diff options
author | Volodymyr Sapsai <vsapsai@gmail.com> | 2016-10-10 22:52:04 -0700 |
---|---|---|
committer | Volodymyr Sapsai <vsapsai@gmail.com> | 2016-10-10 22:52:04 -0700 |
commit | cf4d4963196a7b66b6ccf8f2eb37d7f71882eb5b (patch) | |
tree | cf3c7db9548b4ba5ab6170d83b498f7b3f517e25 | |
parent | 3e98eed9c702296cc6ed9897eaf42c8fa1fa1834 (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.cc | 2 | ||||
-rw-r--r-- | iwyu_location_util.h | 3 |
2 files changed, 2 insertions, 3 deletions
@@ -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 |