[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
This commit is contained in:
Nathan James 2021-03-15 13:06:48 +00:00
parent a149812d0e
commit 6badd3c52d
No known key found for this signature in database
GPG Key ID: CC007AFCDA90AA5F
2 changed files with 2 additions and 2 deletions

View File

@ -7509,7 +7509,7 @@ Given
void f();
void f() {}
void g();
hasAnyBody(functionDecl())
functionDecl(hasAnyBody(compoundStmt()))
matches both 'void f();'
and 'void f() {}'
with compoundStmt()

View File

@ -5217,7 +5217,7 @@ AST_POLYMORPHIC_MATCHER_P(hasBody,
/// void f() {}
/// void g();
/// \endcode
/// hasAnyBody(functionDecl())
/// functionDecl(hasAnyBody(compoundStmt()))
/// matches both 'void f();'
/// and 'void f() {}'
/// with compoundStmt()