InlineObjCInstanceMethod.m: Remove lines introduced in r165079. It broke some builds...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 3 Oct 2012 02:35:19 +0000 (02:35 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 3 Oct 2012 02:35:19 +0000 (02:35 +0000)
error: 'warning' diagnostics expected but not seen:
  Line 94: types are incompatible
1 error generated.

llvm-svn: 165088

clang/test/Analysis/inlining/InlineObjCInstanceMethod.m

index d1b1d94..48556dc 100644 (file)
 void randomlyMessageAnObject(MyClass *arr[], int i) {
   (void)[arr[i] getInt];
 }
-
-
-@interface EvilChild : MyParent
-- (id)getInt;
-@end
-
-@implementation EvilChild
-- (id)getInt { // expected-warning {{types are incompatible}}
-  return self;
-}
-@end
-
-int testNonCovariantReturnType() {
-  MyParent *obj = [[EvilChild alloc] init];
-
-  // Devirtualization allows us to directly call -[EvilChild getInt], but
-  // that returns an id, not an int. There is an off-by-default warning for
-  // this, -Woverriding-method-mismatch, and an on-by-default analyzer warning,
-  // osx.cocoa.IncompatibleMethodTypes. This code would probably crash at
-  // runtime, but at least the analyzer shouldn't crash.
-  int x = 1 + [obj getInt];
-
-  [obj release];
-  return 5/(x-1); // no-warning
-}