From f30257ea9f34b36597067554a45a266dc914b5a7 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 10 Jan 2023 09:53:19 -0500 Subject: [PATCH] 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. --- clang/include/clang/ASTMatchers/ASTMatchers.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 '{}' -- 2.7.4