| 1 |
// RUN: %clang_cc1 -pedantic -verify %s -Wno-error=incompatible-pointer-types |
| 2 |
// RUN: cp %s %t |
| 3 |
// RUN: not %clang_cc1 -pedantic -fobjc-arc -fixit -x objective-c %t -Wno-error=incompatible-pointer-types |
| 4 |
// RUN: %clang_cc1 -pedantic -fobjc-arc -Werror -x objective-c %t -Wno-error=incompatible-pointer-types |
| 5 |
|
| 6 |
@class A; |
| 7 |
@class NSString; |
| 8 |
|
| 9 |
@interface Test |
| 10 |
- (void)test:(NSString *)string; |
| 11 |
|
| 12 |
@property (copy) NSString *property; |
| 13 |
@end |
| 14 |
|
| 15 |
void g(NSString *a); |
| 16 |
void h(id a); |
| 17 |
|
| 18 |
void f(Test *t) { |
| 19 |
NSString *a = "Foo"; // expected-error {{string literal must be prefixed by '@'}} |
| 20 |
g("Foo"); // expected-error {{string literal must be prefixed by '@'}} |
| 21 |
[t test:"Foo"]; // expected-error {{string literal must be prefixed by '@'}} |
| 22 |
t.property = "Foo"; // expected-error {{string literal must be prefixed by '@'}} |
| 23 |
} |