annotate clang/test/Sema/warn-unused-label.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 void f() {
anatofuz
parents:
diff changeset
4 a:
anatofuz
parents:
diff changeset
5 goto a;
anatofuz
parents:
diff changeset
6 b: // expected-warning{{unused}}
anatofuz
parents:
diff changeset
7 c: __attribute__((unused));
anatofuz
parents:
diff changeset
8 d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}}
anatofuz
parents:
diff changeset
9 goto d;
anatofuz
parents:
diff changeset
10 return;
anatofuz
parents:
diff changeset
11 }
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 void PR8455() {
anatofuz
parents:
diff changeset
14 L: __attribute__((unused)) return; // ok, no semicolon required
anatofuz
parents:
diff changeset
15 }