summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-strings-c90.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-01-20 21:52:58 +0000
committerTed Kremenek <kremenek@apple.com>2012-01-20 21:52:58 +0000
commite7b9d4342b10d8bff6e0ae38c80ef27877ebd73a (patch)
tree237186f55c12e051db9d57e8a6e5a9075eb4869f /clang/test/Sema/format-strings-c90.c
parent46a9f016c5fca708710e8c791675354cbf51fdfa (diff)
downloadbcm5719-llvm-e7b9d4342b10d8bff6e0ae38c80ef27877ebd73a.tar.gz
bcm5719-llvm-e7b9d4342b10d8bff6e0ae38c80ef27877ebd73a.zip
Tighten format string diagnostic and make it a bit clearer (and a bit closer to GCC's).
llvm-svn: 148579
Diffstat (limited to 'clang/test/Sema/format-strings-c90.c')
-rw-r--r--clang/test/Sema/format-strings-c90.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Sema/format-strings-c90.c b/clang/test/Sema/format-strings-c90.c
index 678a6ef373a..0b32e82d872 100644
--- a/clang/test/Sema/format-strings-c90.c
+++ b/clang/test/Sema/format-strings-c90.c
@@ -21,7 +21,7 @@ void foo(char **sp, float *fp, int *ip) {
scanf("%da", ip);
/* Test argument type check for the 'a' length modifier. */
- scanf("%as", fp); /* expected-warning{{conversion specifies type 'char **' but the argument has type 'float *'}} */
- scanf("%aS", fp); /* expected-warning{{conversion specifies type 'wchar_t **' (aka 'int **') but the argument has type 'float *'}} */
- scanf("%a[abc]", fp); /* expected-warning{{conversion specifies type 'char **' but the argument has type 'float *'}} */
+ scanf("%as", fp); /* expected-warning{{format specifies type 'char **' but the argument has type 'float *'}} */
+ scanf("%aS", fp); /* expected-warning{{format specifies type 'wchar_t **' (aka 'int **') but the argument has type 'float *'}} */
+ scanf("%a[abc]", fp); /* expected-warning{{format specifies type 'char **' but the argument has type 'float *'}} */
}
OpenPOWER on IntegriCloud