blob: 9abe2731c08eff85c565b27b6dae3b05feef0316 [file] [log] [blame]
Douglas Gregor8f301052009-02-24 19:23:27 +00001// RUN: clang -fsyntax-only -verify %s
2
3int outer1; // expected-note{{previous definition is here}}
4extern int outer2; // expected-note{{previous definition is here}}
5int outer4;
6int outer4; // expected-note{{previous definition is here}}
7int outer5;
8int outer6(float); // expected-note{{previous definition is here}}
9int outer7(float);
10
11void outer_test() {
12 extern float outer1; // expected-error{{redefinition of 'outer1' with a different type}}
13 extern float outer2; // expected-error{{redefinition of 'outer2' with a different type}}
14 extern float outer3; // expected-note{{previous definition is here}}
15 double outer4;
16 extern int outer5; // expected-note{{previous definition is here}}
17 extern int outer6; // expected-error{{redefinition of 'outer6' as different kind of symbol}}
18 int outer7;
19 extern int outer8; // expected-note{{previous definition is here}}
20 extern int outer9;
21 {
22 extern int outer9; // expected-note{{previous definition is here}}
23 }
24}
25
26int outer3; // expected-error{{redefinition of 'outer3' with a different type}}
27float outer4; // expected-error{{redefinition of 'outer4' with a different type}}
28float outer5; // expected-error{{redefinition of 'outer5' with a different type}}
29int outer8(int); // expected-error{{redefinition of 'outer8' as different kind of symbol}}
30float outer9; // expected-error{{redefinition of 'outer9' with a different type}}