[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D120949#3417545 , @ajohnson-uoregon wrote: > Okay, I put the assert back in and made a thing similar to HasSizeMatcher > that works and all the tests pass. > > What do you mean by a release note, in the commit message,

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-30 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 419248. ajohnson-uoregon added a comment. Okay, I put the assert back in and made a thing similar to HasSizeMatcher that works and all the tests pass. What do you mean by a release note, in the commit message, in the docs...? Repository: rG LLVM

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add a release note for the changes? Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:7800 + attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), + [&](const Attr *A) {

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-25 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 418341. ajohnson-uoregon added a comment. updating commit message of last commit to be more accurate Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files:

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-25 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 418338. ajohnson-uoregon added a comment. I overloaded hasAttr and had to fix a couple CUDA tests to explicitly use the decl overload (the other tests for hasAttr did this already, so I think it was just a mistake in those tests). I also had to rem

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2733 +/// \endcode +AST_MATCHER_P(AttributedStmt, isAttr, attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), ajohnson-uoregon wrote: > aaron.ballman wrote:

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-14 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon added a comment. (.. I just figured out where the 'submit' button is. My comment on 2713-2714 is from like, 5 days ago. Oops. 🙃 ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-14 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2733 +/// \endcode +AST_MATCHER_P(AttributedStmt, isAttr, attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), aaron.ballman wrote: > sammccall wrote: > >

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2713-2714 +/// \endcode +extern const internal::VariadicDynCastAllOfMatcher +attributedStmt; + sammccall wrote: > aaron.ballman wrote: > > sammccall wrote: > > > jd

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2713-2714 +/// \endcode +extern const internal::VariadicDynCastAllOfMatcher +attributedStmt; + aaron.ballman wrote: > sammccall wrote: > > jdoerfert wrote: > > > aaron.

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2733 +/// \endcode +AST_MATCHER_P(AttributedStmt, isAttr, attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), sammccall wrote: > This definitely seems more

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-09 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2733 +/// \endcode +AST_MATCHER_P(AttributedStmt, isAttr, attr::Kind, AttrKind) { + return llvm::any_of(Node.getAttrs(), This definitely seems more like `hasAttr` than `is

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-08 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 413962. ajohnson-uoregon added a comment. Figuring out git-clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/docs/LibASTMatchersRef

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-07 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:2713-2714 +/// \endcode +extern const internal::VariadicDynCastAllOfMatcher +attributedStmt; + aaron.ballman wrote: > Design-wise, I'm on the fence here. AST matchers m

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-07 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 413696. ajohnson-uoregon added a comment. Somehow got other edits into ASTMatcher.h, dunno how, it's fixed now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-07 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 413693. ajohnson-uoregon added a comment. Actually has the right doc updates now Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/docs/LibASTMa

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-07 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 413691. ajohnson-uoregon marked 5 inline comments as done. ajohnson-uoregon added a comment. update with fixes from Aaron, tests, and docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ http

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: sammccall. aaron.ballman added a comment. In D120949#3358707 , @ajohnson-uoregon wrote: > Okay this is actually the right commits now, sorry about the spam, Aaron. 🙃 > Didn't realize I'd put unrelated things in the firs

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412901. ajohnson-uoregon added a comment. making clang-format happy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/include/clang/ASTMatchers/

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon added a comment. Okay this is actually the right commits now, sorry about the spam, Aaron. 🙃 Didn't realize I'd put unrelated things in the first commit. The names for isAttr and hasSubStmt are up for debate, I just picked things that were close enough and weren't already in us

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412883. ajohnson-uoregon added a comment. getting the commit range right, finally Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/include/clan

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412882. ajohnson-uoregon added a comment. had to split a commit because past me messed up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang-tool

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412879. ajohnson-uoregon added a comment. Herald added a reviewer: aaron.ballman. maybe this will work Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files:

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412878. ajohnson-uoregon added a comment. arcanist why Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/include/clang/ASTMatchers/ASTMatchers.h

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412877. ajohnson-uoregon added a comment. updated resolution rules to try to get right commits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412875. ajohnson-uoregon added a comment. Still trying to get right commits, apologies XD Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang-tool

[PATCH] D120949: [clang][AST matchers] adding attributedStmt AST matcher

2022-03-03 Thread Alister Johnson via Phabricator via cfe-commits
ajohnson-uoregon updated this revision to Diff 412873. ajohnson-uoregon added a comment. Still doesn't have right files/commits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120949/new/ https://reviews.llvm.org/D120949 Files: clang/include/clang