diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ASTMatchers/ASTMatchFinder.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ASTMatchers/ASTMatchFinder.cpp b/lib/ASTMatchers/ASTMatchFinder.cpp index b081f5426e..8ecb26e8c1 100644 --- a/lib/ASTMatchers/ASTMatchFinder.cpp +++ b/lib/ASTMatchers/ASTMatchFinder.cpp @@ -315,6 +315,15 @@ public: ActiveASTContext(NULL) { } + void onStartOfTranslationUnit() { + for (std::vector<std::pair<const internal::DynTypedMatcher*, + MatchCallback*> >::const_iterator + I = MatcherCallbackPairs->begin(), E = MatcherCallbackPairs->end(); + I != E; ++I) { + I->second->onStartOfTranslationUnit(); + } + } + void set_active_ast_context(ASTContext *NewActiveASTContext) { ActiveASTContext = NewActiveASTContext; } @@ -649,6 +658,7 @@ private: ParsingDone->run(); } Visitor.set_active_ast_context(&Context); + Visitor.onStartOfTranslationUnit(); Visitor.TraverseDecl(Context.getTranslationUnitDecl()); Visitor.set_active_ast_context(NULL); } |