1 // RUN: %clang_cc1 -fsyntax-only %s -include %s -verify 2 // RUN: %clang_cc1 -Wpedantic -fsyntax-only %s -include %s -verify -DWARN_PEDANTIC 3 4 #ifndef enable_if_ext_included 5 #define enable_if_ext_included 6 7 #if !defined(WARN_PEDANTIC) 8 // expected-no-diagnostics 9 #endif 10 11 __attribute__ (( enable_if(1, "") )) 12 #if defined(WARN_PEDANTIC) 13 // expected-warning@-2 {{'enable_if' is a clang extension}} 14 #endif f()15void f() { } 16 17 __attribute__ (( __enable_if__(1, "") )) 18 #if defined(WARN_PEDANTIC) 19 // expected-warning@-2 {{'enable_if' is a clang extension}} 20 #endif g()21void g() { } 22 23 __attribute__ (( enable_if(0, "") )) 24 #if defined(WARN_PEDANTIC) 25 // expected-warning@-2 {{'enable_if' is a clang extension}} 26 #endif h()27void h() { } 28 29 __attribute__ (( __enable_if__(0, "") )) 30 #if defined(WARN_PEDANTIC) 31 // expected-warning@-2 {{'enable_if' is a clang extension}} 32 #endif i()33void i() { } 34 35 #pragma clang system_header 36 37 __attribute__ (( enable_if(1, "") )) j()38void j() { } 39 40 __attribute__ (( __enable_if__(1, "") )) k()41void k() { } 42 43 __attribute__ (( enable_if(0, "") )) l()44void l() { } 45 46 __attribute__ (( __enable_if__(0, "") )) m()47void m() { } 48 49 #endif 50 51