xref: /minix3/external/bsd/llvm/dist/clang/test/Sema/block-labels.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1 // RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only
2 
3 void xx();
4 
a()5 int a() {
6   A:
7 
8   if (1) xx();
9   return ^{
10          A: return 1;
11        }();
12 }
b()13 int b() {
14   A: return ^{int a; A:return 1;}();
15 }
16 
d()17 int d() {
18   A: return ^{int a; A: a = ^{int a; A:return 1;}() + ^{int b; A:return 2;}(); return a; }();
19 }
20 
c()21 int c() {
22   goto A;     // expected-error {{use of undeclared label 'A'}}
23   return ^{
24        A:
25         return 1;
26      }();
27 }
28