summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/format-strings.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-01 23:23:50 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-01 23:23:50 +0000
commit016b6052662c772ea8866694e54626e334214010 (patch)
treebc491579c67fe384fcd8efcd4a17e38d26ef8a2e /clang/test/Sema/format-strings.c
parent5b66b31774d8e5bb3cc43900d419362d8e93b398 (diff)
downloadbcm5719-llvm-016b6052662c772ea8866694e54626e334214010.tar.gz
bcm5719-llvm-016b6052662c772ea8866694e54626e334214010.zip
Add format string type checking support for 'long double'.
llvm-svn: 95026
Diffstat (limited to 'clang/test/Sema/format-strings.c')
-rw-r--r--clang/test/Sema/format-strings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/Sema/format-strings.c b/clang/test/Sema/format-strings.c
index a055bfe1822..d8f7e4f6931 100644
--- a/clang/test/Sema/format-strings.c
+++ b/clang/test/Sema/format-strings.c
@@ -167,6 +167,8 @@ void test10(int x, float f, int i, long long lli) {
// This is fine, because there is an implicit conversion to an int.
printf("%d", (unsigned char) 10); // no-warning
printf("%d", (long long) 10); // expected-warning{{conversion specifies type 'int' but the argument has type 'long long'}}
+ printf("%Lf\n", (long double) 1.0); // no-warning
+ printf("%f\n", (long double) 1.0); // expected-warning{{conversion specifies type 'double' but the argument has type 'long double'}}
}
typedef struct __aslclient *aslclient;
OpenPOWER on IntegriCloud