blob: c1d1b536fc6960040e8e6a8b5f961150f0a91e28 [file] [log] [blame]
Ryan Flynn478fbc62009-07-25 22:29:44 +00001// RUN: clang-cc -fsyntax-only -verify %s
2
3void foo();
4void foo() __attribute__((unused));
5void foo() __attribute__((unused));
6void foo(){} // expected-note {{previous definition is here}}
7void foo() __attribute__((constructor)); // expected-warning {{must precede definition}}
8void foo();
9
10int bar;
11extern int bar;
12int bar;
13int bar __attribute__((weak));
14int bar __attribute__((used));
15extern int bar __attribute__((weak));
16int bar = 0; // expected-note {{previous definition is here}}
17int bar __attribute__((weak)); // expected-warning {{must precede definition}}
18int bar;
19