diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Sema/format-attr-pr4470.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Sema/format-attr-pr4470.c b/test/Sema/format-attr-pr4470.c new file mode 100644 index 0000000000..cba3adf1d6 --- /dev/null +++ b/test/Sema/format-attr-pr4470.c @@ -0,0 +1,11 @@ +// RUN: clang-cc -fsyntax-only -verify -Wformat=2 %s + +#include <stdio.h> + +const char *foo(const char *format) __attribute__((format_arg(1))); + +void __attribute__((format(printf, 1, 0))) +foo2(const char *fmt, va_list va) +{ + vprintf(foo(fmt), va); +} |