diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 00:07:51 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-05 00:07:51 +0000 |
commit | 4489fe10fa073eb326e2c8906db170f009050911 (patch) | |
tree | 5330c84c6ca7dc75f8e98581c3c6ccd95db9a94b /test/Sema/format-strings.c | |
parent | a34ea072371154c9042ce86321d17fbb4df1f84d (diff) |
Add EXTWARN Diagnostic class.
- Like EXTENSION but always generates a warning (even without
-pedantic).
- Updated ptr -> int, int -> ptr, and incompatible cast warnings to
be EXTWARN.
- Other EXTENSION level diagnostics should be audited for upgrade.
- Updated several test cases to fix code which produced unanticipated
warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index c1e690a3b8..2d6e719e3a 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -61,8 +61,8 @@ void check_wide_string(char* b, ...) va_list ap; va_start(ap,b); - printf(L"foo %d",2); // expected-warning {{should not be a wide string}} - vasprintf(&b,L"bar %d",ap); // expected-warning {{should not be a wide string}} + printf(L"foo %d",2); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}} + vasprintf(&b,L"bar %d",ap); // expected-warning {{incompatible pointer types}}, expected-warning {{should not be a wide string}} } void check_asterisk_precision_width(int x) { @@ -71,4 +71,4 @@ void check_asterisk_precision_width(int x) { printf("%*d",12,x); // no-warning printf("%*d","foo",x); // expected-warning {{field width should have type 'int', but argument has type 'char *'}} printf("%.*d","foo",x); // expected-warning {{field precision should have type 'int', but argument has type 'char *'}} -}
\ No newline at end of file +} |