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
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m
index b3405c0..13b3af6 100644
--- a/test/SemaObjC/arc.m
+++ b/test/SemaObjC/arc.m
@@ -189,13 +189,13 @@
- (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 @@
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 571bd30..42bffa8 100644
--- a/test/SemaObjC/attr-deprecated.m
+++ b/test/SemaObjC/attr-deprecated.m
@@ -77,8 +77,8 @@
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 @@
@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 2d77a20..7beec19 100644
--- a/test/SemaObjC/blocks.m
+++ b/test/SemaObjC/blocks.m
@@ -45,10 +45,10 @@
@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 d77b759..3c45a2c 100644
--- a/test/SemaObjC/call-super-2.m
+++ b/test/SemaObjC/call-super-2.m
@@ -68,8 +68,8 @@
}
- (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 f2d4abd..7df85da 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 452d242..692ff8c 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 ce0db19..e195640 100644
--- a/test/SemaObjC/compare-qualified-id.m
+++ b/test/SemaObjC/compare-qualified-id.m
@@ -24,7 +24,7 @@
@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 98107ee..997ef19 100644
--- a/test/SemaObjC/comptypes-1.m
+++ b/test/SemaObjC/comptypes-1.m
@@ -42,7 +42,7 @@
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 ef0f158..dde504b 100644
--- a/test/SemaObjC/comptypes-7.m
+++ b/test/SemaObjC/comptypes-7.m
@@ -28,7 +28,7 @@
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 @@
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 3b5f609..166e02b 100644
--- a/test/SemaObjC/conditional-expr-3.m
+++ b/test/SemaObjC/conditional-expr-3.m
@@ -31,7 +31,7 @@
}
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 74ab59b..f97224f 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 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 599e37d..d023302 100644
--- a/test/SemaObjC/gcc-cast-ext.m
+++ b/test/SemaObjC/gcc-cast-ext.m
@@ -5,8 +5,8 @@
@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 91bd8a8..46338bb 100644
--- a/test/SemaObjC/invalid-objc-decls-1.m
+++ b/test/SemaObjC/invalid-objc-decls-1.m
@@ -27,8 +27,8 @@
}
@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 c781a56..f9a7b35 100644
--- a/test/SemaObjC/ivar-lookup.m
+++ b/test/SemaObjC/ivar-lookup.m
@@ -29,7 +29,7 @@
@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 0a1b1cd..c58cfcf 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 ed68b22..22466f7 100644
--- a/test/SemaObjC/method-not-defined.m
+++ b/test/SemaObjC/method-not-defined.m
@@ -9,5 +9,5 @@
[[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 532ecfc..9ef83b2 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 ade861e..9701a2e 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 b62a046..a0c10f6 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 5d2da0a..311800f 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 4ef21cc..60c8fd1 100644
--- a/test/SemaObjC/property-9.m
+++ b/test/SemaObjC/property-9.m
@@ -51,14 +51,14 @@
// 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 86da48e..b729a4d 100644
--- a/test/SemaObjC/property-lookup-in-id.m
+++ b/test/SemaObjC/property-lookup-in-id.m
@@ -25,7 +25,7 @@
- (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 3f474be..5b73be5 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 @@
}
@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 @@
@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 @@
// 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) 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)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 9164111..754bf5f 100644
--- a/test/SemaObjC/special-dep-unavail-warning.m
+++ b/test/SemaObjC/special-dep-unavail-warning.m
@@ -50,6 +50,6 @@
@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 0c42e99..cf48c19 100644
--- a/test/SemaObjC/super.m
+++ b/test/SemaObjC/super.m
@@ -21,7 +21,7 @@
@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 da06eca..5afbbb6 100644
--- a/test/SemaObjC/try-catch.m
+++ b/test/SemaObjC/try-catch.m
@@ -40,7 +40,7 @@
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 44d384c..c685fdb 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 ec8e84e..00e0c77 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 8ac0ca4..34f1712 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 @@
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 @@
}
+ (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;
}