brintos

brintos / llvm-project-archived public Read only

0
0
Text · 803 B · 36d3b94 Raw
24 lines · plain
1// RUN: %clang_cc1 -pedantic -verify %s -Wno-error=incompatible-pointer-types2// RUN: cp %s %t3// RUN: not %clang_cc1 -pedantic -fobjc-arc -fixit -x objective-c %t -Wno-error=incompatible-pointer-types4// RUN: %clang_cc1 -pedantic -fobjc-arc -Werror -x objective-c %t -Wno-error=incompatible-pointer-types5 6@class A;7@class NSString;8 9@interface Test10- (void)test:(NSString *)string;11 12@property (copy) NSString *property;13@end14 15void g(NSString *a);16void h(id a);17 18void 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}24