[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 589a93907222cf2380198ca2172ff6697dd43d87 , thanks for the new matcher! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117846/new/ https://reviews.llvm.org/D117846

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron marked an inline comment as done. Izaron added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5223 +/// matches the declaration of foo and bar. +AST_MATCHER(VarDecl, isConstinit) { return Node.hasAttr(); } + aaron.ballman wrot

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 402111. Izaron added a comment. Fix: accept only keyword, not the attribute itself Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117846/new/ https://reviews.llvm.org/D117846 Files: clang/docs/LibASTMatchersRe

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5223 +/// matches the declaration of foo and bar. +AST_MATCHER(VarDecl, isConstinit) { return Node.hasAttr(); } + This isn't quite correct -- there are two forms of `

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 401872. Izaron added a comment. Fix clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117846/new/ https://reviews.llvm.org/D117846 Files: clang/docs/LibASTMatchersReference.html clang/docs/ReleaseN

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 401817. Izaron added a comment. Removed the brackets in `{ return }` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117846/new/ https://reviews.llvm.org/D117846 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. I'm going to use this matcher very soon in my new `clang-tidy` check. If you're interested and want to read more, I have a design document about my ne check - here (gist.github.com)

[PATCH] D117846: [ASTMatchers] Add `isConstinit` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: aaron.ballman, cor3ntin. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Support C++20 constinit variables for AST Matchers. Repository: rG LLVM Github Monorepo https://revie