From: Aaron Ballman Date: Tue, 10 Jan 2023 14:53:19 +0000 (-0500) Subject: Correct documentation for the hasBody() AST matcher; NFC X-Git-Tag: upstream/17.0.6~21545 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f30257ea9f34b36597067554a45a266dc914b5a7;p=platform%2Fupstream%2Fllvm.git Correct documentation for the hasBody() AST matcher; NFC Note, when regenerating the documentation for this change, no changes were made to the HTML file. There is an existing bug with the AST matcher python script that fails to handle hasBody() specifically. So this commit is to correct the internal documentation but another change will be needed to fix the public documentation. --- diff --git a/clang/include/clang/ASTMatchers/ASTMatchers.h b/clang/include/clang/ASTMatchers/ASTMatchers.h index 5d3d458..2046c59d 100644 --- a/clang/include/clang/ASTMatchers/ASTMatchers.h +++ b/clang/include/clang/ASTMatchers/ASTMatchers.h @@ -5468,7 +5468,7 @@ AST_MATCHER_P(ArraySubscriptExpr, hasBase, /// \code /// for (;;) {} /// \endcode -/// hasBody(compoundStmt()) +/// forStmt(hasBody(compoundStmt())) /// matches 'for (;;) {}' /// with compoundStmt() /// matching '{}' @@ -5478,7 +5478,7 @@ AST_MATCHER_P(ArraySubscriptExpr, hasBase, /// void f(); /// void f() {} /// \endcode -/// hasBody(functionDecl()) +/// functionDecl(hasBody(compoundStmt())) /// matches 'void f() {}' /// with compoundStmt() /// matching '{}'