From: Nathan James Date: Mon, 15 Mar 2021 13:06:48 +0000 (+0000) Subject: [ASTMatchers] Fix documentation for hasAnyBody matcher X-Git-Tag: llvmorg-14-init~12361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6badd3c52dc8a9c0a253a48722c569beeeefea4f;p=platform%2Fupstream%2Fllvm.git [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 --- diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index 0becf5e..0d2570b 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -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() diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index 885bc74..64e8cec 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -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()