summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit-objc-arc.m
blob: dcee81594e780feb4bfe7a9c9ba31c4ab75f7d10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// RUN: %clang_cc1 -pedantic -verify %s
// RUN: cp %s %t
// RUN: not %clang_cc1 -pedantic -fobjc-arc -fixit -x objective-c %t
// RUN: %clang_cc1 -pedantic -fobjc-arc -Werror -x objective-c %t
// rdar://14106083

@class A;
@class NSString;

@interface Test
- (void)test:(NSString *)string;

@property (copy) NSString *property;
@end

void g(NSString *a);
void h(id a);

void f(Test *t) {
  NSString *a = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
  g("Foo"); // expected-error {{string literal must be prefixed by '@'}}
  [t test:"Foo"]; // expected-error {{string literal must be prefixed by '@'}}
  t.property = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
}
OpenPOWER on IntegriCloud