|
|
|
digraph iCFG {
|
Using clang's method resolution if possible
Summary: public
Using clang's method resolution. This means that, in method calls, clang gives you a pointer to the declaration of the method.
In some cases though, clang doesn't find the right method. For example, when it finds a method in a category, we
need to make it into a method in the corresponding class, because that's how we treat categories in Infer. Moreover,
when it finds a method in a protocol, that is not useful for us, since the implementation will be in some class. Finally,
sometimes the call is on an object of type id, in which case clang doesn't know what is the correct declaration. In
those cases, we fall back to what we were doing before of approximating the method resolution. We also refactor
some of the code.
Reviewed By: akotulski
Differential Revision: D2679766
fb-gh-sync-id: b79bb85
9 years ago
|
|
|
6 [label="6: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class Car ):unsigned long ) [line 13]\n n$4=_fun_NSObject_init(n$6:class Car *) virtual [line 13]\n *&honda:class Car *=n$4 [line 13]\n REMOVE_TEMPS(n$4,n$6); [line 13]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
6 -> 5 ;
|
|
|
|
5 [label="5: Message Call: setRunning: \n n$3=*&honda:class Car * [line 14]\n _fun_Car_setRunning:(n$3:class Car *,1:_Bool ) virtual [line 14]\n REMOVE_TEMPS(n$3); [line 14]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
5 -> 4 ;
|
|
|
|
4 [label="4: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"%d\":char *) [line 15]\n n$2=*&honda:class Car * [line 15]\n n$1=_fun_Car_running(n$2:class Car *) virtual [line 15]\n _fun_NSLog(n$0:struct objc_object *,n$1:int ) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 15]\n NULLIFY(&honda,false); [line 15]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
4 -> 3 ;
|
|
|
|
3 [label="3: Return Stmt \n *&return:int =0 [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
3 -> 2 ;
|
|
|
|
2 [label="2: Exit main \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
1 [label="1: Start main\nFormals: \nLocals: honda:class Car * \n DECLARE_LOCALS(&return,&honda); [line 12]\n NULLIFY(&honda,false); [line 12]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
1 -> 6 ;
|
|
|
|
}
|