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
11 __attribute__ (( enable_if(1, "") ))
12 #if defined(WARN_PEDANTIC)
13 // expected-warning@-2 {{'enable_if' is a clang extension}}
17 __attribute__ (( __enable_if__(1, "") ))
18 #if defined(WARN_PEDANTIC)
19 // expected-warning@-2 {{'enable_if' is a clang extension}}
23 __attribute__ (( enable_if(0, "") ))
24 #if defined(WARN_PEDANTIC)
25 // expected-warning@-2 {{'enable_if' is a clang extension}}
29 __attribute__ (( __enable_if__(0, "") ))
30 #if defined(WARN_PEDANTIC)
31 // expected-warning@-2 {{'enable_if' is a clang extension}}
35 #pragma clang system_header
37 __attribute__ (( enable_if(1, "") ))
40 __attribute__ (( __enable_if__(1, "") ))
43 __attribute__ (( enable_if(0, "") ))
46 __attribute__ (( __enable_if__(0, "") ))