diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-13 16:06:05 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-13 16:06:05 +0000 |
commit | 42ae3e81a811362c0bf78deb71b72455aadff772 (patch) | |
tree | 6a8bf1a238b7bada88d38f42b7c1dda99f5b920e /test/Sema/format-strings.c | |
parent | 2033a95c9b2692441ce0de790f0d8bbe01722c7f (diff) |
Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < NumArgs && "Arg access out of range!").
For format string checking, only check the type of the format
specifier for non-vararg functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71672 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index 50903b0cf8..1826c7457e 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -125,3 +125,8 @@ void test9(char *P) { printf(P, 42); printf("%n", &x); // expected-warning {{use of '%n' in format string discouraged }} } + +void torture(va_list v8) { + vprintf ("%*.*d", v8); // no-warning +} + |