[clang] [Clang] Implement consteval blocks for C++26 (PR #188665)

Corentin Jabot via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 02:57:02 PDT 2026


================
@@ -1434,6 +1445,9 @@ ExprResult Parser::ParseLambdaExpressionAfterIntroducer(
       TrailingReturnTypeLoc = Range.getBegin();
       if (Range.getEnd().isValid())
         DeclEndLoc = Range.getEnd();
+    } else if (ConstevalBlockStart.isValid()) {
+      TrailingReturnType = ParsedType::make(Actions.Context.VoidTy);
+      TrailingReturnTypeLoc = ConstevalBlockStart;
----------------
cor3ntin wrote:

this implies you can write `consteval noexcept {}` - I don;t think you can actually get there but it's unnecessary work / dead code

https://github.com/llvm/llvm-project/pull/188665


More information about the cfe-commits mailing list