Skip to content

Commit 18b0083

Browse files
committed
move tests
1 parent b5b6ddc commit 18b0083

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

clang/lib/Parse/ParseExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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();

clang/test/CXX/stmt.stmt/stmt.select/stmt.if/p2.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
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
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
}

0 commit comments

Comments
 (0)