diff options
Diffstat (limited to 'test/SemaObjC/argument-checking.m')
-rw-r--r-- | test/SemaObjC/argument-checking.m | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/SemaObjC/argument-checking.m b/test/SemaObjC/argument-checking.m index 3806a4c..9019a0f 100644 --- a/test/SemaObjC/argument-checking.m +++ b/test/SemaObjC/argument-checking.m @@ -2,24 +2,25 @@ struct S { int a; }; -extern int charStarFunc(char *); -extern int charFunc(char); +extern int charStarFunc(char *); // expected-note{{passing argument to parameter here}} +extern int charFunc(char); // expected-note{{passing argument to parameter here}} @interface Test +alloc; --(int)charStarMeth:(char *)s; --structMeth:(struct S)s; --structMeth:(struct S)s :(struct S)s2; +-(int)charStarMeth:(char *)s; // expected-note{{passing argument to parameter 's' here}} +-structMeth:(struct S)s; // expected-note{{passing argument to parameter 's' here}} +-structMeth:(struct S)s + :(struct S)s2; // expected-note{{passing argument to parameter 's2' here}} @end void test() { id obj = [Test alloc]; struct S sInst; - charStarFunc(1); // expected-warning {{incompatible integer to pointer conversion passing 'int', expected 'char *'}} - charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char [4]', expected 'char'}} + charStarFunc(1); // expected-warning {{incompatible integer to pointer conversion passing 'int' to parameter of type 'char *'}} + charFunc("abc"); // expected-warning {{incompatible pointer to integer conversion passing 'char [4]' to parameter of type 'char'}} [obj charStarMeth:1]; // expected-warning {{incompatible integer to pointer conversion sending 'int'}} - [obj structMeth:1]; // expected-error {{incompatible type sending 'int'}} - [obj structMeth:sInst :1]; // expected-error {{incompatible type sending 'int'}} + [obj structMeth:1]; // expected-error {{sending 'int'}} + [obj structMeth:sInst :1]; // expected-error {{sending 'int'}} } |