File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
CXX/stmt.stmt/stmt.select/stmt.if Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -3342,7 +3342,7 @@ ExprResult Parser::ParseBlockLiteralExpression() {
33423342 Actions.ActOnBlockError (CaretLoc, getCurScope ());
33433343 return ExprError ();
33443344 }
3345- EnterExpressionEvaluationContextForFunction PotentiallyEvaluated (
3345+ EnterExpressionEvaluationContextForFunction PotentiallyEvaluated (
33463346 Actions, Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
33473347 StmtResult Stmt (ParseCompoundStatementBody ());
33483348 BlockScope.Exit ();
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -std=c++1z -verify %s
2- // RUN: %clang_cc1 -std=c++1z -fblocks -verify %s -DBLOCK_TEST
32// RUN: %clang_cc1 -std=c++1z -verify %s -DUNDEFINED
43
54#ifdef UNDEFINED
@@ -255,15 +254,6 @@ namespace GH153884 {
255254 // expected-note@-1 {{in instantiation of function template specialization 'GH153884::f2()}}
256255 return false ;
257256 }
258-
259- #if BLOCK_TEST
260- void block_receiver (int (^)() );
261- int f3 () {
262- if constexpr (0 )
263- (block_receiver)(^{ return 2 ; });
264- return 1 ;
265- }
266- #endif
267257}
268258
269259#endif
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