diff options
Diffstat (limited to 'test/SemaObjC/protocol-id-test-3.m')
-rw-r--r-- | test/SemaObjC/protocol-id-test-3.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/SemaObjC/protocol-id-test-3.m b/test/SemaObjC/protocol-id-test-3.m index 3538b0e..624bab0 100644 --- a/test/SemaObjC/protocol-id-test-3.m +++ b/test/SemaObjC/protocol-id-test-3.m @@ -8,7 +8,7 @@ @interface INTF @end -id<MyProto1> Func(INTF <MyProto1, MyProto2> *p2) +id<MyProto1> Func(INTF <MyProto1, MyProto2> *p2) // expected-note 2{{passing argument to parameter 'p2' here}} { return p2; } @@ -29,15 +29,15 @@ id<MyProto1> Func(INTF <MyProto1, MyProto2> *p2) id<MyProto1, MyProto2> Gunc2(id <MyProto1>p2) { - Func(p2); // expected-warning {{incompatible type passing 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}} - return p2; // expected-warning {{incompatible type returning 'id<MyProto1>', expected 'id<MyProto1,MyProto2>'}} + Func(p2); // expected-warning {{passing 'id<MyProto1>' to parameter of incompatible type 'INTF<MyProto1,MyProto2> *'}} + return p2; // expected-warning {{returning 'id<MyProto1>' from a function with incompatible result type 'id<MyProto1,MyProto2>'}} } id<MyProto1> Gunc3(id <MyProto2>p2) { - return p2; // expected-warning {{incompatible type returning 'id<MyProto2>', expected 'id<MyProto1>'}} + return p2; // expected-warning {{returning 'id<MyProto2>' from a function with incompatible result type 'id<MyProto1>'}} } @@ -61,13 +61,13 @@ INTF<MyProto1> * Hunc1(id <MyProto1, MyProto2>p2) INTF<MyProto1, MyProto2> * Hunc2(id <MyProto1>p2) { - Func(p2); // expected-warning {{incompatible type passing 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}} - return p2; // expected-warning {{incompatible type returning 'id<MyProto1>', expected 'INTF<MyProto1,MyProto2> *'}} + Func(p2); // expected-warning {{passing 'id<MyProto1>' to parameter of incompatible type 'INTF<MyProto1,MyProto2> *'}} + return p2; // expected-warning {{returning 'id<MyProto1>' from a function with incompatible result type 'INTF<MyProto1,MyProto2> *'}} } INTF<MyProto1> * Hunc3(id <MyProto2>p2) { - return p2; // expected-warning {{incompatible type returning 'id<MyProto2>', expected 'INTF<MyProto1> *'}} + return p2; // expected-warning {{returning 'id<MyProto2>' from a function with incompatible result type 'INTF<MyProto1> *'}} } |