fix __attribute__(format) for struct function pointer fields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49938 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/format-attribute.c b/test/Sema/format-attribute.c
index df3e4b5..8eefe3f 100644
--- a/test/Sema/format-attribute.c
+++ b/test/Sema/format-attribute.c
@@ -17,3 +17,8 @@
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}}
+
+struct _mystruct {
+ int (*printf)(const char *format, ...) __attribute__((__format__(printf, 1, 2))); // no-error
+ int (*printf2)(double format, ...) __attribute__((__format__(printf, 1, 2))); // expected-error {{format argument not a string type}}
+};