summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-attribute.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/format-attribute.c')
-rw-r--r--clang/test/Sema/format-attribute.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/format-attribute.c b/clang/test/Sema/format-attribute.c
index 0b166e3c4dc..df3e4b59591 100644
--- a/clang/test/Sema/format-attribute.c
+++ b/clang/test/Sema/format-attribute.c
@@ -14,3 +14,6 @@ void g(xpto c) __attribute__((format(printf, 1, 0))); // no-error
void y(char *str) __attribute__((format(strftime, 1,0))); // no-error
void z(char *str, int c, ...) __attribute__((format(strftime, 1,2))); // expected-error {{strftime format attribute requires 3rd parameter to be 0}}
+
+int (*f_ptr)(char*,...) __attribute__((format(printf, 1,2))); // no-error
+int (*f2_ptr)(double,...) __attribute__((format(printf, 1, 2))); // expected-error {{format argument not a string type}}
OpenPOWER on IntegriCloud