diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-08 05:28:46 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-08 05:28:46 +0000 |
commit | 65197b4b0c55bb74af0450230d61ee9461223721 (patch) | |
tree | 201f419c8802d9946cd8f61566814961dc7544a5 /test/Sema/format-strings.c | |
parent | bd18d4584aae0ed6f7111ef5713784cf29fe663f (diff) |
Add semantic checking that the "thousands grouping"
prefix in a printf format string is matched
with the appropriate conversion specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index 93b6eb52b2..be506d7c6b 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -336,4 +336,7 @@ void posix_extensions() { // Test %'d, "thousands grouping". // <rdar://problem/8816343> printf("%'d\n", 123456789); // no-warning + printf("%'i\n", 123456789); // no-warning + printf("%'f\n", (float) 1.0); // no-warning + printf("%'p\n", (void*) 0); // expected-warning{{results in undefined behavior with 'p' conversion specifier}} } |