Skip to content

Commit

Permalink
Correct documentation for the hasBody() AST matcher; NFC
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AaronBallman committed Jan 10, 2023
1 parent 95be33f commit f30257e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/include/clang/ASTMatchers/ASTMatchers.h
Expand Up @@ -5468,7 +5468,7 @@ AST_MATCHER_P(ArraySubscriptExpr, hasBase,
/// \code
/// for (;;) {}
/// \endcode
/// hasBody(compoundStmt())
/// forStmt(hasBody(compoundStmt()))
/// matches 'for (;;) {}'
/// with compoundStmt()
/// matching '{}'
Expand All @@ -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 '{}'
Expand Down

0 comments on commit f30257e

Please sign in to comment.