From a36db669405dd95f9a321baad69e35aed177ca74 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 8 Mar 2019 10:49:47 -0800 Subject: [PATCH] [SIL][2/3] print all the CallFlags Summary: This seems generally useful. Force people to do it in the future even if they want to avoid having to update the frontend tests. Reviewed By: mbouaziz Differential Revision: D14324758 fbshipit-source-id: cdef3f72a --- infer/src/IR/CallFlags.ml | 33 ++++++++++++------- infer/src/IR/CallFlags.mli | 6 ++-- .../objc/frontend/block/retain_cycle.m.dot | 2 +- .../annotations/nonnull_annotations.m.dot | 4 +-- .../objc/shared/block/BlockVar.m.dot | 10 +++--- .../objc/shared/block/block-it.m.dot | 4 +-- .../objc/shared/block/block.m.dot | 6 ++-- .../objc/shared/block/block_no_args.m.dot | 2 +- .../objc/shared/block/block_release.m.dot | 2 +- .../objc/shared/block/dispatch.m.dot | 2 +- .../MemoryLeakExample.m.dot | 4 +-- .../npe/Nonnull_attribute_example.m.dot | 2 +- 12 files changed, 43 insertions(+), 34 deletions(-) diff --git a/infer/src/IR/CallFlags.ml b/infer/src/IR/CallFlags.ml index 2da99c446..da2cc1b57 100644 --- a/infer/src/IR/CallFlags.ml +++ b/infer/src/IR/CallFlags.ml @@ -13,25 +13,34 @@ module F = Format (** Flags for a procedure call *) type t = - { cf_virtual: bool + { cf_assign_last_arg: bool ; cf_interface: bool - ; cf_assign_last_arg: bool - ; cf_noreturn: bool ; cf_is_objc_block: bool + ; cf_noreturn: bool + ; cf_virtual: bool ; cf_with_block_parameters: bool } [@@deriving compare] -let pp f cf = - if cf.cf_virtual then F.pp_print_string f " virtual" ; - if cf.cf_assign_last_arg then F.pp_print_string f " assign_last" ; - if cf.cf_noreturn then F.pp_print_string f " noreturn" ; - if cf.cf_with_block_parameters then F.pp_print_string f " block_params" +let pp f + ({ cf_assign_last_arg + ; cf_interface + ; cf_is_objc_block + ; cf_noreturn + ; cf_with_block_parameters + ; cf_virtual }[@warning "+9"]) = + if cf_assign_last_arg then F.pp_print_string f " assign_last" ; + if cf_interface then F.pp_print_string f " interface" ; + if cf_is_objc_block then F.pp_print_string f " objc_block" ; + if cf_noreturn then F.pp_print_string f " noreturn" ; + if cf_with_block_parameters then F.pp_print_string f " block_params" ; + if cf_virtual then F.pp_print_string f " virtual" ; + () let default = - { cf_virtual= false + { cf_assign_last_arg= false ; cf_interface= false - ; cf_assign_last_arg= false - ; cf_noreturn= false ; cf_is_objc_block= false - ; cf_with_block_parameters= false } + ; cf_noreturn= false + ; cf_with_block_parameters= false + ; cf_virtual= false } diff --git a/infer/src/IR/CallFlags.mli b/infer/src/IR/CallFlags.mli index c7b65c8a8..c86f23b92 100644 --- a/infer/src/IR/CallFlags.mli +++ b/infer/src/IR/CallFlags.mli @@ -13,11 +13,11 @@ module F = Format (** Flags for a procedure call *) type t = - { cf_virtual: bool + { cf_assign_last_arg: bool ; cf_interface: bool - ; cf_assign_last_arg: bool - ; cf_noreturn: bool ; cf_is_objc_block: bool + ; cf_noreturn: bool + ; cf_virtual: bool ; cf_with_block_parameters: bool } [@@deriving compare] diff --git a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.m.dot b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.m.dot index 182277bcf..75aa43e23 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.m.dot @@ -52,7 +52,7 @@ digraph cfg { "capture#A#instance.d411336575e4bf632a1828f5f5979726_2" [label="2: Exit A_capture \n " color=yellow style=filled] -"capture#A#instance.d411336575e4bf632a1828f5f5979726_3" [label="3: Message Call: sHandler: \n n$3=*&self:A* [line 45, column 4]\n n$4=*n$3._b:B* [line 45, column 4]\n n$0=*&self:A* [line 45, column 16]\n n$5=_fun_B_sHandler:(n$4:B*,(_fun_objc_blockA_capture_1,(n$0 &self:A*)):_fn_(*)) virtual block_params [line 45, column 3]\n NULLIFY(&self); [line 45, column 3]\n EXIT_SCOPE(n$0,n$3,n$4,n$5,self); [line 45, column 3]\n APPLY_ABSTRACTION; [line 45, column 3]\n " shape="box"] +"capture#A#instance.d411336575e4bf632a1828f5f5979726_3" [label="3: Message Call: sHandler: \n n$3=*&self:A* [line 45, column 4]\n n$4=*n$3._b:B* [line 45, column 4]\n n$0=*&self:A* [line 45, column 16]\n n$5=_fun_B_sHandler:(n$4:B*,(_fun_objc_blockA_capture_1,(n$0 &self:A*)):_fn_(*)) block_params virtual [line 45, column 3]\n NULLIFY(&self); [line 45, column 3]\n EXIT_SCOPE(n$0,n$3,n$4,n$5,self); [line 45, column 3]\n APPLY_ABSTRACTION; [line 45, column 3]\n " shape="box"] "capture#A#instance.d411336575e4bf632a1828f5f5979726_3" -> "capture#A#instance.d411336575e4bf632a1828f5f5979726_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot b/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot index fdb8e92a3..700d1968c 100644 --- a/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot @@ -52,7 +52,7 @@ digraph cfg { "test3:#A#instance.28bc2df8df797b21818dc2037239f326_3" -> "test3:#A#instance.28bc2df8df797b21818dc2037239f326_2" ; -"test3:#A#instance.28bc2df8df797b21818dc2037239f326_4" [label="4: Call n$11 \n n$11=*&successBlock:_fn_(*) [line 34, column 3]\n n$12=_fun_NSString_stringWithUTF8String:(\"Yay\":char* const ) [line 34, column 16]\n n$13=n$11(n$12:NSString*) [line 34, column 3]\n NULLIFY(&successBlock); [line 34, column 3]\n EXIT_SCOPE(n$11,n$12,n$13,successBlock); [line 34, column 3]\n " shape="box"] +"test3:#A#instance.28bc2df8df797b21818dc2037239f326_4" [label="4: Call n$11 \n n$11=*&successBlock:_fn_(*) [line 34, column 3]\n n$12=_fun_NSString_stringWithUTF8String:(\"Yay\":char* const ) [line 34, column 16]\n n$13=n$11(n$12:NSString*) objc_block [line 34, column 3]\n NULLIFY(&successBlock); [line 34, column 3]\n EXIT_SCOPE(n$11,n$12,n$13,successBlock); [line 34, column 3]\n " shape="box"] "test3:#A#instance.28bc2df8df797b21818dc2037239f326_4" -> "test3:#A#instance.28bc2df8df797b21818dc2037239f326_3" ; @@ -67,7 +67,7 @@ digraph cfg { "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_3" -> "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_2" ; -"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_4" [label="4: Call n$14 \n n$14=*&successBlock:_fn_(*) [line 39, column 3]\n n$15=_fun_NSString_stringWithUTF8String:(\"Yay\":char* const ) [line 39, column 16]\n n$16=n$14(n$15:NSString*) [line 39, column 3]\n NULLIFY(&successBlock); [line 39, column 3]\n EXIT_SCOPE(n$14,n$15,n$16,successBlock); [line 39, column 3]\n " shape="box"] +"test4:#A#instance.718a300d6fa63609a70f22221a548ee5_4" [label="4: Call n$14 \n n$14=*&successBlock:_fn_(*) [line 39, column 3]\n n$15=_fun_NSString_stringWithUTF8String:(\"Yay\":char* const ) [line 39, column 16]\n n$16=n$14(n$15:NSString*) objc_block [line 39, column 3]\n NULLIFY(&successBlock); [line 39, column 3]\n EXIT_SCOPE(n$14,n$15,n$16,successBlock); [line 39, column 3]\n " shape="box"] "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_4" -> "test4:#A#instance.718a300d6fa63609a70f22221a548ee5_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot index 16039b846..004949832 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/BlockVar.m.dot @@ -99,7 +99,7 @@ digraph cfg { "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_10" -> "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_5" ; -"navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_11" [label="11: DeclStmt \n n$8=_fun___variable_initialization(&x:int) assign_last [line 21, column 3]\n n$6=*&addBlock:_fn_(*) [line 21, column 11]\n n$7=n$6(1:int,2:int) [line 21, column 11]\n *&x:int=n$7 [line 21, column 3]\n EXIT_SCOPE(n$6,n$7,n$8,addBlock); [line 21, column 3]\n " shape="box"] +"navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_11" [label="11: DeclStmt \n n$8=_fun___variable_initialization(&x:int) assign_last [line 21, column 3]\n n$6=*&addBlock:_fn_(*) [line 21, column 11]\n n$7=n$6(1:int,2:int) objc_block [line 21, column 11]\n *&x:int=n$7 [line 21, column 3]\n EXIT_SCOPE(n$6,n$7,n$8,addBlock); [line 21, column 3]\n " shape="box"] "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_11" -> "navigateToURLInBackground#BlockVar#class.f4e64a7a224e4dae5096c3b731a4233e_10" ; @@ -125,7 +125,7 @@ digraph cfg { "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_2" [label="2: Exit BlockVar_blockPostBad \n NULLIFY(&x); [line 35, column 1]\n NULLIFY(&my_block); [line 35, column 1]\n " color=yellow style=filled] -"blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_3" [label="3: Return Stmt \n n$15=*&my_block:_fn_(*) [line 34, column 11]\n n$16=n$15() [line 34, column 11]\n n$17=*n$16:int [line 34, column 10]\n *&return:int=n$17 [line 34, column 3]\n EXIT_SCOPE(n$15,n$16,n$17,my_block); [line 34, column 3]\n APPLY_ABSTRACTION; [line 34, column 3]\n " shape="box"] +"blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_3" [label="3: Return Stmt \n n$15=*&my_block:_fn_(*) [line 34, column 11]\n n$16=n$15() objc_block [line 34, column 11]\n n$17=*n$16:int [line 34, column 10]\n *&return:int=n$17 [line 34, column 3]\n EXIT_SCOPE(n$15,n$16,n$17,my_block); [line 34, column 3]\n APPLY_ABSTRACTION; [line 34, column 3]\n " shape="box"] "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_3" -> "blockPostBad#BlockVar#instance.60292f870cad8c1a5cefdbfe4194d6f9_2" ; @@ -144,7 +144,7 @@ digraph cfg { "blockPostOk#BlockVar#instance.1bb64a946f8b169b31996644931ed82d_2" [label="2: Exit BlockVar_blockPostOk \n NULLIFY(&x); [line 44, column 1]\n NULLIFY(&my_block); [line 44, column 1]\n NULLIFY(&i); [line 44, column 1]\n " color=yellow style=filled] -"blockPostOk#BlockVar#instance.1bb64a946f8b169b31996644931ed82d_3" [label="3: Return Stmt \n n$22=*&my_block:_fn_(*) [line 43, column 11]\n n$23=n$22() [line 43, column 11]\n n$24=*n$23:int [line 43, column 10]\n *&return:int=n$24 [line 43, column 3]\n EXIT_SCOPE(n$22,n$23,n$24,my_block); [line 43, column 3]\n APPLY_ABSTRACTION; [line 43, column 3]\n " shape="box"] +"blockPostOk#BlockVar#instance.1bb64a946f8b169b31996644931ed82d_3" [label="3: Return Stmt \n n$22=*&my_block:_fn_(*) [line 43, column 11]\n n$23=n$22() objc_block [line 43, column 11]\n n$24=*n$23:int [line 43, column 10]\n *&return:int=n$24 [line 43, column 3]\n EXIT_SCOPE(n$22,n$23,n$24,my_block); [line 43, column 3]\n APPLY_ABSTRACTION; [line 43, column 3]\n " shape="box"] "blockPostOk#BlockVar#instance.1bb64a946f8b169b31996644931ed82d_3" -> "blockPostOk#BlockVar#instance.1bb64a946f8b169b31996644931ed82d_2" ; @@ -167,7 +167,7 @@ digraph cfg { "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_2" [label="2: Exit BlockVar_capturedNoNullDeref \n NULLIFY(&i); [line 62, column 1]\n NULLIFY(&x); [line 62, column 1]\n NULLIFY(&my_block); [line 62, column 1]\n " color=yellow style=filled] -"capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_3" [label="3: Return Stmt \n n$37=*&my_block:_fn_(*) [line 61, column 10]\n n$38=n$37() [line 61, column 10]\n *&return:int=n$38 [line 61, column 3]\n EXIT_SCOPE(n$37,n$38,my_block); [line 61, column 3]\n APPLY_ABSTRACTION; [line 61, column 3]\n " shape="box"] +"capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_3" [label="3: Return Stmt \n n$37=*&my_block:_fn_(*) [line 61, column 10]\n n$38=n$37() objc_block [line 61, column 10]\n *&return:int=n$38 [line 61, column 3]\n EXIT_SCOPE(n$37,n$38,my_block); [line 61, column 3]\n APPLY_ABSTRACTION; [line 61, column 3]\n " shape="box"] "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_3" -> "capturedNoNullDeref#BlockVar#instance.ebe646baaabdc58144a5916780ee8c76_2" ; @@ -194,7 +194,7 @@ digraph cfg { "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_2" [label="2: Exit BlockVar_capturedNullDeref \n NULLIFY(&my_block); [line 52, column 1]\n NULLIFY(&x); [line 52, column 1]\n " color=yellow style=filled] -"capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_3" [label="3: Return Stmt \n n$30=*&my_block:_fn_(*) [line 51, column 10]\n n$31=n$30() [line 51, column 10]\n *&return:int=n$31 [line 51, column 3]\n EXIT_SCOPE(n$30,n$31,my_block); [line 51, column 3]\n APPLY_ABSTRACTION; [line 51, column 3]\n " shape="box"] +"capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_3" [label="3: Return Stmt \n n$30=*&my_block:_fn_(*) [line 51, column 10]\n n$31=n$30() objc_block [line 51, column 10]\n *&return:int=n$31 [line 51, column 3]\n EXIT_SCOPE(n$30,n$31,my_block); [line 51, column 3]\n APPLY_ABSTRACTION; [line 51, column 3]\n " shape="box"] "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_3" -> "capturedNullDeref#BlockVar#instance.48c44f7ae26caf7a1ac522523ebac894_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot index 85eaa93e7..4b9e01810 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block-it.m.dot @@ -63,7 +63,7 @@ digraph cfg { "array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_2" [label="2: Exit MyBlock_array \n NULLIFY(&a); [line 28, column 1]\n " color=yellow style=filled] -"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" [label="3: Message Call: enumerateObjectsUsingBlock: \n n$5=*&a:NSArray* [line 19, column 4]\n n$6=_fun_NSArray_enumerateObjectsUsingBlock:(n$5:NSArray*,(_fun_objc_blockMyBlock_array_1):_fn_(*)) virtual block_params [line 19, column 3]\n EXIT_SCOPE(n$5,n$6,a); [line 19, column 3]\n APPLY_ABSTRACTION; [line 19, column 3]\n " shape="box"] +"array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" [label="3: Message Call: enumerateObjectsUsingBlock: \n n$5=*&a:NSArray* [line 19, column 4]\n n$6=_fun_NSArray_enumerateObjectsUsingBlock:(n$5:NSArray*,(_fun_objc_blockMyBlock_array_1):_fn_(*)) block_params virtual [line 19, column 3]\n EXIT_SCOPE(n$5,n$6,a); [line 19, column 3]\n APPLY_ABSTRACTION; [line 19, column 3]\n " shape="box"] "array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_3" -> "array#MyBlock#instance.8be6e5b5e968d186440e1931c9eb40de_2" ; @@ -124,7 +124,7 @@ digraph cfg { "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_13" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_10" ; -"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" [label="14: Call n$22 \n n$22=*&enumerateObjectsUsingBlock:_fn_(*) [line 51, column 5]\n n$23=*&object:objc_object* [line 51, column 32]\n n$24=*&idx:unsigned long [line 51, column 40]\n n$25=*&stop:_Bool* [line 51, column 45]\n n$26=n$22(n$23:objc_object*,n$24:unsigned long,n$25:_Bool*) [line 51, column 5]\n EXIT_SCOPE(n$22,n$23,n$24,n$25,n$26,object); [line 51, column 5]\n " shape="box"] +"array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" [label="14: Call n$22 \n n$22=*&enumerateObjectsUsingBlock:_fn_(*) [line 51, column 5]\n n$23=*&object:objc_object* [line 51, column 32]\n n$24=*&idx:unsigned long [line 51, column 40]\n n$25=*&stop:_Bool* [line 51, column 45]\n n$26=n$22(n$23:objc_object*,n$24:unsigned long,n$25:_Bool*) objc_block [line 51, column 5]\n EXIT_SCOPE(n$22,n$23,n$24,n$25,n$26,object); [line 51, column 5]\n " shape="box"] "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_14" -> "array_trans#MyBlock#instance.13289a590560d0628a3ae5174e716a32_11" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot index 74aba5840..5e758a6cb 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot @@ -26,7 +26,7 @@ digraph cfg { "main1.38f534a9576db7ec6ebcbca8c111f942_4" -> "main1.38f534a9576db7ec6ebcbca8c111f942_3" ; -"main1.38f534a9576db7ec6ebcbca8c111f942_5" [label="5: BinaryOperatorStmt: Assign \n n$3=*&addblock:_fn_(*) [line 35, column 10]\n n$4=n$3(3:int,2:int) [line 35, column 10]\n *&add2:int=n$4 [line 35, column 3]\n NULLIFY(&addblock); [line 35, column 3]\n EXIT_SCOPE(n$3,n$4,addblock); [line 35, column 3]\n " shape="box"] +"main1.38f534a9576db7ec6ebcbca8c111f942_5" [label="5: BinaryOperatorStmt: Assign \n n$3=*&addblock:_fn_(*) [line 35, column 10]\n n$4=n$3(3:int,2:int) objc_block [line 35, column 10]\n *&add2:int=n$4 [line 35, column 3]\n NULLIFY(&addblock); [line 35, column 3]\n EXIT_SCOPE(n$3,n$4,addblock); [line 35, column 3]\n " shape="box"] "main1.38f534a9576db7ec6ebcbca8c111f942_5" -> "main1.38f534a9576db7ec6ebcbca8c111f942_4" ; @@ -34,7 +34,7 @@ digraph cfg { "main1.38f534a9576db7ec6ebcbca8c111f942_6" -> "main1.38f534a9576db7ec6ebcbca8c111f942_5" ; -"main1.38f534a9576db7ec6ebcbca8c111f942_7" [label="7: BinaryOperatorStmt: Assign \n n$7=*&addblock:_fn_(*) [line 29, column 10]\n n$8=n$7(1:int,2:int) [line 29, column 10]\n *&add1:int=n$8 [line 29, column 3]\n NULLIFY(&addblock); [line 29, column 3]\n EXIT_SCOPE(n$7,n$8,addblock); [line 29, column 3]\n " shape="box"] +"main1.38f534a9576db7ec6ebcbca8c111f942_7" [label="7: BinaryOperatorStmt: Assign \n n$7=*&addblock:_fn_(*) [line 29, column 10]\n n$8=n$7(1:int,2:int) objc_block [line 29, column 10]\n *&add1:int=n$8 [line 29, column 3]\n NULLIFY(&addblock); [line 29, column 3]\n EXIT_SCOPE(n$7,n$8,addblock); [line 29, column 3]\n " shape="box"] "main1.38f534a9576db7ec6ebcbca8c111f942_7" -> "main1.38f534a9576db7ec6ebcbca8c111f942_6" ; @@ -72,7 +72,7 @@ digraph cfg { "objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_3" -> "objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_2" ; -"objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_4" [label="4: BinaryOperatorStmt: Assign \n n$13=*&addblock2:_fn_(*) [line 25, column 12]\n n$14=n$13(1:int) [line 25, column 12]\n *&add2:int=n$14 [line 25, column 5]\n NULLIFY(&addblock2); [line 25, column 5]\n EXIT_SCOPE(n$13,n$14,addblock2); [line 25, column 5]\n " shape="box"] +"objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_4" [label="4: BinaryOperatorStmt: Assign \n n$13=*&addblock2:_fn_(*) [line 25, column 12]\n n$14=n$13(1:int) objc_block [line 25, column 12]\n *&add2:int=n$14 [line 25, column 5]\n NULLIFY(&addblock2); [line 25, column 5]\n EXIT_SCOPE(n$13,n$14,addblock2); [line 25, column 5]\n " shape="box"] "objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_4" -> "objc_blockmain1_2.0d332204bbe33f46a9283d2c0df5700a_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot index 3e03c192e..8e9e753c0 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block_no_args.m.dot @@ -51,7 +51,7 @@ digraph cfg { "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_10" -> "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_5" ; -"m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_11" [label="11: Call n$6 \n n$6=*&b:_fn_(*) [line 26, column 3]\n n$7=n$6() [line 26, column 3]\n NULLIFY(&b); [line 26, column 3]\n EXIT_SCOPE(n$6,n$7,b); [line 26, column 3]\n " shape="box"] +"m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_11" [label="11: Call n$6 \n n$6=*&b:_fn_(*) [line 26, column 3]\n n$7=n$6() objc_block [line 26, column 3]\n NULLIFY(&b); [line 26, column 3]\n EXIT_SCOPE(n$6,n$7,b); [line 26, column 3]\n " shape="box"] "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_11" -> "m#My_manager#instance.e773f849d062cb9801497b62f5c98f5e_10" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot index aed1c930e..5cb6043c8 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block_release.m.dot @@ -55,7 +55,7 @@ digraph cfg { "blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_7" -> "blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_4" ; -"blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_8" [label="8: Call n$6 \n n$6=*&b:_fn_(*) [line 27, column 3]\n n$7=*&z:int [line 27, column 5]\n n$8=n$6(n$7:int) [line 27, column 3]\n NULLIFY(&b); [line 27, column 3]\n EXIT_SCOPE(n$6,n$7,n$8,b); [line 27, column 3]\n " shape="box"] +"blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_8" [label="8: Call n$6 \n n$6=*&b:_fn_(*) [line 27, column 3]\n n$7=*&z:int [line 27, column 5]\n n$8=n$6(n$7:int) objc_block [line 27, column 3]\n NULLIFY(&b); [line 27, column 3]\n EXIT_SCOPE(n$6,n$7,n$8,b); [line 27, column 3]\n " shape="box"] "blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_8" -> "blockReleaseNoLeak#My_manager#instance.0c48f80f024250b18a529440f1313af6_5" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot index 27faab57a..a5a32c500 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot @@ -205,7 +205,7 @@ digraph cfg { "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_3" -> "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_2" ; -"trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_4" [label="4: Call n$14 \n n$14=*&dummy_block:_fn_(*) [line 48, column 3]\n n$15=n$14() [line 48, column 3]\n EXIT_SCOPE(n$14,n$15,dummy_block); [line 48, column 3]\n " shape="box"] +"trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_4" [label="4: Call n$14 \n n$14=*&dummy_block:_fn_(*) [line 48, column 3]\n n$15=n$14() objc_block [line 48, column 3]\n EXIT_SCOPE(n$14,n$15,dummy_block); [line 48, column 3]\n " shape="box"] "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_4" -> "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot index 6c27b3fd6..fd53a8007 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot @@ -164,7 +164,7 @@ digraph cfg { "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_2" [label="2: Exit MemoryLeakExample_blockCapturedVarLeak \n NULLIFY(&x); [line 98, column 1]\n NULLIFY(&blk); [line 98, column 1]\n " color=yellow style=filled] -"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_3" [label="3: Return Stmt \n n$60=*&blk:_fn_(*) [line 97, column 10]\n n$61=n$60() [line 97, column 10]\n *&return:int=n$61 [line 97, column 3]\n EXIT_SCOPE(n$60,n$61,blk); [line 97, column 3]\n APPLY_ABSTRACTION; [line 97, column 3]\n " shape="box"] +"blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_3" [label="3: Return Stmt \n n$60=*&blk:_fn_(*) [line 97, column 10]\n n$61=n$60() objc_block [line 97, column 10]\n *&return:int=n$61 [line 97, column 3]\n EXIT_SCOPE(n$60,n$61,blk); [line 97, column 3]\n APPLY_ABSTRACTION; [line 97, column 3]\n " shape="box"] "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_3" -> "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_2" ; @@ -187,7 +187,7 @@ digraph cfg { "blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_2" [label="2: Exit MemoryLeakExample_blockFreeNoLeak \n NULLIFY(&x); [line 109, column 1]\n NULLIFY(&blk); [line 109, column 1]\n " color=yellow style=filled] -"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_3" [label="3: Return Stmt \n n$69=*&blk:_fn_(*) [line 108, column 10]\n n$70=n$69() [line 108, column 10]\n *&return:int=n$70 [line 108, column 3]\n EXIT_SCOPE(n$69,n$70,blk); [line 108, column 3]\n APPLY_ABSTRACTION; [line 108, column 3]\n " shape="box"] +"blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_3" [label="3: Return Stmt \n n$69=*&blk:_fn_(*) [line 108, column 10]\n n$70=n$69() objc_block [line 108, column 10]\n *&return:int=n$70 [line 108, column 3]\n EXIT_SCOPE(n$69,n$70,blk); [line 108, column 3]\n APPLY_ABSTRACTION; [line 108, column 3]\n " shape="box"] "blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_3" -> "blockFreeNoLeak#MemoryLeakExample#instance.6bcefe2afb9f172f8aadbab54d9bd144_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot index 203c8848e..caf71ae96 100644 --- a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot @@ -7,7 +7,7 @@ digraph cfg { "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_2" [label="2: Exit NonnullAtrributeTest \n " color=yellow style=filled] -"NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" [label="3: Call n$0 \n n$0=*&callback:_fn_(*) [line 45, column 3]\n n$1=n$0(null:NSError*,null:objc_object*) [line 45, column 3]\n NULLIFY(&callback); [line 45, column 3]\n EXIT_SCOPE(n$0,n$1,callback); [line 45, column 3]\n APPLY_ABSTRACTION; [line 45, column 3]\n " shape="box"] +"NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" [label="3: Call n$0 \n n$0=*&callback:_fn_(*) [line 45, column 3]\n n$1=n$0(null:NSError*,null:objc_object*) objc_block [line 45, column 3]\n NULLIFY(&callback); [line 45, column 3]\n EXIT_SCOPE(n$0,n$1,callback); [line 45, column 3]\n APPLY_ABSTRACTION; [line 45, column 3]\n " shape="box"] "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_3" -> "NonnullAtrributeTest.69a49728cf7d46ab0add381e5c93704c_2" ;