diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-10-03 02:35:19 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-10-03 02:35:19 +0000 |
commit | d09074f0ca06626914108f1c0d4e70adeb851e01 (patch) | |
tree | c6509699ef57c7e4f45e8a457fc0fada54113118 | |
parent | bebae7c4647ed671e37ca2edf9eeb160c181a8ac (diff) |
InlineObjCInstanceMethod.m: Remove lines introduced in r165079. It broke some builds, on FreeBSD, Linux and Windows.
error: 'warning' diagnostics expected but not seen:
Line 94: types are incompatible
1 error generated.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165088 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/inlining/InlineObjCInstanceMethod.m | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/test/Analysis/inlining/InlineObjCInstanceMethod.m b/test/Analysis/inlining/InlineObjCInstanceMethod.m index d1b1d945a1..48556dcd49 100644 --- a/test/Analysis/inlining/InlineObjCInstanceMethod.m +++ b/test/Analysis/inlining/InlineObjCInstanceMethod.m @@ -84,28 +84,3 @@ 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 -} |