summaryrefslogtreecommitdiff
path: root/test/Sema/format-attribute-printf0.c
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-04-02 08:55:10 +0000
commit11d2b2d2bb706fca0656f2760839721bb7f6cb6f (patch)
treed374cdca417e76f1bf101f139dba2db1d10ee8f7 /test/Sema/format-attribute-printf0.c
parentc0c7bca4e5b8d12699dc93a0da49e9e4bb79671b (diff)
Notes
Diffstat (limited to 'test/Sema/format-attribute-printf0.c')
-rw-r--r--test/Sema/format-attribute-printf0.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/test/Sema/format-attribute-printf0.c b/test/Sema/format-attribute-printf0.c
deleted file mode 100644
index 33e8d40076dc0..0000000000000
--- a/test/Sema/format-attribute-printf0.c
+++ /dev/null
@@ -1,26 +0,0 @@
-//RUN: %clang_cc1 -fsyntax-only -verify %s
-
-#include <stdarg.h>
-
-// same as format(printf(...))...
-void a2(const char *a, ...) __attribute__((format(printf0, 1,2))); // no-error
-void b2(const char *a, ...) __attribute__((format(printf0, 1,1))); // expected-error {{'format' attribute parameter 3 is out of bounds}}
-void c2(const char *a, ...) __attribute__((format(printf0, 0,2))); // expected-error {{'format' attribute parameter 2 is out of bounds}}
-void d2(const char *a, int c) __attribute__((format(printf0, 1,2))); // expected-error {{format attribute requires variadic function}}
-void e2(char *str, int c, ...) __attribute__((format(printf0, 2,3))); // expected-error {{format argument not a string type}}
-
-// FreeBSD usage
-#define __printf0like(fmt,va) __attribute__((__format__(__printf0__,fmt,va)))
-void null(int i, const char *a, ...) __printf0like(2,0); // no-error
-void null(int i, const char *a, ...) {
- if (a)
- (void)0/* vprintf(...) would go here */;
-}
-
-void callnull(void){
- null(0, 0); // no error
- null(0, (char*)0); // no error
- null(0, (void*)0); // no error
- null(0, (int*)0); // expected-warning {{incompatible pointer types}}
-}
-