1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s
3 typedef signed char BOOL;
4 @protocol NSObject - (BOOL)isEqual:(id)object; @end
5 @interface NSObject <NSObject> {}
14 void clang_analyzer_eval(BOOL);
16 @interface SomeOtherClass : NSObject
19 @implementation SomeOtherClass
20 - (int)getZero { return 0; }
23 @interface MyClass : NSObject
27 @implementation MyClass
28 - (int)getZero { return 1; }
30 // TODO: Not only we should correctly determine that the type of o at runtime
31 // is MyClass, but we should also warn about it.
32 + (void) testCastToParent {
33 id a = [[self alloc] init];
34 SomeOtherClass *o = a;
35 clang_analyzer_eval([o getZero] == 0); // expected-warning{{FALSE}}