summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/enable_if.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/enable_if.c')
-rw-r--r--clang/test/Sema/enable_if.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/enable_if.c b/clang/test/Sema/enable_if.c
index 0ee642e2ee7..0cd9c48f42b 100644
--- a/clang/test/Sema/enable_if.c
+++ b/clang/test/Sema/enable_if.c
@@ -136,4 +136,10 @@ void test7() {
void *p3 = (void*)&f3; // expected-error{{address of overloaded function 'f3' does not match required type 'void'}} expected-note@131{{candidate function made ineligible by enable_if}} expected-note@132{{candidate function made ineligible by enable_if}}
void *p4 = (void*)f3; // expected-error{{address of overloaded function 'f3' does not match required type 'void'}} expected-note@131{{candidate function made ineligible by enable_if}} expected-note@132{{candidate function made ineligible by enable_if}}
}
+
+void f4(int m) __attribute__((enable_if(0, "")));
+void test8() {
+ void (*p1)(int) = &f4; // expected-error{{cannot take address of function 'f4' becuase it has one or more non-tautological enable_if conditions}}
+ void (*p2)(int) = f4; // expected-error{{cannot take address of function 'f4' becuase it has one or more non-tautological enable_if conditions}}
+}
#endif
OpenPOWER on IntegriCloud