]> granicus.if.org Git - clang/commitdiff
[ASTMatchers] Extend documentation for match()
authorMartin Bohme <mboehme@google.com>
Wed, 10 Aug 2016 11:22:57 +0000 (11:22 +0000)
committerMartin Bohme <mboehme@google.com>
Wed, 10 Aug 2016 11:22:57 +0000 (11:22 +0000)
Summary:
Adds an explanation of how to use findAll() to find all matches in a subtree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278213 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/ASTMatchers/ASTMatchFinder.h

index 042408859c9de3d7de628acd22d58566f01bced2..2c9a377b5286dc5caff26404e5571c84df3fb21e 100644 (file)
@@ -229,6 +229,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>