diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /tools/libclang/Indexing.cpp | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) |
Notes
Diffstat (limited to 'tools/libclang/Indexing.cpp')
-rw-r--r-- | tools/libclang/Indexing.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp index 20f4474a1ee8..0ede684a18e4 100644 --- a/tools/libclang/Indexing.cpp +++ b/tools/libclang/Indexing.cpp @@ -284,10 +284,10 @@ public: /// MacroUndefined - This hook is called whenever a macro #undef is seen. /// MI is released immediately following this callback. void MacroUndefined(const Token &MacroNameTok, - const MacroDirective *MD) override {} + const MacroDefinition &MD) override {} /// MacroExpands - This is called by when a macro invocation is found. - void MacroExpands(const Token &MacroNameTok, const MacroDirective *MD, + void MacroExpands(const Token &MacroNameTok, const MacroDefinition &MD, SourceRange Range, const MacroArgs *Args) override {} /// SourceRangeSkipped - This hook is called when a source range is skipped. @@ -697,13 +697,8 @@ static void indexPreprocessingRecord(ASTUnit &Unit, IndexingContext &IdxCtx) { // FIXME: Only deserialize inclusion directives. - PreprocessingRecord::iterator I, E; - std::tie(I, E) = Unit.getLocalPreprocessingEntities(); - bool isModuleFile = Unit.isModuleFile(); - for (; I != E; ++I) { - PreprocessedEntity *PPE = *I; - + for (PreprocessedEntity *PPE : Unit.getLocalPreprocessingEntities()) { if (InclusionDirective *ID = dyn_cast<InclusionDirective>(PPE)) { SourceLocation Loc = ID->getSourceRange().getBegin(); // Modules have synthetic main files as input, give an invalid location |