Fix test/SemaObjC/cocoa-api-usage.m that broke via r158114.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158115 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/cocoa-api-usage.m b/test/SemaObjC/cocoa-api-usage.m
index 85e2115..bed7ecd 100644
--- a/test/SemaObjC/cocoa-api-usage.m
+++ b/test/SemaObjC/cocoa-api-usage.m
@@ -1,9 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -fsyntax-only -Wobjc-cocoa-api -verify
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %s -fsyntax-only -Wobjc-cocoa-api -verify
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c %s.fixed -fsyntax-only
-// RUN: cp %s %t.m
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %t.m -fixit -Wobjc-cocoa-api
-// RUN: diff %s.fixed %t.m
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -x objective-c %s.fixed -fsyntax-only
// RUN: cp %s %t.m
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %t.m -fixit -Wobjc-cocoa-api
// RUN: diff %s.fixed %t.m
@@ -82,7 +78,7 @@
void foo() {
NSString *str = M([NSString stringWithString:@"foo"]); // expected-warning {{redundant}}
- str = [[NSString alloc] initWithString:@"foo"];
+ str = [[NSString alloc] initWithString:@"foo"]; // expected-warning {{redundant}}
NSArray *arr = [NSArray arrayWithArray:@[str]]; // expected-warning {{redundant}}
NSDictionary *dict = [NSDictionary dictionaryWithDictionary:@{str: arr}]; // expected-warning {{redundant}}
}
diff --git a/test/SemaObjC/cocoa-api-usage.m.fixed b/test/SemaObjC/cocoa-api-usage.m.fixed
index 55e060a..f472cf1 100644
--- a/test/SemaObjC/cocoa-api-usage.m.fixed
+++ b/test/SemaObjC/cocoa-api-usage.m.fixed
@@ -1,9 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %s -fsyntax-only -Wobjc-cocoa-api -verify
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %s -fsyntax-only -Wobjc-cocoa-api -verify
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -x objective-c %s.fixed -fsyntax-only
-// RUN: cp %s %t.m
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 %t.m -fixit -Wobjc-cocoa-api
-// RUN: diff %s.fixed %t.m
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -x objective-c %s.fixed -fsyntax-only
// RUN: cp %s %t.m
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc %t.m -fixit -Wobjc-cocoa-api
// RUN: diff %s.fixed %t.m
@@ -82,7 +78,7 @@
void foo() {
NSString *str = M(@"foo"); // expected-warning {{redundant}}
- str = [[NSString alloc] initWithString:@"foo"];
+ str = @"foo"; // expected-warning {{redundant}}
NSArray *arr = @[str]; // expected-warning {{redundant}}
NSDictionary *dict = @{str: arr}; // expected-warning {{redundant}}
}