summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@gmail.com>2016-10-10 22:52:04 -0700
committerVolodymyr Sapsai <vsapsai@gmail.com>2016-10-10 22:52:04 -0700
commitcf4d4963196a7b66b6ccf8f2eb37d7f71882eb5b (patch)
treecf3c7db9548b4ba5ab6170d83b498f7b3f517e25
parent3e98eed9c702296cc6ed9897eaf42c8fa1fa1834 (diff)
Update to reflect changes in Clang.
In r283766 started using unique_ptr instead of raw pointers in the late-parsed templates map. In r283815 changed FileEntry::Name from raw pointer to StringRef.
-rw-r--r--iwyu.cc2
-rw-r--r--iwyu_location_util.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/iwyu.cc b/iwyu.cc
index aac899d..ee2da4a 100644
--- a/iwyu.cc
+++ b/iwyu.cc
@@ -3553,7 +3553,7 @@ class IwyuAstConsumer
// Force parsing and AST building of the yet-uninstantiated function
// template body.
- clang::LateParsedTemplate* lpt = sema.LateParsedTemplateMap[fd];
+ clang::LateParsedTemplate* lpt = sema.LateParsedTemplateMap[fd].get();
sema.LateTemplateParser(sema.OpaqueParser, *lpt);
}
}
diff --git a/iwyu_location_util.h b/iwyu_location_util.h
index 1fd2a14..3892a42 100644
--- a/iwyu_location_util.h
+++ b/iwyu_location_util.h
@@ -78,8 +78,7 @@ inline bool IsBuiltinFile(const clang::FileEntry* file) {
// IsBuiltinOrCommandLineFile(file) returns true if it's either of the
// two cases.
inline bool IsBuiltinOrCommandLineFile(const clang::FileEntry* file) {
- return IsBuiltinFile(file) ||
- (strcmp(file->getName(), "<command line>") == 0);
+ return IsBuiltinFile(file) || file->getName().equals("<command line>");
}
// When macro args are concatenated e.g. '#define CAT(A, B) A##B', their