diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-08-27 00:16:45 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-08-27 00:16:45 +0000 |
commit | 62088e3317c74a3a8baf2db3e1bd7ab0b7ddc590 (patch) | |
tree | 3402206f50008bd7454ab04c65155990cec9b381 /test/Sema/format-strings.c | |
parent | 40a0f9c1ca14f0b4a07eb9894523b55093bc182b (diff) |
Control 'invalid conversion specifier' warnings under a subflag (-Wformat-invalid-specifier) of -Wformat. Fixes <rdar://problem/10031930>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index b47d3ca261..20c665b978 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -372,3 +372,13 @@ void check_char(unsigned char x, signed char y) { printf("%c", x); // no-warning printf("%hhu", y); // no-warning } + +// Test suppression of individual warnings. + +void test_suppress_invalid_specifier() { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-invalid-specifier" + printf("%@", 12); // no-warning +#pragma clang diagnostic pop +} + |