From 3e660b05ee073e6a8098baaf1607b828c2d44b1e Mon Sep 17 00:00:00 2001 From: Daiva Naudziuniene Date: Wed, 30 Aug 2017 06:28:13 -0700 Subject: [PATCH] [destructors] Injecting destructors of fields to destructor bodies. Reviewed By: jberdine Differential Revision: D5611089 fbshipit-source-id: 556c3e9 --- infer/src/clang/cAst_utils.ml | 10 ++ infer/src/clang/cAst_utils.mli | 2 + infer/src/clang/cTrans.ml | 127 +++++++++++++++--- .../clang_translation/src/main.cpp.dot | 2 +- .../src/main_default_root.cpp.dot | 2 +- .../src/main_default_symlink.cpp.dot | 2 +- .../src/main_symlink.cpp.dot | 2 +- .../tests/codetoanalyze/cpp/errors/issues.exp | 2 +- .../cpp/frontend/destructors/scope.cpp | 14 ++ .../cpp/frontend/destructors/scope.cpp.dot | 118 +++++++++++----- .../frontend/destructors/simple_decl.cpp.dot | 4 +- 11 files changed, 224 insertions(+), 61 deletions(-) diff --git a/infer/src/clang/cAst_utils.ml b/infer/src/clang/cAst_utils.ml index 26dc0da51..f055fa25f 100644 --- a/infer/src/clang/cAst_utils.ml +++ b/infer/src/clang/cAst_utils.ml @@ -460,3 +460,13 @@ let type_of_decl decl = -> Some qual_type.qt_type_ptr | _ -> None + +let get_record_fields decl = + let open Clang_ast_t in + match decl with + | ClassTemplateSpecializationDecl (_, _, _, _, decl_list, _, _, _, _) + | CXXRecordDecl (_, _, _, _, decl_list, _, _, _) + | RecordDecl (_, _, _, _, decl_list, _, _) + -> List.filter ~f:(function FieldDecl _ -> true | _ -> false) decl_list + | _ + -> [] diff --git a/infer/src/clang/cAst_utils.mli b/infer/src/clang/cAst_utils.mli index 797a918bd..1b33f249e 100644 --- a/infer/src/clang/cAst_utils.mli +++ b/infer/src/clang/cAst_utils.mli @@ -142,3 +142,5 @@ val name_of_decl_ref_opt : Clang_ast_t.decl_ref option -> string option val sil_annot_of_type : Clang_ast_t.qual_type -> Annot.Item.t val type_of_decl : Clang_ast_t.decl -> Clang_ast_t.type_ptr option + +val get_record_fields : Clang_ast_t.decl -> Clang_ast_t.decl list diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 849096c24..f94bfb6fd 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -1163,11 +1163,23 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s {res_trans with exps= extra_res_trans.exps} and cxx_destructor_call_trans trans_state si this_res_trans class_qual_type = - let trans_state_pri = PriorityNode.try_claim_priority_node trans_state si in - let res_trans_callee = destructor_deref_trans trans_state this_res_trans class_qual_type si in + (* cxx_method_construct_call_trans claims a priority with the same `si`. + New pointer is generated to avoid premature node creation *) + let si' = {si with Clang_ast_t.si_pointer= CAst_utils.get_fresh_pointer ()} in + let trans_state_pri = PriorityNode.try_claim_priority_node trans_state si' in + let this_exp, this_typ = + extract_exp_from_list this_res_trans.exps + "WARNING: There should be one expression for 'this' in constructor. @\n" + in + let this_res_trans' = + {this_res_trans with exps= [(this_exp, CType.add_pointer_to_typ this_typ)]} + in + let res_trans_callee = + destructor_deref_trans trans_state this_res_trans' class_qual_type si' + in let is_cpp_call_virtual = res_trans_callee.is_cpp_call_virtual in if res_trans_callee.exps <> [] then - cxx_method_construct_call_trans trans_state_pri res_trans_callee [] si (Typ.mk Tvoid) + cxx_method_construct_call_trans trans_state_pri res_trans_callee [] si' (Typ.mk Tvoid) is_cpp_call_virtual empty_res_trans else empty_res_trans @@ -1290,6 +1302,67 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s in instruction trans_state transformed_stmt + and cxx_inject_field_destructors_in_destructor_body trans_state stmt_info = + let context = trans_state.context in + if not (CGeneral_utils.is_cpp_translation context.translation_unit_context) then + empty_res_trans + else + (* get fields of the current class *) + let class_ptr = CContext.get_curr_class_decl_ptr context.CContext.curr_class in + let decl = Option.value_exn (CAst_utils.get_decl class_ptr) in + let fields = CAst_utils.get_record_fields decl in + (* compute `this` once that is used for all fields *) + let class_qual_type = CAst_utils.qual_type_of_decl_ptr class_ptr in + let _, sloc2 = stmt_info.Clang_ast_t.si_source_range in + let stmt_info_loc = {stmt_info with Clang_ast_t.si_source_range= (sloc2, sloc2)} in + let sil_loc = CLocation.get_sil_location stmt_info_loc context in + let this_res_trans = + this_expr_trans trans_state sil_loc + (Ast_expressions.create_pointer_qual_type class_qual_type) + in + let obj_sil, class_typ = + extract_exp_from_list this_res_trans.exps + "WARNING: There should be one expression for 'this' in constructor. @\n" + in + (* ReturnStmt claims a priority with the same `stmt_info`. + New pointer is generated to avoid premature node creation *) + let stmt_info' = + {stmt_info_loc with Clang_ast_t.si_pointer= CAst_utils.get_fresh_pointer ()} + in + let trans_state_pri = PriorityNode.try_claim_priority_node trans_state stmt_info' in + let all_res_trans = + List.rev_map fields ~f:(function + | Clang_ast_t.FieldDecl ({di_parent_pointer}, {ni_name}, qual_type, _) + -> let class_tname = + match CAst_utils.get_decl_opt di_parent_pointer with + | Some decl + -> CType_decl.get_record_typename ~tenv:context.tenv decl + | _ + -> assert false + in + let field_name = CGeneral_utils.mk_class_field_name class_tname ni_name in + let this_qual_type = + match class_typ.desc with Typ.Tptr (t, _) -> t | _ -> class_typ + in + let field_exp = Exp.Lfield (obj_sil, field_name, this_qual_type) in + let field_typ = CType_decl.qual_type_to_sil_type context.tenv qual_type in + let this_res_trans_destruct = + {empty_res_trans with exps= [(field_exp, field_typ)]} + in + cxx_destructor_call_trans trans_state_pri stmt_info_loc this_res_trans_destruct + qual_type + | _ + -> assert false ) + in + let all_res_trans = List.filter ~f:(fun res -> res <> empty_res_trans) all_res_trans in + let all_res_trans = + if all_res_trans <> [] then {empty_res_trans with instrs= this_res_trans.instrs} + :: all_res_trans + else all_res_trans + in + PriorityNode.compute_results_to_parent trans_state_pri sil_loc "Destruction" stmt_info' + all_res_trans + and inject_destructors trans_state stmt_info = let context = trans_state.context in if not (CGeneral_utils.is_cpp_translation context.translation_unit_context) then @@ -1299,7 +1372,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s (* The source location of destructor should reflect the end of the statement *) let _, sloc2 = stmt_info.Clang_ast_t.si_source_range in let stmt_info_loc = {stmt_info with Clang_ast_t.si_source_range= (sloc2, sloc2)} in - (* ReturnStmt may claim a priority with the same `stmt_info`. + (* ReturnStmt claims a priority with the same `stmt_info`. New pointer is generated to avoid premature node creation *) let stmt_info' = {stmt_info_loc with Clang_ast_t.si_pointer= CAst_utils.get_fresh_pointer ()} @@ -1315,15 +1388,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s -> let pvar = CVar_decl.sil_var_of_decl context decl procname in let exp = Exp.Lvar pvar in let typ = CType_decl.qual_type_to_sil_type context.CContext.tenv qual_type in - let this_res_trans_destruct = - {empty_res_trans with exps= [(exp, CType.add_pointer_to_typ typ)]} - in - (* cxx_destructor_call_trans may claim a priority with the same `stmt_info`. - New pointer is generated to avoid premature node creation *) - let stmt_info'' = - {stmt_info_loc with Clang_ast_t.si_pointer= CAst_utils.get_fresh_pointer ()} - in - cxx_destructor_call_trans trans_state_pri stmt_info'' this_res_trans_destruct + let this_res_trans_destruct = {empty_res_trans with exps= [(exp, typ)]} in + cxx_destructor_call_trans trans_state_pri stmt_info_loc this_res_trans_destruct qual_type | _ -> assert false) @@ -2290,11 +2356,28 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s let context = trans_state.context in let succ_nodes = trans_state.succ_nodes in let sil_loc = CLocation.get_sil_location stmt_info context in + let procdesc = context.CContext.procdesc in + let procname = Procdesc.get_proc_name procdesc in let trans_state_pri = PriorityNode.try_claim_priority_node trans_state stmt_info in let mk_ret_node instrs = let destr_trans_result = inject_destructors trans_state_pri stmt_info in + (* `inject_destructors` should not create new nodes for return statement, + this is ensured by creating a fresh pointer in `inject_destructors` + *) + if destr_trans_result.root_nodes <> [] then assert false ; + let is_destructor = Typ.Procname.is_destructor procname in + let destructor_res = + if is_destructor then + cxx_inject_field_destructors_in_destructor_body trans_state_pri stmt_info + else empty_res_trans + in + (* `cxx_inject_field_destructors_in_destructor_body` should not create new nodes for return statement, + this is ensured by creating a fresh pointer in `cxx_inject_field_destructors_in_destructor_body` + *) + if destructor_res.root_nodes <> [] then assert false ; let ret_node = - create_node (Procdesc.Node.Stmt_node "Return Stmt") (instrs @ destr_trans_result.instrs) + create_node (Procdesc.Node.Stmt_node "Return Stmt") + (instrs @ destr_trans_result.instrs @ destructor_res.instrs) sil_loc context in Procdesc.node_set_succs_exn context.procdesc ret_node @@ -2305,13 +2388,11 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s match stmt_list with | [stmt] -> (* return exp; *) - let procdesc = context.CContext.procdesc in let ret_type = Procdesc.get_ret_type procdesc in let ret_exp, ret_typ, var_instrs = match context.CContext.return_param_typ with | Some ret_param_typ -> let name = CFrontend_config.return_param in - let procname = Procdesc.get_proc_name procdesc in let pvar = Pvar.mk (Mangled.from_string name) procname in let id = Ident.create_fresh Ident.knormal in let instr = Sil.Load (id, Exp.Lvar pvar, ret_param_typ, sil_loc) in @@ -3157,8 +3238,20 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s ; opaque_exp= None ; obj_bridged_cast_typ= None } in + let procname = Procdesc.get_proc_name context.CContext.procdesc in + let is_destructor = Typ.Procname.is_destructor procname in + let stmt_info, _ = Clang_ast_proj.get_stmt_tuple body in + let destructor_res = + if is_destructor then cxx_inject_field_destructors_in_destructor_body trans_state stmt_info + else empty_res_trans + in + (* Injecting destructor call nodes of fields at the end of the body *) + let succ_nodes = + if destructor_res.root_nodes <> [] then destructor_res.root_nodes else trans_state.succ_nodes + in + let trans_state' = {trans_state with succ_nodes} in let instrs = extra_instrs @ [`ClangStmt body] in let instrs_trans = List.map ~f:get_custom_stmt_trans instrs in - let res_trans = exec_trans_instrs trans_state instrs_trans in + let res_trans = exec_trans_instrs trans_state' instrs_trans in res_trans.root_nodes end diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot index 10f7f0780..67823c5f8 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot @@ -214,7 +214,7 @@ digraph iCFG { "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr_~shared_ptr \n " color=yellow style=filled] -"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr_reset(n$0:int**,null:int*) [line 182]\n " shape="box"] +"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$1=*&this:int** [line 182]\n _=*n$1:int* [line 182]\n _fun_std::shared_ptr_reset(n$1:int**,null:int*) [line 182]\n " shape="box"] "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot index 10f7f0780..67823c5f8 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot @@ -214,7 +214,7 @@ digraph iCFG { "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr_~shared_ptr \n " color=yellow style=filled] -"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr_reset(n$0:int**,null:int*) [line 182]\n " shape="box"] +"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$1=*&this:int** [line 182]\n _=*n$1:int* [line 182]\n _fun_std::shared_ptr_reset(n$1:int**,null:int*) [line 182]\n " shape="box"] "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot index 10f7f0780..67823c5f8 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot @@ -214,7 +214,7 @@ digraph iCFG { "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr_~shared_ptr \n " color=yellow style=filled] -"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr_reset(n$0:int**,null:int*) [line 182]\n " shape="box"] +"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$1=*&this:int** [line 182]\n _=*n$1:int* [line 182]\n _fun_std::shared_ptr_reset(n$1:int**,null:int*) [line 182]\n " shape="box"] "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot index 10f7f0780..67823c5f8 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot @@ -214,7 +214,7 @@ digraph iCFG { "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" [label="2: Exit std::shared_ptr_~shared_ptr \n " color=yellow style=filled] -"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$0=*&this:int** [line 182]\n _=*n$0:int* [line 182]\n _fun_std::shared_ptr_reset(n$0:int**,null:int*) [line 182]\n " shape="box"] +"~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" [label="3: Call _fun_std::shared_ptr_reset \n n$1=*&this:int** [line 182]\n _=*n$1:int* [line 182]\n _fun_std::shared_ptr_reset(n$1:int**,null:int*) [line 182]\n " shape="box"] "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_3" -> "~shared_ptr#shared_ptr#std#(_ZNSt3__110shared_ptrIiED0Ev).64f04c4b2ed4a174cbcd135fb2e0998b_2" ; diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index 715550b0a..414ab14dc 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -95,7 +95,7 @@ codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile3, 3, N codetoanalyze/cpp/errors/smart_ptr/const_volatile_type.cpp, test_volatile4, 2, NULL_DEREFERENCE, [start of procedure test_volatile4()] codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_crash, 4, NULL_DEREFERENCE, [start of procedure deref_after_mode_example::deref_after_move_crash(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure access_age] codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_after_move_ok, 3, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_after_move_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure move_age,return from a call to deref_after_mode_example::Person_move_age,start of procedure ~Person,return from a call to deref_after_mode_example::Person_~Person] -codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 3, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,start of procedure ~Person,return from a call to deref_after_mode_example::Person_~Person,return from a call to deref_after_mode_example::deref_ok] +codetoanalyze/cpp/errors/smart_ptr/deref_after_move_example.cpp, deref_after_mode_example::deref_ok, 2, MEMORY_LEAK, [start of procedure deref_after_mode_example::deref_ok(),start of procedure Person,return from a call to deref_after_mode_example::Person_Person,start of procedure access_age,return from a call to deref_after_mode_example::Person_access_age,start of procedure ~Person,return from a call to deref_after_mode_example::Person_~Person] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::aliasing_member_null_bad, 4, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::aliasing_member_null_bad(),start of procedure shared_ptr_constructors::aliasing_construct_from_internal(),start of procedure shared_ptr_constructors::internal_null_def(),Skipping shared_ptr_constructors::external_def(): function or method not found,return from a call to shared_ptr_constructors::internal_null_def,Condition is true,Condition is false,return from a call to shared_ptr_constructors::aliasing_construct_from_internal] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_null_f1_deref, 6, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::get_from_base1_null_f1_deref(),start of procedure Base,return from a call to shared_ptr_constructors::Base_Base,start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] codetoanalyze/cpp/errors/smart_ptr/shared_ptr_constructors.cpp, shared_ptr_constructors::get_from_base1_nullptr_deref, 0, NULL_DEREFERENCE, [start of procedure shared_ptr_constructors::get_from_base1_nullptr_deref(),start of procedure shared_ptr_constructors::getFromBase1(),return from a call to shared_ptr_constructors::getFromBase1] diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp index af387924a..21073ae70 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp @@ -19,7 +19,21 @@ struct Y { struct Z {}; struct S { + X x1; +}; + +struct W { + static S statics; X x; + Y y; + S s; + bool b; + ~W() { + X x; + if (b) + return; + Y y; + }; }; void test1(bool a, bool b) { diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot index 34f9d3408..d1b1c58d8 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot @@ -1,54 +1,54 @@ /* @generated */ digraph iCFG { -"callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_1" [label="1: Start destructor_scope::callgetZ\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:destructor_scope::Z \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 70]\n " color=yellow style=filled] +"callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_1" [label="1: Start destructor_scope::callgetZ\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:destructor_scope::Z \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 84]\n " color=yellow style=filled] "callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_1" -> "callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_3" ; "callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_2" [label="2: Exit destructor_scope::callgetZ \n " color=yellow style=filled] -"callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_3" [label="3: Call _fun_destructor_scope::getZ \n _fun_destructor_scope::getZ(&0$?%__sil_tmp__temp_return_n$1:destructor_scope::Z*) [line 70]\n " shape="box"] +"callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_3" [label="3: Call _fun_destructor_scope::getZ \n _fun_destructor_scope::getZ(&0$?%__sil_tmp__temp_return_n$1:destructor_scope::Z*) [line 84]\n " shape="box"] "callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_3" -> "callgetZ#destructor_scope#_ZN16destructor_scope8callgetZEv.2c9a1cb54f86af11f45d83039775201e_2" ; -"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_1" [label="1: Start destructor_scope::getX\nFormals: __return_param:destructor_scope::X*\nLocals: x:destructor_scope::X \n DECLARE_LOCALS(&return,&x); [line 56]\n " color=yellow style=filled] +"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_1" [label="1: Start destructor_scope::getX\nFormals: __return_param:destructor_scope::X*\nLocals: x:destructor_scope::X \n DECLARE_LOCALS(&return,&x); [line 70]\n " color=yellow style=filled] "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_1" -> "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_4" ; "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_2" [label="2: Exit destructor_scope::getX \n " color=yellow style=filled] -"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::X* [line 58]\n _fun_destructor_scope::X_X(n$0:destructor_scope::X*,&x:destructor_scope::X&) [line 58]\n _=*&x:destructor_scope::X [line 58]\n _fun_destructor_scope::X_~X(&x:destructor_scope::X*) [line 58]\n " shape="box"] +"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::X* [line 72]\n _fun_destructor_scope::X_X(n$0:destructor_scope::X*,&x:destructor_scope::X&) [line 72]\n _=*&x:destructor_scope::X [line 72]\n _fun_destructor_scope::X_~X(&x:destructor_scope::X*) [line 72]\n " shape="box"] "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_3" -> "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_2" ; -"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_4" [label="4: DeclStmt \n _fun_destructor_scope::X_X(&x:destructor_scope::X*) [line 57]\n " shape="box"] +"getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_4" [label="4: DeclStmt \n _fun_destructor_scope::X_X(&x:destructor_scope::X*) [line 71]\n " shape="box"] "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_4" -> "getX#destructor_scope#_ZN16destructor_scope4getXEv.b2ba3b7097be97728da335bbc1da58e3_3" ; -"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_1" [label="1: Start destructor_scope::getZ\nFormals: __return_param:destructor_scope::Z*\nLocals: z:destructor_scope::Z \n DECLARE_LOCALS(&return,&z); [line 61]\n " color=yellow style=filled] +"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_1" [label="1: Start destructor_scope::getZ\nFormals: __return_param:destructor_scope::Z*\nLocals: z:destructor_scope::Z \n DECLARE_LOCALS(&return,&z); [line 75]\n " color=yellow style=filled] "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_1" -> "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_4" ; "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_2" [label="2: Exit destructor_scope::getZ \n " color=yellow style=filled] -"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::Z* [line 63]\n _fun_destructor_scope::Z_Z(n$0:destructor_scope::Z*,&z:destructor_scope::Z&) [line 63]\n " shape="box"] +"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::Z* [line 77]\n _fun_destructor_scope::Z_Z(n$0:destructor_scope::Z*,&z:destructor_scope::Z&) [line 77]\n " shape="box"] "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_3" -> "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_2" ; -"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_4" [label="4: DeclStmt \n _fun_destructor_scope::Z_Z(&z:destructor_scope::Z*) [line 62]\n " shape="box"] +"getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_4" [label="4: DeclStmt \n _fun_destructor_scope::Z_Z(&z:destructor_scope::Z*) [line 76]\n " shape="box"] "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_4" -> "getZ#destructor_scope#_ZN16destructor_scope4getZEv.3a61a74007b69468d628bfcaa77ebe85_3" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_1" [label="1: Start destructor_scope::test2\nFormals: a:_Bool\nLocals: x2:destructor_scope::X x3:destructor_scope::X x1:destructor_scope::X \n DECLARE_LOCALS(&return,&x2,&x3,&x1); [line 45]\n " color=yellow style=filled] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_1" [label="1: Start destructor_scope::test2\nFormals: a:_Bool\nLocals: x2:destructor_scope::X x3:destructor_scope::X x1:destructor_scope::X \n DECLARE_LOCALS(&return,&x2,&x3,&x1); [line 59]\n " color=yellow style=filled] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_1" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_11" ; "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_2" [label="2: Exit destructor_scope::test2 \n " color=yellow style=filled] -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_3" [label="3: Destruction \n _=*&x1:destructor_scope::X [line 54]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 54]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_3" [label="3: Destruction \n _=*&x1:destructor_scope::X [line 68]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 68]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_3" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_2" ; @@ -56,63 +56,63 @@ digraph iCFG { "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_4" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_3" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_5" [label="5: Prune (true branch) \n n$1=*&a:_Bool [line 47]\n PRUNE((n$1 != 0), true); [line 47]\n " shape="invhouse"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_5" [label="5: Prune (true branch) \n n$1=*&a:_Bool [line 61]\n PRUNE((n$1 != 0), true); [line 61]\n " shape="invhouse"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_5" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_8" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_6" [label="6: Prune (false branch) \n n$1=*&a:_Bool [line 47]\n PRUNE((n$1 == 0), false); [line 47]\n " shape="invhouse"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_6" [label="6: Prune (false branch) \n n$1=*&a:_Bool [line 61]\n PRUNE((n$1 == 0), false); [line 61]\n " shape="invhouse"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_6" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_10" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_7" [label="7: Return Stmt \n *&return:int=1 [line 49]\n _=*&x2:destructor_scope::X [line 49]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 49]\n _=*&x1:destructor_scope::X [line 49]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 49]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_7" [label="7: Return Stmt \n *&return:int=1 [line 63]\n _=*&x2:destructor_scope::X [line 63]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 63]\n _=*&x1:destructor_scope::X [line 63]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 63]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_7" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_2" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_8" [label="8: DeclStmt \n _fun_destructor_scope::X_X(&x2:destructor_scope::X*) [line 48]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_8" [label="8: DeclStmt \n _fun_destructor_scope::X_X(&x2:destructor_scope::X*) [line 62]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_8" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_7" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_9" [label="9: Return Stmt \n *&return:int=2 [line 52]\n _=*&x3:destructor_scope::X [line 52]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 52]\n _=*&x1:destructor_scope::X [line 52]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 52]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_9" [label="9: Return Stmt \n *&return:int=2 [line 66]\n _=*&x3:destructor_scope::X [line 66]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 66]\n _=*&x1:destructor_scope::X [line 66]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 66]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_9" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_2" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_10" [label="10: DeclStmt \n _fun_destructor_scope::X_X(&x3:destructor_scope::X*) [line 51]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_10" [label="10: DeclStmt \n _fun_destructor_scope::X_X(&x3:destructor_scope::X*) [line 65]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_10" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_9" ; -"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_11" [label="11: DeclStmt \n _fun_destructor_scope::X_X(&x1:destructor_scope::X*) [line 46]\n " shape="box"] +"test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_11" [label="11: DeclStmt \n _fun_destructor_scope::X_X(&x1:destructor_scope::X*) [line 60]\n " shape="box"] "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_11" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_5" ; "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_11" -> "test2#destructor_scope#_ZN16destructor_scope5test2Eb.098ed11854422e6a46c509b82dd7020a_6" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_1" [label="1: Start destructor_scope::test1\nFormals: a:_Bool b:_Bool\nLocals: y3:destructor_scope::Y y1:destructor_scope::Y x3:destructor_scope::X y2:destructor_scope::Y x2:destructor_scope::X s:destructor_scope::S x1:destructor_scope::X \n DECLARE_LOCALS(&return,&y3,&y1,&x3,&y2,&x2,&s,&x1); [line 25]\n " color=yellow style=filled] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_1" [label="1: Start destructor_scope::test1\nFormals: a:_Bool b:_Bool\nLocals: y3:destructor_scope::Y y1:destructor_scope::Y x3:destructor_scope::X y2:destructor_scope::Y x2:destructor_scope::X s:destructor_scope::S x1:destructor_scope::X \n DECLARE_LOCALS(&return,&y3,&y1,&x3,&y2,&x2,&s,&x1); [line 39]\n " color=yellow style=filled] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_1" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_21" ; "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_2" [label="2: Exit destructor_scope::test1 \n " color=yellow style=filled] -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_3" [label="3: Destruction \n _=*&y1:destructor_scope::Y [line 43]\n _fun_destructor_scope::Y_~Y(&y1:destructor_scope::Y*) [line 43]\n _=*&s:destructor_scope::S [line 43]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 43]\n _=*&x1:destructor_scope::X [line 43]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 43]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_3" [label="3: Destruction \n _=*&y1:destructor_scope::Y [line 57]\n _fun_destructor_scope::Y_~Y(&y1:destructor_scope::Y*) [line 57]\n _=*&s:destructor_scope::S [line 57]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 57]\n _=*&x1:destructor_scope::X [line 57]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 57]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_3" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_2" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_4" [label="4: Destruction \n _=*&y3:destructor_scope::Y [line 42]\n _fun_destructor_scope::Y_~Y(&y3:destructor_scope::Y*) [line 42]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_4" [label="4: Destruction \n _=*&y3:destructor_scope::Y [line 56]\n _fun_destructor_scope::Y_~Y(&y3:destructor_scope::Y*) [line 56]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_4" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_3" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_5" [label="5: DeclStmt \n _fun_destructor_scope::Y_Y(&y3:destructor_scope::Y*) [line 42]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_5" [label="5: DeclStmt \n _fun_destructor_scope::Y_Y(&y3:destructor_scope::Y*) [line 56]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_5" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_4" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_6" [label="6: DeclStmt \n _fun_destructor_scope::Y_Y(&y1:destructor_scope::Y*) [line 41]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_6" [label="6: DeclStmt \n _fun_destructor_scope::Y_Y(&y1:destructor_scope::Y*) [line 55]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_6" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_5" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_7" [label="7: Destruction \n _=*&y2:destructor_scope::Y [line 40]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 40]\n _=*&x2:destructor_scope::X [line 40]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 40]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_7" [label="7: Destruction \n _=*&y2:destructor_scope::Y [line 54]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 54]\n _=*&x2:destructor_scope::X [line 54]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 54]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_7" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_6" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_8" [label="8: Destruction \n _=*&x3:destructor_scope::X [line 39]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 39]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_8" [label="8: Destruction \n _=*&x3:destructor_scope::X [line 53]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 53]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_8" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_7" ; @@ -120,19 +120,19 @@ digraph iCFG { "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_9" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_8" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_10" [label="10: Prune (true branch) \n n$7=*&b:_Bool [line 36]\n PRUNE((n$7 != 0), true); [line 36]\n " shape="invhouse"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_10" [label="10: Prune (true branch) \n n$7=*&b:_Bool [line 50]\n PRUNE((n$7 != 0), true); [line 50]\n " shape="invhouse"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_10" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_12" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_11" [label="11: Prune (false branch) \n n$7=*&b:_Bool [line 36]\n PRUNE((n$7 == 0), false); [line 36]\n " shape="invhouse"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_11" [label="11: Prune (false branch) \n n$7=*&b:_Bool [line 50]\n PRUNE((n$7 == 0), false); [line 50]\n " shape="invhouse"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_11" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_9" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_12" [label="12: Return Stmt \n _=*&x3:destructor_scope::X [line 37]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 37]\n _=*&y2:destructor_scope::Y [line 37]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 37]\n _=*&x2:destructor_scope::X [line 37]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 37]\n _=*&s:destructor_scope::S [line 37]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 37]\n _=*&x1:destructor_scope::X [line 37]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 37]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_12" [label="12: Return Stmt \n _=*&x3:destructor_scope::X [line 51]\n _fun_destructor_scope::X_~X(&x3:destructor_scope::X*) [line 51]\n _=*&y2:destructor_scope::Y [line 51]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 51]\n _=*&x2:destructor_scope::X [line 51]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 51]\n _=*&s:destructor_scope::S [line 51]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 51]\n _=*&x1:destructor_scope::X [line 51]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 51]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_12" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_2" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_13" [label="13: DeclStmt \n _fun_destructor_scope::X_X(&x3:destructor_scope::X*) [line 35]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_13" [label="13: DeclStmt \n _fun_destructor_scope::X_X(&x3:destructor_scope::X*) [line 49]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_13" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_10" ; @@ -141,32 +141,32 @@ digraph iCFG { "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_14" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_13" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_15" [label="15: Prune (true branch) \n n$13=*&a:_Bool [line 31]\n PRUNE((n$13 != 0), true); [line 31]\n " shape="invhouse"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_15" [label="15: Prune (true branch) \n n$13=*&a:_Bool [line 45]\n PRUNE((n$13 != 0), true); [line 45]\n " shape="invhouse"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_15" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_17" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_16" [label="16: Prune (false branch) \n n$13=*&a:_Bool [line 31]\n PRUNE((n$13 == 0), false); [line 31]\n " shape="invhouse"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_16" [label="16: Prune (false branch) \n n$13=*&a:_Bool [line 45]\n PRUNE((n$13 == 0), false); [line 45]\n " shape="invhouse"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_16" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_14" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_17" [label="17: Return Stmt \n _=*&y2:destructor_scope::Y [line 32]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 32]\n _=*&x2:destructor_scope::X [line 32]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 32]\n _=*&s:destructor_scope::S [line 32]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 32]\n _=*&x1:destructor_scope::X [line 32]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 32]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_17" [label="17: Return Stmt \n _=*&y2:destructor_scope::Y [line 46]\n _fun_destructor_scope::Y_~Y(&y2:destructor_scope::Y*) [line 46]\n _=*&x2:destructor_scope::X [line 46]\n _fun_destructor_scope::X_~X(&x2:destructor_scope::X*) [line 46]\n _=*&s:destructor_scope::S [line 46]\n _fun_destructor_scope::S_~S(&s:destructor_scope::S*) [line 46]\n _=*&x1:destructor_scope::X [line 46]\n _fun_destructor_scope::X_~X(&x1:destructor_scope::X*) [line 46]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_17" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_2" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_18" [label="18: DeclStmt \n _fun_destructor_scope::Y_Y(&y2:destructor_scope::Y*) [line 30]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_18" [label="18: DeclStmt \n _fun_destructor_scope::Y_Y(&y2:destructor_scope::Y*) [line 44]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_18" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_15" ; "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_18" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_16" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_19" [label="19: DeclStmt \n _fun_destructor_scope::X_X(&x2:destructor_scope::X*) [line 29]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_19" [label="19: DeclStmt \n _fun_destructor_scope::X_X(&x2:destructor_scope::X*) [line 43]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_19" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_18" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_20" [label="20: DeclStmt \n _fun_destructor_scope::S_S(&s:destructor_scope::S*) [line 27]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_20" [label="20: DeclStmt \n _fun_destructor_scope::S_S(&s:destructor_scope::S*) [line 41]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_20" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_19" ; -"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_21" [label="21: DeclStmt \n _fun_destructor_scope::X_X(&x1:destructor_scope::X*) [line 26]\n " shape="box"] +"test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_21" [label="21: DeclStmt \n _fun_destructor_scope::X_X(&x1:destructor_scope::X*) [line 40]\n " shape="box"] "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_21" -> "test1#destructor_scope#_ZN16destructor_scope5test1Ebb.fea2570de1bd37fe2fd8c1bd9766c861_20" ; @@ -177,17 +177,61 @@ digraph iCFG { "S#S#destructor_scope#{_ZN16destructor_scope1SC1Ev|constexpr}.8a90c7de74a36914310ae757d91d91ff_2" [label="2: Exit destructor_scope::S_S \n " color=yellow style=filled] -"S#S#destructor_scope#{_ZN16destructor_scope1SC1Ev|constexpr}.8a90c7de74a36914310ae757d91d91ff_3" [label="3: Constructor Init \n n$0=*&this:destructor_scope::S* [line 21]\n _fun_destructor_scope::X_X(n$0.x:destructor_scope::X*) [line 21]\n " shape="box"] +"S#S#destructor_scope#{_ZN16destructor_scope1SC1Ev|constexpr}.8a90c7de74a36914310ae757d91d91ff_3" [label="3: Constructor Init \n n$0=*&this:destructor_scope::S* [line 21]\n _fun_destructor_scope::X_X(n$0.x1:destructor_scope::X*) [line 21]\n " shape="box"] "S#S#destructor_scope#{_ZN16destructor_scope1SC1Ev|constexpr}.8a90c7de74a36914310ae757d91d91ff_3" -> "S#S#destructor_scope#{_ZN16destructor_scope1SC1Ev|constexpr}.8a90c7de74a36914310ae757d91d91ff_2" ; "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_1" [label="1: Start destructor_scope::S_~S\nFormals: this:destructor_scope::S*\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled] - "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_1" -> "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_2" ; + "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_1" -> "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_3" ; "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_2" [label="2: Exit destructor_scope::S_~S \n " color=yellow style=filled] +"~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_3" [label="3: Destruction \n n$0=*&this:destructor_scope::S* [line 21]\n _=*n$0.x1:destructor_scope::X [line 21]\n _fun_destructor_scope::X_~X(n$0.x1:destructor_scope::X*) [line 21]\n " shape="box"] + + + "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_3" -> "~S#S#destructor_scope#(_ZN16destructor_scope1SD0Ev).e029a1be84e1c759d19e67b6cee10d7f_2" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_1" [label="1: Start destructor_scope::W_~W\nFormals: this:destructor_scope::W*\nLocals: y:destructor_scope::Y x:destructor_scope::X \n DECLARE_LOCALS(&return,&y,&x); [line 31]\n " color=yellow style=filled] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_1" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_10" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_2" [label="2: Exit destructor_scope::W_~W \n " color=yellow style=filled] + + +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_3" [label="3: Destruction \n n$0=*&this:destructor_scope::W* [line 36]\n _=*n$0.s:destructor_scope::S [line 36]\n _fun_destructor_scope::S_~S(n$0.s:destructor_scope::S*) [line 36]\n _=*n$0.y:destructor_scope::Y [line 36]\n _fun_destructor_scope::Y_~Y(n$0.y:destructor_scope::Y*) [line 36]\n _=*n$0.x:destructor_scope::X [line 36]\n _fun_destructor_scope::X_~X(n$0.x:destructor_scope::X*) [line 36]\n " shape="box"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_3" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_2" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_4" [label="4: Destruction \n _=*&y:destructor_scope::Y [line 36]\n _fun_destructor_scope::Y_~Y(&y:destructor_scope::Y*) [line 36]\n _=*&x:destructor_scope::X [line 36]\n _fun_destructor_scope::X_~X(&x:destructor_scope::X*) [line 36]\n " shape="box"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_4" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_3" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_5" [label="5: DeclStmt \n _fun_destructor_scope::Y_Y(&y:destructor_scope::Y*) [line 35]\n " shape="box"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_5" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_4" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_6" [label="6: + \n " ] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_6" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_5" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_7" [label="7: Prune (true branch) \n n$6=*&this:destructor_scope::W* [line 33]\n n$7=*n$6.b:_Bool [line 33]\n PRUNE((n$7 != 0), true); [line 33]\n " shape="invhouse"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_7" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_9" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_8" [label="8: Prune (false branch) \n n$6=*&this:destructor_scope::W* [line 33]\n n$7=*n$6.b:_Bool [line 33]\n PRUNE((n$7 == 0), false); [line 33]\n " shape="invhouse"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_8" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_6" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_9" [label="9: Return Stmt \n _=*&x:destructor_scope::X [line 34]\n _fun_destructor_scope::X_~X(&x:destructor_scope::X*) [line 34]\n n$9=*&this:destructor_scope::W* [line 34]\n _=*n$9.s:destructor_scope::S [line 34]\n _fun_destructor_scope::S_~S(n$9.s:destructor_scope::S*) [line 34]\n _=*n$9.y:destructor_scope::Y [line 34]\n _fun_destructor_scope::Y_~Y(n$9.y:destructor_scope::Y*) [line 34]\n _=*n$9.x:destructor_scope::X [line 34]\n _fun_destructor_scope::X_~X(n$9.x:destructor_scope::X*) [line 34]\n " shape="box"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_9" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_2" ; +"~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_10" [label="10: DeclStmt \n _fun_destructor_scope::X_X(&x:destructor_scope::X*) [line 32]\n " shape="box"] + + + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_10" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_7" ; + "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_10" -> "~W#W#destructor_scope#(_ZN16destructor_scope1WD0Ev).9885401ab9f4b0bdd64fdcd63dd6accc_8" ; "X#X#destructor_scope#{_ZN16destructor_scope1XC1Ev|constexpr}.2fe4286cdaf024592bc7b4ad8b4a565f_1" [label="1: Start destructor_scope::X_X\nFormals: this:destructor_scope::X*\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot index 0dd4a1153..8045434ee 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { "~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_2" [label="2: Exit A_~A \n " color=yellow style=filled] -"~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:A* [line 12]\n *n$0.f:int=0 [line 12]\n " shape="box"] +"~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_3" [label="3: BinaryOperatorStmt: Assign \n n$1=*&this:A* [line 12]\n *n$1.f:int=0 [line 12]\n " shape="box"] "~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_3" -> "~A#A#(_ZN1AD0Ev).56ee06aef571dbbd330acc7aac738fb2_2" ; @@ -18,7 +18,7 @@ digraph iCFG { "~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_2" [label="2: Exit B_~B \n " color=yellow style=filled] -"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:B* [line 20]\n *n$0.f:int=1 [line 20]\n " shape="box"] +"~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" [label="3: BinaryOperatorStmt: Assign \n n$1=*&this:B* [line 20]\n *n$1.f:int=1 [line 20]\n " shape="box"] "~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_3" -> "~B#B#(_ZN1BD0Ev).cd4fb9d54ed1b3496d9539c455e8ee1d_2" ;