summaryrefslogtreecommitdiffstats
path: root/test/Sema/block-labels.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/block-labels.c')
-rw-r--r--test/Sema/block-labels.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/Sema/block-labels.c b/test/Sema/block-labels.c
index 353a570..d1b60cc 100644
--- a/test/Sema/block-labels.c
+++ b/test/Sema/block-labels.c
@@ -3,8 +3,12 @@
void xx();
int a() {
- A:if (1) xx();
- return ^{A:return 1;}();
+ A:
+
+ if (1) xx();
+ return ^{
+ A: return 1;
+ }();
}
int b() {
A: return ^{int a; A:return 1;}();
@@ -15,5 +19,9 @@ int d() {
}
int c() {
- goto A; return ^{ A:return 1;}(); // expected-error {{use of undeclared label 'A'}}
+ goto A; // expected-error {{use of undeclared label 'A'}}
+ return ^{
+ A:
+ return 1;
+ }();
}
OpenPOWER on IntegriCloud