Allow matchers to access the ASTContext.
Patch by Edwin Vane.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169000 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ASTMatchers/ASTMatchFinder.cpp b/lib/ASTMatchers/ASTMatchFinder.cpp
index 04a2b35..c13cf4a 100644
--- a/lib/ASTMatchers/ASTMatchFinder.cpp
+++ b/lib/ASTMatchers/ASTMatchFinder.cpp
@@ -475,6 +475,9 @@
return false;
}
+ // Implements ASTMatchFinder::getASTContext.
+ virtual ASTContext &getASTContext() const { return *ActiveASTContext; }
+
bool shouldVisitTemplateInstantiations() const { return true; }
bool shouldVisitImplicitCode() const { return true; }
// Disables data recursion. We intercept Traverse* methods in the RAV, which