diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2016-09-26 17:04:27 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2016-09-26 17:04:27 +0000 |
commit | a384821bc33f8e8d6fcbf14a3048c11940f2a708 (patch) | |
tree | 1bdbcc9dc1112ba86e18f4a9fcc6223d5d3683b7 /include/clang/ASTMatchers | |
parent | b2c1023a57dfe16e64e14fcd207a82f1571345a1 (diff) |
Complete support for the cxxCtorInitializer() AST matcher so that it can be used as a top-level matcher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282417 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/ASTMatchers')
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchFinder.h | 3 | ||||
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchers.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchFinder.h b/include/clang/ASTMatchers/ASTMatchFinder.h index 2c9a377b52..389af1b6e2 100644 --- a/include/clang/ASTMatchers/ASTMatchFinder.h +++ b/include/clang/ASTMatchers/ASTMatchFinder.h @@ -158,6 +158,8 @@ public: MatchCallback *Action); void addMatcher(const TypeLocMatcher &NodeMatch, MatchCallback *Action); + void addMatcher(const CXXCtorInitializerMatcher &NodeMatch, + MatchCallback *Action); /// @} /// \brief Adds a matcher to execute when running over the AST. @@ -208,6 +210,7 @@ public: std::vector<std::pair<NestedNameSpecifierLocMatcher, MatchCallback *>> NestedNameSpecifierLoc; std::vector<std::pair<TypeLocMatcher, MatchCallback *>> TypeLoc; + std::vector<std::pair<CXXCtorInitializerMatcher, MatchCallback *>> CtorInit; /// \brief All the callbacks in one container to simplify iteration. llvm::SmallPtrSet<MatchCallback *, 16> AllCallbacks; }; diff --git a/include/clang/ASTMatchers/ASTMatchers.h b/include/clang/ASTMatchers/ASTMatchers.h index a45b0bebca..af4cd47d53 100644 --- a/include/clang/ASTMatchers/ASTMatchers.h +++ b/include/clang/ASTMatchers/ASTMatchers.h @@ -125,6 +125,7 @@ typedef internal::Matcher<QualType> TypeMatcher; typedef internal::Matcher<TypeLoc> TypeLocMatcher; typedef internal::Matcher<NestedNameSpecifier> NestedNameSpecifierMatcher; typedef internal::Matcher<NestedNameSpecifierLoc> NestedNameSpecifierLocMatcher; +typedef internal::Matcher<CXXCtorInitializer> CXXCtorInitializerMatcher; /// @} /// \brief Matches any node. |