File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -3380,7 +3380,8 @@ ExprResult Parser::ParseBlockLiteralExpression() {
33803380 Actions.ActOnBlockError (CaretLoc, getCurScope ());
33813381 return ExprError ();
33823382 }
3383-
3383+ EnterExpressionEvaluationContextForFunction PotentiallyEvaluated (
3384+ Actions, Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
33843385 StmtResult Stmt (ParseCompoundStatementBody ());
33853386 BlockScope.Exit ();
33863387 if (!Stmt.isInvalid ())
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -std=c++23 -fsyntax-only -fobjc-arc -fblocks %s
2+
3+ void block_receiver (int (^)() );
4+
5+ int f1 () {
6+ if constexpr (0 )
7+ (block_receiver)(^{ return 2 ; });
8+ return 1 ;
9+ }
10+
11+ int f2 () {
12+ if constexpr (0 )
13+ return (^{ return 2 ; })();
14+ return 1 ;
15+ }
You can’t perform that action at this time.
0 commit comments