diff options
author | Richard Trieu <rtrieu@google.com> | 2011-12-15 00:38:15 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2011-12-15 00:38:15 +0000 |
commit | 2fe9b7fb07dff15dd15dd8755a9a9e6de0fe46fc (patch) | |
tree | 29e2aab8ed6d3dda663e31e3ed5434a0d3e26163 /test/SemaObjC | |
parent | 60ef308e51c71b760d7f598c1b763ceb7b768148 (diff) |
Modify how the -verify flag works. Currently, the verification string and
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:
// expect-error{{candidate function has different number of parameters}}
will match the following error messages from Clang:
candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters
It will also match these other error messages:
candidate function
function has different number of parameters
number of parameters
This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:
87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC')
29 files changed, 70 insertions, 70 deletions
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index b3405c05e2..13b3af62b8 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -189,13 +189,13 @@ void test7_unsafe(void) { - (id) init50 { return 0; } - (void) init01 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init11 {} - (void) init21 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} - (void) init31 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init41 {} // expected-error {{method was declared as an 'init' method, but its implementation doesn't match because its result type is not an object pointer}} \ - // expected-warning{{ method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} + // expected-warning{{method is expected to return an instance of its class type 'Test8', but is declared to return 'void'}} - (void) init51 {} - (Test8_incomplete*) init02 { return 0; } // expected-error {{init methods must return a type related to the receiver type}} \ @@ -403,7 +403,7 @@ struct Test19 *const test19b = 0; void test19(void) { id x; x = (id) test19a; // expected-error {{bridged cast}} \ - // expected-note{{use __bridge to convert directly (no change in ownership))}} \ + // expected-note{{use __bridge to convert directly (no change in ownership)}} \ // expected-note{{use __bridge_transfer to transfer ownership of a +1 'struct Test19 *' into ARC}} x = (id) test19b; // expected-error {{bridged cast}} \ // expected-note{{use __bridge to convert directly (no change in ownership)}} \ diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m index 571bd30e12..42bffa8811 100644 --- a/test/SemaObjC/attr-deprecated.m +++ b/test/SemaObjC/attr-deprecated.m @@ -77,8 +77,8 @@ void t4(Class c) int t5() { Bar *f; - f.FooBar = 1; // expected-warning {{warning: 'FooBar' is deprecated}} - return f.FooBar; // expected-warning {{warning: 'FooBar' is deprecated}} + f.FooBar = 1; // expected-warning {{'FooBar' is deprecated}} + return f.FooBar; // expected-warning {{'FooBar' is deprecated}} } @@ -99,10 +99,10 @@ __attribute ((deprecated)) @interface DEPRECATED (Category2) // no warning. @end -@implementation DEPRECATED (Category2) // expected-warning {{warning: 'DEPRECATED' is deprecated}} +@implementation DEPRECATED (Category2) // expected-warning {{'DEPRECATED' is deprecated}} @end -@interface NS : DEPRECATED // expected-warning {{warning: 'DEPRECATED' is deprecated}} +@interface NS : DEPRECATED // expected-warning {{'DEPRECATED' is deprecated}} @end diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m index 2d77a20fce..7beec19ea7 100644 --- a/test/SemaObjC/blocks.m +++ b/test/SemaObjC/blocks.m @@ -45,10 +45,10 @@ void foo7(id (^x)(int)) { @end void foo8() { - void *P = ^(itf x) {}; // expected-error {{Objective-C interface type 'itf' cannot be passed by value; did you forget * in 'itf'}} - P = ^itf(int x) {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} - P = ^itf() {}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} - P = ^itf{}; // expected-error {{Objective-C interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + void *P = ^(itf x) {}; // expected-error {{interface type 'itf' cannot be passed by value; did you forget * in 'itf'}} + P = ^itf(int x) {}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + P = ^itf() {}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} + P = ^itf{}; // expected-error {{interface type 'itf' cannot be returned by value; did you forget * in 'itf'}} } diff --git a/test/SemaObjC/call-super-2.m b/test/SemaObjC/call-super-2.m index d77b759ffa..3c45a2c732 100644 --- a/test/SemaObjC/call-super-2.m +++ b/test/SemaObjC/call-super-2.m @@ -68,8 +68,8 @@ id objc_getClass(const char *s); } - (int) instance_func1 { - int i = (size_t)[self instance_func0]; // expected-warning {{instance method '-instance_func0' not found (return type defaults to 'id'))}} - return i + (size_t)[super instance_func0]; // expected-warning {{'Object' may not respond to 'instance_func0')}} + int i = (size_t)[self instance_func0]; // expected-warning {{instance method '-instance_func0' not found (return type defaults to 'id')}} + return i + (size_t)[super instance_func0]; // expected-warning {{'Object' may not respond to 'instance_func0'}} } - (int) instance_func2 { diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m index f2d4abd5ae..7df85da500 100644 --- a/test/SemaObjC/category-1.m +++ b/test/SemaObjC/category-1.m @@ -72,7 +72,7 @@ @interface MultipleCat_I() <MultipleCat_P> @end @implementation MultipleCat_I // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} @end // <rdar://problem/7680391> - Handle nameless categories with no name that refer diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m index 452d242888..692ff8c68a 100644 --- a/test/SemaObjC/class-extension-dup-methods.m +++ b/test/SemaObjC/class-extension-dup-methods.m @@ -1,9 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s @interface Foo -- (int) garf; // expected-note {{ previous declaration is here}} +- (int) garf; // expected-note {{previous declaration is here}} - (int) OK; -+ (int) cgarf; // expected-note {{ previous declaration is here}} ++ (int) cgarf; // expected-note {{previous declaration is here}} - (int) InstMeth; @end diff --git a/test/SemaObjC/compare-qualified-id.m b/test/SemaObjC/compare-qualified-id.m index ce0db191ea..e195640d2b 100644 --- a/test/SemaObjC/compare-qualified-id.m +++ b/test/SemaObjC/compare-qualified-id.m @@ -24,7 +24,7 @@ extern NSString * const NSTaskDidTerminateNotification; @end @implementation XCPropertyExpansionContext // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (NSString *)expandedValueForProperty:(NSString *)property { id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}} if (cachedValueNode == ((void *)0)) { } diff --git a/test/SemaObjC/comptypes-1.m b/test/SemaObjC/comptypes-1.m index 98107eef21..997ef19c1b 100644 --- a/test/SemaObjC/comptypes-1.m +++ b/test/SemaObjC/comptypes-1.m @@ -42,7 +42,7 @@ int main() MyProtocol), but not from an 'id' or from a 'MyOtherClass *' (which implements MyProtocol). */ obj_p = obj; /* Ok */ - obj_p = obj_c; // expected-warning {{ assigning to 'id<MyProtocol>' from incompatible type 'MyClass *'}} + obj_p = obj_c; // expected-warning {{assigning to 'id<MyProtocol>' from incompatible type 'MyClass *'}} obj_p = obj_cp; /* Ok */ obj_p = obj_C; // expected-warning {{incompatible pointer types assigning to 'id<MyProtocol>' from 'Class'}} diff --git a/test/SemaObjC/comptypes-7.m b/test/SemaObjC/comptypes-7.m index ef0f158c49..dde504b860 100644 --- a/test/SemaObjC/comptypes-7.m +++ b/test/SemaObjC/comptypes-7.m @@ -28,7 +28,7 @@ int main() obj = j; // expected-warning {{incompatible pointer types assigning to 'id' from 'int *'}} obj_p = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'id<MyProtocol>' from 'int'}} - obj_p = j; // expected-warning {{ incompatible pointer types assigning to 'id<MyProtocol>' from 'int *'}} + obj_p = j; // expected-warning {{incompatible pointer types assigning to 'id<MyProtocol>' from 'int *'}} obj_c = i; // expected-warning {{incompatible integer to pointer conversion assigning to 'MyClass *' from 'int'}} obj_c = j; // expected-warning {{incompatible pointer types assigning to 'MyClass *' from 'int *'}} @@ -42,7 +42,7 @@ int main() i = obj_C; // expected-warning {{incompatible pointer to integer conversion assigning to 'int' from 'Class'}} j = obj; // expected-warning {{incompatible pointer types assigning to 'int *' from 'id'}} - j = obj_p; // expected-warning {{ incompatible pointer types assigning to 'int *' from 'id<MyProtocol>'}} + j = obj_p; // expected-warning {{incompatible pointer types assigning to 'int *' from 'id<MyProtocol>'}} j = obj_c; // expected-warning {{incompatible pointer types assigning to 'int *' from 'MyClass *'}} j = obj_C; // expected-warning {{incompatible pointer types assigning to 'int *' from 'Class'}} diff --git a/test/SemaObjC/conditional-expr-3.m b/test/SemaObjC/conditional-expr-3.m index 3b5f609e42..166e02be9e 100644 --- a/test/SemaObjC/conditional-expr-3.m +++ b/test/SemaObjC/conditional-expr-3.m @@ -31,7 +31,7 @@ void f2(id<P1> x) { } void f3(A *a) { - id<P1> l = a; // expected-warning {{ initializing 'id<P1>' with an expression of incompatible type 'A *'}} + id<P1> l = a; // expected-warning {{initializing 'id<P1>' with an expression of incompatible type 'A *'}} } void f4(int cond, id x, A *a) { diff --git a/test/SemaObjC/conditional-expr.m b/test/SemaObjC/conditional-expr.m index 74ab59bdb9..f97224fe7a 100644 --- a/test/SemaObjC/conditional-expr.m +++ b/test/SemaObjC/conditional-expr.m @@ -21,7 +21,7 @@ @end @interface DTFilterOutputStream2 -- nextOutputStream; // expected-note {{{{method definition for 'nextOutputStream' not found}} +- nextOutputStream; // expected-note {{method definition for 'nextOutputStream' not found}} @end @implementation DTFilterOutputStream2 // expected-warning {{incomplete implementation}} @@ -100,7 +100,7 @@ void f8(int a, A<P0> *x, A *y) { } void f9(int a, A<P0> *x, A<P1> *y) { - id l0 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')'}} + id l0 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} A<P0> *l1 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} A<P1> *l2 = (a ? x : y ); // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} [ (a ? x : y ) intProp ]; // expected-warning {{incompatible operand types ('A<P0> *' and 'A<P1> *')}} diff --git a/test/SemaObjC/gcc-cast-ext.m b/test/SemaObjC/gcc-cast-ext.m index 599e37d778..d023302bf5 100644 --- a/test/SemaObjC/gcc-cast-ext.m +++ b/test/SemaObjC/gcc-cast-ext.m @@ -5,8 +5,8 @@ typedef struct _NSRange { } NSRange; @class PBXFileReference; @interface PBXDocBookmark -+ alloc; // expected-note {{{{method definition for 'alloc' not found}} -- autorelease; // expected-note {{{{method definition for 'autorelease' not found}} ++ alloc; // expected-note {{method definition for 'alloc' not found}} +- autorelease; // expected-note {{method definition for 'autorelease' not found}} @end // GCC allows pointer expressions in integer constant expressions. diff --git a/test/SemaObjC/invalid-objc-decls-1.m b/test/SemaObjC/invalid-objc-decls-1.m index 91bd8a8c86..46338bb4be 100644 --- a/test/SemaObjC/invalid-objc-decls-1.m +++ b/test/SemaObjC/invalid-objc-decls-1.m @@ -27,8 +27,8 @@ struct whatever { } @end -Super foo( // expected-error{{interface interface type 'Super' cannot be returned by value; did you forget * in 'Super'}} - Super parm1) { // expected-error{{interface interface type 'Super' cannot be passed by value; did you forget * in 'Super'}} +Super foo( // expected-error{{interface type 'Super' cannot be returned by value; did you forget * in 'Super'}} + Super parm1) { // expected-error{{interface type 'Super' cannot be passed by value; did you forget * in 'Super'}} Super p1; // expected-error{{interface type cannot be statically allocated}} return p1; } diff --git a/test/SemaObjC/ivar-lookup.m b/test/SemaObjC/ivar-lookup.m index c781a56d76..f9a7b35cef 100644 --- a/test/SemaObjC/ivar-lookup.m +++ b/test/SemaObjC/ivar-lookup.m @@ -29,7 +29,7 @@ extern struct foo x; @implementation A - (int*)method { - int *ip = [Ivar method]; // expected-warning{{warning: incompatible pointer types initializing 'int *' with an expression of type 'float *'}} + int *ip = [Ivar method]; // expected-warning{{incompatible pointer types initializing 'int *' with an expression of type 'float *'}} // Note that there is no warning in Objective-C++ return 0; } diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m index 0a1b1cd067..c58cfcf80f 100644 --- a/test/SemaObjC/method-bad-param.m +++ b/test/SemaObjC/method-bad-param.m @@ -7,21 +7,21 @@ @end @interface bar --(void) my_method:(foo) my_param; // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} -- (foo)cccccc:(long)ddddd; // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +-(void) my_method:(foo) my_param; // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +- (foo)cccccc:(long)ddddd; // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} @end @implementation bar --(void) my_method:(foo) my_param // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +-(void) my_method:(foo) my_param // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} { } -- (foo)cccccc:(long)ddddd // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +- (foo)cccccc:(long)ddddd // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} { } @end -void somefunc(foo x) {} // expected-error {{Objective-C interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} -foo somefunc2() {} // expected-error {{Objective-C interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} +void somefunc(foo x) {} // expected-error {{interface type 'foo' cannot be passed by value; did you forget * in 'foo'}} +foo somefunc2() {} // expected-error {{interface type 'foo' cannot be returned by value; did you forget * in 'foo'}} // rdar://6780761 void f0(foo *a0) { diff --git a/test/SemaObjC/method-not-defined.m b/test/SemaObjC/method-not-defined.m index ed68b22945..22466f7dc3 100644 --- a/test/SemaObjC/method-not-defined.m +++ b/test/SemaObjC/method-not-defined.m @@ -9,5 +9,5 @@ void test() { [[Foo alloc] init]; // expected-warning {{class method '+alloc' not found (return type defaults to 'id')}} expected-warning {{instance method '-init' not found (return type defaults to 'id')}} [fooObj notdefined]; // expected-warning {{instance method '-notdefined' not found (return type defaults to 'id')}} - [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id'))}} + [obj whatever:1 :2 :3]; // expected-warning {{instance method '-whatever:::' not found (return type defaults to 'id')}} } diff --git a/test/SemaObjC/method-undef-category-warn-1.m b/test/SemaObjC/method-undef-category-warn-1.m index 532ecfca9e..9ef83b2641 100644 --- a/test/SemaObjC/method-undef-category-warn-1.m +++ b/test/SemaObjC/method-undef-category-warn-1.m @@ -4,8 +4,8 @@ @end @protocol P -- (void) Pmeth; // expected-note {{method declared here }} -- (void) Pmeth1; // expected-note {{method declared here }} +- (void) Pmeth; // expected-note {{method declared here}} +- (void) Pmeth1; // expected-note {{method declared here}} @end @interface MyClass1(CAT) <P> // expected-note {{required for direct or indirect protocol 'P'}} @@ -13,7 +13,7 @@ @end @implementation MyClass1(CAT) // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void) Pmeth1{} @end @@ -22,7 +22,7 @@ @end @implementation MyClass1(DOG) // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void) Pmeth {} @end diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m index ade861e52e..9701a2e5d5 100644 --- a/test/SemaObjC/method-undef-extension-warn-1.m +++ b/test/SemaObjC/method-undef-extension-warn-1.m @@ -19,6 +19,6 @@ @end @implementation MyClass // expected-warning {{incomplete implementation}} \ - // expected-warning {{method in protocol not implemented [-Wprotocol]}} + // expected-warning {{method in protocol not implemented}} - (void)Pmeth {} @end diff --git a/test/SemaObjC/missing-method-return-type.m b/test/SemaObjC/missing-method-return-type.m index b62a0466ad..a0c10f6fc9 100644 --- a/test/SemaObjC/missing-method-return-type.m +++ b/test/SemaObjC/missing-method-return-type.m @@ -2,10 +2,10 @@ // rdar://9615045 @interface I -- initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} +- initWithFoo:(id)foo; // expected-warning {{method has no return type specified; defaults to 'id'}} @end @implementation I -- initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id' [-Wmissing-method-return-type]}} +- initWithFoo:(id)foo { return 0; } // expected-warning {{method has no return type specified; defaults to 'id'}} @end diff --git a/test/SemaObjC/no-protocol-option-tests.m b/test/SemaObjC/no-protocol-option-tests.m index 5d2da0af48..311800f39a 100644 --- a/test/SemaObjC/no-protocol-option-tests.m +++ b/test/SemaObjC/no-protocol-option-tests.m @@ -17,7 +17,7 @@ // Test2 @interface super - PMeth; @end @interface J : super <P> -- PMeth; // expected-note {{ method definition for 'PMeth' not found}} +- PMeth; // expected-note {{method definition for 'PMeth' not found}} @end @implementation J @end // expected-warning {{incomplete implementation}} diff --git a/test/SemaObjC/property-9.m b/test/SemaObjC/property-9.m index 4ef21cc145..60c8fd19dd 100644 --- a/test/SemaObjC/property-9.m +++ b/test/SemaObjC/property-9.m @@ -51,14 +51,14 @@ typedef signed char BOOL; // test parser recovery: rdar://6254579 @property ( // expected-note {{to match this '('}} - readonly getter=isAwesome) // expected-error {{error: expected ')'}} + readonly getter=isAwesome) // expected-error {{expected ')'}} int _awesome; @property (readonlyx) // expected-error {{unknown property attribute 'readonlyx'}} int _awesome2; @property ( // expected-note {{to match this '('}} - +) // expected-error {{error: expected ')'}} + +) // expected-error {{expected ')'}} int _awesome3; diff --git a/test/SemaObjC/property-lookup-in-id.m b/test/SemaObjC/property-lookup-in-id.m index 86da48e851..b729a4d85d 100644 --- a/test/SemaObjC/property-lookup-in-id.m +++ b/test/SemaObjC/property-lookup-in-id.m @@ -25,7 +25,7 @@ extern id NSApp; - (void)startFSEventGathering:(id)sender { - fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{warning: instance method '-delegate' not found (return type defaults to 'id')}} \ + fsEventStream = [NSApp delegate].fsEventStream; // expected-warning {{instance method '-delegate' not found (return type defaults to 'id')}} \ // expected-error {{property 'fsEventStream' not found on object of type 'id'}} } diff --git a/test/SemaObjC/scope-check.m b/test/SemaObjC/scope-check.m index 3f474be6e8..5b73be5851 100644 --- a/test/SemaObjC/scope-check.m +++ b/test/SemaObjC/scope-check.m @@ -3,9 +3,9 @@ @class A, B, C; void test1() { - goto L; // expected-error{{illegal goto into protected scope}} - goto L2; // expected-error{{illegal goto into protected scope}} - goto L3; // expected-error{{illegal goto into protected scope}} + goto L; // expected-error{{goto into protected scope}} + goto L2; // expected-error{{goto into protected scope}} + goto L3; // expected-error{{goto into protected scope}} @try { // expected-note {{jump bypasses initialization of @try block}} L: ; } @catch (A *x) { // expected-note {{jump bypasses initialization of @catch block}} @@ -17,11 +17,11 @@ L3: ; } @try { - goto L4; // expected-error{{illegal goto into protected scope}} - goto L5; // expected-error{{illegal goto into protected scope}} + goto L4; // expected-error{{goto into protected scope}} + goto L5; // expected-error{{goto into protected scope}} } @catch (C *c) { // expected-note {{jump bypasses initialization of @catch block}} L5: ; - goto L6; // expected-error{{illegal goto into protected scope}} + goto L6; // expected-error{{goto into protected scope}} } @catch (B *c) { // expected-note {{jump bypasses initialization of @catch block}} L6: ; } @finally { // expected-note {{jump bypasses initialization of @finally block}} @@ -32,12 +32,12 @@ L3: ; @try { // expected-note 2 {{jump bypasses initialization of @try block}} L7: ; } @catch (C *c) { - goto L7; // expected-error{{illegal goto into protected scope}} + goto L7; // expected-error{{goto into protected scope}} } @finally { - goto L7; // expected-error{{illegal goto into protected scope}} + goto L7; // expected-error{{goto into protected scope}} } - goto L8; // expected-error{{illegal goto into protected scope}} + goto L8; // expected-error{{goto into protected scope}} @try { } @catch (A *c) { } @catch (B *c) { @@ -47,7 +47,7 @@ L3: ; // rdar://6810106 id X; - goto L9; // expected-error{{illegal goto into protected scope}} + goto L9; // expected-error{{goto into protected scope}} goto L10; // ok @synchronized // expected-note {{jump bypasses initialization of @synchronized block}} ( ({ L10: ; X; })) { @@ -79,7 +79,7 @@ void test3() { + (void) hello { @try { - goto blargh; // expected-error {{illegal goto into protected scope}} + goto blargh; // expected-error {{goto into protected scope}} } @catch (...) { // expected-note {{jump bypasses initialization of @catch block}} blargh: ; } @@ -87,14 +87,14 @@ void test3() { + (void)meth2 { int n; void *P; - goto L0; // expected-error {{illegal goto into protected scope}} + goto L0; // expected-error {{goto into protected scope}} typedef int A[n]; // expected-note {{jump bypasses initialization of VLA typedef}} L0: - goto L1; // expected-error {{illegal goto into protected scope}} + goto L1; // expected-error {{goto into protected scope}} A b, c[10]; // expected-note 2 {{jump bypasses initialization of variable length array}} L1: - goto L2; // expected-error {{illegal goto into protected scope}} + goto L2; // expected-error {{goto into protected scope}} A d[n]; // expected-note {{jump bypasses initialization of variable length array}} L2: return; diff --git a/test/SemaObjC/special-dep-unavail-warning.m b/test/SemaObjC/special-dep-unavail-warning.m index 9164111441..754bf5f4cb 100644 --- a/test/SemaObjC/special-dep-unavail-warning.m +++ b/test/SemaObjC/special-dep-unavail-warning.m @@ -50,6 +50,6 @@ __attribute ((deprecated)) @end void foo() { - [DEPRECATED new]; // expected-warning {{warning: 'DEPRECATED' is deprecated}} + [DEPRECATED new]; // expected-warning {{'DEPRECATED' is deprecated}} } diff --git a/test/SemaObjC/super.m b/test/SemaObjC/super.m index 0c42e99d71..cf48c196db 100644 --- a/test/SemaObjC/super.m +++ b/test/SemaObjC/super.m @@ -21,7 +21,7 @@ void takevoidptr(void*); @implementation B - (void)instanceMethod { - [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod')}} + [super iMethod]; // expected-warning{{'A' may not respond to 'iMethod'}} // Use of super in a block is ok and does codegen to the right thing. // rdar://7852959 diff --git a/test/SemaObjC/try-catch.m b/test/SemaObjC/try-catch.m index da06eca470..5afbbb6c32 100644 --- a/test/SemaObjC/try-catch.m +++ b/test/SemaObjC/try-catch.m @@ -40,7 +40,7 @@ typedef struct _NSZone NSZone; int foo() { struct s { int a, b; } agg, *pagg; - @throw 42; // expected-error {{@throw requires an Objective-C object type ('int' invalid))}} + @throw 42; // expected-error {{@throw requires an Objective-C object type ('int' invalid)}} @throw agg; // expected-error {{@throw requires an Objective-C object type ('struct s' invalid)}} @throw pagg; // expected-error {{@throw requires an Objective-C object type ('struct s *' invalid)}} @throw; // expected-error {{@throw (rethrow) used outside of a @catch block}} diff --git a/test/SemaObjC/undef-protocol-methods-1.m b/test/SemaObjC/undef-protocol-methods-1.m index 44d384c639..c685fdbcbe 100644 --- a/test/SemaObjC/undef-protocol-methods-1.m +++ b/test/SemaObjC/undef-protocol-methods-1.m @@ -29,7 +29,7 @@ @end @implementation INTF // expected-warning {{incomplete implementation}} \ - // expected-warning 9 {{method in protocol not implemented [-Wprotocol}} + // expected-warning 9 {{method in protocol not implemented}} - (void) DefP1proto{} + (void) DefClsP3Proto{} diff --git a/test/SemaObjC/warn-implicit-atomic-property.m b/test/SemaObjC/warn-implicit-atomic-property.m index ec8e84e20f..00e0c771d0 100644 --- a/test/SemaObjC/warn-implicit-atomic-property.m +++ b/test/SemaObjC/warn-implicit-atomic-property.m @@ -8,6 +8,6 @@ @property int P3; // expected-note {{property declared here}} @end -@implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property [-Wimplicit-atomic-properties]}} -@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default [-Wimplicit-atomic-properties]}} +@implementation Super // expected-warning {{property is assumed atomic when auto-synthesizing the property}} +@synthesize P,P1,P2; // expected-warning {{property is assumed atomic by default}} @end diff --git a/test/SemaObjC/warn-strict-selector-match.m b/test/SemaObjC/warn-strict-selector-match.m index 8ac0ca46ac..34f1712f8b 100644 --- a/test/SemaObjC/warn-strict-selector-match.m +++ b/test/SemaObjC/warn-strict-selector-match.m @@ -8,7 +8,7 @@ -(float) method; // expected-note {{also found}} @end -int main() { [(id)0 method]; } // expected-warning {{multiple methods named 'method' found [-Wstrict-selector-match]}} +int main() { [(id)0 method]; } // expected-warning {{multiple methods named 'method' found}} @interface Object @end @@ -24,7 +24,7 @@ id foo(void) { Object *obj = 0; id obj2 = obj; [obj setWindow:0]; // expected-warning {{Object' may not respond to 'setWindow:'}} - [obj2 setWindow:0]; // expected-warning {{multiple methods named 'setWindow:' found [-Wstrict-selector-match]}} + [obj2 setWindow:0]; // expected-warning {{multiple methods named 'setWindow:' found}} return obj; } @@ -54,7 +54,7 @@ id foo(void) { } + (NTGridDataObject*)dataObject:(id<MyObject, MyCoding>)data { - NTGridDataObject *result = [(id)0 initWithData:data]; // expected-warning {{multiple methods named 'initWithData:' found [-Wstrict-selector-match]}} \ + NTGridDataObject *result = [(id)0 initWithData:data]; // expected-warning {{multiple methods named 'initWithData:' found}} \ expected-warning {{sending 'id<MyObject,MyCoding>' to parameter of incompatible type 'Object *'}} return result; } |