[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In D117613#3258886 , @Izaron wrote: > In D117613#3258854 , @aaron.ballman > wrote: > >> LGTM! Do you need someone to commit on your behalf? If

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. In D117613#3258854 , @aaron.ballman wrote: > LGTM! Do you need someone to commit on your behalf? If so, what name and > email address would you like used for patch attribution? Sorry, I should have set the Author property of

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. Thanks! Let's see if docs are more explicit and nicer now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117613/new/ https://reviews.llvm.org/D117613 ___ cfe-commits mailing list

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 401679. Izaron added a comment. Fixed: make docs more explicit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117613/new/ https://reviews.llvm.org/D117613 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 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 with a minor adjustment to the documentation. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5173 +/// Matches consteval function

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5179 +/// consteval int bar(); +/// void baz() { if consteval {} } +/// \endcode cor3ntin wrote: > aaron.ballman wrote: > > cor3ntin wrote: > > > Izaron wrote: > >

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5179 +/// consteval int bar(); +/// void baz() { if consteval {} } +/// \endcode aaron.ballman wrote: > cor3ntin wrote: > > Izaron wrote: > > > aaron.ballman wrote: > >

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5179 +/// consteval int bar(); +/// void baz() { if consteval {} } +/// \endcode

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5179 +/// consteval int bar(); +/// void baz() { if consteval {} } +/// \endcode Izaron wrote: > aaron.ballman wrote: > > It'd be good to show an example of: > > ``` >

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-19 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron marked 4 inline comments as done. Izaron added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5179 +/// consteval int bar(); +/// void baz() { if consteval {} } +/// \endcode aaron.ballman wrote: > It'd be good to show an

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-19 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 401365. Izaron added a comment. Fixed commit (with clang-format) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117613/new/ https://reviews.llvm.org/D117613 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-19 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 401363. Izaron added a comment. Fixed commit Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117613/new/ https://reviews.llvm.org/D117613 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: cor3ntin, sammccall. aaron.ballman added a comment. Adding a few more reviewers in case there are differing opinions. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:5173-5174 +/// Matches consteval function declarations, +///

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-18 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1807 +TEST_P(ASTMatchersTest, IsConsteval_MatchesIfConsteval) { + if (!GetParam().isCXX20OrLater()) { +return; Actually `if consteval` is a C++23 feature, but

[PATCH] D117613: [ASTMatchers] Add `isConsteval` matcher

2022-01-18 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added a reviewer: aaron.ballman. Izaron requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Support C++20 `consteval` functions and C++2b `if consteval` for AST Matchers. Repository: rG LLVM Github