[PATCH] D140794: [ASTMatcher] Add coroutineBodyStmt matcher
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 27 05:10:39 PST 2023
aaron.ballman added a comment.
> Hmmm, I'm coming around to reusing hasBody() like you've done here. I think it's pretty weird to read: functionDecl(hasBody(coroutineBodyStmt(hasBody(stmt().bind(...))) because of the duplicated calls to hasBody, but I think it's more defensible now than I was originally thinking. I'm still curious if other folks who care about AST matchers have an opinion given that this is a bit trickier than usual.
I think I'm okay with this direction, but one last try at pinging @klimek and @sammccall in case they've got an opinion. If we don't hear from them by Thur of this week, I'd say it's fine to move forward with the patch as-is.
================
Comment at: clang/docs/ReleaseNotes.rst:871
+- Add ``coroutineBodyStmt`` matcher.
+
----------------
You should also mention that the `hasBody` matcher now works with coroutine bodies.
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