blob: fdabf7ff2ad53763bdd5a092137b00a8dab73df7 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -verify -fsyntax-only %s
Daniel Dunbarb805dad2009-02-13 19:23:53 +00002
Daniel Dunbar186204b2009-02-13 22:48:56 +00003extern int l0 __attribute__((used)); // expected-warning {{used attribute ignored}}
4__private_extern__ int l1 __attribute__((used)); // expected-warning {{used attribute ignored}}
5
Daniel Dunbarb805dad2009-02-13 19:23:53 +00006struct __attribute__((used)) s { // expected-warning {{'used' attribute only applies to variable and function types}}
7 int x;
8};
9
10int a __attribute__((used));
11
12static void __attribute__((used)) f0(void) {
13}
14
15void f1() {
16 static int a __attribute__((used));
17 int b __attribute__((used)); // expected-warning {{used attribute ignored}}
18}
19
20