[cfe-commits] r158115 - in /cfe/trunk/test/SemaObjC: cocoa-api-usage.m cocoa-api-usage.m.fixed

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jun 6 15:32:07 PDT 2012


Author: akirtzidis
Date: Wed Jun  6 17:32:07 2012
New Revision: 158115

URL: http://llvm.org/viewvc/llvm-project?rev=158115&view=rev
Log:
Fix test/SemaObjC/cocoa-api-usage.m that broke via r158114.

Modified:
    cfe/trunk/test/SemaObjC/cocoa-api-usage.m
    cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed

Modified: cfe/trunk/test/SemaObjC/cocoa-api-usage.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/cocoa-api-usage.m?rev=158115&r1=158114&r2=158115&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa-api-usage.m (original)
+++ cfe/trunk/test/SemaObjC/cocoa-api-usage.m Wed Jun  6 17:32:07 2012
@@ -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}}
 }

Modified: cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed?rev=158115&r1=158114&r2=158115&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed (original)
+++ cfe/trunk/test/SemaObjC/cocoa-api-usage.m.fixed Wed Jun  6 17:32:07 2012
@@ -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}}
 }





More information about the cfe-commits mailing list