diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2012-05-30 22:41:32 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2012-05-30 22:41:32 +0000 |
| commit | 95341bf4d4be875b599bcc59e01a69fdfb7f8e30 (patch) | |
| tree | 7d59d37ab45ad6294312d109405217e96f5e2dfe /clang | |
| parent | 0b97dbcf1a2642b7011a9e998043f8f0392d9bab (diff) | |
| download | bcm5719-llvm-95341bf4d4be875b599bcc59e01a69fdfb7f8e30.tar.gz bcm5719-llvm-95341bf4d4be875b599bcc59e01a69fdfb7f8e30.zip | |
Add a test for '%@' suggestion for classes.
llvm-svn: 157718
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/FixIt/format.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/FixIt/format.m b/clang/test/FixIt/format.m index d412b8dbfc5..d9589a0148d 100644 --- a/clang/test/FixIt/format.m +++ b/clang/test/FixIt/format.m @@ -68,3 +68,14 @@ void test_block_correction (block_t x) { // CHECK: fix-it:"{{.*}}":{64:11-64:13}:"%@" // CHECK: fix-it:"{{.*}}":{65:11-65:14}:"%@" } + +void test_class_correction (Class x) { + NSLog(@"%d", x); // expected-warning{{format specifies type 'int' but the argument has type 'Class'}} + NSLog(@"%s", x); // expected-warning{{format specifies type 'char *' but the argument has type 'Class'}} + NSLog(@"%lf", x); // expected-warning{{format specifies type 'double' but the argument has type 'Class'}} + NSLog(@"%@", x); // no-warning + // CHECK: fix-it:"{{.*}}":{73:11-73:13}:"%@" + // CHECK: fix-it:"{{.*}}":{74:11-74:13}:"%@" + // CHECK: fix-it:"{{.*}}":{75:11-75:14}:"%@" +} + |

