[PATCH] D98583: [ASTMatchers] Fix documentation for hasAnyBody matcher

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 15 06:07:00 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6badd3c52dc8: [ASTMatchers] Fix documentation for hasAnyBody matcher (authored by njames93).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98583/new/

https://reviews.llvm.org/D98583

Files:
  clang/docs/LibASTMatchersReference.html
  clang/include/clang/ASTMatchers/ASTMatchers.h


Index: clang/include/clang/ASTMatchers/ASTMatchers.h
===================================================================
--- clang/include/clang/ASTMatchers/ASTMatchers.h
+++ clang/include/clang/ASTMatchers/ASTMatchers.h
@@ -5217,7 +5217,7 @@
 ///   void f() {}
 ///   void g();
 /// \endcode
-/// hasAnyBody(functionDecl())
+/// functionDecl(hasAnyBody(compoundStmt()))
 ///   matches both 'void f();'
 ///   and 'void f() {}'
 /// with compoundStmt()
Index: clang/docs/LibASTMatchersReference.html
===================================================================
--- clang/docs/LibASTMatchersReference.html
+++ clang/docs/LibASTMatchersReference.html
@@ -7509,7 +7509,7 @@
   void f();
   void f() {}
   void g();
-hasAnyBody(functionDecl())
+functionDecl(hasAnyBody(compoundStmt()))
   matches both 'void f();'
   and 'void f() {}'
 with compoundStmt()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98583.330630.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210315/2a534b5d/attachment.bin>


More information about the cfe-commits mailing list