blob: 353a5702eafab63181cee89c3e015714bf78773c [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only
Steve Naroffd8eb4562009-03-13 16:03:38 +00002
Chris Lattnere0303582010-01-09 20:43:19 +00003void xx();
4
Steve Naroffd8eb4562009-03-13 16:03:38 +00005int a() {
6 A:if (1) xx();
7 return ^{A:return 1;}();
8}
9int b() {
10 A: return ^{int a; A:return 1;}();
11}
12
13int d() {
14 A: return ^{int a; A: a = ^{int a; A:return 1;}() + ^{int b; A:return 2;}(); return a; }();
15}
16
17int c() {
18 goto A; return ^{ A:return 1;}(); // expected-error {{use of undeclared label 'A'}}
19}