diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-06-16 21:23:04 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-06-16 21:23:04 +0000 |
commit | 13927a431dd733336cfd664bf0840747a71b0a43 (patch) | |
tree | 19128d5db391d877d383fcbe96c96d91db94b805 /test/Sema/format-strings.c | |
parent | 3e1274f2b99cb99c03cc8e2c6517c37d330b597a (diff) |
Extend format string type-checking to include '%p'. Fixes remaining cases PR 4468.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index d6d37961d9..72aa5927c3 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -176,6 +176,7 @@ void test10(int x, float f, int i, long long lli) { void test11(void *p, char *s) { printf("%p", p); // no-warning + printf("%p", 123); // expected-warning{{conversion specifies type 'void *' but the argument has type 'int'}} printf("%.4p", p); // expected-warning{{precision used in 'p' conversion specifier (where it has no meaning)}} printf("%+p", p); // expected-warning{{flag '+' results in undefined behavior in 'p' conversion specifier}} printf("% p", p); // expected-warning{{flag ' ' results in undefined behavior in 'p' conversion specifier}} |