summaryrefslogtreecommitdiffstats
path: root/clang/test/FixIt/fixit-objc-arc.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/FixIt/fixit-objc-arc.m')
-rw-r--r--clang/test/FixIt/fixit-objc-arc.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit-objc-arc.m b/clang/test/FixIt/fixit-objc-arc.m
new file mode 100644
index 00000000000..19a61b4108e
--- /dev/null
+++ b/clang/test/FixIt/fixit-objc-arc.m
@@ -0,0 +1,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; // expected-note{{passing argument to parameter 'string' here}}
+
+@property (copy) NSString *property;
+@end
+
+void g(NSString *a); // expected-note{{passing argument to parameter 'a' here}}
+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