aboutsummaryrefslogtreecommitdiff
path: root/test/Sema
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-28 14:54:07 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2010-09-28 14:54:07 +0000
commit1a18600b85aaa691122983dd8dcf4225cfc9ef68 (patch)
treeae18cba7044d0436807c534f49996cc0ca91e3c0 /test/Sema
parentedadecc012dd6bc0bb008a89f0eaccd5c4c1ff64 (diff)
Don't warn for an unused label if it has 'unused' attribute. Fixes rdar://8483139.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema')
-rw-r--r--test/Sema/warn-unused-label.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/warn-unused-label.c b/test/Sema/warn-unused-label.c
index b5979be264..163446002e 100644
--- a/test/Sema/warn-unused-label.c
+++ b/test/Sema/warn-unused-label.c
@@ -4,5 +4,8 @@ void f() {
a:
goto a;
b: // expected-warning{{unused}}
+ c: __attribute__((unused));
+ d: __attribute__((noreturn)); // expected-warning {{The only valid attribute for labels is 'unused'}}
+ goto d;
return;
}