[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / alias-redefinition.c
blob526b67d9be7f29814fd541ec32d2d1cf357cee5c
1 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -Wno-strict-prototypes -fsyntax-only -verify %s
3 void f0() {}
4 void fun0(void) __attribute((alias("f0")));
6 void f1() {}
7 void fun1() {} // expected-note {{previous definition}}
8 void fun1(void) __attribute((alias("f1"))); // expected-error {{redefinition of 'fun1'}}
10 void f2() {}
11 void fun2(void) __attribute((alias("f2"))); // expected-note {{previous definition}}
12 void fun2() {} // expected-error {{redefinition of 'fun2'}}
14 void f3() {}
15 void fun3(void) __attribute((alias("f3"))); // expected-note {{previous definition}}
16 void fun3(void) __attribute((alias("f3"))); // expected-error {{redefinition of 'fun3'}}
18 void f4() {}
19 void fun4(void) __attribute((alias("f4")));
20 void fun4(void);
22 void f5() {}
23 void __attribute((alias("f5"))) fun5(void) {} // expected-error {{definition 'fun5' cannot also be an alias}}
25 int var1 __attribute((alias("v1"))); // expected-error {{definition 'var1' cannot also be an alias}}
26 static int var2 __attribute((alias("v2"))) = 2; // expected-error {{definition 'var2' cannot also be an alias}}
28 extern int var3 __attribute__((alias("C"))); // expected-note{{previous definition is here}}
29 int var3 = 3; // expected-error{{redefinition of 'var3'}}
31 int var4; // expected-note{{previous definition is here}}
32 extern int var4 __attribute__((alias("v4"))); // expected-error{{alias definition of 'var4' after tentative definition}}