summaryrefslogtreecommitdiffstats
path: root/test/Sema/attr-format.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/attr-format.c')
-rw-r--r--test/Sema/attr-format.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Sema/attr-format.c b/test/Sema/attr-format.c
index 21d9585..3ea9d79 100644
--- a/test/Sema/attr-format.c
+++ b/test/Sema/attr-format.c
@@ -57,6 +57,13 @@ void callnull(void){
null(0, (int*)0); // expected-warning {{incompatible pointer types}}
}
+// FreeBSD kernel extensions
+void a3(const char *a, ...) __attribute__((format(freebsd_kprintf, 1,2))); // no-error
+void b3(const char *a, ...) __attribute__((format(freebsd_kprintf, 1,1))); // expected-error {{'format' attribute parameter 3 is out of bounds}}
+void c3(const char *a, ...) __attribute__((format(freebsd_kprintf, 0,2))); // expected-error {{'format' attribute parameter 2 is out of bounds}}
+void d3(const char *a, int c) __attribute__((format(freebsd_kprintf, 1,2))); // expected-error {{format attribute requires variadic function}}
+void e3(char *str, int c, ...) __attribute__((format(freebsd_kprintf, 2,3))); // expected-error {{format argument not a string type}}
+
// PR4470
OpenPOWER on IntegriCloud