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 | 64c235e4c68a8f2bad5d26ea429b91b4e83f1de6 (patch) | |
tree | 403e50b67fd807a6203dcbee447acce287419b42 /clang/test/Sema/format-strings.c | |
parent | fd3b4e739012b95bf981bbe79702a6a955578ca3 (diff) | |
download | bcm5719-llvm-64c235e4c68a8f2bad5d26ea429b91b4e83f1de6.tar.gz bcm5719-llvm-64c235e4c68a8f2bad5d26ea429b91b4e83f1de6.zip |
Extend format string type-checking to include '%p'. Fixes remaining cases PR 4468.
llvm-svn: 106151
Diffstat (limited to 'clang/test/Sema/format-strings.c')
-rw-r--r-- | clang/test/Sema/format-strings.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c index d6d37961d92..72aa5927c30 100644 --- a/clang/test/Sema/format-strings.c +++ b/clang/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}} |