From 0bbca21c016b51d8019d380edf5879bc7827d0f5 Mon Sep 17 00:00:00 2001 From: Martin Bohme Date: Wed, 10 Aug 2016 11:22:57 +0000 Subject: [PATCH] [ASTMatchers] Extend documentation for match() 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/clang/ASTMatchers/ASTMatchFinder.h b/include/clang/ASTMatchers/ASTMatchFinder.h index 042408859c..2c9a377b52 100644 --- a/include/clang/ASTMatchers/ASTMatchFinder.h +++ b/include/clang/ASTMatchers/ASTMatchFinder.h @@ -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 -- 2.40.0