diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2013-06-10 23:51:51 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2013-06-10 23:51:51 +0000 |
commit | 286fcf67979f905e3932fb5779a7a9b5ea24b9fc (patch) | |
tree | 1216aff7675a54d99b3ba6713ef5143168ca8547 /clang/test | |
parent | 536a10cc2d8a64eea4761234ea696f0e7fc697db (diff) | |
download | bcm5719-llvm-286fcf67979f905e3932fb5779a7a9b5ea24b9fc.tar.gz bcm5719-llvm-286fcf67979f905e3932fb5779a7a9b5ea24b9fc.zip |
Objective-C [qoi]: Issue better warning when nsstring literal is missing
the '@'. PR16287 and // rdar://14106083
llvm-svn: 183713
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/FixIt/fixit-objc.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/FixIt/fixit-objc.m b/clang/test/FixIt/fixit-objc.m index ea57fe671b9..7c4776ae71e 100644 --- a/clang/test/FixIt/fixit-objc.m +++ b/clang/test/FixIt/fixit-objc.m @@ -27,13 +27,13 @@ void g(NSString *a); // expected-note{{passing argument to parameter 'a' here}} void h(id a); // expected-note 2{{passing argument to parameter 'a' here}} void f(Test *t) { - NSString *a = "Foo"; // expected-warning {{incompatible pointer types initializing 'NSString *' with an expression of type 'char [4]'}} + NSString *a = "Foo"; // expected-warning {{string literal must be prefixed by '@'}} id b = "Foo"; // expected-warning {{incompatible pointer types initializing 'id' with an expression of type 'char [4]'}} - g("Foo"); // expected-warning{{incompatible pointer types passing 'char [4]' to parameter of type 'NSString *'}} + g("Foo"); // expected-warning {{string literal must be prefixed by '@'}} h("Foo"); // expected-warning{{incompatible pointer types passing 'char [4]' to parameter of type 'id'}} h(("Foo")); // expected-warning{{incompatible pointer types passing 'char [4]' to parameter of type 'id'}} - [t test:"Foo"]; // expected-warning{{incompatible pointer types sending 'char [4]' to parameter of type 'NSString *'}} - t.property = "Foo"; // expected-warning{{incompatible pointer types assigning to 'NSString *' from 'char [4]'}} + [t test:"Foo"]; // expected-warning {{string literal must be prefixed by '@'}} + t.property = "Foo"; // expected-warning {{string literal must be prefixed by '@'}} // <rdar://problem/6896493> [t test:@"Foo"]]; // expected-error{{extraneous ']' before ';'}} |