From d04a7aed52bd73f87d4f1a1b2925334294983ac1 Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Mon, 19 Mar 2018 04:10:35 -0700 Subject: [PATCH] [clang] Removed the mangling part of Clang global variables in the error messages Reviewed By: mbouaziz Differential Revision: D7292524 fbshipit-source-id: 1127751 --- infer/src/IR/DecompiledExp.ml | 9 +++- infer/src/clang/cGeneral_utils.ml | 2 +- .../c/frontend/arithmetic/int_const.c.dot | 2 +- .../objc/frontend/block/static.m.dot | 16 +++--- .../objc/shared/block/block.m.dot | 6 +-- .../objc/shared/block/dispatch.m.dot | 24 ++++----- .../objc/shared/block/dispatch_examples.m.dot | 50 +++++++++---------- .../objc/shared/block/dispatch_in_macro.m.dot | 6 +-- 8 files changed, 61 insertions(+), 54 deletions(-) diff --git a/infer/src/IR/DecompiledExp.ml b/infer/src/IR/DecompiledExp.ml index 85ac7e5c5..298bd1559 100644 --- a/infer/src/IR/DecompiledExp.ml +++ b/infer/src/IR/DecompiledExp.ml @@ -36,6 +36,10 @@ type vpath = t option let eradicate_java () = Config.eradicate && Language.curr_language_is Java +let split_var_clang var_name = + match String.rsplit2 ~on:'.' var_name with Some (_, name) -> name | _ -> var_name + + (** convert a dexp to a string *) let rec to_string = function | Darray (de1, de2) -> @@ -105,10 +109,13 @@ let rec to_string = function if Language.curr_language_is Java then to_string de ^ "." ^ Typ.Fieldname.to_flat_string f else to_string de ^ "." ^ Typ.Fieldname.to_string f | Dpvar pv -> - Mangled.to_string (Pvar.get_name pv) + let var_name = Mangled.to_string (Pvar.get_name pv) in + if Language.curr_language_is Clang then split_var_clang var_name else var_name | Dpvaraddr pv -> + let var_name = Mangled.to_string (Pvar.get_name pv) in let s = if eradicate_java () then Pvar.get_simplified_name pv + else if Language.curr_language_is Clang then split_var_clang var_name else Mangled.to_string (Pvar.get_name pv) in let ampersand = if eradicate_java () then "" else "&" in diff --git a/infer/src/clang/cGeneral_utils.ml b/infer/src/clang/cGeneral_utils.ml index 74a43131a..c76bb3565 100644 --- a/infer/src/clang/cGeneral_utils.ml +++ b/infer/src/clang/cGeneral_utils.ml @@ -158,7 +158,7 @@ let mk_sil_var trans_unit_ctx named_decl_info decl_info_qual_type_opt procname o if var_decl_info.Clang_ast_t.vdi_is_static_local then Some (fun name_string _ -> - Mangled.from_string (Typ.Procname.to_string outer_procname ^ "_" ^ name_string) ) + Mangled.from_string (Typ.Procname.to_string outer_procname ^ "." ^ name_string) ) else None in mk_sil_global_var trans_unit_ctx ?mk_name decl_info named_decl_info var_decl_info qt diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot index b2055e5c1..5fc0aea0c 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot @@ -19,7 +19,7 @@ digraph cfg { "main.fad58de7366495db4650cfefac2fcd61_5" -> "main.fad58de7366495db4650cfefac2fcd61_4" ; -"main.fad58de7366495db4650cfefac2fcd61_6" [label="6: DeclStmt \n *&#GB$main_kDuration:int=3 [line 17, column 3]\n " shape="box"] +"main.fad58de7366495db4650cfefac2fcd61_6" [label="6: DeclStmt \n *&#GB$main.kDuration:int=3 [line 17, column 3]\n " shape="box"] "main.fad58de7366495db4650cfefac2fcd61_6" -> "main.fad58de7366495db4650cfefac2fcd61_5" ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot b/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot index dcdc2cf33..3c30a73f1 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot @@ -7,7 +7,7 @@ digraph cfg { "test#A#class.c69ae9e6be36a2eeb5dcbaa1187c354d_2" [label="2: Exit A_test \n " color=yellow style=filled] -"test#A#class.c69ae9e6be36a2eeb5dcbaa1187c354d_3" [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:objc_object* [line 25, column 10]\n *&return:objc_object*=n$0 [line 25, column 3]\n " shape="box"] +"test#A#class.c69ae9e6be36a2eeb5dcbaa1187c354d_3" [label="3: Return Stmt \n n$0=*&#GB$A_test.sharedInstance:objc_object* [line 25, column 10]\n *&return:objc_object*=n$0 [line 25, column 3]\n " shape="box"] "test#A#class.c69ae9e6be36a2eeb5dcbaa1187c354d_3" -> "test#A#class.c69ae9e6be36a2eeb5dcbaa1187c354d_2" ; @@ -33,7 +33,7 @@ digraph cfg { "test2#A#class.ce50cb13c3345decc567dd4eb6124604_2" [label="2: Exit A_test2 \n " color=yellow style=filled] -"test2#A#class.ce50cb13c3345decc567dd4eb6124604_3" [label="3: Return Stmt \n n$5=*&#GB$A_test2_sharedInstance:objc_object* [line 44, column 10]\n *&return:objc_object*=n$5 [line 44, column 3]\n " shape="box"] +"test2#A#class.ce50cb13c3345decc567dd4eb6124604_3" [label="3: Return Stmt \n n$5=*&#GB$A_test2.sharedInstance:objc_object* [line 44, column 10]\n *&return:objc_object*=n$5 [line 44, column 3]\n " shape="box"] "test2#A#class.ce50cb13c3345decc567dd4eb6124604_3" -> "test2#A#class.ce50cb13c3345decc567dd4eb6124604_2" ; @@ -41,7 +41,7 @@ digraph cfg { "test2#A#class.ce50cb13c3345decc567dd4eb6124604_4" -> "test2#A#class.ce50cb13c3345decc567dd4eb6124604_3" ; -"test2#A#class.ce50cb13c3345decc567dd4eb6124604_5" [label="5: BinaryOperatorStmt: Assign \n n$7=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 38, column 21]\n n$8=_fun_NSBundleResourceRequest_init(n$7:A*) virtual [line 38, column 20]\n *&#GB$A_test2_sharedInstance:objc_object*=n$8 [line 38, column 3]\n " shape="box"] +"test2#A#class.ce50cb13c3345decc567dd4eb6124604_5" [label="5: BinaryOperatorStmt: Assign \n n$7=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 38, column 21]\n n$8=_fun_NSBundleResourceRequest_init(n$7:A*) virtual [line 38, column 20]\n *&#GB$A_test2.sharedInstance:objc_object*=n$8 [line 38, column 3]\n " shape="box"] "test2#A#class.ce50cb13c3345decc567dd4eb6124604_5" -> "test2#A#class.ce50cb13c3345decc567dd4eb6124604_4" ; @@ -52,7 +52,7 @@ digraph cfg { "test3#A#class.041e0eaf033ae8cfa2af48253dfb07ee_2" [label="2: Exit A_test3 \n " color=yellow style=filled] -"test3#A#class.041e0eaf033ae8cfa2af48253dfb07ee_3" [label="3: Return Stmt \n n$9=*&#GB$A_test3_i:int [line 55, column 10]\n *&return:int=n$9 [line 55, column 3]\n " shape="box"] +"test3#A#class.041e0eaf033ae8cfa2af48253dfb07ee_3" [label="3: Return Stmt \n n$9=*&#GB$A_test3.i:int [line 55, column 10]\n *&return:int=n$9 [line 55, column 3]\n " shape="box"] "test3#A#class.041e0eaf033ae8cfa2af48253dfb07ee_3" -> "test3#A#class.041e0eaf033ae8cfa2af48253dfb07ee_2" ; @@ -67,7 +67,7 @@ digraph cfg { "objc_blockA_test_1.91b00d7c265c98d7bfda34cc42ad73ed_2" [label="2: Exit objc_blockA_test_1 \n " color=yellow style=filled] -"objc_blockA_test_1.91b00d7c265c98d7bfda34cc42ad73ed_3" [label="3: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 21, column 23]\n n$2=_fun_NSBundleResourceRequest_init(n$1:A*) virtual [line 21, column 22]\n *&#GB$A_test_sharedInstance:objc_object*=n$2 [line 21, column 5]\n " shape="box"] +"objc_blockA_test_1.91b00d7c265c98d7bfda34cc42ad73ed_3" [label="3: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 21, column 23]\n n$2=_fun_NSBundleResourceRequest_init(n$1:A*) virtual [line 21, column 22]\n *&#GB$A_test.sharedInstance:objc_object*=n$2 [line 21, column 5]\n " shape="box"] "objc_blockA_test_1.91b00d7c265c98d7bfda34cc42ad73ed_3" -> "objc_blockA_test_1.91b00d7c265c98d7bfda34cc42ad73ed_2" ; @@ -78,7 +78,7 @@ digraph cfg { "objc_blockA_test_leak_2.5b3de3f9ef0695311853bace3ed320b8_2" [label="2: Exit objc_blockA_test_leak_2 \n " color=yellow style=filled] -"objc_blockA_test_leak_2.5b3de3f9ef0695311853bace3ed320b8_3" [label="3: BinaryOperatorStmt: Assign \n n$3=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 31, column 23]\n n$4=_fun_NSBundleResourceRequest_init(n$3:A*) virtual [line 31, column 22]\n *&#GB$A_test_leak_sharedInstance:objc_object*=n$4 [line 31, column 5]\n " shape="box"] +"objc_blockA_test_leak_2.5b3de3f9ef0695311853bace3ed320b8_3" [label="3: BinaryOperatorStmt: Assign \n n$3=_fun___objc_alloc_no_fail(sizeof(t=A):unsigned long) [line 31, column 23]\n n$4=_fun_NSBundleResourceRequest_init(n$3:A*) virtual [line 31, column 22]\n *&#GB$A_test_leak.sharedInstance:objc_object*=n$4 [line 31, column 5]\n " shape="box"] "objc_blockA_test_leak_2.5b3de3f9ef0695311853bace3ed320b8_3" -> "objc_blockA_test_leak_2.5b3de3f9ef0695311853bace3ed320b8_2" ; @@ -89,7 +89,7 @@ digraph cfg { "objc_blockA_test2_3.d73da2e84cb701fb03b2fbe656a01a1b_2" [label="2: Exit objc_blockA_test2_3 \n " color=yellow style=filled] -"objc_blockA_test2_3.d73da2e84cb701fb03b2fbe656a01a1b_3" [label="3: DeclStmt \n n$6=*&#GB$A_test2_sharedInstance:objc_object* [line 41, column 12]\n *&p:objc_object*=n$6 [line 41, column 5]\n " shape="box"] +"objc_blockA_test2_3.d73da2e84cb701fb03b2fbe656a01a1b_3" [label="3: DeclStmt \n n$6=*&#GB$A_test2.sharedInstance:objc_object* [line 41, column 12]\n *&p:objc_object*=n$6 [line 41, column 5]\n " shape="box"] "objc_blockA_test2_3.d73da2e84cb701fb03b2fbe656a01a1b_3" -> "objc_blockA_test2_3.d73da2e84cb701fb03b2fbe656a01a1b_2" ; @@ -100,7 +100,7 @@ digraph cfg { "objc_blockA_test3_4.645dc6f18a9ea7bd77a195ea083890a4_2" [label="2: Exit objc_blockA_test3_4 \n " color=yellow style=filled] -"objc_blockA_test3_4.645dc6f18a9ea7bd77a195ea083890a4_3" [label="3: UnaryOperator \n n$10=*&#GB$A_test3_i:int [line 52, column 5]\n *&#GB$A_test3_i:int=(n$10 + 1) [line 52, column 5]\n " shape="box"] +"objc_blockA_test3_4.645dc6f18a9ea7bd77a195ea083890a4_3" [label="3: UnaryOperator \n n$10=*&#GB$A_test3.i:int [line 52, column 5]\n *&#GB$A_test3.i:int=(n$10 + 1) [line 52, column 5]\n " shape="box"] "objc_blockA_test3_4.645dc6f18a9ea7bd77a195ea083890a4_3" -> "objc_blockA_test3_4.645dc6f18a9ea7bd77a195ea083890a4_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot index b57df0a74..69496b740 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot @@ -18,7 +18,7 @@ digraph cfg { "objc_blockmain1_1.74199543de3b6a9a736f23ef5e45586a_2" [label="2: Exit objc_blockmain1_1 \n " color=yellow style=filled] -"objc_blockmain1_1.74199543de3b6a9a736f23ef5e45586a_3" [label="3: Return Stmt \n n$5=*&e:int [line 35, column 12]\n n$6=*&#GB$main1_s:int [line 35, column 16]\n *&return:int=(n$5 - n$6) [line 35, column 5]\n " shape="box"] +"objc_blockmain1_1.74199543de3b6a9a736f23ef5e45586a_3" [label="3: Return Stmt \n n$5=*&e:int [line 35, column 12]\n n$6=*&#GB$main1.s:int [line 35, column 16]\n *&return:int=(n$5 - n$6) [line 35, column 5]\n " shape="box"] "objc_blockmain1_1.74199543de3b6a9a736f23ef5e45586a_3" -> "objc_blockmain1_1.74199543de3b6a9a736f23ef5e45586a_2" ; @@ -57,7 +57,7 @@ digraph cfg { "main1.38f534a9576db7ec6ebcbca8c111f942_9" -> "main1.38f534a9576db7ec6ebcbca8c111f942_8" ; -"main1.38f534a9576db7ec6ebcbca8c111f942_10" [label="10: DeclStmt \n *&#GB$main1_s:int=3 [line 12, column 3]\n " shape="box"] +"main1.38f534a9576db7ec6ebcbca8c111f942_10" [label="10: DeclStmt \n *&#GB$main1.s:int=3 [line 12, column 3]\n " shape="box"] "main1.38f534a9576db7ec6ebcbca8c111f942_10" -> "main1.38f534a9576db7ec6ebcbca8c111f942_9" ; @@ -91,7 +91,7 @@ digraph cfg { "objc_blockobjc_blockmain1_2_3.0824f0806cf4ebad2920e9a12535d20e_2" [label="2: Exit objc_blockobjc_blockmain1_2_3 \n " color=yellow style=filled] -"objc_blockobjc_blockmain1_2_3.0824f0806cf4ebad2920e9a12535d20e_3" [label="3: Return Stmt \n n$17=*&z:int [line 25, column 14]\n n$18=*&#GB$main1_s:int [line 25, column 18]\n n$19=*&x:int [line 25, column 22]\n n$20=*&bla:int [line 25, column 26]\n *&return:int=(((n$17 + n$18) + n$19) + n$20) [line 25, column 7]\n " shape="box"] +"objc_blockobjc_blockmain1_2_3.0824f0806cf4ebad2920e9a12535d20e_3" [label="3: Return Stmt \n n$17=*&z:int [line 25, column 14]\n n$18=*&#GB$main1.s:int [line 25, column 18]\n n$19=*&x:int [line 25, column 22]\n n$20=*&bla:int [line 25, column 26]\n *&return:int=(((n$17 + n$18) + n$19) + n$20) [line 25, column 7]\n " shape="box"] "objc_blockobjc_blockmain1_2_3.0824f0806cf4ebad2920e9a12535d20e_3" -> "objc_blockobjc_blockmain1_2_3.0824f0806cf4ebad2920e9a12535d20e_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot index 9722e1ac3..2b6323104 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot @@ -7,11 +7,11 @@ digraph cfg { "sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_2" [label="2: Exit DispatchA_sharedInstance \n " color=yellow style=filled] -"sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_3" [label="3: Return Stmt \n n$1=*&#GB$DispatchA_sharedInstance_sharedInstance:objc_object* [line 33, column 10]\n *&return:objc_object*=n$1 [line 33, column 3]\n " shape="box"] +"sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_3" [label="3: Return Stmt \n n$1=*&#GB$DispatchA_sharedInstance.sharedInstance:objc_object* [line 33, column 10]\n *&return:objc_object*=n$1 [line 33, column 3]\n " shape="box"] "sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_3" -> "sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_2" ; -"sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchA_sharedInstance_once:long*,(_fun_objc_blockDispatchA_sharedInstance_1):_fn_(*)) block_params [line 30, column 3]\n " shape="box"] +"sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchA_sharedInstance.once:long*,(_fun_objc_blockDispatchA_sharedInstance_1):_fn_(*)) block_params [line 30, column 3]\n " shape="box"] "sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_4" -> "sharedInstance#DispatchA#class.8992c6086d1ce5c225093940f62386ac_3" ; @@ -26,7 +26,7 @@ digraph cfg { "block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_3" -> "block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_2" ; -"block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_4" [label="4: Call _fun__dispatch_once \n n$6=*&a:DispatchA* [line 39, column 24]\n _fun__dispatch_once(&#GB$DispatchA_block_attribute_once:long*,(_fun_objc_blockDispatchA_block_attribute_2,(n$6 &a:DispatchA*)):_fn_(*)) block_params [line 39, column 3]\n " shape="box"] +"block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_4" [label="4: Call _fun__dispatch_once \n n$6=*&a:DispatchA* [line 39, column 24]\n _fun__dispatch_once(&#GB$DispatchA_block_attribute.once:long*,(_fun_objc_blockDispatchA_block_attribute_2,(n$6 &a:DispatchA*)):_fn_(*)) block_params [line 39, column 3]\n " shape="box"] "block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_4" -> "block_attribute#DispatchA#class.df997e345dbf19ec3438c667c942e14a_3" ; @@ -41,7 +41,7 @@ digraph cfg { "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_2" [label="2: Exit DispatchA_trans \n " color=yellow style=filled] -"trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_3" [label="3: Return Stmt \n n$10=*&#GB$DispatchA_trans_sharedInstance:objc_object* [line 51, column 10]\n *&return:objc_object*=n$10 [line 51, column 3]\n " shape="box"] +"trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_3" [label="3: Return Stmt \n n$10=*&#GB$DispatchA_trans.sharedInstance:objc_object* [line 51, column 10]\n *&return:objc_object*=n$10 [line 51, column 3]\n " shape="box"] "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_3" -> "trans#DispatchA#class.23f9d908a87deca79c235bc76ca6e941_2" ; @@ -60,11 +60,11 @@ digraph cfg { "dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_2" [label="2: Exit DispatchA_dispatch_a_block_variable \n " color=yellow style=filled] -"dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_3" [label="3: Return Stmt \n n$14=*&#GB$DispatchA_dispatch_a_block_variable_static_storage__:objc_object* [line 61, column 10]\n *&return:objc_object*=n$14 [line 61, column 3]\n " shape="box"] +"dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_3" [label="3: Return Stmt \n n$14=*&#GB$DispatchA_dispatch_a_block_variable.static_storage__:objc_object* [line 61, column 10]\n *&return:objc_object*=n$14 [line 61, column 3]\n " shape="box"] "dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_3" -> "dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_2" ; -"dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_4" [label="4: Call _fun__dispatch_once \n n$15=*&initialization_block__:_fn_(*) [line 60, column 32]\n _fun__dispatch_once(&#GB$DispatchA_dispatch_a_block_variable_once_token__:long*,n$15:_fn_(*)) [line 60, column 3]\n " shape="box"] +"dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_4" [label="4: Call _fun__dispatch_once \n n$15=*&initialization_block__:_fn_(*) [line 60, column 32]\n _fun__dispatch_once(&#GB$DispatchA_dispatch_a_block_variable.once_token__:long*,n$15:_fn_(*)) [line 60, column 3]\n " shape="box"] "dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_4" -> "dispatch_a_block_variable#DispatchA#class.3cc12dd22127281b8293b7c046d21bb2_3" ; @@ -79,11 +79,11 @@ digraph cfg { "dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_2" [label="2: Exit DispatchA_dispatch_a_block_variable_from_macro \n " color=yellow style=filled] -"dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_3" [label="3: Fallback node \n n$18=*&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:objc_object* [line 72, column 5]\n " shape="box"] +"dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_3" [label="3: Fallback node \n n$18=*&#GB$DispatchA_dispatch_a_block_variable_from_macro.static_storage__:objc_object* [line 72, column 5]\n " shape="box"] "dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_3" -> "dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_6" ; -"dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_4" [label="4: Call _fun__dispatch_once \n n$19=*&initialization_block__:_fn_(*) [line 71, column 34]\n _fun__dispatch_once(&#GB$DispatchA_dispatch_a_block_variable_from_macro_once_token__:long*,n$19:_fn_(*)) [line 71, column 5]\n " shape="box"] +"dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_4" [label="4: Call _fun__dispatch_once \n n$19=*&initialization_block__:_fn_(*) [line 71, column 34]\n _fun__dispatch_once(&#GB$DispatchA_dispatch_a_block_variable_from_macro.once_token__:long*,n$19:_fn_(*)) [line 71, column 5]\n " shape="box"] "dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_4" -> "dispatch_a_block_variable_from_macro#DispatchA#class.92567a38d5ab3cf637f72030b1097441_3" ; @@ -121,7 +121,7 @@ digraph cfg { "objc_blockDispatchA_sharedInstance_1.0b8803e75b6a82e1a4530bcb953490e2_2" [label="2: Exit objc_blockDispatchA_sharedInstance_1 \n " color=yellow style=filled] -"objc_blockDispatchA_sharedInstance_1.0b8803e75b6a82e1a4530bcb953490e2_3" [label="3: BinaryOperatorStmt: Assign \n n$2=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 31, column 23]\n n$3=_fun_NSBundleResourceRequest_init(n$2:DispatchA*) virtual [line 31, column 22]\n *&#GB$DispatchA_sharedInstance_sharedInstance:objc_object*=n$3 [line 31, column 5]\n " shape="box"] +"objc_blockDispatchA_sharedInstance_1.0b8803e75b6a82e1a4530bcb953490e2_3" [label="3: BinaryOperatorStmt: Assign \n n$2=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 31, column 23]\n n$3=_fun_NSBundleResourceRequest_init(n$2:DispatchA*) virtual [line 31, column 22]\n *&#GB$DispatchA_sharedInstance.sharedInstance:objc_object*=n$3 [line 31, column 5]\n " shape="box"] "objc_blockDispatchA_sharedInstance_1.0b8803e75b6a82e1a4530bcb953490e2_3" -> "objc_blockDispatchA_sharedInstance_1.0b8803e75b6a82e1a4530bcb953490e2_2" ; @@ -132,7 +132,7 @@ digraph cfg { "objc_blockDispatchA_trans_3.80c09fe69dc0d5591de63a0c525de29b_2" [label="2: Exit objc_blockDispatchA_trans_3 \n " color=yellow style=filled] -"objc_blockDispatchA_trans_3.80c09fe69dc0d5591de63a0c525de29b_3" [label="3: BinaryOperatorStmt: Assign \n n$12=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 48, column 23]\n n$13=_fun_NSBundleResourceRequest_init(n$12:DispatchA*) virtual [line 48, column 22]\n *&#GB$DispatchA_trans_sharedInstance:objc_object*=n$13 [line 48, column 5]\n " shape="box"] +"objc_blockDispatchA_trans_3.80c09fe69dc0d5591de63a0c525de29b_3" [label="3: BinaryOperatorStmt: Assign \n n$12=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 48, column 23]\n n$13=_fun_NSBundleResourceRequest_init(n$12:DispatchA*) virtual [line 48, column 22]\n *&#GB$DispatchA_trans.sharedInstance:objc_object*=n$13 [line 48, column 5]\n " shape="box"] "objc_blockDispatchA_trans_3.80c09fe69dc0d5591de63a0c525de29b_3" -> "objc_blockDispatchA_trans_3.80c09fe69dc0d5591de63a0c525de29b_2" ; @@ -143,7 +143,7 @@ digraph cfg { "objc_blockDispatchA_dispatch_a_block_variable_4.2eedc45fca2c35e6e8c11937ba7a2df8_2" [label="2: Exit objc_blockDispatchA_dispatch_a_block_variable_4 \n " color=yellow style=filled] -"objc_blockDispatchA_dispatch_a_block_variable_4.2eedc45fca2c35e6e8c11937ba7a2df8_3" [label="3: BinaryOperatorStmt: Assign \n n$16=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 57, column 25]\n n$17=_fun_NSObject_init(n$16:DispatchA*) virtual [line 57, column 25]\n *&#GB$DispatchA_dispatch_a_block_variable_static_storage__:objc_object*=n$17 [line 57, column 5]\n " shape="box"] +"objc_blockDispatchA_dispatch_a_block_variable_4.2eedc45fca2c35e6e8c11937ba7a2df8_3" [label="3: BinaryOperatorStmt: Assign \n n$16=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 57, column 25]\n n$17=_fun_NSObject_init(n$16:DispatchA*) virtual [line 57, column 25]\n *&#GB$DispatchA_dispatch_a_block_variable.static_storage__:objc_object*=n$17 [line 57, column 5]\n " shape="box"] "objc_blockDispatchA_dispatch_a_block_variable_4.2eedc45fca2c35e6e8c11937ba7a2df8_3" -> "objc_blockDispatchA_dispatch_a_block_variable_4.2eedc45fca2c35e6e8c11937ba7a2df8_2" ; @@ -154,7 +154,7 @@ digraph cfg { "objc_blockDispatchA_dispatch_a_block_variable_from_macro_5.e4f37df69df9d95138cb008e85eedab8_2" [label="2: Exit objc_blockDispatchA_dispatch_a_block_variable_from_macro_5 \n " color=yellow style=filled] -"objc_blockDispatchA_dispatch_a_block_variable_from_macro_5.e4f37df69df9d95138cb008e85eedab8_3" [label="3: BinaryOperatorStmt: Assign \n n$20=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 68, column 27]\n n$21=_fun_NSObject_init(n$20:DispatchA*) virtual [line 68, column 27]\n *&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:objc_object*=n$21 [line 68, column 7]\n " shape="box"] +"objc_blockDispatchA_dispatch_a_block_variable_from_macro_5.e4f37df69df9d95138cb008e85eedab8_3" [label="3: BinaryOperatorStmt: Assign \n n$20=_fun___objc_alloc_no_fail(sizeof(t=DispatchA):unsigned long) [line 68, column 27]\n n$21=_fun_NSObject_init(n$20:DispatchA*) virtual [line 68, column 27]\n *&#GB$DispatchA_dispatch_a_block_variable_from_macro.static_storage__:objc_object*=n$21 [line 68, column 7]\n " shape="box"] "objc_blockDispatchA_dispatch_a_block_variable_from_macro_5.e4f37df69df9d95138cb008e85eedab8_3" -> "objc_blockDispatchA_dispatch_a_block_variable_from_macro_5.e4f37df69df9d95138cb008e85eedab8_2" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot index 87e304878..322d132d5 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot @@ -7,15 +7,15 @@ digraph cfg { "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_2" [label="2: Exit DispatchEx_dispatch_once_example \n " color=yellow style=filled] -"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_3" [label="3: Return Stmt \n n$1=*&#GB$DispatchEx_dispatch_once_example_a:DispatchEx* [line 33, column 10]\n n$2=*n$1.x:int [line 33, column 10]\n *&return:int=n$2 [line 33, column 3]\n " shape="box"] +"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_3" [label="3: Return Stmt \n n$1=*&#GB$DispatchEx_dispatch_once_example.a:DispatchEx* [line 33, column 10]\n n$2=*n$1.x:int [line 33, column 10]\n *&return:int=n$2 [line 33, column 3]\n " shape="box"] "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_3" -> "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_2" ; -"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchEx_dispatch_once_example_onceToken:long*,(_fun_objc_blockDispatchEx_dispatch_once_example_1):_fn_(*)) block_params [line 29, column 3]\n " shape="box"] +"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchEx_dispatch_once_example.onceToken:long*,(_fun_objc_blockDispatchEx_dispatch_once_example_1):_fn_(*)) block_params [line 29, column 3]\n " shape="box"] "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" -> "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_3" ; -"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example_a:DispatchEx*=null [line 25, column 3]\n " shape="box"] +"dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example.a:DispatchEx*=null [line 25, column 3]\n " shape="box"] "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_5" -> "dispatch_once_example#DispatchEx#class.d3456446b1a2d5355c1767887cc8b62c_4" ; @@ -26,7 +26,7 @@ digraph cfg { "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_2" [label="2: Exit DispatchEx_dispatch_async_example \n " color=yellow style=filled] -"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_3" [label="3: Return Stmt \n n$6=*&#GB$DispatchEx_dispatch_async_example_a:DispatchEx* [line 43, column 10]\n n$7=*n$6.x:int [line 43, column 10]\n *&return:int=n$7 [line 43, column 3]\n " shape="box"] +"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_3" [label="3: Return Stmt \n n$6=*&#GB$DispatchEx_dispatch_async_example.a:DispatchEx* [line 43, column 10]\n n$7=*n$6.x:int [line 43, column 10]\n *&return:int=n$7 [line 43, column 3]\n " shape="box"] "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_3" -> "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_2" ; @@ -34,7 +34,7 @@ digraph cfg { "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_4" -> "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_3" ; -"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example_a:DispatchEx*=null [line 37, column 3]\n " shape="box"] +"dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example.a:DispatchEx*=null [line 37, column 3]\n " shape="box"] "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_5" -> "dispatch_async_example#DispatchEx#class.5c5d7347be2a9654ad7e32514189fe54_4" ; @@ -45,7 +45,7 @@ digraph cfg { "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_2" [label="2: Exit DispatchEx_dispatch_after_example \n " color=yellow style=filled] -"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_3" [label="3: Return Stmt \n n$12=*&#GB$DispatchEx_dispatch_after_example_a:DispatchEx* [line 54, column 10]\n n$13=*n$12.x:int [line 54, column 10]\n *&return:int=n$13 [line 54, column 3]\n " shape="box"] +"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_3" [label="3: Return Stmt \n n$12=*&#GB$DispatchEx_dispatch_after_example.a:DispatchEx* [line 54, column 10]\n n$13=*n$12.x:int [line 54, column 10]\n *&return:int=n$13 [line 54, column 3]\n " shape="box"] "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_3" -> "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_2" ; @@ -53,7 +53,7 @@ digraph cfg { "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_4" -> "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_3" ; -"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example_a:DispatchEx*=null [line 47, column 3]\n " shape="box"] +"dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example.a:DispatchEx*=null [line 47, column 3]\n " shape="box"] "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_5" -> "dispatch_after_example#DispatchEx#class.1d25856bd99eb1ef683c8f65ff46d05d_4" ; @@ -64,7 +64,7 @@ digraph cfg { "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_2" [label="2: Exit DispatchEx_dispatch_group_example \n " color=yellow style=filled] -"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_3" [label="3: Return Stmt \n n$19=*&#GB$DispatchEx_dispatch_group_example_a:DispatchEx* [line 63, column 10]\n n$20=*n$19.x:int [line 63, column 10]\n *&return:int=n$20 [line 63, column 3]\n " shape="box"] +"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_3" [label="3: Return Stmt \n n$19=*&#GB$DispatchEx_dispatch_group_example.a:DispatchEx* [line 63, column 10]\n n$20=*n$19.x:int [line 63, column 10]\n *&return:int=n$20 [line 63, column 3]\n " shape="box"] "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_3" -> "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_2" ; @@ -72,7 +72,7 @@ digraph cfg { "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_4" -> "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_3" ; -"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example_a:DispatchEx*=null [line 58, column 3]\n " shape="box"] +"dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example.a:DispatchEx*=null [line 58, column 3]\n " shape="box"] "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_5" -> "dispatch_group_example#DispatchEx#class.f420a75c58eda6d3f0e5e05fadabfc18_4" ; @@ -83,7 +83,7 @@ digraph cfg { "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_2" [label="2: Exit DispatchEx_dispatch_group_notify_example \n " color=yellow style=filled] -"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_3" [label="3: Return Stmt \n n$25=*&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx* [line 72, column 10]\n n$26=*n$25.x:int [line 72, column 10]\n *&return:int=n$26 [line 72, column 3]\n " shape="box"] +"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_3" [label="3: Return Stmt \n n$25=*&#GB$DispatchEx_dispatch_group_notify_example.a:DispatchEx* [line 72, column 10]\n n$26=*n$25.x:int [line 72, column 10]\n *&return:int=n$26 [line 72, column 3]\n " shape="box"] "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_3" -> "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_2" ; @@ -91,7 +91,7 @@ digraph cfg { "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_4" -> "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_3" ; -"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx*=null [line 67, column 3]\n " shape="box"] +"dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example.a:DispatchEx*=null [line 67, column 3]\n " shape="box"] "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_5" -> "dispatch_group_notify_example#DispatchEx#class.f5cf54b07621c319cf7ead3b217760ed_4" ; @@ -102,7 +102,7 @@ digraph cfg { "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_2" [label="2: Exit DispatchEx_dispatch_barrier_example \n " color=yellow style=filled] -"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_3" [label="3: Return Stmt \n n$31=*&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx* [line 81, column 10]\n n$32=*n$31.x:int [line 81, column 10]\n *&return:int=n$32 [line 81, column 3]\n " shape="box"] +"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_3" [label="3: Return Stmt \n n$31=*&#GB$DispatchEx_dispatch_barrier_example.a:DispatchEx* [line 81, column 10]\n n$32=*n$31.x:int [line 81, column 10]\n *&return:int=n$32 [line 81, column 3]\n " shape="box"] "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_3" -> "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_2" ; @@ -110,7 +110,7 @@ digraph cfg { "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_4" -> "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_3" ; -"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx*=null [line 76, column 3]\n " shape="box"] +"dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" [label="5: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example.a:DispatchEx*=null [line 76, column 3]\n " shape="box"] "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_5" -> "dispatch_barrier_example#DispatchEx#class.a541a40f2f04e29019c58e563f7544d8_4" ; @@ -121,11 +121,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_2" [label="2: Exit objc_blockDispatchEx_dispatch_once_example_1 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_3" [label="3: BinaryOperatorStmt: Assign \n n$3=*&#GB$DispatchEx_dispatch_once_example_a:DispatchEx* [line 31, column 5]\n *n$3.x:int=10 [line 31, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_3" [label="3: BinaryOperatorStmt: Assign \n n$3=*&#GB$DispatchEx_dispatch_once_example.a:DispatchEx* [line 31, column 5]\n *n$3.x:int=10 [line 31, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_3" -> "objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_2" ; -"objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_4" [label="4: BinaryOperatorStmt: Assign \n n$4=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 30, column 10]\n n$5=_fun_DispatchEx_init(n$4:DispatchEx*) virtual [line 30, column 9]\n *&#GB$DispatchEx_dispatch_once_example_a:DispatchEx*=n$5 [line 30, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_4" [label="4: BinaryOperatorStmt: Assign \n n$4=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 30, column 10]\n n$5=_fun_DispatchEx_init(n$4:DispatchEx*) virtual [line 30, column 9]\n *&#GB$DispatchEx_dispatch_once_example.a:DispatchEx*=n$5 [line 30, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_4" -> "objc_blockDispatchEx_dispatch_once_example_1.4b4341cb61d8b8d8f01e95edf36e4961_3" ; @@ -136,11 +136,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_2" [label="2: Exit objc_blockDispatchEx_dispatch_async_example_2 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_3" [label="3: BinaryOperatorStmt: Assign \n n$9=*&#GB$DispatchEx_dispatch_async_example_a:DispatchEx* [line 41, column 20]\n *n$9.x:int=10 [line 41, column 20]\n " shape="box"] +"objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_3" [label="3: BinaryOperatorStmt: Assign \n n$9=*&#GB$DispatchEx_dispatch_async_example.a:DispatchEx* [line 41, column 20]\n *n$9.x:int=10 [line 41, column 20]\n " shape="box"] "objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_3" -> "objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_2" ; -"objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_4" [label="4: BinaryOperatorStmt: Assign \n n$10=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 40, column 25]\n n$11=_fun_DispatchEx_init(n$10:DispatchEx*) virtual [line 40, column 24]\n *&#GB$DispatchEx_dispatch_async_example_a:DispatchEx*=n$11 [line 40, column 20]\n " shape="box"] +"objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_4" [label="4: BinaryOperatorStmt: Assign \n n$10=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 40, column 25]\n n$11=_fun_DispatchEx_init(n$10:DispatchEx*) virtual [line 40, column 24]\n *&#GB$DispatchEx_dispatch_async_example.a:DispatchEx*=n$11 [line 40, column 20]\n " shape="box"] "objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_4" -> "objc_blockDispatchEx_dispatch_async_example_2.6510e5756fbcdafec0a18e8d5493346b_3" ; @@ -151,11 +151,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_2" [label="2: Exit objc_blockDispatchEx_dispatch_after_example_3 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_3" [label="3: BinaryOperatorStmt: Assign \n n$16=*&#GB$DispatchEx_dispatch_after_example_a:DispatchEx* [line 52, column 20]\n *n$16.x:int=10 [line 52, column 20]\n " shape="box"] +"objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_3" [label="3: BinaryOperatorStmt: Assign \n n$16=*&#GB$DispatchEx_dispatch_after_example.a:DispatchEx* [line 52, column 20]\n *n$16.x:int=10 [line 52, column 20]\n " shape="box"] "objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_3" -> "objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_2" ; -"objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_4" [label="4: BinaryOperatorStmt: Assign \n n$17=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 51, column 25]\n n$18=_fun_DispatchEx_init(n$17:DispatchEx*) virtual [line 51, column 24]\n *&#GB$DispatchEx_dispatch_after_example_a:DispatchEx*=n$18 [line 51, column 20]\n " shape="box"] +"objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_4" [label="4: BinaryOperatorStmt: Assign \n n$17=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 51, column 25]\n n$18=_fun_DispatchEx_init(n$17:DispatchEx*) virtual [line 51, column 24]\n *&#GB$DispatchEx_dispatch_after_example.a:DispatchEx*=n$18 [line 51, column 20]\n " shape="box"] "objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_4" -> "objc_blockDispatchEx_dispatch_after_example_3.380a17f45400d49d71ce1ba1c29a6ba4_3" ; @@ -166,11 +166,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_2" [label="2: Exit objc_blockDispatchEx_dispatch_group_example_4 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_3" [label="3: BinaryOperatorStmt: Assign \n n$22=*&#GB$DispatchEx_dispatch_group_example_a:DispatchEx* [line 61, column 5]\n *n$22.x:int=10 [line 61, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_3" [label="3: BinaryOperatorStmt: Assign \n n$22=*&#GB$DispatchEx_dispatch_group_example.a:DispatchEx* [line 61, column 5]\n *n$22.x:int=10 [line 61, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_3" -> "objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_2" ; -"objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_4" [label="4: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 60, column 10]\n n$24=_fun_DispatchEx_init(n$23:DispatchEx*) virtual [line 60, column 9]\n *&#GB$DispatchEx_dispatch_group_example_a:DispatchEx*=n$24 [line 60, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_4" [label="4: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 60, column 10]\n n$24=_fun_DispatchEx_init(n$23:DispatchEx*) virtual [line 60, column 9]\n *&#GB$DispatchEx_dispatch_group_example.a:DispatchEx*=n$24 [line 60, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_4" -> "objc_blockDispatchEx_dispatch_group_example_4.65d6b4827e06dfbede68939492105a46_3" ; @@ -181,11 +181,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_2" [label="2: Exit objc_blockDispatchEx_dispatch_group_notify_example_5 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_3" [label="3: BinaryOperatorStmt: Assign \n n$28=*&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx* [line 70, column 5]\n *n$28.x:int=10 [line 70, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_3" [label="3: BinaryOperatorStmt: Assign \n n$28=*&#GB$DispatchEx_dispatch_group_notify_example.a:DispatchEx* [line 70, column 5]\n *n$28.x:int=10 [line 70, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_3" -> "objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_2" ; -"objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_4" [label="4: BinaryOperatorStmt: Assign \n n$29=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 69, column 10]\n n$30=_fun_DispatchEx_init(n$29:DispatchEx*) virtual [line 69, column 9]\n *&#GB$DispatchEx_dispatch_group_notify_example_a:DispatchEx*=n$30 [line 69, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_4" [label="4: BinaryOperatorStmt: Assign \n n$29=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 69, column 10]\n n$30=_fun_DispatchEx_init(n$29:DispatchEx*) virtual [line 69, column 9]\n *&#GB$DispatchEx_dispatch_group_notify_example.a:DispatchEx*=n$30 [line 69, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_4" -> "objc_blockDispatchEx_dispatch_group_notify_example_5.ded89d749d973a9d57680f9d68afb8a0_3" ; @@ -196,11 +196,11 @@ digraph cfg { "objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_2" [label="2: Exit objc_blockDispatchEx_dispatch_barrier_example_6 \n " color=yellow style=filled] -"objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_3" [label="3: BinaryOperatorStmt: Assign \n n$34=*&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx* [line 79, column 5]\n *n$34.x:int=10 [line 79, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_3" [label="3: BinaryOperatorStmt: Assign \n n$34=*&#GB$DispatchEx_dispatch_barrier_example.a:DispatchEx* [line 79, column 5]\n *n$34.x:int=10 [line 79, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_3" -> "objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_2" ; -"objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_4" [label="4: BinaryOperatorStmt: Assign \n n$35=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 78, column 10]\n n$36=_fun_DispatchEx_init(n$35:DispatchEx*) virtual [line 78, column 9]\n *&#GB$DispatchEx_dispatch_barrier_example_a:DispatchEx*=n$36 [line 78, column 5]\n " shape="box"] +"objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_4" [label="4: BinaryOperatorStmt: Assign \n n$35=_fun___objc_alloc_no_fail(sizeof(t=DispatchEx):unsigned long) [line 78, column 10]\n n$36=_fun_DispatchEx_init(n$35:DispatchEx*) virtual [line 78, column 9]\n *&#GB$DispatchEx_dispatch_barrier_example.a:DispatchEx*=n$36 [line 78, column 5]\n " shape="box"] "objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_4" -> "objc_blockDispatchEx_dispatch_barrier_example_6.644987ff1e6d0e0008d4ccdb7e8538ee_3" ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot index f1926a502..9bdaa5cb1 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch_in_macro.m.dot @@ -7,7 +7,7 @@ digraph cfg { "objc_blockDispatchInMacroTest_1.0a2ff27838c52acc175e58f653e6eaad_2" [label="2: Exit objc_blockDispatchInMacroTest_1 \n " color=yellow style=filled] -"objc_blockDispatchInMacroTest_1.0a2ff27838c52acc175e58f653e6eaad_3" [label="3: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(t=NSObject):unsigned long) [line 23, column 10]\n n$2=_fun_NSObject_init(n$1:NSObject*) virtual [line 23, column 10]\n *&#GB$DispatchInMacroTest_static_storage:NSObject*=n$2 [line 23, column 10]\n " shape="box"] +"objc_blockDispatchInMacroTest_1.0a2ff27838c52acc175e58f653e6eaad_3" [label="3: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(t=NSObject):unsigned long) [line 23, column 10]\n n$2=_fun_NSObject_init(n$1:NSObject*) virtual [line 23, column 10]\n *&#GB$DispatchInMacroTest.static_storage:NSObject*=n$2 [line 23, column 10]\n " shape="box"] "objc_blockDispatchInMacroTest_1.0a2ff27838c52acc175e58f653e6eaad_3" -> "objc_blockDispatchInMacroTest_1.0a2ff27838c52acc175e58f653e6eaad_2" ; @@ -18,11 +18,11 @@ digraph cfg { "DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_2" [label="2: Exit DispatchInMacroTest \n " color=yellow style=filled] -"DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_3" [label="3: Fallback node \n n$0=*&#GB$DispatchInMacroTest_static_storage:NSObject* [line 23, column 10]\n " shape="box"] +"DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_3" [label="3: Fallback node \n n$0=*&#GB$DispatchInMacroTest.static_storage:NSObject* [line 23, column 10]\n " shape="box"] "DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_3" -> "DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_5" ; -"DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchInMacroTest_once_token:long*,(_fun_objc_blockDispatchInMacroTest_1):_fn_(*)) block_params [line 23, column 10]\n " shape="box"] +"DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_4" [label="4: Call _fun__dispatch_once \n _fun__dispatch_once(&#GB$DispatchInMacroTest.once_token:long*,(_fun_objc_blockDispatchInMacroTest_1):_fn_(*)) block_params [line 23, column 10]\n " shape="box"] "DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_4" -> "DispatchInMacroTest.f5d56763274a479d06265a2f9562bef1_3" ;