aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-30 01:02:18 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-30 01:02:18 +0000
commitc9a89fec60a20eb3269caa95eca048d45ab215ad (patch)
treeb3fa99ad32a9bb91a8aacae1be2ffeb05895b934 /test/Sema/format-strings.c
parentf7066acc5061e3587ebbd3108f3b1c554bf692a4 (diff)
Add format string checking of 'double' arguments. Fixes <rdar://problem/6931734>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index f1ab868dc7..21d7770e12 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -160,6 +160,7 @@ void test10(int x, float f, int i) {
printf("%"); // expected-warning{{incomplete format specifier}}
printf("%.d", x); // no-warning
printf("%.", x); // expected-warning{{incomplete format specifier}}
+ printf("%f", 4); // expected-warning{{conversion specifies type 'double' but the argument has type 'int'}}
}
typedef struct __aslclient *aslclient;