Skip to content

Commit 6badd3c

Browse files
committed
[ASTMatchers] Fix documentation for hasAnyBody matcher
Looks like a oversight when the matcher was added. Reviewed By: steveire Differential Revision: https://reviews.llvm.org/D98583
1 parent a149812 commit 6badd3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/docs/LibASTMatchersReference.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7509,7 +7509,7 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2>
75097509
void f();
75107510
void f() {}
75117511
void g();
7512-
hasAnyBody(functionDecl())
7512+
functionDecl(hasAnyBody(compoundStmt()))
75137513
matches both 'void f();'
75147514
and 'void f() {}'
75157515
with compoundStmt()

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5217,7 +5217,7 @@ AST_POLYMORPHIC_MATCHER_P(hasBody,
52175217
/// void f() {}
52185218
/// void g();
52195219
/// \endcode
5220-
/// hasAnyBody(functionDecl())
5220+
/// functionDecl(hasAnyBody(compoundStmt()))
52215221
/// matches both 'void f();'
52225222
/// and 'void f() {}'
52235223
/// with compoundStmt()

0 commit comments

Comments
 (0)