aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/fixit-static-object-decl.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/FixIt/fixit-static-object-decl.m')
-rw-r--r--test/FixIt/fixit-static-object-decl.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/FixIt/fixit-static-object-decl.m b/test/FixIt/fixit-static-object-decl.m
new file mode 100644
index 000000000000..e13900fa786f
--- /dev/null
+++ b/test/FixIt/fixit-static-object-decl.m
@@ -0,0 +1,29 @@
+// Objective-C recovery
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -fixit -x objective-c %t
+// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c %t
+
+// Objective-C++ recovery
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -fixit -x objective-c++ %t
+// RUN: %clang_cc1 -fsyntax-only -Werror -x objective-c++ %t
+// rdar://9603056
+
+@interface S @end
+
+@interface NSArray
+{
+@public
+ S iS;
+}
++ (id) arrayWithObjects;
+@end
+
+NSArray func() {
+ NSArray P;
+ return P;
+}
+
+int main() {
+ NSArray pluginNames = [NSArray arrayWithObjects];
+}