diff options
Diffstat (limited to 'include/clang/ASTMatchers/ASTMatchFinder.h')
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchFinder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchFinder.h b/include/clang/ASTMatchers/ASTMatchFinder.h index 042408859c9d..389af1b6e259 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; }; @@ -229,6 +232,10 @@ private: /// Multiple results occur when using matchers like \c forEachDescendant, /// which generate a result for each sub-match. /// +/// If you want to find all matches on the sub-tree rooted at \c Node (rather +/// than only the matches on \c Node itself), surround the \c Matcher with a +/// \c findAll(). +/// /// \see selectFirst /// @{ template <typename MatcherT, typename NodeT> |