diff --git a/infer/src/IR/Pvar.re b/infer/src/IR/Pvar.re index f2a50af04..7308f8f71 100644 --- a/infer/src/IR/Pvar.re +++ b/infer/src/IR/Pvar.re @@ -26,7 +26,7 @@ type pvar_kind = | Abduced_retvar Procname.t Location.t /** synthetic variable to represent return value */ | Abduced_ref_param Procname.t t Location.t /** synthetic variable to represent param passed by reference */ - | Global_var /** gloval variable */ + | Global_var DB.source_file /** global variable */ | Seed_var /** variable used to store the initial value of formal parameters */ /** Names for program variables. */ and t = {pv_name: Mangled.t, pv_kind: pvar_kind}; @@ -62,9 +62,9 @@ let rec pvar_kind_compare k1 k2 => } | (Abduced_ref_param _, _) => (-1) | (_, Abduced_ref_param _) => 1 - | (Global_var, Global_var) => 0 - | (Global_var, _) => (-1) - | (_, Global_var) => 1 + | (Global_var f1, Global_var f2) => DB.source_file_compare f1 f2 + | (Global_var _, _) => (-1) + | (_, Global_var _) => 1 | (Seed_var, Seed_var) => 0 } and compare pv1 pv2 => { @@ -105,7 +105,7 @@ let rec _pp f pv => { } else { F.fprintf f "%a$%a%a|abducedRefParam" Procname.pp n Location.pp l Mangled.pp name } - | Global_var => F.fprintf f "#GB$%a" Mangled.pp name + | Global_var fname => F.fprintf f "#GB<%s>$%a" (DB.source_file_to_string fname) Mangled.pp name | Seed_var => F.fprintf f "old_%a" Mangled.pp name } }; @@ -140,7 +140,7 @@ let pp_latex f pv => { (Mangled.to_string name) (Latex.pp_string Latex.Roman) "abducedRefParam" - | Global_var => Latex.pp_string Latex.Boldface f (Mangled.to_string name) + | Global_var _ => Latex.pp_string Latex.Boldface f (Mangled.to_string name) | Seed_var => F.fprintf f @@ -248,7 +248,11 @@ let is_seed pv => /** Check if the pvar is a global var */ -let is_global pv => pv.pv_kind == Global_var; +let is_global pv => + switch pv.pv_kind { + | Global_var _ => true + | _ => false + }; /** Check if a pvar is the special "this" var */ @@ -285,7 +289,7 @@ let is_frontend_tmp pvar => { let to_callee pname pvar => switch pvar.pv_kind { | Local_var _ => {...pvar, pv_kind: Callee_var pname} - | Global_var => pvar + | Global_var _ => pvar | Callee_var _ | Abduced_retvar _ | Abduced_ref_param _ @@ -315,7 +319,7 @@ let mk_callee (name: Mangled.t) (proc_name: Procname.t) :t => { /** create a global variable with the given name */ -let mk_global (name: Mangled.t) :t => {pv_name: name, pv_kind: Global_var}; +let mk_global (name: Mangled.t) fname :t => {pv_name: name, pv_kind: Global_var fname}; /** create a fresh temporary variable local to procedure [pname]. for use in the frontends only! */ diff --git a/infer/src/IR/Pvar.rei b/infer/src/IR/Pvar.rei index 4534469c6..8717dd12e 100644 --- a/infer/src/IR/Pvar.rei +++ b/infer/src/IR/Pvar.rei @@ -104,7 +104,7 @@ let mk_callee: Mangled.t => Procname.t => t; /** create a global variable with the given name */ -let mk_global: Mangled.t => t; +let mk_global: Mangled.t => DB.source_file => t; /** create a fresh temporary variable local to procedure [pname]. for use in the frontends only! */ diff --git a/infer/src/IR/Sil.re b/infer/src/IR/Sil.re index 077f7afc5..351c12344 100644 --- a/infer/src/IR/Sil.re +++ b/infer/src/IR/Sil.re @@ -2802,4 +2802,4 @@ let hpara_dll_instantiate (para: hpara_dll) cell blink flink elist => { (ids_evars, IList.map (hpred_sub subst) para.body_dll) }; -let custom_error = Pvar.mk_global (Mangled.from_string "INFER_CUSTOM_ERROR"); +let custom_error = Pvar.mk_global (Mangled.from_string "INFER_CUSTOM_ERROR") DB.source_file_empty; diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index fe7eabe9f..fbf7ec9ce 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -126,6 +126,8 @@ let filter_buckets = false let frontend_stats_dir_name = "frontend_stats" +let clang_initializer_prefix = "__infer_globals_initializer_" + let global_tenv_filename = "global.tenv" (** If true, treat calls to no-arg getters as idempotent w.r.t non-nullness *) diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 2f1cebec1..1586f3772 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -68,6 +68,7 @@ val buck_infer_deps_file_name : string val captured_dir_name : string val checks_disabled_by_default : string list val clang_build_output_dir_name : string +val clang_initializer_prefix : string val cpp_models_dir : string val csl_analysis : bool val current_exe : CommandLineOption.exe diff --git a/infer/src/clang/cFrontend_decl.ml b/infer/src/clang/cFrontend_decl.ml index 7ff1771eb..91f5b74da 100644 --- a/infer/src/clang/cFrontend_decl.ml +++ b/infer/src/clang/cFrontend_decl.ml @@ -220,6 +220,21 @@ struct | Some dec -> Logging.out "Methods of %s skipped\n" (Ast_utils.string_of_decl dec) | None -> ()) + | VarDecl (decl_info, { ni_name }, _, { vdi_is_global; vdi_init_expr }) + when vdi_is_global && Option.is_some vdi_init_expr -> + (* create a fake procedure that initializes the global variable so that the variable + initializer can be analyzed by the backend (eg, the SIOF checker) *) + let procname = Procname.from_string_c_fun (Config.clang_initializer_prefix ^ ni_name) in + let ms = CMethod_signature.make_ms procname [] Ast_expressions.create_void_type + [] decl_info.Clang_ast_t.di_source_range false trans_unit_ctx.CFrontend_config.lang + None None None in + let stmt_info = { si_pointer = Ast_utils.get_fresh_pointer (); + si_source_range = decl_info.di_source_range } in + let body = Clang_ast_t.DeclStmt (stmt_info, [], [dec]) in + ignore (CMethod_trans.create_local_procdesc trans_unit_ctx cfg tenv ms [body] [] false); + add_method trans_unit_ctx tenv cg cfg CContext.ContextNoCls procname body None false + None [] + | _ -> ()); let translate = translate_one_declaration trans_unit_ctx tenv cg cfg decl_trans_context in match dec with diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index 5b9c58374..4736e6539 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -745,7 +745,8 @@ struct | None -> Mangled.from_string name_string in name_string, mangled - let mk_sil_var name decl_info_type_ptr_opt procname outer_procname = + let mk_sil_var {CFrontend_config.source_file} name decl_info_type_ptr_opt + procname outer_procname = let name_string = Ast_utils.get_qualified_name name in match decl_info_type_ptr_opt with | Some (decl_info, _, var_decl_info, should_be_mangled) -> @@ -755,7 +756,7 @@ struct if var_decl_info.Clang_ast_t.vdi_is_static_local then Mangled.from_string ((Procname.to_string outer_procname) ^ "_" ^ name_string) else simple_name in - Pvar.mk_global global_mangled_name + Pvar.mk_global global_mangled_name source_file else if not should_be_mangled then Pvar.mk simple_name procname else let start_location = fst decl_info.Clang_ast_t.di_source_range in diff --git a/infer/src/clang/cFrontend_utils.mli b/infer/src/clang/cFrontend_utils.mli index 401c7ce53..175e79a54 100644 --- a/infer/src/clang/cFrontend_utils.mli +++ b/infer/src/clang/cFrontend_utils.mli @@ -88,8 +88,8 @@ sig See get_type for more info and restrictions *) val get_desugared_type : Clang_ast_t.type_ptr -> Clang_ast_t.c_type option -(** returns declaration of the type for certain types - (RecordType, ObjCInterfaceType and None for others *) + (** returns declaration of the type for certain types + (RecordType, ObjCInterfaceType and None for others *) val get_decl_from_typ_ptr : Clang_ast_t.type_ptr -> Clang_ast_t.decl option (** returns string representation of type_ptr @@ -240,8 +240,8 @@ sig val get_var_name_mangled : Clang_ast_t.named_decl_info -> Clang_ast_t.var_decl_info -> (string * Mangled.t) - val mk_sil_var : Clang_ast_t.named_decl_info -> var_info option -> Procname.t -> Procname.t -> - Pvar.t + val mk_sil_var : CFrontend_config.translation_unit_context -> Clang_ast_t.named_decl_info -> + var_info option -> Procname.t -> Procname.t -> Pvar.t (** true if the current language is C++ or ObjC++ *) val is_cpp_translation : CFrontend_config.translation_unit_context -> bool diff --git a/infer/src/clang/cVar_decl.ml b/infer/src/clang/cVar_decl.ml index 20e3f9c73..4f539b9a2 100644 --- a/infer/src/clang/cVar_decl.ml +++ b/infer/src/clang/cVar_decl.ml @@ -21,6 +21,7 @@ let is_custom_var_pointer pointer = let sil_var_of_decl context var_decl procname = let outer_procname = CContext.get_outer_procname context in + let trans_unit_ctx = context.CContext.translation_unit_context in let open Clang_ast_t in match var_decl with | VarDecl (decl_info, name_info, qual_type, var_decl_info) -> @@ -28,11 +29,11 @@ let sil_var_of_decl context var_decl procname = not (is_custom_var_pointer decl_info.Clang_ast_t.di_pointer) in let var_decl_details = Some (decl_info, qual_type.Clang_ast_t.qt_type_ptr, var_decl_info, shoud_be_mangled) in - General_utils.mk_sil_var name_info var_decl_details procname outer_procname + General_utils.mk_sil_var trans_unit_ctx name_info var_decl_details procname outer_procname | ParmVarDecl (decl_info, name_info, qual_type, var_decl_info) -> let var_decl_details = Some (decl_info, qual_type.Clang_ast_t.qt_type_ptr, var_decl_info, false) in - General_utils.mk_sil_var name_info var_decl_details procname outer_procname + General_utils.mk_sil_var trans_unit_ctx name_info var_decl_details procname outer_procname | _ -> assert false let sil_var_of_decl_ref context decl_ref procname = @@ -44,7 +45,8 @@ let sil_var_of_decl_ref context decl_ref procname = match decl_ref.Clang_ast_t.dr_kind with | `ImplicitParam -> let outer_procname = CContext.get_outer_procname context in - General_utils.mk_sil_var name None procname outer_procname + let trans_unit_ctx = context.CContext.translation_unit_context in + General_utils.mk_sil_var trans_unit_ctx name None procname outer_procname | _ -> if is_custom_var_pointer pointer then Pvar.mk (Mangled.from_string name.Clang_ast_t.ni_name) procname diff --git a/infer/src/java/jTrans.ml b/infer/src/java/jTrans.ml index c8d7b2013..65d61a10d 100644 --- a/infer/src/java/jTrans.ml +++ b/infer/src/java/jTrans.ml @@ -420,6 +420,7 @@ let rec expression (context : JContext.t) pc expr = pc context.meth_kind cn in + let file = loc.Location.file in let tenv = JContext.get_tenv context in let type_of_expr = JTransType.expr_type context expr in let trans_var pvar = @@ -512,7 +513,7 @@ let rec expression (context : JContext.t) pc expr = | JBir.StaticField (cn, fs) -> let class_exp = let classname = Mangled.from_string (JBasics.cn_name cn) in - let var_name = Pvar.mk_global classname in + let var_name = Pvar.mk_global classname file in Exp.Lvar var_name in let (instrs, sil_expr) = [], class_exp in let field_name = get_field_name program true tenv cn fs in @@ -790,6 +791,7 @@ let rec instruction (context : JContext.t) pc instr : translation = let ret_type = Cfg.Procdesc.get_ret_type context.procdesc in let loc = get_location context.source_file context.impl pc meth_kind cn in + let file = loc.Location.file in let match_never_null = Inferconfig.never_return_null_matcher in let create_node node_kind sil_instrs = Cfg.Node.create @@ -865,7 +867,7 @@ let rec instruction (context : JContext.t) pc instr : translation = | JBir.AffectStaticField (cn, fs, e_rhs) -> let class_exp = let classname = Mangled.from_string (JBasics.cn_name cn) in - let var_name = Pvar.mk_global classname in + let var_name = Pvar.mk_global classname file in Exp.Lvar var_name in let (stml1, sil_expr_lhs) = [], class_exp in let (stml2, sil_expr_rhs, _) = expression context pc e_rhs in 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 fdeedc6c8..0b2fd7f7a 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -6 [label="6: DeclStmt \n *&#GB$main_kDuration:int =3 [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n *&#GB$main_kDuration:int =3 [line 17]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.c.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.c.dot index 249dc6b89..8e2b8d606 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.c.dot @@ -1,18 +1,18 @@ /* @generated */ digraph iCFG { -7 [label="7: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct anonymous_struct_nestedoperators_union.c:12:1 * [line 32]\n *n$3.a:int =1 [line 32]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:struct anonymous_struct_nestedoperators_union.c:12:1 * [line 32]\n *n$3.a:int =1 [line 32]\n " shape="box"] 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n *&#GB$y.f:int =7 [line 33]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n *&#GB$y.f:int =7 [line 33]\n " shape="box"] 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&#GB$y.f:int [line 34]\n *&#GB$y.g.u:int =n$2 [line 34]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&#GB$y.f:int [line 34]\n *&#GB$y.g.u:int =n$2 [line 34]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct anonymous_struct_nestedoperators_union.c:12:1 * [line 36]\n n$1=*n$0.b:int [line 36]\n *&#GB$y.g.w:int =n$1 [line 36]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:struct anonymous_struct_nestedoperators_union.c:12:1 * [line 36]\n n$1=*n$0.b:int [line 36]\n *&#GB$y.g.w:int =n$1 [line 36]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.cpp.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.cpp.dot index d3f3710a6..2296c827f 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.cpp.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/union.cpp.dot @@ -1,32 +1,43 @@ /* @generated */ digraph iCFG { -9 [label="9: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:class anonymous_struct_nestedoperators_union.cpp:12:1 * [line 32]\n *n$3.a:int =1 [line 32]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n n$3=*&#GB$x:class anonymous_struct_nestedoperators_union.cpp:12:1 * [line 32]\n *n$3.a:int =1 [line 32]\n " shape="box"] + + + 12 -> 11 ; +11 [label="11: BinaryOperatorStmt: Assign \n *&#GB$y.f:int =7 [line 33]\n " shape="box"] + + + 11 -> 10 ; +10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&#GB$y.f:int [line 34]\n *&#GB$y.g.u:int =n$2 [line 34]\n " shape="box"] + + + 10 -> 9 ; +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:class anonymous_struct_nestedoperators_union.cpp:12:1 * [line 36]\n n$1=*n$0.b:int [line 36]\n *&#GB$y.g.w:int =n$1 [line 36]\n " shape="box"] 9 -> 8 ; -8 [label="8: BinaryOperatorStmt: Assign \n *&#GB$y.f:int =7 [line 33]\n " shape="box"] +8 [label="8: Return Stmt \n *&return:int =0 [line 37]\n " shape="box"] 8 -> 7 ; -7 [label="7: BinaryOperatorStmt: Assign \n n$2=*&#GB$y.f:int [line 34]\n *&#GB$y.g.u:int =n$2 [line 34]\n " shape="box"] +7 [label="7: Exit main \n " color=yellow style=filled] - 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&#GB$x:class anonymous_struct_nestedoperators_union.cpp:12:1 * [line 36]\n n$1=*n$0.b:int [line 36]\n *&#GB$y.g.w:int =n$1 [line 36]\n " shape="box"] +6 [label="6: Start main\nFormals: \nLocals: l:int \n DECLARE_LOCALS(&return,&l); [line 29]\n " color=yellow style=filled] - 6 -> 5 ; -5 [label="5: Return Stmt \n *&return:int =0 [line 37]\n " shape="box"] + 6 -> 12 ; +5 [label="5: DeclStmt \n _fun_anonymous_union_nestedoperators_union.cpp:17:1_(&#GB$y:class anonymous_union_nestedoperators_union.cpp:17:1 *) [line 27]\n " shape="box"] 5 -> 4 ; -4 [label="4: Exit main \n " color=yellow style=filled] +4 [label="4: Exit __infer_globals_initializer_y \n " color=yellow style=filled] -3 [label="3: Start main\nFormals: \nLocals: l:int \n DECLARE_LOCALS(&return,&l); [line 29]\n " color=yellow style=filled] +3 [label="3: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] - 3 -> 9 ; + 3 -> 5 ; 2 [label="2: Exit anonymous_union_nestedoperators_union.cpp:17:1_ \n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp.dot deleted file mode 100644 index 8e6fef636..000000000 --- a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp.dot +++ /dev/null @@ -1,43 +0,0 @@ -/* @generated */ -digraph iCFG { -11 [label="11: DeclStmt \n *&#GB$v:int =2 [line 20]\n n$1=*&#GB$v:int [line 20]\n *&local:int =n$1 [line 20]\n " shape="box"] - - - 11 -> 10 ; -10 [label="10: Return Stmt \n *&#GB$v:int =2 [line 21]\n n$0=*&#GB$v:int [line 21]\n *&return:int =n$0 [line 21]\n " shape="box"] - - - 10 -> 9 ; -9 [label="9: Exit test2 \n " color=yellow style=filled] - - -8 [label="8: Start test2\nFormals: \nLocals: local:int \n DECLARE_LOCALS(&return,&local); [line 19]\n " color=yellow style=filled] - - - 8 -> 11 ; -7 [label="7: Return Stmt \n n$0=*&__return_param:class X * [line 15]\n _fun_X_X(&#GB$global:class X *) [line 13]\n _fun_X_X(n$0:class X *,&#GB$global:class X &) [line 15]\n " shape="box"] - - - 7 -> 6 ; -6 [label="6: Exit test \n " color=yellow style=filled] - - -5 [label="5: Start test\nFormals: __return_param:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] - - - 5 -> 7 ; -4 [label="4: Exit X_X \n " color=yellow style=filled] - - -3 [label="3: Start X_X\nFormals: this:class X * __param_0:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - - - 3 -> 4 ; -2 [label="2: Exit X_X \n " color=yellow style=filled] - - -1 [label="1: Start X_X\nFormals: this:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - - - 1 -> 2 ; -} diff --git a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp.dot deleted file mode 100644 index 4e74c7edf..000000000 --- a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp.dot +++ /dev/null @@ -1,35 +0,0 @@ -/* @generated */ -digraph iCFG { -8 [label="8: Return Stmt \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 10]\n *&#GB$global:int =n$1 [line 11]\n n$2=*&#GB$global:int [line 11]\n *&return:int =n$2 [line 11]\n " shape="box"] - - - 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =3 [line 10]\n " shape="box"] - - - 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =2 [line 10]\n " shape="box"] - - - 6 -> 3 ; -5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 10]\n " shape="invhouse"] - - - 5 -> 7 ; -4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 10]\n " shape="invhouse"] - - - 4 -> 6 ; -3 [label="3: + \n " ] - - - 3 -> 8 ; -2 [label="2: Exit test \n " color=yellow style=filled] - - -1 [label="1: Start test\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 11]\n " color=yellow style=filled] - - - 1 -> 4 ; - 1 -> 5 ; -} diff --git a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/global_const/global_const1.cpp rename to infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot new file mode 100644 index 000000000..901c60a19 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot @@ -0,0 +1,65 @@ +/* @generated */ +digraph iCFG { +17 [label="17: DeclStmt \n *&#GB$v:int =2 [line 20]\n n$1=*&#GB$v:int [line 20]\n *&local:int =n$1 [line 20]\n " shape="box"] + + + 17 -> 16 ; +16 [label="16: Return Stmt \n *&#GB$v:int =2 [line 21]\n n$0=*&#GB$v:int [line 21]\n *&return:int =n$0 [line 21]\n " shape="box"] + + + 16 -> 15 ; +15 [label="15: Exit test2 \n " color=yellow style=filled] + + +14 [label="14: Start test2\nFormals: \nLocals: local:int \n DECLARE_LOCALS(&return,&local); [line 19]\n " color=yellow style=filled] + + + 14 -> 17 ; +13 [label="13: DeclStmt \n *&#GB$v:int =2 [line 17]\n " shape="box"] + + + 13 -> 12 ; +12 [label="12: Exit __infer_globals_initializer_v \n " color=yellow style=filled] + + +11 [label="11: Start __infer_globals_initializer_v\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] + + + 11 -> 13 ; +10 [label="10: Return Stmt \n n$0=*&__return_param:class X * [line 15]\n _fun_X_X(&#GB$global:class X *) [line 13]\n _fun_X_X(n$0:class X *,&#GB$global:class X &) [line 15]\n " shape="box"] + + + 10 -> 9 ; +9 [label="9: Exit test \n " color=yellow style=filled] + + +8 [label="8: Start test\nFormals: __return_param:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] + + + 8 -> 10 ; +7 [label="7: DeclStmt \n _fun_X_X(&#GB$global:class X *) [line 13]\n " shape="box"] + + + 7 -> 6 ; +6 [label="6: Exit __infer_globals_initializer_global \n " color=yellow style=filled] + + +5 [label="5: Start __infer_globals_initializer_global\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] + + + 5 -> 7 ; +4 [label="4: Exit X_X \n " color=yellow style=filled] + + +3 [label="3: Start X_X\nFormals: this:class X * __param_0:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] + + + 3 -> 4 ; +2 [label="2: Exit X_X \n " color=yellow style=filled] + + +1 [label="1: Start X_X\nFormals: this:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] + + + 1 -> 2 ; +} diff --git a/infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const2.cpp similarity index 100% rename from infer/tests/codetoanalyze/cpp/frontend/global_const/global_const2.cpp rename to infer/tests/codetoanalyze/cpp/frontend/globals/global_const2.cpp diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/global_const2.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const2.cpp.dot new file mode 100644 index 000000000..bb0c393e3 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const2.cpp.dot @@ -0,0 +1,67 @@ +/* @generated */ +digraph iCFG { +16 [label="16: Return Stmt \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 10]\n *&#GB$global:int =n$1 [line 11]\n n$2=*&#GB$global:int [line 11]\n *&return:int =n$2 [line 11]\n " shape="box"] + + + 16 -> 10 ; +15 [label="15: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =3 [line 10]\n " shape="box"] + + + 15 -> 11 ; +14 [label="14: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =2 [line 10]\n " shape="box"] + + + 14 -> 11 ; +13 [label="13: Prune (false branch) \n PRUNE((1 == 0), false); [line 10]\n " shape="invhouse"] + + + 13 -> 15 ; +12 [label="12: Prune (true branch) \n PRUNE((1 != 0), true); [line 10]\n " shape="invhouse"] + + + 12 -> 14 ; +11 [label="11: + \n " ] + + + 11 -> 16 ; +10 [label="10: Exit test \n " color=yellow style=filled] + + +9 [label="9: Start test\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 11]\n " color=yellow style=filled] + + + 9 -> 12 ; + 9 -> 13 ; +8 [label="8: DeclStmt \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 10]\n *&#GB$global:int =n$1 [line 10]\n " shape="box"] + + + 8 -> 2 ; +7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =3 [line 10]\n " shape="box"] + + + 7 -> 3 ; +6 [label="6: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =2 [line 10]\n " shape="box"] + + + 6 -> 3 ; +5 [label="5: Prune (false branch) \n PRUNE((1 == 0), false); [line 10]\n " shape="invhouse"] + + + 5 -> 7 ; +4 [label="4: Prune (true branch) \n PRUNE((1 != 0), true); [line 10]\n " shape="invhouse"] + + + 4 -> 6 ; +3 [label="3: + \n " ] + + + 3 -> 8 ; +2 [label="2: Exit __infer_globals_initializer_global \n " color=yellow style=filled] + + +1 [label="1: Start __infer_globals_initializer_global\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 10]\n " color=yellow style=filled] + + + 1 -> 4 ; + 1 -> 5 ; +} diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp new file mode 100644 index 000000000..ed9d7c741 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp @@ -0,0 +1,15 @@ +/* + * Copyright (c) 2016 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#include "initializer.h" + +extern int foo(); + +static int x = foo() + 5; +static int y = x + z + 1; diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot new file mode 100644 index 000000000..c8b563f2c --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot @@ -0,0 +1,25 @@ +/* @generated */ +digraph iCFG { +6 [label="6: DeclStmt \n n$0=*&#GB$x:int [line 15]\n n$1=*&#GB$z:int [line 15]\n *&#GB$y:int =((n$0 + n$1) + 1) [line 15]\n " shape="box"] + + + 6 -> 5 ; +5 [label="5: Exit __infer_globals_initializer_y \n " color=yellow style=filled] + + +4 [label="4: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] + + + 4 -> 6 ; +3 [label="3: DeclStmt \n n$0=_fun_foo() [line 14]\n *&#GB$x:int =(n$0 + 5) [line 14]\n " shape="box"] + + + 3 -> 2 ; +2 [label="2: Exit __infer_globals_initializer_x \n " color=yellow style=filled] + + +1 [label="1: Start __infer_globals_initializer_x\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] + + + 1 -> 3 ; +} diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.h b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.h new file mode 100644 index 000000000..d1eb2fbd4 --- /dev/null +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.h @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2016 - present Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +static int z; diff --git a/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot index 37d1f646a..9df409107 100644 --- a/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/namespace/global_variable.cpp.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -15 [label="15: BinaryOperatorStmt: Assign \n *&#GB$f1::A::v:int =1 [line 41]\n " shape="box"] +15 [label="15: BinaryOperatorStmt: Assign \n *&#GB$f1::A::v:int =1 [line 41]\n " shape="box"] 15 -> 14 ; -14 [label="14: BinaryOperatorStmt: Assign \n *&#GB$B::v:int =-2 [line 42]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n *&#GB$B::v:int =-2 [line 42]\n " shape="box"] 14 -> 13 ; -13 [label="13: Return Stmt \n n$0=*&#GB$f1::A::v:int [line 43]\n n$1=*&#GB$B::v:int [line 43]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 43]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=*&#GB$f1::A::v:int [line 43]\n n$1=*&#GB$B::v:int [line 43]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 43]\n " shape="box"] 13 -> 12 ; @@ -19,15 +19,15 @@ digraph iCFG { 11 -> 15 ; -10 [label="10: BinaryOperatorStmt: Assign \n *&#GB$B::v:int =1 [line 35]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n *&#GB$B::v:int =1 [line 35]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n *&#GB$f1::A::v:int =-2 [line 36]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n *&#GB$f1::A::v:int =-2 [line 36]\n " shape="box"] 9 -> 8 ; -8 [label="8: Return Stmt \n n$0=*&#GB$f1::A::v:int [line 37]\n n$1=*&#GB$B::v:int [line 37]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 37]\n " shape="box"] +8 [label="8: Return Stmt \n n$0=*&#GB$f1::A::v:int [line 37]\n n$1=*&#GB$B::v:int [line 37]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 37]\n " shape="box"] 8 -> 7 ; @@ -38,15 +38,15 @@ digraph iCFG { 6 -> 10 ; -5 [label="5: BinaryOperatorStmt: Assign \n *&#GB$f1::val:int =1 [line 29]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n *&#GB$f1::val:int =1 [line 29]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n *&#GB$f2::val:int =-2 [line 30]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n *&#GB$f2::val:int =-2 [line 30]\n " shape="box"] 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&#GB$f1::val:int [line 31]\n n$1=*&#GB$f2::val:int [line 31]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 31]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$f1::val:int [line 31]\n n$1=*&#GB$f2::val:int [line 31]\n *&return:int =(1 / ((n$0 + n$1) + 1)) [line 31]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot index 55c343d94..476c8ddfb 100644 --- a/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/namespace/namespace.cpp.dot @@ -1,67 +1,89 @@ /* @generated */ digraph iCFG { -24 [label="24: DeclStmt \n _fun_foo::my_record_(&x:class foo::my_record *) [line 46]\n " shape="box"] +30 [label="30: DeclStmt \n _fun_foo::my_record_(&x:class foo::my_record *) [line 46]\n " shape="box"] + + + 30 -> 29 ; +29 [label="29: DeclStmt \n _fun_bar::Rectangle_Rectangle(&rect1:class bar::Rectangle *) [line 48]\n " shape="box"] + + + 29 -> 28 ; +28 [label="28: Call _fun_bar::Rectangle_set_values \n _=*&rect1:class bar::Rectangle [line 49]\n _fun_bar::Rectangle_set_values(&rect1:class bar::Rectangle &,3:int ,4:int ) [line 49]\n " shape="box"] + + + 28 -> 27 ; +27 [label="27: DeclStmt \n _fun_foo::Rectangle_Rectangle(&rect2:class foo::Rectangle *) [line 51]\n " shape="box"] + + + 27 -> 26 ; +26 [label="26: Call _fun_foo::Rectangle_set_values \n _=*&rect2:class foo::Rectangle [line 52]\n _fun_foo::Rectangle_set_values(&rect2:class foo::Rectangle &,7:int ,10:int ) [line 52]\n " shape="box"] + + + 26 -> 25 ; +25 [label="25: BinaryOperatorStmt: Assign \n *&x.a:int =10 [line 54]\n " shape="box"] + + + 25 -> 24 ; +24 [label="24: BinaryOperatorStmt: Assign \n n$2=_fun_foo::value() [line 55]\n *&i:int =n$2 [line 55]\n " shape="box"] 24 -> 23 ; -23 [label="23: DeclStmt \n _fun_bar::Rectangle_Rectangle(&rect1:class bar::Rectangle *) [line 48]\n " shape="box"] +23 [label="23: BinaryOperatorStmt: Assign \n n$1=_fun_bar::value() [line 56]\n *&i:int =n$1 [line 56]\n " shape="box"] 23 -> 22 ; -22 [label="22: Call _fun_bar::Rectangle_set_values \n _=*&rect1:class bar::Rectangle [line 49]\n _fun_bar::Rectangle_set_values(&rect1:class bar::Rectangle &,3:int ,4:int ) [line 49]\n " shape="box"] +22 [label="22: BinaryOperatorStmt: Assign \n *&#GB$bar::pi:double =3.141600 [line 57]\n n$0=*&#GB$bar::pi:double [line 57]\n *&j:double =n$0 [line 57]\n " shape="box"] 22 -> 21 ; -21 [label="21: DeclStmt \n _fun_foo::Rectangle_Rectangle(&rect2:class foo::Rectangle *) [line 51]\n " shape="box"] +21 [label="21: Return Stmt \n *&return:int =0 [line 58]\n " shape="box"] 21 -> 20 ; -20 [label="20: Call _fun_foo::Rectangle_set_values \n _=*&rect2:class foo::Rectangle [line 52]\n _fun_foo::Rectangle_set_values(&rect2:class foo::Rectangle &,7:int ,10:int ) [line 52]\n " shape="box"] +20 [label="20: Exit main \n " color=yellow style=filled] - 20 -> 19 ; -19 [label="19: BinaryOperatorStmt: Assign \n *&x.a:int =10 [line 54]\n " shape="box"] +19 [label="19: Start main\nFormals: \nLocals: rect2:class foo::Rectangle rect1:class bar::Rectangle x:class foo::my_record j:double i:int \n DECLARE_LOCALS(&return,&rect2,&rect1,&x,&j,&i); [line 41]\n " color=yellow style=filled] - 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$2=_fun_foo::value() [line 55]\n *&i:int =n$2 [line 55]\n " shape="box"] + 19 -> 30 ; +18 [label="18: DeclStmt \n _fun_bar::Rectangle_Rectangle(&#GB$bar::rect:class bar::Rectangle *) [line 38]\n " shape="box"] 18 -> 17 ; -17 [label="17: BinaryOperatorStmt: Assign \n n$1=_fun_bar::value() [line 56]\n *&i:int =n$1 [line 56]\n " shape="box"] +17 [label="17: Exit __infer_globals_initializer_rect \n " color=yellow style=filled] - 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n *&#GB$bar::pi:double =3.141600 [line 57]\n n$0=*&#GB$bar::pi:double [line 57]\n *&j:double =n$0 [line 57]\n " shape="box"] +16 [label="16: Start __infer_globals_initializer_rect\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] - 16 -> 15 ; -15 [label="15: Return Stmt \n *&return:int =0 [line 58]\n " shape="box"] + 16 -> 18 ; +15 [label="15: Exit bar::Rectangle_Rectangle \n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: Exit main \n " color=yellow style=filled] +14 [label="14: Start bar::Rectangle_Rectangle\nFormals: this:class bar::Rectangle *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] -13 [label="13: Start main\nFormals: \nLocals: rect2:class foo::Rectangle rect1:class bar::Rectangle x:class foo::my_record j:double i:int \n DECLARE_LOCALS(&return,&rect2,&rect1,&x,&j,&i); [line 41]\n " color=yellow style=filled] + 14 -> 15 ; +13 [label="13: Return Stmt \n *&#GB$bar::pi:double =3.141600 [line 30]\n n$0=*&#GB$bar::pi:double [line 30]\n *&return:double =(2 * n$0) [line 30]\n " shape="box"] - 13 -> 24 ; -12 [label="12: Exit bar::Rectangle_Rectangle \n " color=yellow style=filled] + 13 -> 12 ; +12 [label="12: Exit bar::value \n " color=yellow style=filled] -11 [label="11: Start bar::Rectangle_Rectangle\nFormals: this:class bar::Rectangle *\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] +11 [label="11: Start bar::value\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] - 11 -> 12 ; -10 [label="10: Return Stmt \n *&#GB$bar::pi:double =3.141600 [line 30]\n n$0=*&#GB$bar::pi:double [line 30]\n *&return:double =(2 * n$0) [line 30]\n " shape="box"] + 11 -> 13 ; +10 [label="10: DeclStmt \n *&#GB$bar::pi:double =3.141600 [line 29]\n " shape="box"] 10 -> 9 ; -9 [label="9: Exit bar::value \n " color=yellow style=filled] +9 [label="9: Exit __infer_globals_initializer_pi \n " color=yellow style=filled] -8 [label="8: Start bar::value\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] +8 [label="8: Start __infer_globals_initializer_pi\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled] 8 -> 10 ; diff --git a/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot index ec5ff2469..133bcd911 100644 --- a/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/reference/member_access_from_return.cpp.dot @@ -1,54 +1,65 @@ /* @generated */ digraph iCFG { -19 [label="19: DeclStmt \n n$3=_fun_get_ptr() [line 25]\n n$4=*n$3.f:int [line 25]\n *&f:int =n$4 [line 25]\n " shape="box"] +22 [label="22: DeclStmt \n n$3=_fun_get_ptr() [line 25]\n n$4=*n$3.f:int [line 25]\n *&f:int =n$4 [line 25]\n " shape="box"] - 19 -> 18 ; -18 [label="18: DeclStmt \n n$0=_fun_get_ptr() [line 26]\n _=*n$0:class X [line 26]\n n$2=_fun_X_call(n$0:class X *) [line 26]\n *&c:int =n$2 [line 26]\n " shape="box"] + 22 -> 21 ; +21 [label="21: DeclStmt \n n$0=_fun_get_ptr() [line 26]\n _=*n$0:class X [line 26]\n n$2=_fun_X_call(n$0:class X *) [line 26]\n *&c:int =n$2 [line 26]\n " shape="box"] + + + 21 -> 20 ; +20 [label="20: Exit test_ptr \n " color=yellow style=filled] + + +19 [label="19: Start test_ptr\nFormals: \nLocals: c:int f:int \n DECLARE_LOCALS(&return,&c,&f); [line 24]\n " color=yellow style=filled] + + + 19 -> 22 ; +18 [label="18: DeclStmt \n n$3=_fun_get_ref() [line 20]\n n$4=*n$3.f:int [line 20]\n *&f:int =n$4 [line 20]\n " shape="box"] 18 -> 17 ; -17 [label="17: Exit test_ptr \n " color=yellow style=filled] +17 [label="17: DeclStmt \n n$0=_fun_get_ref() [line 21]\n _=*n$0:class X [line 21]\n n$2=_fun_X_call(n$0:class X &) [line 21]\n *&c:int =n$2 [line 21]\n " shape="box"] -16 [label="16: Start test_ptr\nFormals: \nLocals: c:int f:int \n DECLARE_LOCALS(&return,&c,&f); [line 24]\n " color=yellow style=filled] + 17 -> 16 ; +16 [label="16: Exit test_ref \n " color=yellow style=filled] - 16 -> 19 ; -15 [label="15: DeclStmt \n n$3=_fun_get_ref() [line 20]\n n$4=*n$3.f:int [line 20]\n *&f:int =n$4 [line 20]\n " shape="box"] +15 [label="15: Start test_ref\nFormals: \nLocals: c:int f:int \n DECLARE_LOCALS(&return,&c,&f); [line 19]\n " color=yellow style=filled] - 15 -> 14 ; -14 [label="14: DeclStmt \n n$0=_fun_get_ref() [line 21]\n _=*n$0:class X [line 21]\n n$2=_fun_X_call(n$0:class X &) [line 21]\n *&c:int =n$2 [line 21]\n " shape="box"] + 15 -> 18 ; +14 [label="14: Return Stmt \n *&return:class X &=&#GB$global [line 17]\n " shape="box"] 14 -> 13 ; -13 [label="13: Exit test_ref \n " color=yellow style=filled] +13 [label="13: Exit get_ref \n " color=yellow style=filled] -12 [label="12: Start test_ref\nFormals: \nLocals: c:int f:int \n DECLARE_LOCALS(&return,&c,&f); [line 19]\n " color=yellow style=filled] +12 [label="12: Start get_ref\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] - 12 -> 15 ; -11 [label="11: Return Stmt \n *&return:class X &=&#GB$global [line 17]\n " shape="box"] + 12 -> 14 ; +11 [label="11: Return Stmt \n *&return:class X *=&#GB$global [line 16]\n " shape="box"] 11 -> 10 ; -10 [label="10: Exit get_ref \n " color=yellow style=filled] +10 [label="10: Exit get_ptr \n " color=yellow style=filled] -9 [label="9: Start get_ref\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] +9 [label="9: Start get_ptr\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] 9 -> 11 ; -8 [label="8: Return Stmt \n *&return:class X *=&#GB$global [line 16]\n " shape="box"] +8 [label="8: DeclStmt \n _fun_X_X(&#GB$global:class X *) [line 15]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit get_ptr \n " color=yellow style=filled] +7 [label="7: Exit __infer_globals_initializer_global \n " color=yellow style=filled] -6 [label="6: Start get_ptr\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] +6 [label="6: Start __infer_globals_initializer_global\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] 6 -> 8 ; diff --git a/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot index 1f7228201..5d8202952 100644 --- a/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/reference/reference_struct_e2e.cpp.dot @@ -1,364 +1,375 @@ /* @generated */ digraph iCFG { -123 [label="123: Call _fun_X_zero \n n$4=_fun_get_global_ref() [line 124]\n _=*n$4:class X [line 124]\n _fun_X_zero(n$4:class X &) [line 124]\n " shape="box"] +126 [label="126: Call _fun_X_zero \n n$4=_fun_get_global_ref() [line 124]\n _=*n$4:class X [line 124]\n _fun_X_zero(n$4:class X &) [line 124]\n " shape="box"] - 123 -> 122 ; -122 [label="122: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ref() [line 125]\n *n$3.f:int =1 [line 125]\n " shape="box"] + 126 -> 125 ; +125 [label="125: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ref() [line 125]\n *n$3.f:int =1 [line 125]\n " shape="box"] - 122 -> 121 ; -121 [label="121: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 126]\n _=*n$0:class X [line 126]\n n$2=_fun_X_div(n$0:class X &) [line 126]\n " shape="box"] + 125 -> 124 ; +124 [label="124: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 126]\n _=*n$0:class X [line 126]\n n$2=_fun_X_div(n$0:class X &) [line 126]\n " shape="box"] + + + 124 -> 123 ; +123 [label="123: Exit get_global_ref_div1_field \n " color=yellow style=filled] + + +122 [label="122: Start get_global_ref_div1_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 123]\n " color=yellow style=filled] + + + 122 -> 126 ; +121 [label="121: Call _fun_X_nonzero \n n$4=_fun_get_global_ref() [line 118]\n _=*n$4:class X [line 118]\n _fun_X_nonzero(n$4:class X &) [line 118]\n " shape="box"] 121 -> 120 ; -120 [label="120: Exit get_global_ref_div1_field \n " color=yellow style=filled] +120 [label="120: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ref() [line 119]\n *n$3.f:int =0 [line 119]\n " shape="box"] -119 [label="119: Start get_global_ref_div1_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 123]\n " color=yellow style=filled] + 120 -> 119 ; +119 [label="119: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 120]\n _=*n$0:class X [line 120]\n n$2=_fun_X_div(n$0:class X &) [line 120]\n " shape="box"] - 119 -> 123 ; -118 [label="118: Call _fun_X_nonzero \n n$4=_fun_get_global_ref() [line 118]\n _=*n$4:class X [line 118]\n _fun_X_nonzero(n$4:class X &) [line 118]\n " shape="box"] + 119 -> 118 ; +118 [label="118: Exit get_global_ref_div0_field \n " color=yellow style=filled] - 118 -> 117 ; -117 [label="117: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ref() [line 119]\n *n$3.f:int =0 [line 119]\n " shape="box"] +117 [label="117: Start get_global_ref_div0_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 117]\n " color=yellow style=filled] - 117 -> 116 ; -116 [label="116: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 120]\n _=*n$0:class X [line 120]\n n$2=_fun_X_div(n$0:class X &) [line 120]\n " shape="box"] + 117 -> 121 ; +116 [label="116: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ref() [line 112]\n *n$5.f:int =0 [line 112]\n " shape="box"] 116 -> 115 ; -115 [label="115: Exit get_global_ref_div0_field \n " color=yellow style=filled] +115 [label="115: Call _fun_X_nonzero \n n$3=_fun_get_global_ref() [line 113]\n _=*n$3:class X [line 113]\n _fun_X_nonzero(n$3:class X &) [line 113]\n " shape="box"] -114 [label="114: Start get_global_ref_div0_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 117]\n " color=yellow style=filled] + 115 -> 114 ; +114 [label="114: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 114]\n _=*n$0:class X [line 114]\n n$2=_fun_X_div(n$0:class X &) [line 114]\n " shape="box"] - 114 -> 118 ; -113 [label="113: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ref() [line 112]\n *n$5.f:int =0 [line 112]\n " shape="box"] + 114 -> 113 ; +113 [label="113: Exit get_global_ref_div1_method \n " color=yellow style=filled] - 113 -> 112 ; -112 [label="112: Call _fun_X_nonzero \n n$3=_fun_get_global_ref() [line 113]\n _=*n$3:class X [line 113]\n _fun_X_nonzero(n$3:class X &) [line 113]\n " shape="box"] +112 [label="112: Start get_global_ref_div1_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 111]\n " color=yellow style=filled] - 112 -> 111 ; -111 [label="111: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 114]\n _=*n$0:class X [line 114]\n n$2=_fun_X_div(n$0:class X &) [line 114]\n " shape="box"] + 112 -> 116 ; +111 [label="111: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ref() [line 106]\n *n$5.f:int =1 [line 106]\n " shape="box"] 111 -> 110 ; -110 [label="110: Exit get_global_ref_div1_method \n " color=yellow style=filled] +110 [label="110: Call _fun_X_zero \n n$3=_fun_get_global_ref() [line 107]\n _=*n$3:class X [line 107]\n _fun_X_zero(n$3:class X &) [line 107]\n " shape="box"] -109 [label="109: Start get_global_ref_div1_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 111]\n " color=yellow style=filled] + 110 -> 109 ; +109 [label="109: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 108]\n _=*n$0:class X [line 108]\n n$2=_fun_X_div(n$0:class X &) [line 108]\n " shape="box"] - 109 -> 113 ; -108 [label="108: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ref() [line 106]\n *n$5.f:int =1 [line 106]\n " shape="box"] + 109 -> 108 ; +108 [label="108: Exit get_global_ref_div0_method \n " color=yellow style=filled] - 108 -> 107 ; -107 [label="107: Call _fun_X_zero \n n$3=_fun_get_global_ref() [line 107]\n _=*n$3:class X [line 107]\n _fun_X_zero(n$3:class X &) [line 107]\n " shape="box"] +107 [label="107: Start get_global_ref_div0_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 105]\n " color=yellow style=filled] - 107 -> 106 ; -106 [label="106: Call _fun_X_div \n n$0=_fun_get_global_ref() [line 108]\n _=*n$0:class X [line 108]\n n$2=_fun_X_div(n$0:class X &) [line 108]\n " shape="box"] + 107 -> 111 ; +106 [label="106: Call _fun_set_field_ref \n n$3=*&x:class X & [line 101]\n _fun_set_field_ref(n$3:class X &,1:int ) [line 101]\n " shape="box"] 106 -> 105 ; -105 [label="105: Exit get_global_ref_div0_method \n " color=yellow style=filled] +105 [label="105: Return Stmt \n n$0=*&x:class X & [line 102]\n _=*n$0:class X [line 102]\n n$2=_fun_X_div(n$0:class X &) [line 102]\n *&return:int =n$2 [line 102]\n " shape="box"] -104 [label="104: Start get_global_ref_div0_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 105]\n " color=yellow style=filled] + 105 -> 104 ; +104 [label="104: Exit field_div1_ref \n " color=yellow style=filled] - 104 -> 108 ; -103 [label="103: Call _fun_set_field_ref \n n$3=*&x:class X & [line 101]\n _fun_set_field_ref(n$3:class X &,1:int ) [line 101]\n " shape="box"] +103 [label="103: Start field_div1_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled] - 103 -> 102 ; -102 [label="102: Return Stmt \n n$0=*&x:class X & [line 102]\n _=*n$0:class X [line 102]\n n$2=_fun_X_div(n$0:class X &) [line 102]\n *&return:int =n$2 [line 102]\n " shape="box"] + 103 -> 106 ; +102 [label="102: Call _fun_set_field_ref \n n$3=*&x:class X & [line 96]\n _fun_set_field_ref(n$3:class X &,0:int ) [line 96]\n " shape="box"] 102 -> 101 ; -101 [label="101: Exit field_div1_ref \n " color=yellow style=filled] +101 [label="101: Return Stmt \n n$0=*&x:class X & [line 97]\n _=*n$0:class X [line 97]\n n$2=_fun_X_div(n$0:class X &) [line 97]\n *&return:int =n$2 [line 97]\n " shape="box"] -100 [label="100: Start field_div1_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 100]\n " color=yellow style=filled] + 101 -> 100 ; +100 [label="100: Exit field_div0_ref \n " color=yellow style=filled] - 100 -> 103 ; -99 [label="99: Call _fun_set_field_ref \n n$3=*&x:class X & [line 96]\n _fun_set_field_ref(n$3:class X &,0:int ) [line 96]\n " shape="box"] +99 [label="99: Start field_div0_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 95]\n " color=yellow style=filled] - 99 -> 98 ; -98 [label="98: Return Stmt \n n$0=*&x:class X & [line 97]\n _=*n$0:class X [line 97]\n n$2=_fun_X_div(n$0:class X &) [line 97]\n *&return:int =n$2 [line 97]\n " shape="box"] + 99 -> 102 ; +98 [label="98: Call _fun_nonzero_ref \n n$3=*&x:class X & [line 91]\n _fun_nonzero_ref(n$3:class X &) [line 91]\n " shape="box"] 98 -> 97 ; -97 [label="97: Exit field_div0_ref \n " color=yellow style=filled] +97 [label="97: Return Stmt \n n$0=*&x:class X & [line 92]\n _=*n$0:class X [line 92]\n n$2=_fun_X_div(n$0:class X &) [line 92]\n *&return:int =n$2 [line 92]\n " shape="box"] -96 [label="96: Start field_div0_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 95]\n " color=yellow style=filled] + 97 -> 96 ; +96 [label="96: Exit method_div1_ref \n " color=yellow style=filled] - 96 -> 99 ; -95 [label="95: Call _fun_nonzero_ref \n n$3=*&x:class X & [line 91]\n _fun_nonzero_ref(n$3:class X &) [line 91]\n " shape="box"] +95 [label="95: Start method_div1_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 90]\n " color=yellow style=filled] - 95 -> 94 ; -94 [label="94: Return Stmt \n n$0=*&x:class X & [line 92]\n _=*n$0:class X [line 92]\n n$2=_fun_X_div(n$0:class X &) [line 92]\n *&return:int =n$2 [line 92]\n " shape="box"] + 95 -> 98 ; +94 [label="94: Call _fun_zero_ref \n n$3=*&x:class X & [line 86]\n _fun_zero_ref(n$3:class X &) [line 86]\n " shape="box"] 94 -> 93 ; -93 [label="93: Exit method_div1_ref \n " color=yellow style=filled] +93 [label="93: Return Stmt \n n$0=*&x:class X & [line 87]\n _=*n$0:class X [line 87]\n n$2=_fun_X_div(n$0:class X &) [line 87]\n *&return:int =n$2 [line 87]\n " shape="box"] -92 [label="92: Start method_div1_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 90]\n " color=yellow style=filled] + 93 -> 92 ; +92 [label="92: Exit method_div0_ref \n " color=yellow style=filled] - 92 -> 95 ; -91 [label="91: Call _fun_zero_ref \n n$3=*&x:class X & [line 86]\n _fun_zero_ref(n$3:class X &) [line 86]\n " shape="box"] +91 [label="91: Start method_div0_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 85]\n " color=yellow style=filled] - 91 -> 90 ; -90 [label="90: Return Stmt \n n$0=*&x:class X & [line 87]\n _=*n$0:class X [line 87]\n n$2=_fun_X_div(n$0:class X &) [line 87]\n *&return:int =n$2 [line 87]\n " shape="box"] + 91 -> 94 ; +90 [label="90: Call _fun_X_zero \n n$4=_fun_get_global_ptr() [line 80]\n _=*n$4:class X [line 80]\n _fun_X_zero(n$4:class X *) [line 80]\n " shape="box"] 90 -> 89 ; -89 [label="89: Exit method_div0_ref \n " color=yellow style=filled] +89 [label="89: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ptr() [line 81]\n *n$3.f:int =1 [line 81]\n " shape="box"] -88 [label="88: Start method_div0_ref\nFormals: x:class X &\nLocals: \n DECLARE_LOCALS(&return); [line 85]\n " color=yellow style=filled] + 89 -> 88 ; +88 [label="88: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 82]\n _=*n$0:class X [line 82]\n n$2=_fun_X_div(n$0:class X *) [line 82]\n " shape="box"] - 88 -> 91 ; -87 [label="87: Call _fun_X_zero \n n$4=_fun_get_global_ptr() [line 80]\n _=*n$4:class X [line 80]\n _fun_X_zero(n$4:class X *) [line 80]\n " shape="box"] + 88 -> 87 ; +87 [label="87: Exit get_global_ptr_div1_field \n " color=yellow style=filled] - 87 -> 86 ; -86 [label="86: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ptr() [line 81]\n *n$3.f:int =1 [line 81]\n " shape="box"] +86 [label="86: Start get_global_ptr_div1_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 79]\n " color=yellow style=filled] - 86 -> 85 ; -85 [label="85: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 82]\n _=*n$0:class X [line 82]\n n$2=_fun_X_div(n$0:class X *) [line 82]\n " shape="box"] + 86 -> 90 ; +85 [label="85: Call _fun_X_nonzero \n n$4=_fun_get_global_ptr() [line 74]\n _=*n$4:class X [line 74]\n _fun_X_nonzero(n$4:class X *) [line 74]\n " shape="box"] 85 -> 84 ; -84 [label="84: Exit get_global_ptr_div1_field \n " color=yellow style=filled] +84 [label="84: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ptr() [line 75]\n *n$3.f:int =0 [line 75]\n " shape="box"] -83 [label="83: Start get_global_ptr_div1_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 79]\n " color=yellow style=filled] + 84 -> 83 ; +83 [label="83: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 76]\n _=*n$0:class X [line 76]\n n$2=_fun_X_div(n$0:class X *) [line 76]\n " shape="box"] - 83 -> 87 ; -82 [label="82: Call _fun_X_nonzero \n n$4=_fun_get_global_ptr() [line 74]\n _=*n$4:class X [line 74]\n _fun_X_nonzero(n$4:class X *) [line 74]\n " shape="box"] + 83 -> 82 ; +82 [label="82: Exit get_global_ptr_div0_field \n " color=yellow style=filled] - 82 -> 81 ; -81 [label="81: BinaryOperatorStmt: Assign \n n$3=_fun_get_global_ptr() [line 75]\n *n$3.f:int =0 [line 75]\n " shape="box"] +81 [label="81: Start get_global_ptr_div0_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 73]\n " color=yellow style=filled] - 81 -> 80 ; -80 [label="80: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 76]\n _=*n$0:class X [line 76]\n n$2=_fun_X_div(n$0:class X *) [line 76]\n " shape="box"] + 81 -> 85 ; +80 [label="80: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ptr() [line 68]\n *n$5.f:int =0 [line 68]\n " shape="box"] 80 -> 79 ; -79 [label="79: Exit get_global_ptr_div0_field \n " color=yellow style=filled] +79 [label="79: Call _fun_X_nonzero \n n$3=_fun_get_global_ptr() [line 69]\n _=*n$3:class X [line 69]\n _fun_X_nonzero(n$3:class X *) [line 69]\n " shape="box"] -78 [label="78: Start get_global_ptr_div0_field\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 73]\n " color=yellow style=filled] + 79 -> 78 ; +78 [label="78: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 70]\n _=*n$0:class X [line 70]\n n$2=_fun_X_div(n$0:class X *) [line 70]\n " shape="box"] - 78 -> 82 ; -77 [label="77: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ptr() [line 68]\n *n$5.f:int =0 [line 68]\n " shape="box"] + 78 -> 77 ; +77 [label="77: Exit get_global_ptr_div1_method \n " color=yellow style=filled] - 77 -> 76 ; -76 [label="76: Call _fun_X_nonzero \n n$3=_fun_get_global_ptr() [line 69]\n _=*n$3:class X [line 69]\n _fun_X_nonzero(n$3:class X *) [line 69]\n " shape="box"] +76 [label="76: Start get_global_ptr_div1_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 67]\n " color=yellow style=filled] - 76 -> 75 ; -75 [label="75: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 70]\n _=*n$0:class X [line 70]\n n$2=_fun_X_div(n$0:class X *) [line 70]\n " shape="box"] + 76 -> 80 ; +75 [label="75: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ptr() [line 62]\n *n$5.f:int =1 [line 62]\n " shape="box"] 75 -> 74 ; -74 [label="74: Exit get_global_ptr_div1_method \n " color=yellow style=filled] +74 [label="74: Call _fun_X_zero \n n$3=_fun_get_global_ptr() [line 63]\n _=*n$3:class X [line 63]\n _fun_X_zero(n$3:class X *) [line 63]\n " shape="box"] -73 [label="73: Start get_global_ptr_div1_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 67]\n " color=yellow style=filled] + 74 -> 73 ; +73 [label="73: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 64]\n _=*n$0:class X [line 64]\n n$2=_fun_X_div(n$0:class X *) [line 64]\n " shape="box"] - 73 -> 77 ; -72 [label="72: BinaryOperatorStmt: Assign \n n$5=_fun_get_global_ptr() [line 62]\n *n$5.f:int =1 [line 62]\n " shape="box"] + 73 -> 72 ; +72 [label="72: Exit get_global_ptr_div0_method \n " color=yellow style=filled] - 72 -> 71 ; -71 [label="71: Call _fun_X_zero \n n$3=_fun_get_global_ptr() [line 63]\n _=*n$3:class X [line 63]\n _fun_X_zero(n$3:class X *) [line 63]\n " shape="box"] +71 [label="71: Start get_global_ptr_div0_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 61]\n " color=yellow style=filled] - 71 -> 70 ; -70 [label="70: Call _fun_X_div \n n$0=_fun_get_global_ptr() [line 64]\n _=*n$0:class X [line 64]\n n$2=_fun_X_div(n$0:class X *) [line 64]\n " shape="box"] + 71 -> 75 ; +70 [label="70: Call _fun_set_field_ptr \n n$4=*&x:class X * [line 56]\n _fun_set_field_ptr(n$4:class X *,1:int ) [line 56]\n " shape="box"] 70 -> 69 ; -69 [label="69: Exit get_global_ptr_div0_method \n " color=yellow style=filled] +69 [label="69: Return Stmt \n n$1=*&x:class X * [line 57]\n _=*n$1:class X [line 57]\n n$3=_fun_X_div(n$1:class X *) [line 57]\n *&return:int =n$3 [line 57]\n " shape="box"] -68 [label="68: Start get_global_ptr_div0_method\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 61]\n " color=yellow style=filled] + 69 -> 64 ; +68 [label="68: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n " shape="invhouse"] - 68 -> 72 ; -67 [label="67: Call _fun_set_field_ptr \n n$4=*&x:class X * [line 56]\n _fun_set_field_ptr(n$4:class X *,1:int ) [line 56]\n " shape="box"] + 68 -> 65 ; +67 [label="67: Prune (true branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 != 0), true); [line 55]\n " shape="invhouse"] - 67 -> 66 ; -66 [label="66: Return Stmt \n n$1=*&x:class X * [line 57]\n _=*n$1:class X [line 57]\n n$3=_fun_X_div(n$1:class X *) [line 57]\n *&return:int =n$3 [line 57]\n " shape="box"] + 67 -> 70 ; +66 [label="66: between_join_and_exit \n " shape="box"] - 66 -> 61 ; -65 [label="65: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n " shape="invhouse"] + 66 -> 64 ; +65 [label="65: + \n " ] - 65 -> 62 ; -64 [label="64: Prune (true branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 != 0), true); [line 55]\n " shape="invhouse"] + 65 -> 66 ; +64 [label="64: Exit field_div1_ptr \n " color=yellow style=filled] - 64 -> 67 ; -63 [label="63: between_join_and_exit \n " shape="box"] +63 [label="63: Start field_div1_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled] - 63 -> 61 ; -62 [label="62: + \n " ] + 63 -> 67 ; + 63 -> 68 ; +62 [label="62: Call _fun_set_field_ptr \n n$4=*&x:class X * [line 49]\n _fun_set_field_ptr(n$4:class X *,0:int ) [line 49]\n " shape="box"] - 62 -> 63 ; -61 [label="61: Exit field_div1_ptr \n " color=yellow style=filled] + 62 -> 61 ; +61 [label="61: Return Stmt \n n$1=*&x:class X * [line 50]\n _=*n$1:class X [line 50]\n n$3=_fun_X_div(n$1:class X *) [line 50]\n *&return:int =n$3 [line 50]\n " shape="box"] -60 [label="60: Start field_div1_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 54]\n " color=yellow style=filled] + 61 -> 56 ; +60 [label="60: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n " shape="invhouse"] - 60 -> 64 ; - 60 -> 65 ; -59 [label="59: Call _fun_set_field_ptr \n n$4=*&x:class X * [line 49]\n _fun_set_field_ptr(n$4:class X *,0:int ) [line 49]\n " shape="box"] + 60 -> 57 ; +59 [label="59: Prune (true branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 != 0), true); [line 48]\n " shape="invhouse"] - 59 -> 58 ; -58 [label="58: Return Stmt \n n$1=*&x:class X * [line 50]\n _=*n$1:class X [line 50]\n n$3=_fun_X_div(n$1:class X *) [line 50]\n *&return:int =n$3 [line 50]\n " shape="box"] + 59 -> 62 ; +58 [label="58: between_join_and_exit \n " shape="box"] - 58 -> 53 ; -57 [label="57: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n " shape="invhouse"] + 58 -> 56 ; +57 [label="57: + \n " ] - 57 -> 54 ; -56 [label="56: Prune (true branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 != 0), true); [line 48]\n " shape="invhouse"] + 57 -> 58 ; +56 [label="56: Exit field_div0_ptr \n " color=yellow style=filled] - 56 -> 59 ; -55 [label="55: between_join_and_exit \n " shape="box"] +55 [label="55: Start field_div0_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] - 55 -> 53 ; -54 [label="54: + \n " ] + 55 -> 59 ; + 55 -> 60 ; +54 [label="54: Call _fun_nonzero_ptr \n n$4=*&x:class X * [line 42]\n _fun_nonzero_ptr(n$4:class X *) [line 42]\n " shape="box"] - 54 -> 55 ; -53 [label="53: Exit field_div0_ptr \n " color=yellow style=filled] + 54 -> 53 ; +53 [label="53: Return Stmt \n n$1=*&x:class X * [line 43]\n _=*n$1:class X [line 43]\n n$3=_fun_X_div(n$1:class X *) [line 43]\n *&return:int =n$3 [line 43]\n " shape="box"] -52 [label="52: Start field_div0_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 47]\n " color=yellow style=filled] + 53 -> 48 ; +52 [label="52: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n " shape="invhouse"] - 52 -> 56 ; - 52 -> 57 ; -51 [label="51: Call _fun_nonzero_ptr \n n$4=*&x:class X * [line 42]\n _fun_nonzero_ptr(n$4:class X *) [line 42]\n " shape="box"] + 52 -> 49 ; +51 [label="51: Prune (true branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 != 0), true); [line 41]\n " shape="invhouse"] - 51 -> 50 ; -50 [label="50: Return Stmt \n n$1=*&x:class X * [line 43]\n _=*n$1:class X [line 43]\n n$3=_fun_X_div(n$1:class X *) [line 43]\n *&return:int =n$3 [line 43]\n " shape="box"] + 51 -> 54 ; +50 [label="50: between_join_and_exit \n " shape="box"] - 50 -> 45 ; -49 [label="49: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n " shape="invhouse"] + 50 -> 48 ; +49 [label="49: + \n " ] - 49 -> 46 ; -48 [label="48: Prune (true branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 != 0), true); [line 41]\n " shape="invhouse"] + 49 -> 50 ; +48 [label="48: Exit method_div1_ptr \n " color=yellow style=filled] - 48 -> 51 ; -47 [label="47: between_join_and_exit \n " shape="box"] +47 [label="47: Start method_div1_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 40]\n " color=yellow style=filled] - 47 -> 45 ; -46 [label="46: + \n " ] + 47 -> 51 ; + 47 -> 52 ; +46 [label="46: Call _fun_zero_ptr \n n$4=*&x:class X * [line 35]\n _fun_zero_ptr(n$4:class X *) [line 35]\n " shape="box"] - 46 -> 47 ; -45 [label="45: Exit method_div1_ptr \n " color=yellow style=filled] + 46 -> 45 ; +45 [label="45: Return Stmt \n n$1=*&x:class X * [line 36]\n _=*n$1:class X [line 36]\n n$3=_fun_X_div(n$1:class X *) [line 36]\n *&return:int =n$3 [line 36]\n " shape="box"] -44 [label="44: Start method_div1_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 40]\n " color=yellow style=filled] + 45 -> 40 ; +44 [label="44: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n " shape="invhouse"] - 44 -> 48 ; - 44 -> 49 ; -43 [label="43: Call _fun_zero_ptr \n n$4=*&x:class X * [line 35]\n _fun_zero_ptr(n$4:class X *) [line 35]\n " shape="box"] + 44 -> 41 ; +43 [label="43: Prune (true branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 != 0), true); [line 34]\n " shape="invhouse"] - 43 -> 42 ; -42 [label="42: Return Stmt \n n$1=*&x:class X * [line 36]\n _=*n$1:class X [line 36]\n n$3=_fun_X_div(n$1:class X *) [line 36]\n *&return:int =n$3 [line 36]\n " shape="box"] + 43 -> 46 ; +42 [label="42: between_join_and_exit \n " shape="box"] - 42 -> 37 ; -41 [label="41: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n " shape="invhouse"] + 42 -> 40 ; +41 [label="41: + \n " ] - 41 -> 38 ; -40 [label="40: Prune (true branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 != 0), true); [line 34]\n " shape="invhouse"] + 41 -> 42 ; +40 [label="40: Exit method_div0_ptr \n " color=yellow style=filled] - 40 -> 43 ; -39 [label="39: between_join_and_exit \n " shape="box"] +39 [label="39: Start method_div0_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled] - 39 -> 37 ; -38 [label="38: + \n " ] + 39 -> 43 ; + 39 -> 44 ; +38 [label="38: Return Stmt \n *&return:class X &=&#GB$global [line 31]\n " shape="box"] - 38 -> 39 ; -37 [label="37: Exit method_div0_ptr \n " color=yellow style=filled] + 38 -> 37 ; +37 [label="37: Exit get_global_ref \n " color=yellow style=filled] -36 [label="36: Start method_div0_ptr\nFormals: x:class X *\nLocals: \n DECLARE_LOCALS(&return); [line 33]\n " color=yellow style=filled] +36 [label="36: Start get_global_ref\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 31]\n " color=yellow style=filled] - 36 -> 40 ; - 36 -> 41 ; -35 [label="35: Return Stmt \n *&return:class X &=&#GB$global [line 31]\n " shape="box"] + 36 -> 38 ; +35 [label="35: Return Stmt \n *&return:class X *=&#GB$global [line 30]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit get_global_ref \n " color=yellow style=filled] +34 [label="34: Exit get_global_ptr \n " color=yellow style=filled] -33 [label="33: Start get_global_ref\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 31]\n " color=yellow style=filled] +33 [label="33: Start get_global_ptr\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] 33 -> 35 ; -32 [label="32: Return Stmt \n *&return:class X *=&#GB$global [line 30]\n " shape="box"] +32 [label="32: DeclStmt \n _fun_X_X(&#GB$global:class X *) [line 29]\n " shape="box"] 32 -> 31 ; -31 [label="31: Exit get_global_ptr \n " color=yellow style=filled] +31 [label="31: Exit __infer_globals_initializer_global \n " color=yellow style=filled] -30 [label="30: Start get_global_ptr\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 30]\n " color=yellow style=filled] +30 [label="30: Start __infer_globals_initializer_global\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 29]\n " color=yellow style=filled] 30 -> 32 ; diff --git a/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot index 8bd591b39..71de88f73 100644 --- a/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/templates/sizeof_pack.cpp.dot @@ -1,5 +1,16 @@ /* @generated */ digraph iCFG { +14 [label="14: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$0:int =0 [line 23]\n *&0$?%__sil_tmpSIL_materialize_temp__n$1:int =0 [line 23]\n *&0$?%__sil_tmpSIL_materialize_temp__n$2:int =0 [line 23]\n n$3=_fun_hash_combine_generic(&0$?%__sil_tmpSIL_materialize_temp__n$0:int &,&0$?%__sil_tmpSIL_materialize_temp__n$1:int &,&0$?%__sil_tmpSIL_materialize_temp__n$2:int &) [line 23]\n *&#GB$test:int =n$3 [line 23]\n " shape="box"] + + + 14 -> 13 ; +13 [label="13: Exit __infer_globals_initializer_test \n " color=yellow style=filled] + + +12 [label="12: Start __infer_globals_initializer_test\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:int 0$?%__sil_tmpSIL_materialize_temp__n$1:int 0$?%__sil_tmpSIL_materialize_temp__n$2:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_materialize_temp__n$1,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 23]\n " color=yellow style=filled] + + + 12 -> 14 ; 11 [label="11: DeclStmt \n n$1=*&t:int & [line 16]\n n$2=*n$1:int [line 16]\n n$3=_fun_MyHasher_hash(n$2:int ) [line 16]\n *&seed:int =n$3 [line 16]\n " shape="box"] diff --git a/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot index 141cdf3c8..f61672f76 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot @@ -1,473 +1,484 @@ /* @generated */ digraph iCFG { -125 [label="125: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 63]\n " shape="box"] +134 [label="134: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 63]\n " shape="box"] - 125 -> 120 ; -124 [label="124: Return Stmt \n *&return:int =(1 / 0) [line 67]\n " shape="box"] + 134 -> 129 ; +133 [label="133: Return Stmt \n *&return:int =(1 / 0) [line 67]\n " shape="box"] - 124 -> 117 ; -123 [label="123: Return Stmt \n *&return:int =1 [line 65]\n " shape="box"] + 133 -> 126 ; +132 [label="132: Return Stmt \n *&return:int =1 [line 65]\n " shape="box"] - 123 -> 117 ; -122 [label="122: Prune (false branch) \n PRUNE(((n$0 == n$3) == 0), false); [line 64]\n " shape="invhouse"] + 132 -> 126 ; +131 [label="131: Prune (false branch) \n PRUNE(((n$0 == n$3) == 0), false); [line 64]\n " shape="invhouse"] - 122 -> 124 ; -121 [label="121: Prune (true branch) \n PRUNE(((n$0 == n$3) != 0), true); [line 64]\n " shape="invhouse"] + 131 -> 133 ; +130 [label="130: Prune (true branch) \n PRUNE(((n$0 == n$3) != 0), true); [line 64]\n " shape="invhouse"] - 121 -> 123 ; -120 [label="120: BinaryOperatorStmt: EQ \n n$0=_fun_template_typeid(&person:class Person &) [line 64]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 64]\n _=*n$1:class std::type_info [line 64]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 64]\n " shape="box"] + 130 -> 132 ; +129 [label="129: BinaryOperatorStmt: EQ \n n$0=_fun_template_typeid(&person:class Person &) [line 64]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 64]\n _=*n$1:class std::type_info [line 64]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 64]\n " shape="box"] - 120 -> 121 ; - 120 -> 122 ; -119 [label="119: between_join_and_exit \n " shape="box"] + 129 -> 130 ; + 129 -> 131 ; +128 [label="128: between_join_and_exit \n " shape="box"] - 119 -> 117 ; -118 [label="118: + \n " ] + 128 -> 126 ; +127 [label="127: + \n " ] - 118 -> 119 ; -117 [label="117: Exit template_type_id_person \n " color=yellow style=filled] + 127 -> 128 ; +126 [label="126: Exit template_type_id_person \n " color=yellow style=filled] -116 [label="116: Start template_type_id_person\nFormals: \nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] +125 [label="125: Start template_type_id_person\nFormals: \nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] - 116 -> 125 ; -115 [label="115: DeclStmt \n n$4=*&value:class Person & [line 58]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n _fun_Person_Person(&result:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] + 125 -> 134 ; +124 [label="124: DeclStmt \n n$4=*&value:class Person & [line 58]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n _fun_Person_Person(&result:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] - 115 -> 114 ; -114 [label="114: Return Stmt \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n _=*n$0:class std::type_info [line 59]\n n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n *&return:char *=n$2 [line 59]\n " shape="box"] + 124 -> 123 ; +123 [label="123: Return Stmt \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ) [line 59]\n _=*n$0:class std::type_info [line 59]\n n$2=_fun_std::type_info_name(n$0:class std::type_info &) [line 59]\n *&return:char *=n$2 [line 59]\n " shape="box"] - 114 -> 113 ; -113 [label="113: Exit template_typeid \n " color=yellow style=filled] + 123 -> 122 ; +122 [label="122: Exit template_typeid \n " color=yellow style=filled] -112 [label="112: Start template_typeid\nFormals: value:class Person &\nLocals: result:class Person 0$?%__sil_tmpSIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&result,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] +121 [label="121: Start template_typeid\nFormals: value:class Person &\nLocals: result:class Person 0$?%__sil_tmpSIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&result,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] - 112 -> 115 ; -111 [label="111: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 49]\n " shape="box"] + 121 -> 124 ; +120 [label="120: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 49]\n " shape="box"] - 111 -> 106 ; -110 [label="110: Return Stmt \n *&return:int =0 [line 53]\n " shape="box"] + 120 -> 115 ; +119 [label="119: Return Stmt \n *&return:int =0 [line 53]\n " shape="box"] - 110 -> 103 ; -109 [label="109: Return Stmt \n *&return:int =(1 / 0) [line 51]\n " shape="box"] + 119 -> 112 ; +118 [label="118: Return Stmt \n *&return:int =(1 / 0) [line 51]\n " shape="box"] - 109 -> 103 ; -108 [label="108: Prune (false branch) \n PRUNE(((n$3 == n$6) == 0), false); [line 50]\n " shape="invhouse"] + 118 -> 112 ; +117 [label="117: Prune (false branch) \n PRUNE(((n$3 == n$6) == 0), false); [line 50]\n " shape="invhouse"] - 108 -> 110 ; -107 [label="107: Prune (true branch) \n PRUNE(((n$3 == n$6) != 0), true); [line 50]\n " shape="invhouse"] + 117 -> 119 ; +116 [label="116: Prune (true branch) \n PRUNE(((n$3 == n$6) != 0), true); [line 50]\n " shape="invhouse"] - 107 -> 109 ; -106 [label="106: BinaryOperatorStmt: EQ \n n$0=*&ptr:class Person * [line 50]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n _=*n$1:class std::type_info [line 50]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n _=*n$4:class std::type_info [line 50]\n n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n " shape="box"] + 116 -> 118 ; +115 [label="115: BinaryOperatorStmt: EQ \n n$0=*&ptr:class Person * [line 50]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n _=*n$1:class std::type_info [line 50]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n _=*n$4:class std::type_info [line 50]\n n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n " shape="box"] + + + 115 -> 116 ; + 115 -> 117 ; +114 [label="114: between_join_and_exit \n " shape="box"] + + + 114 -> 112 ; +113 [label="113: + \n " ] + + + 113 -> 114 ; +112 [label="112: Exit person_ptr_typeid \n " color=yellow style=filled] + + +111 [label="111: Start person_ptr_typeid\nFormals: ptr:class Person *\nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] + + + 111 -> 120 ; +110 [label="110: DeclStmt \n _fun_Employee_Employee(&employee:class Employee *) [line 40]\n " shape="box"] + + + 110 -> 109 ; +109 [label="109: DeclStmt \n *&ptr:class Employee *=&employee [line 41]\n " shape="box"] + + + 109 -> 104 ; +108 [label="108: Return Stmt \n *&return:int =0 [line 45]\n " shape="box"] + + + 108 -> 101 ; +107 [label="107: Return Stmt \n *&return:int =(1 / 0) [line 43]\n " shape="box"] + + + 107 -> 101 ; +106 [label="106: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 42]\n " shape="invhouse"] - 106 -> 107 ; 106 -> 108 ; -105 [label="105: between_join_and_exit \n " shape="box"] +105 [label="105: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 42]\n " shape="invhouse"] - 105 -> 103 ; -104 [label="104: + \n " ] + 105 -> 107 ; +104 [label="104: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n n$1=*&ptr:class Person * [line 42]\n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n " shape="box"] 104 -> 105 ; -103 [label="103: Exit person_ptr_typeid \n " color=yellow style=filled] + 104 -> 106 ; +103 [label="103: between_join_and_exit \n " shape="box"] -102 [label="102: Start person_ptr_typeid\nFormals: ptr:class Person *\nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] + 103 -> 101 ; +102 [label="102: + \n " ] - 102 -> 111 ; -101 [label="101: DeclStmt \n _fun_Employee_Employee(&employee:class Employee *) [line 40]\n " shape="box"] + 102 -> 103 ; +101 [label="101: Exit employee_typeid \n " color=yellow style=filled] - 101 -> 100 ; -100 [label="100: DeclStmt \n *&ptr:class Employee *=&employee [line 41]\n " shape="box"] +100 [label="100: Start employee_typeid\nFormals: \nLocals: ptr:class Person * employee:class Employee \n DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] - 100 -> 95 ; -99 [label="99: Return Stmt \n *&return:int =0 [line 45]\n " shape="box"] + 100 -> 110 ; +99 [label="99: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 29]\n " shape="box"] - 99 -> 92 ; -98 [label="98: Return Stmt \n *&return:int =(1 / 0) [line 43]\n " shape="box"] + 99 -> 98 ; +98 [label="98: DeclStmt \n *&t:int =3 [line 30]\n " shape="box"] - 98 -> 92 ; -97 [label="97: Prune (false branch) \n PRUNE((n$3 == 0), false); [line 42]\n " shape="invhouse"] + 98 -> 97 ; +97 [label="97: DeclStmt \n n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n _=*n$5:class std::type_info [line 31]\n n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n *&t_type_info:char *=n$7 [line 31]\n " shape="box"] - 97 -> 99 ; -96 [label="96: Prune (true branch) \n PRUNE((n$3 != 0), true); [line 42]\n " shape="invhouse"] + 97 -> 96 ; +96 [label="96: DeclStmt \n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,&person:class Person ) [line 32]\n _=*n$2:class std::type_info [line 32]\n n$4=_fun_std::type_info_name(n$2:class std::type_info &) [line 32]\n *&person_type_info:char *=n$4 [line 32]\n " shape="box"] - 96 -> 98 ; -95 [label="95: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n n$1=*&ptr:class Person * [line 42]\n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n " shape="box"] + 96 -> 91 ; +95 [label="95: Return Stmt \n *&return:int =(1 / 0) [line 36]\n " shape="box"] - 95 -> 96 ; - 95 -> 97 ; -94 [label="94: between_join_and_exit \n " shape="box"] + 95 -> 88 ; +94 [label="94: Return Stmt \n *&return:int =0 [line 34]\n " shape="box"] - 94 -> 92 ; -93 [label="93: + \n " ] + 94 -> 88 ; +93 [label="93: Prune (false branch) \n PRUNE(((n$0 == n$1) == 0), false); [line 33]\n " shape="invhouse"] - 93 -> 94 ; -92 [label="92: Exit employee_typeid \n " color=yellow style=filled] + 93 -> 95 ; +92 [label="92: Prune (true branch) \n PRUNE(((n$0 == n$1) != 0), true); [line 33]\n " shape="invhouse"] -91 [label="91: Start employee_typeid\nFormals: \nLocals: ptr:class Person * employee:class Employee \n DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] + 92 -> 94 ; +91 [label="91: BinaryOperatorStmt: EQ \n n$0=*&t_type_info:char * [line 33]\n n$1=*&person_type_info:char * [line 33]\n " shape="box"] - 91 -> 101 ; -90 [label="90: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 29]\n " shape="box"] + 91 -> 92 ; + 91 -> 93 ; +90 [label="90: between_join_and_exit \n " shape="box"] - 90 -> 89 ; -89 [label="89: DeclStmt \n *&t:int =3 [line 30]\n " shape="box"] + 90 -> 88 ; +89 [label="89: + \n " ] - 89 -> 88 ; -88 [label="88: DeclStmt \n n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n _=*n$5:class std::type_info [line 31]\n n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n *&t_type_info:char *=n$7 [line 31]\n " shape="box"] + 89 -> 90 ; +88 [label="88: Exit person_typeid_name \n " color=yellow style=filled] - 88 -> 87 ; -87 [label="87: DeclStmt \n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,&person:class Person ) [line 32]\n _=*n$2:class std::type_info [line 32]\n n$4=_fun_std::type_info_name(n$2:class std::type_info &) [line 32]\n *&person_type_info:char *=n$4 [line 32]\n " shape="box"] +87 [label="87: Start person_typeid_name\nFormals: \nLocals: person_type_info:char * t_type_info:char * t:int person:class Person \n DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] - 87 -> 82 ; -86 [label="86: Return Stmt \n *&return:int =(1 / 0) [line 36]\n " shape="box"] + 87 -> 99 ; +86 [label="86: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 20]\n " shape="box"] - 86 -> 79 ; -85 [label="85: Return Stmt \n *&return:int =0 [line 34]\n " shape="box"] + 86 -> 85 ; +85 [label="85: DeclStmt \n *&t:int =3 [line 21]\n " shape="box"] - 85 -> 79 ; -84 [label="84: Prune (false branch) \n PRUNE(((n$0 == n$1) == 0), false); [line 33]\n " shape="invhouse"] + 85 -> 80 ; +84 [label="84: Return Stmt \n *&return:int =(1 / 0) [line 25]\n " shape="box"] - 84 -> 86 ; -83 [label="83: Prune (true branch) \n PRUNE(((n$0 == n$1) != 0), true); [line 33]\n " shape="invhouse"] + 84 -> 77 ; +83 [label="83: Return Stmt \n *&return:int =1 [line 23]\n " shape="box"] - 83 -> 85 ; -82 [label="82: BinaryOperatorStmt: EQ \n n$0=*&t_type_info:char * [line 33]\n n$1=*&person_type_info:char * [line 33]\n " shape="box"] + 83 -> 77 ; +82 [label="82: Prune (false branch) \n PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] - 82 -> 83 ; 82 -> 84 ; -81 [label="81: between_join_and_exit \n " shape="box"] +81 [label="81: Prune (true branch) \n PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] - 81 -> 79 ; -80 [label="80: + \n " ] + 81 -> 83 ; +80 [label="80: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n " shape="box"] 80 -> 81 ; -79 [label="79: Exit person_typeid_name \n " color=yellow style=filled] + 80 -> 82 ; +79 [label="79: between_join_and_exit \n " shape="box"] -78 [label="78: Start person_typeid_name\nFormals: \nLocals: person_type_info:char * t_type_info:char * t:int person:class Person \n DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] + 79 -> 77 ; +78 [label="78: + \n " ] - 78 -> 90 ; -77 [label="77: DeclStmt \n _fun_Person_Person(&person:class Person *) [line 20]\n " shape="box"] + 78 -> 79 ; +77 [label="77: Exit person_typeid \n " color=yellow style=filled] - 77 -> 76 ; -76 [label="76: DeclStmt \n *&t:int =3 [line 21]\n " shape="box"] +76 [label="76: Start person_typeid\nFormals: \nLocals: t:int person:class Person \n DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] - 76 -> 71 ; -75 [label="75: Return Stmt \n *&return:int =(1 / 0) [line 25]\n " shape="box"] + 76 -> 86 ; +75 [label="75: Constructor Init \n n$0=*&this:class Employee * [line 17]\n _fun_Person_Person(n$0:class Employee *) [line 17]\n " shape="box"] - 75 -> 68 ; -74 [label="74: Return Stmt \n *&return:int =1 [line 23]\n " shape="box"] + 75 -> 74 ; +74 [label="74: Exit Employee_Employee \n " color=yellow style=filled] - 74 -> 68 ; -73 [label="73: Prune (false branch) \n PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] +73 [label="73: Start Employee_Employee\nFormals: this:class Employee *\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] 73 -> 75 ; -72 [label="72: Prune (true branch) \n PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] +72 [label="72: Exit Employee_~Employee \n " color=yellow style=filled] - 72 -> 74 ; -71 [label="71: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n " shape="box"] +71 [label="71: Start Employee_~Employee\nFormals: this:class Employee *\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] 71 -> 72 ; - 71 -> 73 ; -70 [label="70: between_join_and_exit \n " shape="box"] +70 [label="70: Exit Person_Person \n " color=yellow style=filled] - 70 -> 68 ; -69 [label="69: + \n " ] +69 [label="69: Start Person_Person\nFormals: this:class Person *\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] 69 -> 70 ; -68 [label="68: Exit person_typeid \n " color=yellow style=filled] +68 [label="68: Exit Person_Person \n " color=yellow style=filled] -67 [label="67: Start person_typeid\nFormals: \nLocals: t:int person:class Person \n DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] +67 [label="67: Start Person_Person\nFormals: this:class Person * __param_0:class Person &\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - 67 -> 77 ; -66 [label="66: Constructor Init \n n$0=*&this:class Employee * [line 17]\n _fun_Person_Person(n$0:class Employee *) [line 17]\n " shape="box"] + 67 -> 68 ; +66 [label="66: Exit Person_~Person \n " color=yellow style=filled] - 66 -> 65 ; -65 [label="65: Exit Employee_Employee \n " color=yellow style=filled] +65 [label="65: Start Person_~Person\nFormals: this:class Person *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] -64 [label="64: Start Employee_Employee\nFormals: this:class Employee *\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] + 65 -> 66 ; +64 [label="64: Exit std::type_info_operator!= \n " color=yellow style=filled] - 64 -> 66 ; -63 [label="63: Exit Employee_~Employee \n " color=yellow style=filled] +63 [label="63: Start std::type_info_operator!=\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n " color=yellow style=filled] -62 [label="62: Start Employee_~Employee\nFormals: this:class Employee *\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] +62 [label="62: Exit std::type_info_operator== \n " color=yellow style=filled] - 62 -> 63 ; -61 [label="61: Exit Person_Person \n " color=yellow style=filled] +61 [label="61: Start std::type_info_operator==\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n " color=yellow style=filled] -60 [label="60: Start Person_Person\nFormals: this:class Person *\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +60 [label="60: Return Stmt \n n$0=*&this:class std::type_info * [line 116]\n n$1=*n$0.__type_name:unsigned long [line 116]\n *&return:unsigned long =n$1 [line 116]\n " shape="box"] - 60 -> 61 ; -59 [label="59: Exit Person_Person \n " color=yellow style=filled] + 60 -> 59 ; +59 [label="59: Exit std::type_info_hash_code \n " color=yellow style=filled] -58 [label="58: Start Person_Person\nFormals: this:class Person * __param_0:class Person &\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +58 [label="58: Start std::type_info_hash_code\nFormals: this:class std::type_info *\nLocals: \n DECLARE_LOCALS(&return); [line 113]\n " color=yellow style=filled] - 58 -> 59 ; -57 [label="57: Exit Person_~Person \n " color=yellow style=filled] + 58 -> 60 ; +57 [label="57: Return Stmt \n n$0=*&this:class std::type_info * [line 106]\n n$1=*n$0.__type_name:char * [line 106]\n n$2=*&__arg:class std::type_info & [line 106]\n n$3=*n$2.__type_name:char * [line 106]\n *&return:_Bool =(n$1 < n$3) [line 106]\n " shape="box"] -56 [label="56: Start Person_~Person\nFormals: this:class Person *\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] + 57 -> 56 ; +56 [label="56: Exit std::type_info_before \n " color=yellow style=filled] - 56 -> 57 ; -55 [label="55: Exit std::type_info_operator!= \n " color=yellow style=filled] +55 [label="55: Start std::type_info_before\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] -54 [label="54: Start std::type_info_operator!=\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n " color=yellow style=filled] + 55 -> 57 ; +54 [label="54: Exit std::type_info_name \n " color=yellow style=filled] -53 [label="53: Exit std::type_info_operator== \n " color=yellow style=filled] +53 [label="53: Start std::type_info_name\nFormals: this:class std::type_info *\nLocals: \n " color=yellow style=filled] -52 [label="52: Start std::type_info_operator==\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n " color=yellow style=filled] +52 [label="52: Exit std::type_info_type_info \n " color=yellow style=filled] -51 [label="51: Return Stmt \n n$0=*&this:class std::type_info * [line 116]\n n$1=*n$0.__type_name:unsigned long [line 116]\n *&return:unsigned long =n$1 [line 116]\n " shape="box"] +51 [label="51: Start std::type_info_type_info\nFormals: this:class std::type_info * __n:char *\nLocals: \n " color=yellow style=filled] - 51 -> 50 ; -50 [label="50: Exit std::type_info_hash_code \n " color=yellow style=filled] +50 [label="50: Return Stmt \n n$0=*&__return_param:class std::exception_ptr * [line 180]\n n$1=*&this:class std::nested_exception * [line 180]\n _fun_std::exception_ptr_exception_ptr(n$0:class std::exception_ptr *,n$1.__ptr_:class std::exception_ptr &) [line 180]\n " shape="box"] -49 [label="49: Start std::type_info_hash_code\nFormals: this:class std::type_info *\nLocals: \n DECLARE_LOCALS(&return); [line 113]\n " color=yellow style=filled] + 50 -> 49 ; +49 [label="49: Exit std::nested_exception_nested_ptr \n " color=yellow style=filled] - 49 -> 51 ; -48 [label="48: Return Stmt \n n$0=*&this:class std::type_info * [line 106]\n n$1=*n$0.__type_name:char * [line 106]\n n$2=*&__arg:class std::type_info & [line 106]\n n$3=*n$2.__type_name:char * [line 106]\n *&return:_Bool =(n$1 < n$3) [line 106]\n " shape="box"] +48 [label="48: Start std::nested_exception_nested_ptr\nFormals: this:class std::nested_exception * __return_param:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] - 48 -> 47 ; -47 [label="47: Exit std::type_info_before \n " color=yellow style=filled] + 48 -> 50 ; +47 [label="47: Return Stmt \n n$0=*&this:class std::exception_ptr * [line 138]\n n$1=*n$0.__ptr_:void * [line 138]\n *&return:_Bool =(n$1 != null) [line 138]\n " shape="box"] -46 [label="46: Start std::type_info_before\nFormals: this:class std::type_info * __arg:class std::type_info &\nLocals: \n DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] + 47 -> 46 ; +46 [label="46: Exit std::exception_ptr_operator_bool \n " color=yellow style=filled] - 46 -> 48 ; -45 [label="45: Exit std::type_info_name \n " color=yellow style=filled] +45 [label="45: Start std::exception_ptr_operator_bool\nFormals: this:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 136]\n " color=yellow style=filled] -44 [label="44: Start std::type_info_name\nFormals: this:class std::type_info *\nLocals: \n " color=yellow style=filled] + 45 -> 47 ; +44 [label="44: Constructor Init \n n$0=*&this:class std::exception_ptr * [line 131]\n *n$0.__ptr_:void *=null [line 131]\n " shape="box"] -43 [label="43: Exit std::type_info_type_info \n " color=yellow style=filled] + 44 -> 43 ; +43 [label="43: Exit std::exception_ptr_exception_ptr \n " color=yellow style=filled] -42 [label="42: Start std::type_info_type_info\nFormals: this:class std::type_info * __n:char *\nLocals: \n " color=yellow style=filled] +42 [label="42: Start std::exception_ptr_exception_ptr\nFormals: this:class std::exception_ptr * __param_0:int \nLocals: \n DECLARE_LOCALS(&return); [line 131]\n " color=yellow style=filled] -41 [label="41: Return Stmt \n n$0=*&__return_param:class std::exception_ptr * [line 180]\n n$1=*&this:class std::nested_exception * [line 180]\n _fun_std::exception_ptr_exception_ptr(n$0:class std::exception_ptr *,n$1.__ptr_:class std::exception_ptr &) [line 180]\n " shape="box"] + 42 -> 44 ; +41 [label="41: Constructor Init \n n$0=*&this:class std::exception_ptr * [line 130]\n *n$0.__ptr_:void *=null [line 130]\n " shape="box"] 41 -> 40 ; -40 [label="40: Exit std::nested_exception_nested_ptr \n " color=yellow style=filled] +40 [label="40: Exit std::exception_ptr_exception_ptr \n " color=yellow style=filled] -39 [label="39: Start std::nested_exception_nested_ptr\nFormals: this:class std::nested_exception * __return_param:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 180]\n " color=yellow style=filled] +39 [label="39: Start std::exception_ptr_exception_ptr\nFormals: this:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 130]\n " color=yellow style=filled] 39 -> 41 ; -38 [label="38: Return Stmt \n n$0=*&this:class std::exception_ptr * [line 138]\n n$1=*n$0.__ptr_:void * [line 138]\n *&return:_Bool =(n$1 != null) [line 138]\n " shape="box"] +38 [label="38: Constructor Init \n n$0=*&this:class std::bad_exception * [line 103]\n _fun_std::exception_exception(n$0:class std::bad_exception *) [line 103]\n " shape="box"] 38 -> 37 ; -37 [label="37: Exit std::exception_ptr_operator_bool \n " color=yellow style=filled] +37 [label="37: Exit std::bad_exception_bad_exception \n " color=yellow style=filled] -36 [label="36: Start std::exception_ptr_operator_bool\nFormals: this:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 136]\n " color=yellow style=filled] +36 [label="36: Start std::bad_exception_bad_exception\nFormals: this:class std::bad_exception *\nLocals: \n DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] 36 -> 38 ; -35 [label="35: Constructor Init \n n$0=*&this:class std::exception_ptr * [line 131]\n *n$0.__ptr_:void *=null [line 131]\n " shape="box"] +35 [label="35: Exit std::exception_exception \n " color=yellow style=filled] - 35 -> 34 ; -34 [label="34: Exit std::exception_ptr_exception_ptr \n " color=yellow style=filled] +34 [label="34: Start std::exception_exception\nFormals: this:class std::exception *\nLocals: \n DECLARE_LOCALS(&return); [line 94]\n " color=yellow style=filled] -33 [label="33: Start std::exception_ptr_exception_ptr\nFormals: this:class std::exception_ptr * __param_0:int \nLocals: \n DECLARE_LOCALS(&return); [line 131]\n " color=yellow style=filled] + 34 -> 35 ; +33 [label="33: Return Stmt \n n$0=*&__val:unsigned int [line 4332]\n *&return:unsigned int =n$0 [line 4332]\n " shape="box"] - 33 -> 35 ; -32 [label="32: Constructor Init \n n$0=*&this:class std::exception_ptr * [line 130]\n *n$0.__ptr_:void *=null [line 130]\n " shape="box"] + 33 -> 32 ; +32 [label="32: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] - 32 -> 31 ; -31 [label="31: Exit std::exception_ptr_exception_ptr \n " color=yellow style=filled] +31 [label="31: Start std::__1::__convert_to_integral\nFormals: __val:unsigned int \nLocals: \n DECLARE_LOCALS(&return); [line 4331]\n " color=yellow style=filled] -30 [label="30: Start std::exception_ptr_exception_ptr\nFormals: this:class std::exception_ptr *\nLocals: \n DECLARE_LOCALS(&return); [line 130]\n " color=yellow style=filled] + 31 -> 33 ; +30 [label="30: Return Stmt \n n$0=*&__val:int [line 4329]\n *&return:int =n$0 [line 4329]\n " shape="box"] - 30 -> 32 ; -29 [label="29: Constructor Init \n n$0=*&this:class std::bad_exception * [line 103]\n _fun_std::exception_exception(n$0:class std::bad_exception *) [line 103]\n " shape="box"] + 30 -> 29 ; +29 [label="29: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] - 29 -> 28 ; -28 [label="28: Exit std::bad_exception_bad_exception \n " color=yellow style=filled] +28 [label="28: Start std::__1::__convert_to_integral\nFormals: __val:int \nLocals: \n DECLARE_LOCALS(&return); [line 4328]\n " color=yellow style=filled] -27 [label="27: Start std::bad_exception_bad_exception\nFormals: this:class std::bad_exception *\nLocals: \n DECLARE_LOCALS(&return); [line 103]\n " color=yellow style=filled] + 28 -> 30 ; +27 [label="27: Return Stmt \n n$0=*&__val:unsigned long long [line 4325]\n *&return:unsigned long long =n$0 [line 4325]\n " shape="box"] - 27 -> 29 ; -26 [label="26: Exit std::exception_exception \n " color=yellow style=filled] + 27 -> 26 ; +26 [label="26: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -25 [label="25: Start std::exception_exception\nFormals: this:class std::exception *\nLocals: \n DECLARE_LOCALS(&return); [line 94]\n " color=yellow style=filled] +25 [label="25: Start std::__1::__convert_to_integral\nFormals: __val:unsigned long long \nLocals: \n DECLARE_LOCALS(&return); [line 4324]\n " color=yellow style=filled] - 25 -> 26 ; -24 [label="24: Return Stmt \n n$0=*&__val:unsigned int [line 4332]\n *&return:unsigned int =n$0 [line 4332]\n " shape="box"] + 25 -> 27 ; +24 [label="24: Return Stmt \n n$0=*&__val:long long [line 4322]\n *&return:long long =n$0 [line 4322]\n " shape="box"] 24 -> 23 ; 23 [label="23: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -22 [label="22: Start std::__1::__convert_to_integral\nFormals: __val:unsigned int \nLocals: \n DECLARE_LOCALS(&return); [line 4331]\n " color=yellow style=filled] +22 [label="22: Start std::__1::__convert_to_integral\nFormals: __val:long long \nLocals: \n DECLARE_LOCALS(&return); [line 4321]\n " color=yellow style=filled] 22 -> 24 ; -21 [label="21: Return Stmt \n n$0=*&__val:int [line 4329]\n *&return:int =n$0 [line 4329]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&__val:unsigned long [line 4319]\n *&return:unsigned long =n$0 [line 4319]\n " shape="box"] 21 -> 20 ; 20 [label="20: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -19 [label="19: Start std::__1::__convert_to_integral\nFormals: __val:int \nLocals: \n DECLARE_LOCALS(&return); [line 4328]\n " color=yellow style=filled] +19 [label="19: Start std::__1::__convert_to_integral\nFormals: __val:unsigned long \nLocals: \n DECLARE_LOCALS(&return); [line 4318]\n " color=yellow style=filled] 19 -> 21 ; -18 [label="18: Return Stmt \n n$0=*&__val:unsigned long long [line 4325]\n *&return:unsigned long long =n$0 [line 4325]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&__val:long [line 4316]\n *&return:long =n$0 [line 4316]\n " shape="box"] 18 -> 17 ; 17 [label="17: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -16 [label="16: Start std::__1::__convert_to_integral\nFormals: __val:unsigned long long \nLocals: \n DECLARE_LOCALS(&return); [line 4324]\n " color=yellow style=filled] +16 [label="16: Start std::__1::__convert_to_integral\nFormals: __val:long \nLocals: \n DECLARE_LOCALS(&return); [line 4315]\n " color=yellow style=filled] 16 -> 18 ; -15 [label="15: Return Stmt \n n$0=*&__val:long long [line 4322]\n *&return:long long =n$0 [line 4322]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&__val:unsigned int [line 4313]\n *&return:unsigned int =n$0 [line 4313]\n " shape="box"] 15 -> 14 ; 14 [label="14: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -13 [label="13: Start std::__1::__convert_to_integral\nFormals: __val:long long \nLocals: \n DECLARE_LOCALS(&return); [line 4321]\n " color=yellow style=filled] +13 [label="13: Start std::__1::__convert_to_integral\nFormals: __val:unsigned int \nLocals: \n DECLARE_LOCALS(&return); [line 4312]\n " color=yellow style=filled] 13 -> 15 ; -12 [label="12: Return Stmt \n n$0=*&__val:unsigned long [line 4319]\n *&return:unsigned long =n$0 [line 4319]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&__val:int [line 4310]\n *&return:int =n$0 [line 4310]\n " shape="box"] 12 -> 11 ; 11 [label="11: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] -10 [label="10: Start std::__1::__convert_to_integral\nFormals: __val:unsigned long \nLocals: \n DECLARE_LOCALS(&return); [line 4318]\n " color=yellow style=filled] +10 [label="10: Start std::__1::__convert_to_integral\nFormals: __val:int \nLocals: \n DECLARE_LOCALS(&return); [line 4309]\n " color=yellow style=filled] 10 -> 12 ; -9 [label="9: Return Stmt \n n$0=*&__val:long [line 4316]\n *&return:long =n$0 [line 4316]\n " shape="box"] +9 [label="9: DeclStmt \n *&#GB$std::__1::__numeric_type::value:_Bool =1 [line 1697]\n " shape="box"] 9 -> 8 ; -8 [label="8: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] +8 [label="8: Exit __infer_globals_initializer_value \n " color=yellow style=filled] -7 [label="7: Start std::__1::__convert_to_integral\nFormals: __val:long \nLocals: \n DECLARE_LOCALS(&return); [line 4315]\n " color=yellow style=filled] +7 [label="7: Start __infer_globals_initializer_value\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 1697]\n " color=yellow style=filled] 7 -> 9 ; -6 [label="6: Return Stmt \n n$0=*&__val:unsigned int [line 4313]\n *&return:unsigned int =n$0 [line 4313]\n " shape="box"] - - - 6 -> 5 ; -5 [label="5: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] - - -4 [label="4: Start std::__1::__convert_to_integral\nFormals: __val:unsigned int \nLocals: \n DECLARE_LOCALS(&return); [line 4312]\n " color=yellow style=filled] - - - 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&__val:int [line 4310]\n *&return:int =n$0 [line 4310]\n " shape="box"] - - - 3 -> 2 ; -2 [label="2: Exit std::__1::__convert_to_integral \n " color=yellow style=filled] - - -1 [label="1: Start std::__1::__convert_to_integral\nFormals: __val:int \nLocals: \n DECLARE_LOCALS(&return); [line 4309]\n " color=yellow style=filled] - - - 1 -> 3 ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot b/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot index c98f56e0e..eee90f977 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/static.m.dot @@ -11,11 +11,11 @@ digraph iCFG { 29 -> 31 ; -28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n " shape="box"] +28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n " shape="box"] 28 -> 24 ; -27 [label="27: UnaryOperator \n n$16=*&#GB$A_test3_i:int [line 52]\n *&#GB$A_test3_i:int =(n$16 + 1) [line 52]\n " shape="box"] +27 [label="27: UnaryOperator \n n$16=*&#GB$A_test3_i:int [line 52]\n *&#GB$A_test3_i:int =(n$16 + 1) [line 52]\n " shape="box"] 27 -> 26 ; @@ -26,7 +26,7 @@ digraph iCFG { 25 -> 27 ; -24 [label="24: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n " shape="box"] +24 [label="24: Return Stmt \n n$15=*&#GB$A_test3_i:int [line 55]\n *&return:int =n$15 [line 55]\n " shape="box"] 24 -> 23 ; @@ -37,15 +37,15 @@ digraph iCFG { 22 -> 28 ; -21 [label="21: BinaryOperatorStmt: Assign \n n$13=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 38]\n n$14=_fun_A_init(n$13:class A *) virtual [line 38]\n *&#GB$A_test2_sharedInstance:struct objc_object *=n$14 [line 38]\n " shape="box"] +21 [label="21: BinaryOperatorStmt: Assign \n n$13=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 38]\n n$14=_fun_A_init(n$13:class A *) virtual [line 38]\n *&#GB$A_test2_sharedInstance:struct objc_object *=n$14 [line 38]\n " shape="box"] 21 -> 20 ; -20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n " shape="box"] +20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n " shape="box"] 20 -> 16 ; -19 [label="19: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n " shape="box"] +19 [label="19: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n " shape="box"] 19 -> 18 ; @@ -56,7 +56,7 @@ digraph iCFG { 17 -> 19 ; -16 [label="16: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n " shape="box"] +16 [label="16: Return Stmt \n n$9=*&#GB$A_test2_sharedInstance:struct objc_object * [line 44]\n *&return:struct objc_object *=n$9 [line 44]\n " shape="box"] 16 -> 15 ; @@ -67,11 +67,11 @@ digraph iCFG { 14 -> 21 ; -13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n " shape="box"] +13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n " shape="box"] 13 -> 9 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 31]\n n$6=_fun_A_init(n$5:class A *) virtual [line 31]\n *&#GB$A_test_leak_sharedInstance:struct objc_object *=n$6 [line 31]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n n$5=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 31]\n n$6=_fun_A_init(n$5:class A *) virtual [line 31]\n *&#GB$A_test_leak_sharedInstance:struct objc_object *=n$6 [line 31]\n " shape="box"] 12 -> 11 ; @@ -89,11 +89,11 @@ digraph iCFG { 8 -> 13 ; -7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n " shape="box"] +7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n " shape="box"] 7 -> 3 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$2=_fun_A_init(n$1:class A *) virtual [line 21]\n *&#GB$A_test_sharedInstance:struct objc_object *=n$2 [line 21]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 21]\n n$2=_fun_A_init(n$1:class A *) virtual [line 21]\n *&#GB$A_test_sharedInstance:struct objc_object *=n$2 [line 21]\n " shape="box"] 6 -> 5 ; @@ -104,7 +104,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$A_test_sharedInstance:struct objc_object * [line 25]\n *&return:struct objc_object *=n$0 [line 25]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/strings/global_string_literal.m.dot b/infer/tests/codetoanalyze/objc/frontend/strings/global_string_literal.m.dot index 464fd1c2f..9de39af84 100644 --- a/infer/tests/codetoanalyze/objc/frontend/strings/global_string_literal.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/strings/global_string_literal.m.dot @@ -1,13 +1,24 @@ /* @generated */ digraph iCFG { -3 [label="3: Return Stmt \n *&return:int =0 [line 14]\n " shape="box"] +6 [label="6: Return Stmt \n *&return:int =0 [line 14]\n " shape="box"] + + + 6 -> 5 ; +5 [label="5: Exit main \n " color=yellow style=filled] + + +4 [label="4: Start main\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] + + + 4 -> 6 ; +3 [label="3: DeclStmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Rodriguez\":char *) [line 12]\n *&#GB$lastName:class NSString *=n$0 [line 12]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit main \n " color=yellow style=filled] +2 [label="2: Exit __infer_globals_initializer_lastName \n " color=yellow style=filled] -1 [label="1: Start main\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] +1 [label="1: Start __infer_globals_initializer_lastName\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] 1 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot b/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot index 42683be8e..83a20972c 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot @@ -1,6 +1,28 @@ /* @generated */ digraph iCFG { -3 [label="3: Return Stmt \n n$0=*&#GB$__iPhoneVideoAdLayout:struct FBVideoAdLayout [line 45]\n *&return:struct FBVideoAdLayout =n$0 [line 45]\n " shape="box"] +9 [label="9: DeclStmt \n *&#GB$__iPhoneVideoAdLayout.placeHolderWidth:float =244 [line 35]\n *&#GB$__iPhoneVideoAdLayout.placeHolderHeight:float =175 [line 35]\n *&#GB$__iPhoneVideoAdLayout.contentLeftSidePadding:float =20 [line 35]\n *&#GB$__iPhoneVideoAdLayout.contentRightSidePadding:float =20 [line 35]\n *&#GB$__iPhoneVideoAdLayout.additionalPlaceholderOffset:float =0 [line 35]\n *&#GB$__iPhoneVideoAdLayout.contentGap:float =7 [line 35]\n " shape="box"] + + + 9 -> 8 ; +8 [label="8: Exit __infer_globals_initializer___iPhoneVideoAdLayout \n " color=yellow style=filled] + + +7 [label="7: Start __infer_globals_initializer___iPhoneVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 35]\n " color=yellow style=filled] + + + 7 -> 9 ; +6 [label="6: DeclStmt \n *&#GB$__iPadVideoAdLayout.placeHolderWidth:float =554 [line 26]\n *&#GB$__iPadVideoAdLayout.placeHolderHeight:float =350 [line 26]\n *&#GB$__iPadVideoAdLayout.contentLeftSidePadding:float =140 [line 26]\n *&#GB$__iPadVideoAdLayout.contentRightSidePadding:float =60 [line 26]\n *&#GB$__iPadVideoAdLayout.additionalPlaceholderOffset:float =40 [line 26]\n *&#GB$__iPadVideoAdLayout.contentGap:float =11 [line 26]\n " shape="box"] + + + 6 -> 5 ; +5 [label="5: Exit __infer_globals_initializer___iPadVideoAdLayout \n " color=yellow style=filled] + + +4 [label="4: Start __infer_globals_initializer___iPadVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] + + + 4 -> 6 ; +3 [label="3: Return Stmt \n n$0=*&#GB$__iPhoneVideoAdLayout:struct FBVideoAdLayout [line 45]\n *&return:struct FBVideoAdLayout =n$0 [line 45]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.m.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.m.dot index fddb3645b..2a6db5df3 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass.m.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.m.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.m.dot index fddb3645b..1521f025d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/aclass_2.m.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&#GB$aVariable:class NSObject * [line 21]\n *&return:class NSObject *=n$0 [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot index 55043a3cc..df2f7b47d 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/block.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/block.m.dot @@ -11,7 +11,7 @@ digraph iCFG { 23 -> 25 ; -22 [label="22: DeclStmt \n *&#GB$main1_s:int =3 [line 12]\n " shape="box"] +22 [label="22: DeclStmt \n *&#GB$main1_s:int =3 [line 12]\n " shape="box"] 22 -> 21 ; @@ -27,11 +27,11 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n " shape="box"] 18 -> 14 ; -17 [label="17: Return Stmt \n n$19=*&z:int [line 25]\n n$20=*&#GB$main1_s:int [line 25]\n n$21=*&x:int [line 25]\n n$22=*&bla:int [line 25]\n *&return:int =(((n$19 + n$20) + n$21) + n$22) [line 25]\n " shape="box"] +17 [label="17: Return Stmt \n n$19=*&z:int [line 25]\n n$20=*&#GB$main1_s:int [line 25]\n n$21=*&x:int [line 25]\n n$22=*&bla:int [line 25]\n *&return:int =(((n$19 + n$20) + n$21) + n$22) [line 25]\n " shape="box"] 17 -> 16 ; @@ -61,11 +61,11 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n " shape="box"] 9 -> 5 ; -8 [label="8: Return Stmt \n n$5=*&e:int [line 35]\n n$6=*&#GB$main1_s:int [line 35]\n *&return:int =(n$5 - n$6) [line 35]\n " shape="box"] +8 [label="8: Return Stmt \n n$5=*&e:int [line 35]\n n$6=*&#GB$main1_s:int [line 35]\n *&return:int =(n$5 - n$6) [line 35]\n " shape="box"] 8 -> 7 ; 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 39e069962..82c5dce03 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 @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -17 [label="17: BinaryOperatorStmt: Assign \n *&#GB$g:int =7 [line 22]\n " shape="box"] +17 [label="17: BinaryOperatorStmt: Assign \n *&#GB$g:int =7 [line 22]\n " shape="box"] 17 -> 16 ; @@ -8,11 +8,11 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n " shape="box"] +15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n " shape="box"] 15 -> 11 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n " shape="box"] 14 -> 13 ; @@ -47,7 +47,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: BinaryOperatorStmt: EQ \n n$0=*&#GB$g:int [line 30]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: EQ \n n$0=*&#GB$g:int [line 30]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot index a4b3711b4..7af68f629 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot @@ -63,11 +63,11 @@ digraph iCFG { 33 -> 37 ; -32 [label="32: Return Stmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4); [line 58]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4 ):unsigned long ) [line 58]\n *&__objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4:class __objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4 =n$25 [line 58]\n n$26=*&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object * [line 58]\n *n$25.DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object *=n$26 [line 58]\n *&initialization_block__:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4) [line 58]\n n$21=*&initialization_block__:_fn_ (*) [line 62]\n n$22=n$21() [line 62]\n n$20=*&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object * [line 63]\n *&return:struct objc_object *=n$20 [line 56]\n " shape="box"] +32 [label="32: Return Stmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4); [line 58]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4 ):unsigned long ) [line 58]\n *&__objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4:class __objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4 =n$25 [line 58]\n n$26=*&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object * [line 58]\n *n$25.DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object *=n$26 [line 58]\n *&initialization_block__:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_dispatch_a_block_variable_from_macro______4) [line 58]\n n$21=*&initialization_block__:_fn_ (*) [line 62]\n n$22=n$21() [line 62]\n n$20=*&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object * [line 63]\n *&return:struct objc_object *=n$20 [line 56]\n " shape="box"] 32 -> 28 ; -31 [label="31: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 59]\n n$24=_fun_DispatchA_init(n$23:class DispatchA *) virtual [line 59]\n *&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object *=n$24 [line 59]\n " shape="box"] +31 [label="31: BinaryOperatorStmt: Assign \n n$23=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 59]\n n$24=_fun_DispatchA_init(n$23:class DispatchA *) virtual [line 59]\n *&#GB$DispatchA_dispatch_a_block_variable_from_macro_static_storage__:struct objc_object *=n$24 [line 59]\n " shape="box"] 31 -> 30 ; @@ -85,11 +85,11 @@ digraph iCFG { 27 -> 32 ; -26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_dispatch_a_block_variable______3); [line 47]\n n$18=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_dispatch_a_block_variable______3 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_DispatchA_dispatch_a_block_variable______3:class __objc_anonymous_block_DispatchA_dispatch_a_block_variable______3 =n$18 [line 47]\n n$19=*&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object * [line 47]\n *n$18.DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object *=n$19 [line 47]\n *&initialization_block__:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_dispatch_a_block_variable______3) [line 47]\n " shape="box"] +26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_dispatch_a_block_variable______3); [line 47]\n n$18=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_dispatch_a_block_variable______3 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_DispatchA_dispatch_a_block_variable______3:class __objc_anonymous_block_DispatchA_dispatch_a_block_variable______3 =n$18 [line 47]\n n$19=*&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object * [line 47]\n *n$18.DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object *=n$19 [line 47]\n *&initialization_block__:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_dispatch_a_block_variable______3) [line 47]\n " shape="box"] 26 -> 22 ; -25 [label="25: BinaryOperatorStmt: Assign \n n$16=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 48]\n n$17=_fun_DispatchA_init(n$16:class DispatchA *) virtual [line 48]\n *&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object *=n$17 [line 48]\n " shape="box"] +25 [label="25: BinaryOperatorStmt: Assign \n n$16=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 48]\n n$17=_fun_DispatchA_init(n$16:class DispatchA *) virtual [line 48]\n *&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object *=n$17 [line 48]\n " shape="box"] 25 -> 24 ; @@ -104,7 +104,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n n$13=*&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object * [line 52]\n *&return:struct objc_object *=n$13 [line 52]\n " shape="box"] +21 [label="21: Return Stmt \n n$13=*&#GB$DispatchA_dispatch_a_block_variable_static_storage__:struct objc_object * [line 52]\n *&return:struct objc_object *=n$13 [line 52]\n " shape="box"] 21 -> 20 ; @@ -115,11 +115,11 @@ digraph iCFG { 19 -> 26 ; -18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_trans______2); [line 38]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_trans______2 ):unsigned long ) [line 38]\n *&__objc_anonymous_block_DispatchA_trans______2:class __objc_anonymous_block_DispatchA_trans______2 =n$11 [line 38]\n n$12=*&#GB$DispatchA_trans_sharedInstance:struct objc_object * [line 38]\n *n$11.DispatchA_trans_sharedInstance:struct objc_object *=n$12 [line 38]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_trans______2) [line 38]\n " shape="box"] +18 [label="18: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_trans______2); [line 38]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_trans______2 ):unsigned long ) [line 38]\n *&__objc_anonymous_block_DispatchA_trans______2:class __objc_anonymous_block_DispatchA_trans______2 =n$11 [line 38]\n n$12=*&#GB$DispatchA_trans_sharedInstance:struct objc_object * [line 38]\n *n$11.DispatchA_trans_sharedInstance:struct objc_object *=n$12 [line 38]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_DispatchA_trans______2) [line 38]\n " shape="box"] 18 -> 14 ; -17 [label="17: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 39]\n n$10=_fun_DispatchA_init(n$9:class DispatchA *) virtual [line 39]\n *&#GB$DispatchA_trans_sharedInstance:struct objc_object *=n$10 [line 39]\n " shape="box"] +17 [label="17: BinaryOperatorStmt: Assign \n n$9=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 39]\n n$10=_fun_DispatchA_init(n$9:class DispatchA *) virtual [line 39]\n *&#GB$DispatchA_trans_sharedInstance:struct objc_object *=n$10 [line 39]\n " shape="box"] 17 -> 16 ; @@ -134,7 +134,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$7=*&#GB$DispatchA_trans_sharedInstance:struct objc_object * [line 42]\n *&return:struct objc_object *=n$7 [line 42]\n " shape="box"] +13 [label="13: Return Stmt \n n$7=*&#GB$DispatchA_trans_sharedInstance:struct objc_object * [line 42]\n *&return:struct objc_object *=n$7 [line 42]\n " shape="box"] 13 -> 12 ; @@ -145,11 +145,11 @@ digraph iCFG { 11 -> 18 ; -10 [label="10: Call (_fun___objc_anonymous_block_DispatchA_sharedInstance______1) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_sharedInstance______1); [line 30]\n n$4=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_sharedInstance______1 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_DispatchA_sharedInstance______1:class __objc_anonymous_block_DispatchA_sharedInstance______1 =n$4 [line 30]\n n$5=*&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object * [line 30]\n *n$4.DispatchA_sharedInstance_sharedInstance:struct objc_object *=n$5 [line 30]\n n$6=(_fun___objc_anonymous_block_DispatchA_sharedInstance______1)() [line 30]\n " shape="box"] +10 [label="10: Call (_fun___objc_anonymous_block_DispatchA_sharedInstance______1) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchA_sharedInstance______1); [line 30]\n n$4=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchA_sharedInstance______1 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_DispatchA_sharedInstance______1:class __objc_anonymous_block_DispatchA_sharedInstance______1 =n$4 [line 30]\n n$5=*&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object * [line 30]\n *n$4.DispatchA_sharedInstance_sharedInstance:struct objc_object *=n$5 [line 30]\n n$6=(_fun___objc_anonymous_block_DispatchA_sharedInstance______1)() [line 30]\n " shape="box"] 10 -> 6 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$2=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 31]\n n$3=_fun_DispatchA_init(n$2:class DispatchA *) virtual [line 31]\n *&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object *=n$3 [line 31]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$2=_fun___objc_alloc_no_fail(sizeof(class DispatchA ):unsigned long ) [line 31]\n n$3=_fun_DispatchA_init(n$2:class DispatchA *) virtual [line 31]\n *&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object *=n$3 [line 31]\n " shape="box"] 9 -> 8 ; @@ -160,7 +160,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$1=*&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object * [line 33]\n *&return:struct objc_object *=n$1 [line 33]\n " shape="box"] +6 [label="6: Return Stmt \n n$1=*&#GB$DispatchA_sharedInstance_sharedInstance:struct objc_object * [line 33]\n *&return:struct objc_object *=n$1 [line 33]\n " shape="box"] 6 -> 5 ; 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 9dfb85557..43c598de7 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch_examples.m.dot @@ -1,18 +1,18 @@ /* @generated */ digraph iCFG { -57 [label="57: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx *=0 [line 76]\n " shape="box"] +57 [label="57: DeclStmt \n *&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx *=0 [line 76]\n " shape="box"] 57 -> 56 ; -56 [label="56: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_barrier_example______6) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_barrier_example______6); [line 77]\n n$46=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_barrier_example______6 ):unsigned long ) [line 77]\n *&__objc_anonymous_block_DispatchEx_dispatch_barrier_example______6:class __objc_anonymous_block_DispatchEx_dispatch_barrier_example______6 =n$46 [line 77]\n n$47=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 77]\n *n$46.DispatchEx_dispatch_barrier_example_a:class DispatchEx *=n$47 [line 77]\n n$48=(_fun___objc_anonymous_block_DispatchEx_dispatch_barrier_example______6)() [line 77]\n " shape="box"] +56 [label="56: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_barrier_example______6) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_barrier_example______6); [line 77]\n n$46=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_barrier_example______6 ):unsigned long ) [line 77]\n *&__objc_anonymous_block_DispatchEx_dispatch_barrier_example______6:class __objc_anonymous_block_DispatchEx_dispatch_barrier_example______6 =n$46 [line 77]\n n$47=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 77]\n *n$46.DispatchEx_dispatch_barrier_example_a:class DispatchEx *=n$47 [line 77]\n n$48=(_fun___objc_anonymous_block_DispatchEx_dispatch_barrier_example______6)() [line 77]\n " shape="box"] 56 -> 51 ; -55 [label="55: BinaryOperatorStmt: Assign \n n$44=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 78]\n n$45=_fun_DispatchEx_init(n$44:class DispatchEx *) virtual [line 78]\n *&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx *=n$45 [line 78]\n " shape="box"] +55 [label="55: BinaryOperatorStmt: Assign \n n$44=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 78]\n n$45=_fun_DispatchEx_init(n$44:class DispatchEx *) virtual [line 78]\n *&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx *=n$45 [line 78]\n " shape="box"] 55 -> 54 ; -54 [label="54: BinaryOperatorStmt: Assign \n n$43=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 79]\n *n$43.x:int =10 [line 79]\n " shape="box"] +54 [label="54: BinaryOperatorStmt: Assign \n n$43=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 79]\n *n$43.x:int =10 [line 79]\n " shape="box"] 54 -> 53 ; @@ -23,7 +23,7 @@ digraph iCFG { 52 -> 55 ; -51 [label="51: Return Stmt \n n$41=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 81]\n n$42=*n$41.x:int [line 81]\n *&return:int =n$42 [line 81]\n " shape="box"] +51 [label="51: Return Stmt \n n$41=*&#GB$DispatchEx_dispatch_barrier_example_a:class DispatchEx * [line 81]\n n$42=*n$41.x:int [line 81]\n *&return:int =n$42 [line 81]\n " shape="box"] 51 -> 50 ; @@ -34,19 +34,19 @@ digraph iCFG { 49 -> 57 ; -48 [label="48: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=0 [line 67]\n " shape="box"] +48 [label="48: DeclStmt \n *&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=0 [line 67]\n " shape="box"] 48 -> 47 ; -47 [label="47: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5); [line 68]\n n$38=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5 ):unsigned long ) [line 68]\n *&__objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5:class __objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5 =n$38 [line 68]\n n$39=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 68]\n *n$38.DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=n$39 [line 68]\n n$40=(_fun___objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5)() [line 68]\n " shape="box"] +47 [label="47: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5); [line 68]\n n$38=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5 ):unsigned long ) [line 68]\n *&__objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5:class __objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5 =n$38 [line 68]\n n$39=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 68]\n *n$38.DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=n$39 [line 68]\n n$40=(_fun___objc_anonymous_block_DispatchEx_dispatch_group_notify_example______5)() [line 68]\n " shape="box"] 47 -> 42 ; -46 [label="46: BinaryOperatorStmt: Assign \n n$36=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 69]\n n$37=_fun_DispatchEx_init(n$36:class DispatchEx *) virtual [line 69]\n *&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=n$37 [line 69]\n " shape="box"] +46 [label="46: BinaryOperatorStmt: Assign \n n$36=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 69]\n n$37=_fun_DispatchEx_init(n$36:class DispatchEx *) virtual [line 69]\n *&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx *=n$37 [line 69]\n " shape="box"] 46 -> 45 ; -45 [label="45: BinaryOperatorStmt: Assign \n n$35=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 70]\n *n$35.x:int =10 [line 70]\n " shape="box"] +45 [label="45: BinaryOperatorStmt: Assign \n n$35=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 70]\n *n$35.x:int =10 [line 70]\n " shape="box"] 45 -> 44 ; @@ -57,7 +57,7 @@ digraph iCFG { 43 -> 46 ; -42 [label="42: Return Stmt \n n$33=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 72]\n n$34=*n$33.x:int [line 72]\n *&return:int =n$34 [line 72]\n " shape="box"] +42 [label="42: Return Stmt \n n$33=*&#GB$DispatchEx_dispatch_group_notify_example_a:class DispatchEx * [line 72]\n n$34=*n$33.x:int [line 72]\n *&return:int =n$34 [line 72]\n " shape="box"] 42 -> 41 ; @@ -68,19 +68,19 @@ digraph iCFG { 40 -> 48 ; -39 [label="39: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx *=0 [line 58]\n " shape="box"] +39 [label="39: DeclStmt \n *&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx *=0 [line 58]\n " shape="box"] 39 -> 38 ; -38 [label="38: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_group_example______4) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_group_example______4); [line 59]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_group_example______4 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_DispatchEx_dispatch_group_example______4:class __objc_anonymous_block_DispatchEx_dispatch_group_example______4 =n$30 [line 59]\n n$31=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 59]\n *n$30.DispatchEx_dispatch_group_example_a:class DispatchEx *=n$31 [line 59]\n n$32=(_fun___objc_anonymous_block_DispatchEx_dispatch_group_example______4)() [line 59]\n " shape="box"] +38 [label="38: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_group_example______4) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_group_example______4); [line 59]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_group_example______4 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_DispatchEx_dispatch_group_example______4:class __objc_anonymous_block_DispatchEx_dispatch_group_example______4 =n$30 [line 59]\n n$31=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 59]\n *n$30.DispatchEx_dispatch_group_example_a:class DispatchEx *=n$31 [line 59]\n n$32=(_fun___objc_anonymous_block_DispatchEx_dispatch_group_example______4)() [line 59]\n " shape="box"] 38 -> 33 ; -37 [label="37: BinaryOperatorStmt: Assign \n n$28=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 60]\n n$29=_fun_DispatchEx_init(n$28:class DispatchEx *) virtual [line 60]\n *&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx *=n$29 [line 60]\n " shape="box"] +37 [label="37: BinaryOperatorStmt: Assign \n n$28=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 60]\n n$29=_fun_DispatchEx_init(n$28:class DispatchEx *) virtual [line 60]\n *&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx *=n$29 [line 60]\n " shape="box"] 37 -> 36 ; -36 [label="36: BinaryOperatorStmt: Assign \n n$27=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 61]\n *n$27.x:int =10 [line 61]\n " shape="box"] +36 [label="36: BinaryOperatorStmt: Assign \n n$27=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 61]\n *n$27.x:int =10 [line 61]\n " shape="box"] 36 -> 35 ; @@ -91,7 +91,7 @@ digraph iCFG { 34 -> 37 ; -33 [label="33: Return Stmt \n n$25=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 63]\n n$26=*n$25.x:int [line 63]\n *&return:int =n$26 [line 63]\n " shape="box"] +33 [label="33: Return Stmt \n n$25=*&#GB$DispatchEx_dispatch_group_example_a:class DispatchEx * [line 63]\n n$26=*n$25.x:int [line 63]\n *&return:int =n$26 [line 63]\n " shape="box"] 33 -> 32 ; @@ -102,19 +102,19 @@ digraph iCFG { 31 -> 39 ; -30 [label="30: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx *=0 [line 47]\n " shape="box"] +30 [label="30: DeclStmt \n *&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx *=0 [line 47]\n " shape="box"] 30 -> 29 ; -29 [label="29: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_after_example______3) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_after_example______3); [line 50]\n n$22=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_after_example______3 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_DispatchEx_dispatch_after_example______3:class __objc_anonymous_block_DispatchEx_dispatch_after_example______3 =n$22 [line 50]\n n$23=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 50]\n *n$22.DispatchEx_dispatch_after_example_a:class DispatchEx *=n$23 [line 50]\n n$24=(_fun___objc_anonymous_block_DispatchEx_dispatch_after_example______3)() [line 48]\n " shape="box"] +29 [label="29: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_after_example______3) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_after_example______3); [line 50]\n n$22=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_after_example______3 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_DispatchEx_dispatch_after_example______3:class __objc_anonymous_block_DispatchEx_dispatch_after_example______3 =n$22 [line 50]\n n$23=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 50]\n *n$22.DispatchEx_dispatch_after_example_a:class DispatchEx *=n$23 [line 50]\n n$24=(_fun___objc_anonymous_block_DispatchEx_dispatch_after_example______3)() [line 48]\n " shape="box"] 29 -> 24 ; -28 [label="28: BinaryOperatorStmt: Assign \n n$20=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 51]\n n$21=_fun_DispatchEx_init(n$20:class DispatchEx *) virtual [line 51]\n *&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx *=n$21 [line 51]\n " shape="box"] +28 [label="28: BinaryOperatorStmt: Assign \n n$20=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 51]\n n$21=_fun_DispatchEx_init(n$20:class DispatchEx *) virtual [line 51]\n *&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx *=n$21 [line 51]\n " shape="box"] 28 -> 27 ; -27 [label="27: BinaryOperatorStmt: Assign \n n$19=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 52]\n *n$19.x:int =10 [line 52]\n " shape="box"] +27 [label="27: BinaryOperatorStmt: Assign \n n$19=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 52]\n *n$19.x:int =10 [line 52]\n " shape="box"] 27 -> 26 ; @@ -125,7 +125,7 @@ digraph iCFG { 25 -> 28 ; -24 [label="24: Return Stmt \n n$17=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 54]\n n$18=*n$17.x:int [line 54]\n *&return:int =n$18 [line 54]\n " shape="box"] +24 [label="24: Return Stmt \n n$17=*&#GB$DispatchEx_dispatch_after_example_a:class DispatchEx * [line 54]\n n$18=*n$17.x:int [line 54]\n *&return:int =n$18 [line 54]\n " shape="box"] 24 -> 23 ; @@ -136,19 +136,19 @@ digraph iCFG { 22 -> 30 ; -21 [label="21: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx *=0 [line 37]\n " shape="box"] +21 [label="21: DeclStmt \n *&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx *=0 [line 37]\n " shape="box"] 21 -> 20 ; -20 [label="20: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_async_example______2) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_async_example______2); [line 39]\n n$14=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_async_example______2 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_DispatchEx_dispatch_async_example______2:class __objc_anonymous_block_DispatchEx_dispatch_async_example______2 =n$14 [line 39]\n n$15=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 39]\n *n$14.DispatchEx_dispatch_async_example_a:class DispatchEx *=n$15 [line 39]\n n$16=(_fun___objc_anonymous_block_DispatchEx_dispatch_async_example______2)() [line 38]\n " shape="box"] +20 [label="20: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_async_example______2) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_async_example______2); [line 39]\n n$14=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_async_example______2 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_DispatchEx_dispatch_async_example______2:class __objc_anonymous_block_DispatchEx_dispatch_async_example______2 =n$14 [line 39]\n n$15=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 39]\n *n$14.DispatchEx_dispatch_async_example_a:class DispatchEx *=n$15 [line 39]\n n$16=(_fun___objc_anonymous_block_DispatchEx_dispatch_async_example______2)() [line 38]\n " shape="box"] 20 -> 15 ; -19 [label="19: BinaryOperatorStmt: Assign \n n$12=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 40]\n n$13=_fun_DispatchEx_init(n$12:class DispatchEx *) virtual [line 40]\n *&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx *=n$13 [line 40]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: Assign \n n$12=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 40]\n n$13=_fun_DispatchEx_init(n$12:class DispatchEx *) virtual [line 40]\n *&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx *=n$13 [line 40]\n " shape="box"] 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$11=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 41]\n *n$11.x:int =10 [line 41]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n n$11=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 41]\n *n$11.x:int =10 [line 41]\n " shape="box"] 18 -> 17 ; @@ -159,7 +159,7 @@ digraph iCFG { 16 -> 19 ; -15 [label="15: Return Stmt \n n$9=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 43]\n n$10=*n$9.x:int [line 43]\n *&return:int =n$10 [line 43]\n " shape="box"] +15 [label="15: Return Stmt \n n$9=*&#GB$DispatchEx_dispatch_async_example_a:class DispatchEx * [line 43]\n n$10=*n$9.x:int [line 43]\n *&return:int =n$10 [line 43]\n " shape="box"] 15 -> 14 ; @@ -170,19 +170,19 @@ digraph iCFG { 13 -> 21 ; -12 [label="12: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx *=0 [line 25]\n " shape="box"] +12 [label="12: DeclStmt \n *&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx *=0 [line 25]\n " shape="box"] 12 -> 11 ; -11 [label="11: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_once_example______1) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_once_example______1); [line 29]\n n$6=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_once_example______1 ):unsigned long ) [line 29]\n *&__objc_anonymous_block_DispatchEx_dispatch_once_example______1:class __objc_anonymous_block_DispatchEx_dispatch_once_example______1 =n$6 [line 29]\n n$7=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 29]\n *n$6.DispatchEx_dispatch_once_example_a:class DispatchEx *=n$7 [line 29]\n n$8=(_fun___objc_anonymous_block_DispatchEx_dispatch_once_example______1)() [line 29]\n " shape="box"] +11 [label="11: Call (_fun___objc_anonymous_block_DispatchEx_dispatch_once_example______1) \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchEx_dispatch_once_example______1); [line 29]\n n$6=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchEx_dispatch_once_example______1 ):unsigned long ) [line 29]\n *&__objc_anonymous_block_DispatchEx_dispatch_once_example______1:class __objc_anonymous_block_DispatchEx_dispatch_once_example______1 =n$6 [line 29]\n n$7=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 29]\n *n$6.DispatchEx_dispatch_once_example_a:class DispatchEx *=n$7 [line 29]\n n$8=(_fun___objc_anonymous_block_DispatchEx_dispatch_once_example______1)() [line 29]\n " shape="box"] 11 -> 6 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$4=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 30]\n n$5=_fun_DispatchEx_init(n$4:class DispatchEx *) virtual [line 30]\n *&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx *=n$5 [line 30]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$4=_fun___objc_alloc_no_fail(sizeof(class DispatchEx ):unsigned long ) [line 30]\n n$5=_fun_DispatchEx_init(n$4:class DispatchEx *) virtual [line 30]\n *&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx *=n$5 [line 30]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$3=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 31]\n *n$3.x:int =10 [line 31]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$3=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 31]\n *n$3.x:int =10 [line 31]\n " shape="box"] 9 -> 8 ; @@ -193,7 +193,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: Return Stmt \n n$1=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 33]\n n$2=*n$1.x:int [line 33]\n *&return:int =n$2 [line 33]\n " shape="box"] +6 [label="6: Return Stmt \n n$1=*&#GB$DispatchEx_dispatch_once_example_a:class DispatchEx * [line 33]\n n$2=*n$1.x:int [line 33]\n *&return:int =n$2 [line 33]\n " shape="box"] 6 -> 5 ; 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 6c26a0c27..9e1af212c 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 @@ -1,10 +1,10 @@ /* @generated */ digraph iCFG { -6 [label="6: Return Stmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchInMacroTest______1); [line 23]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchInMacroTest______1 ):unsigned long ) [line 23]\n *&__objc_anonymous_block_DispatchInMacroTest______1:class __objc_anonymous_block_DispatchInMacroTest______1 =n$3 [line 23]\n n$4=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *n$3.DispatchInMacroTest_static_storage:class NSObject *=n$4 [line 23]\n n$5=(_fun___objc_anonymous_block_DispatchInMacroTest______1)() [line 23]\n n$0=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *&return:struct objc_object *=n$0 [line 23]\n " shape="box"] +6 [label="6: Return Stmt \n DECLARE_LOCALS(&__objc_anonymous_block_DispatchInMacroTest______1); [line 23]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_DispatchInMacroTest______1 ):unsigned long ) [line 23]\n *&__objc_anonymous_block_DispatchInMacroTest______1:class __objc_anonymous_block_DispatchInMacroTest______1 =n$3 [line 23]\n n$4=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *n$3.DispatchInMacroTest_static_storage:class NSObject *=n$4 [line 23]\n n$5=(_fun___objc_anonymous_block_DispatchInMacroTest______1)() [line 23]\n n$0=*&#GB$DispatchInMacroTest_static_storage:class NSObject * [line 23]\n *&return:struct objc_object *=n$0 [line 23]\n " shape="box"] 6 -> 2 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class NSObject ):unsigned long ) [line 23]\n n$2=_fun_NSObject_init(n$1:class NSObject *) virtual [line 23]\n *&#GB$DispatchInMacroTest_static_storage:class NSObject *=n$2 [line 23]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$1=_fun___objc_alloc_no_fail(sizeof(class NSObject ):unsigned long ) [line 23]\n n$2=_fun_NSObject_init(n$1:class NSObject *) virtual [line 23]\n *&#GB$DispatchInMacroTest_static_storage:class NSObject *=n$2 [line 23]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot index c9e75f724..2d94c7e5d 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/RetainReleaseExample2.m.dot @@ -92,7 +92,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$0=*&b:class RR2 * [line 40]\n *&#GB$g:class RR2 *=n$0 [line 40]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n n$0=*&b:class RR2 * [line 40]\n *&#GB$g:class RR2 *=n$0 [line 40]\n " shape="box"] 12 -> 11 ; diff --git a/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot b/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot index 9e36e6df4..4ba890531 100644 --- a/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot +++ b/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot @@ -1,13 +1,24 @@ /* @generated */ digraph iCFG { -8 [label="8: Return Stmt \n n$0=*&__return_param:class Fields * [line 20]\n *&#GB$__someFields.field1:float =1 [line 16]\n *&#GB$__someFields.field2:float =2 [line 16]\n *&#GB$__someFields.field3:float =3 [line 16]\n _fun_Fields_(n$0:class Fields *,&#GB$__someFields:class Fields &) [line 20]\n " shape="box"] +11 [label="11: Return Stmt \n n$0=*&__return_param:class Fields * [line 20]\n *&#GB$__someFields.field1:float =1 [line 16]\n *&#GB$__someFields.field2:float =2 [line 16]\n *&#GB$__someFields.field3:float =3 [line 16]\n _fun_Fields_(n$0:class Fields *,&#GB$__someFields:class Fields &) [line 20]\n " shape="box"] + + + 11 -> 10 ; +10 [label="10: Exit fields \n " color=yellow style=filled] + + +9 [label="9: Start fields\nFormals: __return_param:class Fields *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] + + + 9 -> 11 ; +8 [label="8: DeclStmt \n *&#GB$__someFields.field1:float =1 [line 16]\n *&#GB$__someFields.field2:float =2 [line 16]\n *&#GB$__someFields.field3:float =3 [line 16]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit fields \n " color=yellow style=filled] +7 [label="7: Exit __infer_globals_initializer___someFields \n " color=yellow style=filled] -6 [label="6: Start fields\nFormals: __return_param:class Fields *\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] +6 [label="6: Start __infer_globals_initializer___someFields\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] 6 -> 8 ;