[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Sema / enable_if-ext.c
blobbcdf85bf28d0897448d365efe35c98be8643c188
1 // RUN: %clang_cc1 -fsyntax-only %s -include %s -verify
2 // RUN: %clang_cc1 -Wpedantic -fsyntax-only %s -include %s -verify -DWARN_PEDANTIC
4 #ifndef enable_if_ext_included
5 #define enable_if_ext_included
7 #if !defined(WARN_PEDANTIC)
8 // expected-no-diagnostics
9 #endif
11 __attribute__ (( enable_if(1, "") ))
12 #if defined(WARN_PEDANTIC)
13 // expected-warning@-2 {{'enable_if' is a clang extension}}
14 #endif
15 void f(void) { }
17 __attribute__ (( __enable_if__(1, "") ))
18 #if defined(WARN_PEDANTIC)
19 // expected-warning@-2 {{'enable_if' is a clang extension}}
20 #endif
21 void g(void) { }
23 __attribute__ (( enable_if(0, "") ))
24 #if defined(WARN_PEDANTIC)
25 // expected-warning@-2 {{'enable_if' is a clang extension}}
26 #endif
27 void h(void) { }
29 __attribute__ (( __enable_if__(0, "") ))
30 #if defined(WARN_PEDANTIC)
31 // expected-warning@-2 {{'enable_if' is a clang extension}}
32 #endif
33 void i(void) { }
35 #pragma clang system_header
37 __attribute__ (( enable_if(1, "") ))
38 void j(void) { }
40 __attribute__ (( __enable_if__(1, "") ))
41 void k(void) { }
43 __attribute__ (( enable_if(0, "") ))
44 void l(void) { }
46 __attribute__ (( __enable_if__(0, "") ))
47 void m(void) { }
49 #endif