aboutsummaryrefslogtreecommitdiff
path: root/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
commitf911eba72e6d7275e5cfdb79ab23fb2aa9cc01d0 (patch)
tree5fe5f7d8612cbe04d56d6a85e1d1974f12a5e524 /test/Sema/format-strings.c
parentce78c9743aa8272b880a2874393fceff766c3fa3 (diff)
Add format string type checking support for 'long double'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r--test/Sema/format-strings.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index a055bfe182..d8f7e4f693 100644
--- a/test/Sema/format-strings.c
+++ b/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;