Argyrios Kyrtzidis | 355a9fe | 2010-09-19 21:21:25 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s |
| 2 | |
| 3 | void f() { |
| 4 | a: |
| 5 | goto a; |
| 6 | b: // expected-warning{{unused}} |
Chris Lattner | 57ad378 | 2011-02-17 20:34:02 +0000 | [diff] [blame] | 7 | c: __attribute__((unused)); |
| 8 | d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}} |
Argyrios Kyrtzidis | 1a18600 | 2010-09-28 14:54:07 +0000 | [diff] [blame] | 9 | goto d; |
Argyrios Kyrtzidis | 355a9fe | 2010-09-19 21:21:25 +0000 | [diff] [blame] | 10 | return; |
| 11 | } |