Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -verify -fblocks -fsyntax-only |
Steve Naroff | d8eb456 | 2009-03-13 16:03:38 +0000 | [diff] [blame] | 2 | |
Chris Lattner | e030358 | 2010-01-09 20:43:19 +0000 | [diff] [blame^] | 3 | void xx(); |
| 4 | |
Steve Naroff | d8eb456 | 2009-03-13 16:03:38 +0000 | [diff] [blame] | 5 | int a() { |
| 6 | A:if (1) xx(); |
| 7 | return ^{A:return 1;}(); |
| 8 | } |
| 9 | int b() { |
| 10 | A: return ^{int a; A:return 1;}(); |
| 11 | } |
| 12 | |
| 13 | int d() { |
| 14 | A: return ^{int a; A: a = ^{int a; A:return 1;}() + ^{int b; A:return 2;}(); return a; }(); |
| 15 | } |
| 16 | |
| 17 | int c() { |
| 18 | goto A; return ^{ A:return 1;}(); // expected-error {{use of undeclared label 'A'}} |
| 19 | } |