diff options
Diffstat (limited to 'clang/test/SemaObjC')
| -rw-r--r-- | clang/test/SemaObjC/comptypes-a.m | 14 | ||||
| -rw-r--r-- | clang/test/SemaObjC/method-def-1.m | 2 |
2 files changed, 3 insertions, 13 deletions
diff --git a/clang/test/SemaObjC/comptypes-a.m b/clang/test/SemaObjC/comptypes-a.m index bd8a7490c41..f00369f5cac 100644 --- a/clang/test/SemaObjC/comptypes-a.m +++ b/clang/test/SemaObjC/comptypes-a.m @@ -15,25 +15,15 @@ NSInteger codeAssistantCaseCompareItems(id<PBXCompletionItem> a, id<PBXCompletio { } -#if 0 -FIXME: clang needs to compare each method prototype with its definition (see below). - -GCC produces the following correct warnning: -[snaroff:llvm/tools/clang] snarofflocal% cc -c test/Sema/objc-types-compatible.m -test/Sema/objc-types-compatible.m: In function ‘-[TedWantsToVerifyObjCDoesTheRightThing compareThis:withThat:]’: -test/Sema/objc-types-compatible.m:26: warning: conflicting types for ‘-(id)compareThis:(id <PBXCompletionItem>)a withThat:(id <PBXCompletionItem>)b’ -test/Sema/objc-types-compatible.m:20: warning: previous declaration of ‘-(id)compareThis:(int)a withThat:(id)b’ -#endif - @interface TedWantsToVerifyObjCDoesTheRightThing -- compareThis:(int)a withThat:(id)b; +- compareThis:(int)a withThat:(id)b; // expected-note {{previous definition is here}} @end @implementation TedWantsToVerifyObjCDoesTheRightThing -- compareThis:(id<PBXCompletionItem>)a withThat:(id<PBXCompletionItem>)b { +- compareThis:(id<PBXCompletionItem>)a withThat:(id<PBXCompletionItem>)b { // expected-error {{conflicting types for 'compareThis:withThat:'}} return self; } diff --git a/clang/test/SemaObjC/method-def-1.m b/clang/test/SemaObjC/method-def-1.m index c1cd6294b7e..7948eed580e 100644 --- a/clang/test/SemaObjC/method-def-1.m +++ b/clang/test/SemaObjC/method-def-1.m @@ -16,6 +16,6 @@ @implementation MyClass - (void)myMethod { } -- (void)myMethod2 { } +- (vid)myMethod2 { } // expected-error {{expected a type}} @end |

