[cfe-commits] r165088 - /cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m
NAKAMURA Takumi
geek4civic at gmail.com
Tue Oct 2 19:35:20 PDT 2012
Author: chapuni
Date: Tue Oct 2 21:35:19 2012
New Revision: 165088
URL: http://llvm.org/viewvc/llvm-project?rev=165088&view=rev
Log:
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.
Modified:
cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m
Modified: cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m?rev=165088&r1=165087&r2=165088&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m (original)
+++ cfe/trunk/test/Analysis/inlining/InlineObjCInstanceMethod.m Tue Oct 2 21:35:19 2012
@@ -84,28 +84,3 @@
void randomlyMessageAnObject(MyClass *arr[], int i) {
(void)[arr[i] getInt];
}
-
-
- at interface EvilChild : MyParent
-- (id)getInt;
- at end
-
- at implementation EvilChild
-- (id)getInt { // expected-warning {{types are incompatible}}
- return self;
-}
- at 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
-}
More information about the cfe-commits
mailing list