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

Evgeny Shulgin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 18 14:42:34 PST 2022


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 there is no `isCXX23orLater()` method. The `is consteval` construction seems to be backported to C++20 in clang, as it compiles and just emits a warning
```
warning: consteval if is a C++2b extension [-Wc++2b-extensions]
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117613



More information about the cfe-commits mailing list