|
|
|
digraph iCFG {
|
|
|
|
60 [label="60: DeclStmt \n *&#GB$A_dispatch_barrier_example_a:class A *=0 [line 69]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
60 -> 55 ;
|
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
|
|
|
59 [label="59: BinaryOperatorStmt: Assign \n n$57=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 71]\n n$55=_fun_NSObject_init(n$57:class A *) virtual [line 71]\n *&#GB$A_dispatch_barrier_example_a:class A *=n$55 [line 71]\n REMOVE_TEMPS(n$55,n$57); [line 71]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
59 -> 58 ;
|
|
|
|
58 [label="58: BinaryOperatorStmt: Assign \n n$54=*&#GB$A_dispatch_barrier_example_a:class A * [line 72]\n *n$54.x:int =10 [line 72]\n REMOVE_TEMPS(n$54); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
58 -> 57 ;
|
|
|
|
57 [label="57: Exit __objc_anonymous_block_A_dispatch_barrier_example______6 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
56 [label="56: Start __objc_anonymous_block_A_dispatch_barrier_example______6\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 70]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
56 -> 59 ;
|
|
|
|
55 [label="55: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 70]\n n$58=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 70]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$58 [line 70]\n n$59=*&#GB$A_dispatch_barrier_example_a:class A * [line 70]\n *n$58.A_dispatch_barrier_example_a:class A *=n$59 [line 70]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 70]\n REMOVE_TEMPS(n$58,n$59); [line 70]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
55 -> 54 ;
|
|
|
|
54 [label="54: Call n$52 \n n$52=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 70]\n n$53=n$52() [line 70]\n REMOVE_TEMPS(n$52,n$53); [line 70]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 70]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
54 -> 53 ;
|
|
|
|
53 [label="53: Return Stmt \n n$50=*&#GB$A_dispatch_barrier_example_a:class A * [line 74]\n n$51=*n$50.x:int [line 74]\n *&return:int =n$51 [line 74]\n REMOVE_TEMPS(n$50,n$51); [line 74]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,true); [line 74]\n APPLY_ABSTRACTION; [line 74]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
53 -> 52 ;
|
|
|
|
52 [label="52: Exit A_dispatch_barrier_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
51 [label="51: Start A_dispatch_barrier_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 68]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 68]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
51 -> 60 ;
|
|
|
|
50 [label="50: DeclStmt \n *&#GB$A_dispatch_group_notify_example_a:class A *=0 [line 60]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
50 -> 45 ;
|
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
|
|
|
49 [label="49: BinaryOperatorStmt: Assign \n n$47=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 62]\n n$45=_fun_NSObject_init(n$47:class A *) virtual [line 62]\n *&#GB$A_dispatch_group_notify_example_a:class A *=n$45 [line 62]\n REMOVE_TEMPS(n$45,n$47); [line 62]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
49 -> 48 ;
|
|
|
|
48 [label="48: BinaryOperatorStmt: Assign \n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 63]\n *n$44.x:int =10 [line 63]\n REMOVE_TEMPS(n$44); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
48 -> 47 ;
|
|
|
|
47 [label="47: Exit __objc_anonymous_block_A_dispatch_group_notify_example______5 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
46 [label="46: Start __objc_anonymous_block_A_dispatch_group_notify_example______5\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 61]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
46 -> 49 ;
|
|
|
|
45 [label="45: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 61]\n n$48=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 61]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$48 [line 61]\n n$49=*&#GB$A_dispatch_group_notify_example_a:class A * [line 61]\n *n$48.A_dispatch_group_notify_example_a:class A *=n$49 [line 61]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 61]\n REMOVE_TEMPS(n$48,n$49); [line 61]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
45 -> 44 ;
|
|
|
|
44 [label="44: Call n$42 \n n$42=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 61]\n n$43=n$42() [line 61]\n REMOVE_TEMPS(n$42,n$43); [line 61]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 61]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
44 -> 43 ;
|
|
|
|
43 [label="43: Return Stmt \n n$40=*&#GB$A_dispatch_group_notify_example_a:class A * [line 65]\n n$41=*n$40.x:int [line 65]\n *&return:int =n$41 [line 65]\n REMOVE_TEMPS(n$40,n$41); [line 65]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,true); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
43 -> 42 ;
|
|
|
|
42 [label="42: Exit A_dispatch_group_notify_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
41 [label="41: Start A_dispatch_group_notify_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 59]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 59]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
41 -> 50 ;
|
|
|
|
40 [label="40: DeclStmt \n *&#GB$A_dispatch_group_example_a:class A *=0 [line 51]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
40 -> 35 ;
|
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
|
|
|
39 [label="39: BinaryOperatorStmt: Assign \n n$37=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 53]\n n$35=_fun_NSObject_init(n$37:class A *) virtual [line 53]\n *&#GB$A_dispatch_group_example_a:class A *=n$35 [line 53]\n REMOVE_TEMPS(n$35,n$37); [line 53]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
39 -> 38 ;
|
|
|
|
38 [label="38: BinaryOperatorStmt: Assign \n n$34=*&#GB$A_dispatch_group_example_a:class A * [line 54]\n *n$34.x:int =10 [line 54]\n REMOVE_TEMPS(n$34); [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
38 -> 37 ;
|
|
|
|
37 [label="37: Exit __objc_anonymous_block_A_dispatch_group_example______4 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
36 [label="36: Start __objc_anonymous_block_A_dispatch_group_example______4\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 52]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
36 -> 39 ;
|
|
|
|
35 [label="35: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 52]\n n$38=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 52]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$38 [line 52]\n n$39=*&#GB$A_dispatch_group_example_a:class A * [line 52]\n *n$38.A_dispatch_group_example_a:class A *=n$39 [line 52]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 52]\n REMOVE_TEMPS(n$38,n$39); [line 52]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
35 -> 34 ;
|
|
|
|
34 [label="34: Call n$32 \n n$32=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 52]\n n$33=n$32() [line 52]\n REMOVE_TEMPS(n$32,n$33); [line 52]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 52]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
34 -> 33 ;
|
|
|
|
33 [label="33: Return Stmt \n n$30=*&#GB$A_dispatch_group_example_a:class A * [line 56]\n n$31=*n$30.x:int [line 56]\n *&return:int =n$31 [line 56]\n REMOVE_TEMPS(n$30,n$31); [line 56]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,true); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
33 -> 32 ;
|
|
|
|
32 [label="32: Exit A_dispatch_group_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
31 [label="31: Start A_dispatch_group_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 50]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 50]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
31 -> 40 ;
|
|
|
|
30 [label="30: DeclStmt \n *&#GB$A_dispatch_after_example_a:class A *=0 [line 41]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
30 -> 25 ;
|
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
|
|
|
29 [label="29: BinaryOperatorStmt: Assign \n n$27=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 44]\n n$25=_fun_NSObject_init(n$27:class A *) virtual [line 44]\n *&#GB$A_dispatch_after_example_a:class A *=n$25 [line 44]\n REMOVE_TEMPS(n$25,n$27); [line 44]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
29 -> 28 ;
|
|
|
|
28 [label="28: BinaryOperatorStmt: Assign \n n$24=*&#GB$A_dispatch_after_example_a:class A * [line 45]\n *n$24.x:int =10 [line 45]\n REMOVE_TEMPS(n$24); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
28 -> 27 ;
|
|
|
|
27 [label="27: Exit __objc_anonymous_block_A_dispatch_after_example______3 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
26 [label="26: Start __objc_anonymous_block_A_dispatch_after_example______3\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 43]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
26 -> 29 ;
|
|
|
|
25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 43]\n n$28=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 43]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$28 [line 43]\n n$29=*&#GB$A_dispatch_after_example_a:class A * [line 43]\n *n$28.A_dispatch_after_example_a:class A *=n$29 [line 43]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 42]\n REMOVE_TEMPS(n$28,n$29); [line 42]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
25 -> 24 ;
|
|
|
|
24 [label="24: Call n$22 \n n$22=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 42]\n n$23=n$22() [line 42]\n REMOVE_TEMPS(n$22,n$23); [line 42]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 42]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
24 -> 23 ;
|
|
|
|
23 [label="23: Return Stmt \n n$20=*&#GB$A_dispatch_after_example_a:class A * [line 47]\n n$21=*n$20.x:int [line 47]\n *&return:int =n$21 [line 47]\n REMOVE_TEMPS(n$20,n$21); [line 47]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,true); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
23 -> 22 ;
|
|
|
|
22 [label="22: Exit A_dispatch_after_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
21 [label="21: Start A_dispatch_after_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 40]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 40]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
21 -> 30 ;
|
|
|
|
20 [label="20: DeclStmt \n *&#GB$A_dispatch_async_example_a:class A *=0 [line 32]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
20 -> 15 ;
|
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
|
|
|
19 [label="19: BinaryOperatorStmt: Assign \n n$17=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 34]\n n$15=_fun_NSObject_init(n$17:class A *) virtual [line 34]\n *&#GB$A_dispatch_async_example_a:class A *=n$15 [line 34]\n REMOVE_TEMPS(n$15,n$17); [line 34]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
19 -> 18 ;
|
|
|
|
18 [label="18: BinaryOperatorStmt: Assign \n n$14=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$14.x:int =10 [line 35]\n REMOVE_TEMPS(n$14); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
18 -> 17 ;
|
|
|
|
17 [label="17: Exit __objc_anonymous_block_A_dispatch_async_example______2 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
16 [label="16: Start __objc_anonymous_block_A_dispatch_async_example______2\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
16 -> 19 ;
|
|
|
|
15 [label="15: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 33]\n n$18=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$18 [line 33]\n n$19=*&#GB$A_dispatch_async_example_a:class A * [line 33]\n *n$18.A_dispatch_async_example_a:class A *=n$19 [line 33]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 33]\n REMOVE_TEMPS(n$18,n$19); [line 33]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
15 -> 14 ;
|
|
|
|
14 [label="14: Call n$12 \n n$12=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 33]\n n$13=n$12() [line 33]\n REMOVE_TEMPS(n$12,n$13); [line 33]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 33]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
14 -> 13 ;
|
|
|
|
13 [label="13: Return Stmt \n n$10=*&#GB$A_dispatch_async_example_a:class A * [line 37]\n n$11=*n$10.x:int [line 37]\n *&return:int =n$11 [line 37]\n REMOVE_TEMPS(n$10,n$11); [line 37]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,true); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
13 -> 12 ;
|
|
|
|
12 [label="12: Exit A_dispatch_async_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
11 [label="11: Start A_dispatch_async_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 31]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 31]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
11 -> 20 ;
|
|
|
|
10 [label="10: DeclStmt \n *&#GB$A_dispatch_once_example_a:class A *=0 [line 21]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
10 -> 5 ;
|
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
|
|
|
9 [label="9: BinaryOperatorStmt: Assign \n n$7=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 25]\n n$5=_fun_NSObject_init(n$7:class A *) virtual [line 25]\n *&#GB$A_dispatch_once_example_a:class A *=n$5 [line 25]\n REMOVE_TEMPS(n$5,n$7); [line 25]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
9 -> 8 ;
|
|
|
|
8 [label="8: BinaryOperatorStmt: Assign \n n$4=*&#GB$A_dispatch_once_example_a:class A * [line 26]\n *n$4.x:int =10 [line 26]\n REMOVE_TEMPS(n$4); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
8 -> 7 ;
|
|
|
|
7 [label="7: Exit __objc_anonymous_block_A_dispatch_once_example______1 \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
6 [label="6: Start __objc_anonymous_block_A_dispatch_once_example______1\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
6 -> 9 ;
|
|
|
|
5 [label="5: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 24]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 24]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$8 [line 24]\n n$9=*&#GB$A_dispatch_once_example_a:class A * [line 24]\n *n$8.A_dispatch_once_example_a:class A *=n$9 [line 24]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 23]\n REMOVE_TEMPS(n$8,n$9); [line 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
5 -> 4 ;
|
|
|
|
4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 23]\n n$3=n$2() [line 23]\n REMOVE_TEMPS(n$2,n$3); [line 23]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 23]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
4 -> 3 ;
|
|
|
|
3 [label="3: Return Stmt \n n$0=*&#GB$A_dispatch_once_example_a:class A * [line 28]\n n$1=*n$0.x:int [line 28]\n *&return:int =n$1 [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,true); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"]
|
|
|
|
|
|
|
|
|
|
|
|
3 -> 2 ;
|
|
|
|
2 [label="2: Exit A_dispatch_once_example \n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
1 [label="1: Start A_dispatch_once_example\nFormals: \nLocals: infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) \n DECLARE_LOCALS(&return,&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 20]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 20]\n " color=yellow style=filled]
|
|
|
|
|
|
|
|
|
|
|
|
1 -> 10 ;
|
|
|
|
}
|