blob: 4d32e0028b542c36cc380f43e287bb0b7951729d [file] [log] [blame]
Shih-wei Liaof8fd82b2010-02-10 11:10:31 -08001// RUN: %clang_cc1 -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