[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 12:04:00 PST 2023


aaron.ballman added a comment.

Thank you for this! FWIW, it looks like precommit CI found some issues that need to be resolved.



================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5503
+                                                          FunctionDecl,
+                                                          CoroutineBodyStmt),
                           internal::Matcher<Stmt>, InnerMatcher) {
----------------
I'm not certain it makes sense to me to add `CoroutineBodyStmt` to `hasBody` -- in this case, it doesn't *have* a body, it *is* the body.


================
Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:171
   REGISTER_MATCHER(compoundStmt);
+  REGISTER_MATCHER(coroutineBodyStmt);
   REGISTER_MATCHER(coawaitExpr);
----------------
Please keep this sorted alphabetically.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140794



More information about the cfe-commits mailing list