diff options
author | Anders Carlsson <andersca@mac.com> | 2009-06-28 19:55:58 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-06-28 19:55:58 +0000 |
commit | d966a55bccae13f34d18958877c5e71dd643a125 (patch) | |
tree | d5071b0aa53443bec5655d8d1265f3df3b9b364d /test | |
parent | ae0b24376708657a16ff57227241ea86dc4f062b (diff) |
Move the check for vprintf* functions inside of SemaCheckStringLiteral. Fixes PR4470.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74413 91177308-0d34-0410-b5e6-96231b3b80d8
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); +} |