diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index 30ceaa8cb..55343d4cf 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -1537,11 +1537,13 @@ and unknown_or_scan_call ~is_scan ~reason ret_type_option ret_annots | Java _ -> (* FIXME (T19882766): we need to disable this for Java because it breaks too many tests *) false - | ObjC_Cpp _ -> + | ObjC_Cpp cpp_name -> (* FIXME: we need to work around a frontend hack for std::shared_ptr * to silent some of the uninitialization warnings *) - if String.is_suffix ~suffix:"_std__shared_ptr" (Typ.Procname.to_string callee_pname) then - false + if String.is_suffix ~suffix:"_std__shared_ptr" (Typ.Procname.to_string callee_pname) + (* Abduced parameters for the empty destructor body cause `Cannot star` *) + || Typ.Procname.ObjC_Cpp.is_destructor cpp_name + then false else true | _ -> true diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 93889543b..ba90a1ff1 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -680,13 +680,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s match destruct_decl_ref_opt with | Some decl_ref -> ( match CAst_utils.get_decl decl_ref.Clang_ast_t.dr_decl_pointer with - | Some CXXDestructorDecl (_, named_decl_info, _, {fdi_body= None}, _) -> - L.(debug Capture Verbose) - "@\n Trying to translate destructor call, but found empty destructor body for %s@\n@." - (CAst_utils.get_unqualified_name named_decl_info) ; - empty_res_trans - | Some CXXDestructorDecl (_, _, _, {fdi_body= Some _}, _) - (* Translate only those destructors that have bodies *) -> + | Some CXXDestructorDecl _ -> method_deref_trans ~is_inner_destructor trans_state pvar_trans_result decl_ref si `CXXDestructor | _ -> @@ -2670,7 +2664,8 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s let loc = CLocation.get_sil_location stmt_info context in let id, instr = assign_captured_var loc pvar_typ in let trans_results = {empty_res_trans with instrs= [instr]} in - (trans_results :: trans_results_acc, (Exp.Var id, fst pvar_typ, snd pvar_typ) :: captured_vars_acc) + ( trans_results :: trans_results_acc + , (Exp.Var id, fst pvar_typ, snd pvar_typ) :: captured_vars_acc ) in let translate_captured {Clang_ast_t.lci_captured_var; lci_init_captured_vardecl; lci_capture_this} @@ -2680,7 +2675,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s (* capture and init *) let pvar_typ = get_captured_pvar_typ captured_var_decl_ref in ( translate_capture_init pvar_typ init_decl :: trans_results_acc - , (Exp.Lvar (fst pvar_typ), fst pvar_typ, snd pvar_typ) :: captured_vars_acc ) + , (Exp.Lvar (fst pvar_typ), fst pvar_typ, snd pvar_typ) :: captured_vars_acc ) | Some captured_var_decl_ref, None -> (* just capture *) let pvar_typ = get_captured_pvar_typ captured_var_decl_ref in diff --git a/infer/tests/codetoanalyze/cpp/errors/issues.exp b/infer/tests/codetoanalyze/cpp/errors/issues.exp index cb16fb112..a011d4755 100644 --- a/infer/tests/codetoanalyze/cpp/errors/issues.exp +++ b/infer/tests/codetoanalyze/cpp/errors/issues.exp @@ -1,4 +1,6 @@ INFER_MODEL/cpp/include/infer_model/unique_ptr.h, std::operator!=<65d659492edc5cb5>, 1, Abduction_case_not_implemented, [start of procedure std::operator!=<65d659492edc5cb5>()] +INFER_MODEL/cpp/include/infer_model/unique_ptr.h, std::unique_ptr>___infer_inner_destructor_~unique_ptr, 0, Missing_fld, [start of procedure __infer_inner_destructor_~unique_ptr,start of procedure Pointer,return from a call to unique_ptr_with_deleter::Pointer_Pointer,start of procedure Pointer,return from a call to unique_ptr_with_deleter::Pointer_Pointer] +INFER_MODEL/cpp/include/infer_model/unique_ptr.h, std::unique_ptr>___infer_inner_destructor_~unique_ptr, 0, Missing_fld, [start of procedure __infer_inner_destructor_~unique_ptr,start of procedure Pointer,return from a call to unique_ptr_with_deleter::Pointer_Pointer,start of procedure Pointer,return from a call to unique_ptr_with_deleter::Pointer_Pointer] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_fgetc, 4, NULL_DEREFERENCE, [start of procedure crash_fgetc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_getc, 4, NULL_DEREFERENCE, [start of procedure crash_getc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, malloc_fail_gets_reported, 2, NULL_DEREFERENCE, [start of procedure malloc_fail_gets_reported()] @@ -208,7 +210,7 @@ codetoanalyze/cpp/errors/vector/empty_access.cpp, assign_empty, 4, EMPTY_VECTOR_ codetoanalyze/cpp/errors/vector/empty_access.cpp, clear_empty, 3, EMPTY_VECTOR_ACCESS, [start of procedure clear_empty()] codetoanalyze/cpp/errors/vector/empty_access.cpp, copy_empty, 3, EMPTY_VECTOR_ACCESS, [start of procedure copy_empty()] codetoanalyze/cpp/errors/vector/empty_access.cpp, empty_check_access_empty, 2, EMPTY_VECTOR_ACCESS, [start of procedure empty_check_access_empty(),Condition is true] -codetoanalyze/cpp/errors/vector/empty_access.cpp, getter_empty, 0, EMPTY_VECTOR_ACCESS, [start of procedure getter_empty(),start of procedure get_vector(),return from a call to get_vector] +codetoanalyze/cpp/errors/vector/empty_access.cpp, getter_empty, 0, EMPTY_VECTOR_ACCESS, [start of procedure getter_empty(),start of procedure get_vector(),Skipping ~vector: function or method not found,return from a call to get_vector] codetoanalyze/cpp/errors/vector/empty_access.cpp, size_check0_empty, 2, EMPTY_VECTOR_ACCESS, [start of procedure size_check0_empty(),Condition is true] codetoanalyze/cpp/errors/vector/empty_access.cpp, vector_as_param_by_value_empty, 2, EMPTY_VECTOR_ACCESS, [start of procedure vector_as_param_by_value_empty(),start of procedure vector_param_by_value_access(),return from a call to vector_param_by_value_access] codetoanalyze/cpp/errors/vector/empty_access.cpp, vector_as_param_clear, 3, EMPTY_VECTOR_ACCESS, [start of procedure vector_as_param_clear(),start of procedure vector_param_clear(),return from a call to vector_param_clear] @@ -267,9 +269,9 @@ codetoanalyze/cpp/shared/constructors/constructor_with_body.cpp, constructor_wit codetoanalyze/cpp/shared/constructors/copy_array_field.cpp, copy_array_field::npe, 4, NULL_DEREFERENCE, [start of procedure copy_array_field::npe(),start of procedure X,return from a call to copy_array_field::X_X,start of procedure X,return from a call to copy_array_field::X_X] codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyX_div0, 4, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::copyX_div0(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X] codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::copyY_div0, 4, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::copyY_div0(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X,return from a call to copy_move_constructor::getX] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,return from a call to copy_move_constructor::getY] -codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveY_moveY_copyY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,return from a call to copy_move_constructor::getY,start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveX_div0, 0, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveX_div0(),start of procedure copy_move_constructor::getX(),start of procedure X,return from a call to copy_move_constructor::X_X,start of procedure X,return from a call to copy_move_constructor::X_X,Skipping ~X: function or method not found,return from a call to copy_move_constructor::getX] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_div0, 0, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: function or method not found,return from a call to copy_move_constructor::getY] +codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp, copy_move_constructor::moveY_moveY_copyY_div0, 3, DIVIDE_BY_ZERO, [start of procedure copy_move_constructor::moveY_moveY_copyY_div0(),start of procedure copy_move_constructor::getY(),start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y,Skipping ~Y: function or method not found,return from a call to copy_move_constructor::getY,start of procedure Y,return from a call to copy_move_constructor::Y_Y,start of procedure Y,return from a call to copy_move_constructor::Y_Y] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::assign_temp_div0, 2, DIVIDE_BY_ZERO, [start of procedure temp_object::assign_temp_div0(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,start of procedure div] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_field_div0, 0, DIVIDE_BY_ZERO, [start of procedure temp_object::getX_field_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,return from a call to temp_object::getX,start of procedure temp_object::div()] codetoanalyze/cpp/shared/constructors/temp_object.cpp, temp_object::getX_method_div0, 0, DIVIDE_BY_ZERO, [start of procedure temp_object::getX_method_div0(),start of procedure temp_object::getX(),start of procedure X,return from a call to temp_object::X_X,start of procedure X,return from a call to temp_object::X_X,return from a call to temp_object::getX,start of procedure div] @@ -354,8 +356,8 @@ codetoanalyze/cpp/shared/templates/method.cpp, method::div0_getter_templ2, 4, DI codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer1, 2, NULL_DEREFERENCE, [start of procedure call_const_params_with_pointer1(),start of procedure const_in_param1()] codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer2, 2, NULL_DEREFERENCE, [start of procedure call_const_params_with_pointer2(),start of procedure const_in_param2()] codetoanalyze/cpp/shared/types/const.cpp, call_const_params_with_pointer3, 2, NULL_DEREFERENCE, [start of procedure call_const_params_with_pointer3(),start of procedure const_in_param2()] -codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_A, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_A(),start of procedure inheritance_casts::getA(),start of procedure A,return from a call to inheritance_casts::A_A,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::getA,start of procedure inheritance_casts::div()] -codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_B, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_B(),start of procedure inheritance_casts::getB(),start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,return from a call to inheritance_casts::getB,start of procedure inheritance_casts::div()] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_A, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_A(),start of procedure inheritance_casts::getA(),start of procedure A,return from a call to inheritance_casts::A_A,start of procedure A,return from a call to inheritance_casts::A_A,Skipping ~A: function or method not found,return from a call to inheritance_casts::getA,start of procedure inheritance_casts::div()] +codetoanalyze/cpp/shared/types/inheritance_casts.cpp, inheritance_casts::div0_B, 0, DIVIDE_BY_ZERO, [start of procedure inheritance_casts::div0_B(),start of procedure inheritance_casts::getB(),start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,start of procedure B,start of procedure A,return from a call to inheritance_casts::A_A,return from a call to inheritance_casts::B_B,Skipping ~B: function or method not found,return from a call to inheritance_casts::getB,start of procedure inheritance_casts::div()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1, 2, DIVIDE_BY_ZERO, [start of procedure div0_b1()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b1_s, 3, DIVIDE_BY_ZERO, [start of procedure div0_b1_s()] codetoanalyze/cpp/shared/types/inheritance_field.cpp, div0_b2, 2, DIVIDE_BY_ZERO, [start of procedure div0_b2()] @@ -368,9 +370,9 @@ codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_inheritted_op, 2, DIV codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method, 3, DIVIDE_BY_ZERO, [start of procedure div0_method(),start of procedure operator[],return from a call to X_operator[]] codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method_op, 3, DIVIDE_BY_ZERO, [start of procedure div0_method_op(),start of procedure operator[],return from a call to X_operator[]] codetoanalyze/cpp/shared/types/operator_overload.cpp, div0_method_op_ptr, 0, DIVIDE_BY_ZERO, [start of procedure div0_method_op_ptr(),start of procedure operator[],return from a call to X_operator[]] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO, [start of procedure return_struct::get_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,return from a call to return_struct::get,start of procedure X,return from a call to return_struct::X_X] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,return from a call to return_struct::get,Skipping skip: function or method not found,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,return from a call to return_struct::get] -codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO, [start of procedure return_struct::get_method_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,return from a call to return_struct::get,start of procedure div] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_div0, 2, DIVIDE_BY_ZERO, [start of procedure return_struct::get_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,start of procedure X,return from a call to return_struct::X_X] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_field_div0, 2, DIVIDE_BY_ZERO, [start of procedure return_struct::get_field_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,Skipping skip: function or method not found,start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get] +codetoanalyze/cpp/shared/types/return_struct.cpp, return_struct::get_method_div0, 0, DIVIDE_BY_ZERO, [start of procedure return_struct::get_method_div0(),start of procedure return_struct::get(),start of procedure X,return from a call to return_struct::X_X,start of procedure X,return from a call to return_struct::X_X,Skipping ~X: function or method not found,return from a call to return_struct::get,start of procedure div] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_Y_div0, 7, DIVIDE_BY_ZERO, [start of procedure struct_forward_declare::X_Y_div0(),start of procedure X,return from a call to struct_forward_declare::X_X,Condition is false,start of procedure getF,return from a call to struct_forward_declare::X_getF] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_div0, 3, DIVIDE_BY_ZERO, [start of procedure struct_forward_declare::X_div0(),start of procedure X,return from a call to struct_forward_declare::X_X,start of procedure getF,return from a call to struct_forward_declare::X_getF] codetoanalyze/cpp/shared/types/struct_forward_declare.cpp, struct_forward_declare::X_ptr_div0, 2, DIVIDE_BY_ZERO, [start of procedure struct_forward_declare::X_ptr_div0(),start of procedure getF,return from a call to struct_forward_declare::X_getF] diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot index 9f0691e13..9c361aa35 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/scope.cpp.dot @@ -33,7 +33,7 @@ digraph cfg { "getZ#destructor_scope#13110319947448813202.fe2bc6519a3d7998283b70bbacc3915e_2" [label="2: Exit destructor_scope::getZ \n " color=yellow style=filled] -"getZ#destructor_scope#13110319947448813202.fe2bc6519a3d7998283b70bbacc3915e_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::Z* [line 77, column 3]\n _fun_destructor_scope::Z_Z(n$0:destructor_scope::Z*,&z:destructor_scope::Z&) [line 77, column 10]\n " shape="box"] +"getZ#destructor_scope#13110319947448813202.fe2bc6519a3d7998283b70bbacc3915e_3" [label="3: Return Stmt \n n$0=*&__return_param:destructor_scope::Z* [line 77, column 3]\n _fun_destructor_scope::Z_Z(n$0:destructor_scope::Z*,&z:destructor_scope::Z&) [line 77, column 10]\n _=*&z:destructor_scope::Z [line 77, column 10]\n _fun_destructor_scope::Z_~Z(&z:destructor_scope::Z*) [line 77, column 10]\n " shape="box"] "getZ#destructor_scope#13110319947448813202.fe2bc6519a3d7998283b70bbacc3915e_3" -> "getZ#destructor_scope#13110319947448813202.fe2bc6519a3d7998283b70bbacc3915e_2" ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/initialization/init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/initialization/init_list.cpp.dot index f4d2fc600..ac959b7a4 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/initialization/init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/initialization/init_list.cpp.dot @@ -22,41 +22,49 @@ digraph cfg { "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_1" [label="1: Start init_list::zero_init_record\nFormals: \nLocals: c:init_list::C y:init_list::Y \n DECLARE_LOCALS(&return,&c,&y); [line 33, column 1]\n " color=yellow style=filled] - "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_1" -> "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_4" ; + "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_1" -> "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_5" ; "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_2" [label="2: Exit init_list::zero_init_record \n " color=yellow style=filled] -"zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_3" [label="3: DeclStmt \n _fun_init_list::C_C(&c:init_list::C*) [line 35, column 5]\n " shape="box"] +"zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_3" [label="3: Destruction \n _=*&c:init_list::C [line 36, column 1]\n _fun_init_list::C_~C(&c:init_list::C*) [line 36, column 1]\n " shape="box"] "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_3" -> "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_2" ; -"zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_4" [label="4: DeclStmt \n *&y.z:int=0 [line 34, column 7]\n *&y.x.a:int=0 [line 34, column 7]\n *&y.x.p:int*=null [line 34, column 7]\n " shape="box"] +"zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_4" [label="4: DeclStmt \n _fun_init_list::C_C(&c:init_list::C*) [line 35, column 5]\n " shape="box"] "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_4" -> "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_3" ; +"zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_5" [label="5: DeclStmt \n *&y.z:int=0 [line 34, column 7]\n *&y.x.a:int=0 [line 34, column 7]\n *&y.x.p:int*=null [line 34, column 7]\n " shape="box"] + + + "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_5" -> "zero_init_record#init_list#7364160241041626579.8baaea62666796dca7b4a7b11bf4f2bb_4" ; "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_1" [label="1: Start init_list::record_init\nFormals: \nLocals: c:init_list::C y2:init_list::Y y1:init_list::Y x:init_list::X \n DECLARE_LOCALS(&return,&c,&y2,&y1,&x); [line 38, column 1]\n " color=yellow style=filled] - "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_1" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_6" ; + "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_1" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_7" ; "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_2" [label="2: Exit init_list::record_init \n " color=yellow style=filled] -"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_3" [label="3: DeclStmt \n _fun_init_list::C_C(&c:init_list::C*,1:int,2:int,&x:init_list::X&) [line 43, column 5]\n " shape="box"] +"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_3" [label="3: Destruction \n _=*&c:init_list::C [line 44, column 1]\n _fun_init_list::C_~C(&c:init_list::C*) [line 44, column 1]\n _=*&x:init_list::X [line 44, column 1]\n _fun_init_list::X_~X(&x:init_list::X*) [line 44, column 1]\n " shape="box"] "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_3" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_2" ; -"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_4" [label="4: DeclStmt \n *&y2.z:int=1 [line 41, column 7]\n *&y2.x.a:int=2 [line 41, column 11]\n *&y2.x.p:int*=null [line 41, column 11]\n " shape="box"] +"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_4" [label="4: DeclStmt \n _fun_init_list::C_C(&c:init_list::C*,1:int,2:int,&x:init_list::X&) [line 43, column 5]\n " shape="box"] "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_4" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_3" ; -"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_5" [label="5: DeclStmt \n *&y1.z:int=1 [line 40, column 7]\n _fun_init_list::X_X(&y1.x:init_list::X*,&x:init_list::X&) [line 40, column 11]\n " shape="box"] +"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_5" [label="5: DeclStmt \n *&y2.z:int=1 [line 41, column 7]\n *&y2.x.a:int=2 [line 41, column 11]\n *&y2.x.p:int*=null [line 41, column 11]\n " shape="box"] "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_5" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_4" ; -"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_6" [label="6: DeclStmt \n *&x.a:int=1 [line 39, column 6]\n *&x.p:int*=null [line 39, column 6]\n " shape="box"] +"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_6" [label="6: DeclStmt \n *&y1.z:int=1 [line 40, column 7]\n _fun_init_list::X_X(&y1.x:init_list::X*,&x:init_list::X&) [line 40, column 11]\n " shape="box"] "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_6" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_5" ; +"record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_7" [label="7: DeclStmt \n *&x.a:int=1 [line 39, column 6]\n *&x.p:int*=null [line 39, column 6]\n " shape="box"] + + + "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_7" -> "record_init#init_list#9390182661430352809.a0bac2a3cf71c0b7c450ce49d030845f_6" ; "list_init#init_list#18348854466346904105.0126b9f1f80f91b73d5fbdbf2bc60754_1" [label="1: Start init_list::list_init\nFormals: \nLocals: ty:init_list::Y[3*24] yref:init_list::Y& y:init_list::Y ti:int[4*4] \n DECLARE_LOCALS(&return,&ty,&yref,&y,&ti); [line 46, column 1]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp b/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp index 60e997838..a5b142379 100644 --- a/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp +++ b/infer/tests/codetoanalyze/cpp/liveness/dead_stores.cpp @@ -323,6 +323,12 @@ struct NoDestructor {}; void dead_struct_no_destructor_bad() { NoDestructor dead; } +struct NoDestructorDefinition { + ~NoDestructorDefinition(); +}; + +void dead_struct_no_destructor_definition_ok() { NoDestructorDefinition dead; } + std::mutex my_mutex; void dead_lock_guard_ok() { std::lock_guard lock(my_mutex); } diff --git a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot index f998d61d9..82ad25a19 100644 --- a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot @@ -1,89 +1,97 @@ /* @generated */ digraph cfg { -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_1" [label="1: Start binary_conditional::binaryConditional\nFormals: \nLocals: x:binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$2:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$4:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X a:binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&0$?%__sil_tmpSIL_materialize_temp__n$0,&a); [line 22, column 1]\n " color=yellow style=filled] +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_1" [label="1: Start binary_conditional::binaryConditional\nFormals: \nLocals: x:binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$4:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$6:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X a:binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$4,&0$?%__sil_tmpSIL_materialize_temp__n$6,&0$?%__sil_tmpSIL_materialize_temp__n$2,&a); [line 22, column 1]\n " color=yellow style=filled] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_1" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" ; + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_1" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_12" ; "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_2" [label="2: Exit binary_conditional::binaryConditional \n " color=yellow style=filled] -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" [label="3: + \n " ] +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" [label="3: Destruction \n _=*&x:binary_conditional::X [line 25, column 1]\n _fun_binary_conditional::X_~X(&x:binary_conditional::X*) [line 25, column 1]\n _=*&a:binary_conditional::X [line 25, column 1]\n _fun_binary_conditional::X_~X(&a:binary_conditional::X*) [line 25, column 1]\n " shape="box"] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" [label="4: Call _fun_binary_conditional::X_operator_bool \n n$3=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X&) [line 24, column 9]\n " shape="box"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_2" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" [label="4: + \n " ] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" ; - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_6" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" [label="5: Prune (true branch) \n PRUNE(n$3, true); [line 24, column 9]\n " shape="invhouse"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" [label="5: Call _fun_binary_conditional::X_operator_bool \n n$5=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X&) [line 24, column 9]\n " shape="box"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_6" ; "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_7" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_6" [label="6: Prune (false branch) \n PRUNE(!n$3, false); [line 24, column 9]\n " shape="invhouse"] +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_6" [label="6: Prune (true branch) \n PRUNE(n$5, true); [line 24, column 9]\n " shape="invhouse"] "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_6" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_8" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_7" [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_materialize_temp__n$4:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24, column 9]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$4:binary_conditional::X&) [line 24, column 9]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24, column 9]\n " shape="box"] +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_7" [label="7: Prune (false branch) \n PRUNE(!n$5, false); [line 24, column 9]\n " shape="invhouse"] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_7" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_8" [label="8: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X*,&a:binary_conditional::X&) [line 24, column 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 24, column 9]\n " shape="box"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_7" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_9" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_8" [label="8: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_materialize_temp__n$6:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 24, column 9]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$6:binary_conditional::X&) [line 24, column 9]\n *&0$?%__sil_tmpSIL_temp_conditional___n$4:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 24, column 9]\n " shape="box"] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_8" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_9" [label="9: BinaryConditinalStmt Init \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X*) [line 24, column 9]\n " shape="box"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_8" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_9" [label="9: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X*,&a:binary_conditional::X&) [line 24, column 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$4:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 24, column 9]\n " shape="box"] "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_9" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_4" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" [label="10: DeclStmt \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:binary_conditional::X [line 24, column 9]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X=n$5 [line 24, column 9]\n _fun_binary_conditional::X_X(&x:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X&) [line 24, column 9]\n " shape="box"] +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" [label="10: BinaryConditinalStmt Init \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X*) [line 24, column 9]\n " shape="box"] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_2" ; -"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" [label="11: DeclStmt \n _fun_binary_conditional::X_X(&a:binary_conditional::X*) [line 23, column 5]\n " shape="box"] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_5" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" [label="11: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$4:binary_conditional::X [line 24, column 9]\n *&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X=n$7 [line 24, column 9]\n _fun_binary_conditional::X_X(&x:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X&) [line 24, column 9]\n " shape="box"] - "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_9" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_1" [label="1: Start binary_conditional::conditional\nFormals: \nLocals: x:binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$1:binary_conditional::X 0$?%__sil_tmp__temp_return_n$3:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$5:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X a:binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&0$?%__sil_tmpSIL_materialize_temp__n$0,&a); [line 27, column 1]\n " color=yellow style=filled] + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_11" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_3" ; +"binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_12" [label="12: DeclStmt \n _fun_binary_conditional::X_X(&a:binary_conditional::X*) [line 23, column 5]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_1" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" ; + "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_12" -> "binaryConditional#binary_conditional#15641211300815748363.a0f7e256e24b7117cb94c66e5aa27a30_10" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_1" [label="1: Start binary_conditional::conditional\nFormals: \nLocals: x:binary_conditional::X 0$?%__sil_tmpSIL_temp_conditional___n$3:binary_conditional::X 0$?%__sil_tmp__temp_return_n$5:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$7:binary_conditional::X 0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X a:binary_conditional::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmp__temp_return_n$5,&0$?%__sil_tmpSIL_materialize_temp__n$7,&0$?%__sil_tmpSIL_materialize_temp__n$2,&a); [line 27, column 1]\n " color=yellow style=filled] + + + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_1" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_11" ; "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_2" [label="2: Exit binary_conditional::conditional \n " color=yellow style=filled] -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" [label="3: + \n " ] +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" [label="3: Destruction \n _=*&x:binary_conditional::X [line 30, column 1]\n _fun_binary_conditional::X_~X(&x:binary_conditional::X*) [line 30, column 1]\n _=*&a:binary_conditional::X [line 30, column 1]\n _fun_binary_conditional::X_~X(&a:binary_conditional::X*) [line 30, column 1]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" [label="4: Call _fun_binary_conditional::X_operator_bool \n _fun_binary_conditional::getX(&0$?%__sil_tmp__temp_return_n$3:binary_conditional::X*) [line 29, column 9]\n n$4=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmp__temp_return_n$3:binary_conditional::X&) [line 29, column 9]\n " shape="box"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_2" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" [label="4: + \n " ] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" ; - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_6" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" [label="5: Prune (true branch) \n PRUNE(n$4, true); [line 29, column 9]\n " shape="invhouse"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" [label="5: Call _fun_binary_conditional::X_operator_bool \n _fun_binary_conditional::getX(&0$?%__sil_tmp__temp_return_n$5:binary_conditional::X*) [line 29, column 9]\n n$6=_fun_binary_conditional::X_operator_bool(&0$?%__sil_tmp__temp_return_n$5:binary_conditional::X&) [line 29, column 9]\n " shape="box"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_6" ; "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_7" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_6" [label="6: Prune (false branch) \n PRUNE(!n$4, false); [line 29, column 9]\n " shape="invhouse"] +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_6" [label="6: Prune (true branch) \n PRUNE(n$6, true); [line 29, column 9]\n " shape="invhouse"] "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_6" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_8" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_7" [label="7: ConditinalStmt Branch \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$5:binary_conditional::X*) [line 29, column 18]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$5:binary_conditional::X&) [line 29, column 18]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 29, column 9]\n " shape="box"] +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_7" [label="7: Prune (false branch) \n PRUNE(!n$6, false); [line 29, column 9]\n " shape="invhouse"] + + + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_7" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_8" [label="8: ConditinalStmt Branch \n _fun_binary_conditional::getX(&0$?%__sil_tmpSIL_materialize_temp__n$7:binary_conditional::X*) [line 29, column 18]\n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$7:binary_conditional::X&) [line 29, column 18]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 29, column 9]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_7" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_8" [label="8: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X*,&a:binary_conditional::X&) [line 29, column 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 29, column 9]\n " shape="box"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_8" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" [label="9: ConditinalStmt Branch \n _fun_binary_conditional::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X*,&a:binary_conditional::X&) [line 29, column 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:binary_conditional::X=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 29, column 9]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_8" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" [label="9: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$1:binary_conditional::X [line 29, column 9]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X=n$7 [line 29, column 9]\n _fun_binary_conditional::X_X(&x:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$0:binary_conditional::X&) [line 29, column 9]\n " shape="box"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" [label="10: DeclStmt \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$3:binary_conditional::X [line 29, column 9]\n *&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X=n$9 [line 29, column 9]\n _fun_binary_conditional::X_X(&x:binary_conditional::X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:binary_conditional::X&) [line 29, column 9]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_9" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_2" ; -"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" [label="10: DeclStmt \n _fun_binary_conditional::X_X(&a:binary_conditional::X*) [line 28, column 5]\n " shape="box"] + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_3" ; +"conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_11" [label="11: DeclStmt \n _fun_binary_conditional::X_X(&a:binary_conditional::X*) [line 28, column 5]\n " shape="box"] - "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_10" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_4" ; + "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_11" -> "conditional#binary_conditional#4777209206611953450.41decaebdce6325bd31c1d47d4647c45_5" ; "getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_1" [label="1: Start binary_conditional::getX\nFormals: __return_param:binary_conditional::X*\nLocals: x:binary_conditional::X \n DECLARE_LOCALS(&return,&x); [line 16, column 1]\n " color=yellow style=filled] @@ -91,7 +99,7 @@ digraph cfg { "getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_2" [label="2: Exit binary_conditional::getX \n " color=yellow style=filled] -"getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_3" [label="3: Return Stmt \n n$0=*&__return_param:binary_conditional::X* [line 18, column 3]\n _fun_binary_conditional::X_X(n$0:binary_conditional::X*,&x:binary_conditional::X&) [line 18, column 10]\n " shape="box"] +"getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_3" [label="3: Return Stmt \n n$0=*&__return_param:binary_conditional::X* [line 18, column 3]\n _fun_binary_conditional::X_X(n$0:binary_conditional::X*,&x:binary_conditional::X&) [line 18, column 10]\n _=*&x:binary_conditional::X [line 18, column 10]\n _fun_binary_conditional::X_~X(&x:binary_conditional::X*) [line 18, column 10]\n " shape="box"] "getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_3" -> "getX#binary_conditional#7708042186122353096.ec6c66051810049a5e5688caadbf0f96_2" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot index 978ba4e64..989b5f589 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_init.cpp.dot @@ -7,7 +7,7 @@ digraph cfg { "f2_div0#7534053771484990951.dd0b0233a011b5600e68aef2c840bcef_2" [label="2: Exit f2_div0 \n " color=yellow style=filled] -"f2_div0#7534053771484990951.dd0b0233a011b5600e68aef2c840bcef_3" [label="3: Return Stmt \n n$0=*&b.f2:int [line 29, column 14]\n *&return:int=(1 / n$0) [line 29, column 3]\n " shape="box"] +"f2_div0#7534053771484990951.dd0b0233a011b5600e68aef2c840bcef_3" [label="3: Return Stmt \n n$0=*&b.f2:int [line 29, column 14]\n *&return:int=(1 / n$0) [line 29, column 3]\n _=*&b:B [line 29, column 16]\n _fun_B_~B(&b:B*) [line 29, column 16]\n " shape="box"] "f2_div0#7534053771484990951.dd0b0233a011b5600e68aef2c840bcef_3" -> "f2_div0#7534053771484990951.dd0b0233a011b5600e68aef2c840bcef_2" ; @@ -22,7 +22,7 @@ digraph cfg { "f_div0#425664895438337450.ac4424ba5cea731e26a9fe2fb1b0b687_2" [label="2: Exit f_div0 \n " color=yellow style=filled] -"f_div0#425664895438337450.ac4424ba5cea731e26a9fe2fb1b0b687_3" [label="3: Return Stmt \n n$0=*&b.f:int [line 34, column 14]\n *&return:int=(1 / n$0) [line 34, column 3]\n " shape="box"] +"f_div0#425664895438337450.ac4424ba5cea731e26a9fe2fb1b0b687_3" [label="3: Return Stmt \n n$0=*&b.f:int [line 34, column 14]\n *&return:int=(1 / n$0) [line 34, column 3]\n _=*&b:B [line 34, column 16]\n _fun_B_~B(&b:B*) [line 34, column 16]\n " shape="box"] "f_div0#425664895438337450.ac4424ba5cea731e26a9fe2fb1b0b687_3" -> "f_div0#425664895438337450.ac4424ba5cea731e26a9fe2fb1b0b687_2" ; @@ -37,7 +37,7 @@ digraph cfg { "t_div0#3531430030893775324.a762c245df414e083e61674c93898055_2" [label="2: Exit t_div0 \n " color=yellow style=filled] -"t_div0#3531430030893775324.a762c245df414e083e61674c93898055_3" [label="3: Return Stmt \n n$0=*&b.t.v:int [line 39, column 14]\n *&return:int=(1 / n$0) [line 39, column 3]\n " shape="box"] +"t_div0#3531430030893775324.a762c245df414e083e61674c93898055_3" [label="3: Return Stmt \n n$0=*&b.t.v:int [line 39, column 14]\n *&return:int=(1 / n$0) [line 39, column 3]\n _=*&b:B [line 39, column 18]\n _fun_B_~B(&b:B*) [line 39, column 18]\n " shape="box"] "t_div0#3531430030893775324.a762c245df414e083e61674c93898055_3" -> "t_div0#3531430030893775324.a762c245df414e083e61674c93898055_2" ; @@ -52,11 +52,11 @@ digraph cfg { "delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_2" [label="2: Exit delegate_constr_f_div0 \n " color=yellow style=filled] -"delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_3" [label="3: Return Stmt \n n$0=*&b.f:int [line 45, column 14]\n *&return:int=(1 / n$0) [line 45, column 3]\n " shape="box"] +"delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_3" [label="3: Return Stmt \n n$0=*&b.f:int [line 45, column 14]\n *&return:int=(1 / n$0) [line 45, column 3]\n _=*&b:B [line 45, column 16]\n _fun_B_~B(&b:B*) [line 45, column 16]\n " shape="box"] "delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_3" -> "delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_2" ; -"delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_4" [label="4: DeclStmt \n n$1=*&b.f2:int [line 44, column 15]\n *&v:int=(1 / n$1) [line 44, column 3]\n " shape="box"] +"delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_4" [label="4: DeclStmt \n n$2=*&b.f2:int [line 44, column 15]\n *&v:int=(1 / n$2) [line 44, column 3]\n " shape="box"] "delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_4" -> "delegate_constr_f_div0#5612932889167727636.f7eff0d7a58a3e6a6faddf562531b7f4_3" ; @@ -71,11 +71,11 @@ digraph cfg { "delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_2" [label="2: Exit delegate_constr_f2_div0 \n " color=yellow style=filled] -"delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_3" [label="3: Return Stmt \n n$0=*&b.f2:int [line 51, column 14]\n *&return:int=(1 / n$0) [line 51, column 3]\n " shape="box"] +"delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_3" [label="3: Return Stmt \n n$0=*&b.f2:int [line 51, column 14]\n *&return:int=(1 / n$0) [line 51, column 3]\n _=*&b:B [line 51, column 16]\n _fun_B_~B(&b:B*) [line 51, column 16]\n " shape="box"] "delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_3" -> "delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_2" ; -"delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_4" [label="4: DeclStmt \n n$1=*&b.f:int [line 50, column 15]\n *&v:int=(1 / n$1) [line 50, column 3]\n " shape="box"] +"delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_4" [label="4: DeclStmt \n n$2=*&b.f:int [line 50, column 15]\n *&v:int=(1 / n$2) [line 50, column 3]\n " shape="box"] "delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_4" -> "delegate_constr_f2_div0#13553474688240246893.0ce7e6b119d9277f847a079378cf30a1_3" ; @@ -90,19 +90,19 @@ digraph cfg { "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_2" [label="2: Exit f_f2_div1 \n " color=yellow style=filled] -"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_3" [label="3: Return Stmt \n n$0=*&v:int [line 59, column 10]\n n$1=*&v2:int [line 59, column 14]\n *&return:int=(n$0 + n$1) [line 59, column 3]\n " shape="box"] +"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_3" [label="3: Return Stmt \n n$0=*&v:int [line 59, column 10]\n n$1=*&v2:int [line 59, column 14]\n *&return:int=(n$0 + n$1) [line 59, column 3]\n _=*&b:B [line 59, column 14]\n _fun_B_~B(&b:B*) [line 59, column 14]\n " shape="box"] "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_3" -> "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_2" ; -"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_4" [label="4: DeclStmt \n n$2=*&b.t.v:int [line 58, column 16]\n *&v3:int=(1 / n$2) [line 58, column 3]\n " shape="box"] +"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_4" [label="4: DeclStmt \n n$3=*&b.t.v:int [line 58, column 16]\n *&v3:int=(1 / n$3) [line 58, column 3]\n " shape="box"] "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_4" -> "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_3" ; -"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_5" [label="5: DeclStmt \n n$3=*&b.f2:int [line 57, column 16]\n *&v2:int=(1 / n$3) [line 57, column 3]\n " shape="box"] +"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_5" [label="5: DeclStmt \n n$4=*&b.f2:int [line 57, column 16]\n *&v2:int=(1 / n$4) [line 57, column 3]\n " shape="box"] "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_5" -> "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_4" ; -"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_6" [label="6: DeclStmt \n n$4=*&b.f:int [line 56, column 15]\n *&v:int=(1 / n$4) [line 56, column 3]\n " shape="box"] +"f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_6" [label="6: DeclStmt \n n$5=*&b.f:int [line 56, column 15]\n *&v:int=(1 / n$5) [line 56, column 3]\n " shape="box"] "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_6" -> "f_f2_div1#1916649103065485619.7e2fb5eeaa415affd6bdd86573d188de_5" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot index 5cbb33286..92e95f035 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/copy_move_constructor.cpp.dot @@ -7,7 +7,7 @@ digraph cfg { "copyX_div0#copy_move_constructor#7555826423954612298.1fd45599e2fc3ce471d7d474aa615bcb_2" [label="2: Exit copy_move_constructor::copyX_div0 \n " color=yellow style=filled] -"copyX_div0#copy_move_constructor#7555826423954612298.1fd45599e2fc3ce471d7d474aa615bcb_3" [label="3: Return Stmt \n n$0=*&x2.f:int [line 45, column 14]\n *&return:int=(1 / n$0) [line 45, column 3]\n " shape="box"] +"copyX_div0#copy_move_constructor#7555826423954612298.1fd45599e2fc3ce471d7d474aa615bcb_3" [label="3: Return Stmt \n n$0=*&x2.f:int [line 45, column 14]\n *&return:int=(1 / n$0) [line 45, column 3]\n _=*&x2:copy_move_constructor::X [line 45, column 17]\n _fun_copy_move_constructor::X_~X(&x2:copy_move_constructor::X*) [line 45, column 17]\n _=*&x1:copy_move_constructor::X [line 45, column 17]\n _fun_copy_move_constructor::X_~X(&x1:copy_move_constructor::X*) [line 45, column 17]\n " shape="box"] "copyX_div0#copy_move_constructor#7555826423954612298.1fd45599e2fc3ce471d7d474aa615bcb_3" -> "copyX_div0#copy_move_constructor#7555826423954612298.1fd45599e2fc3ce471d7d474aa615bcb_2" ; @@ -41,7 +41,7 @@ digraph cfg { "copyY_div0#copy_move_constructor#17079397845524781987.61211209ec1f961073f3adafcd080bfb_2" [label="2: Exit copy_move_constructor::copyY_div0 \n " color=yellow style=filled] -"copyY_div0#copy_move_constructor#17079397845524781987.61211209ec1f961073f3adafcd080bfb_3" [label="3: Return Stmt \n n$0=*&y2.f:int [line 54, column 14]\n *&return:int=(1 / n$0) [line 54, column 3]\n " shape="box"] +"copyY_div0#copy_move_constructor#17079397845524781987.61211209ec1f961073f3adafcd080bfb_3" [label="3: Return Stmt \n n$0=*&y2.f:int [line 54, column 14]\n *&return:int=(1 / n$0) [line 54, column 3]\n _=*&y2:copy_move_constructor::Y [line 54, column 17]\n _fun_copy_move_constructor::Y_~Y(&y2:copy_move_constructor::Y*) [line 54, column 17]\n _=*&y1:copy_move_constructor::Y [line 54, column 17]\n _fun_copy_move_constructor::Y_~Y(&y1:copy_move_constructor::Y*) [line 54, column 17]\n " shape="box"] "copyY_div0#copy_move_constructor#17079397845524781987.61211209ec1f961073f3adafcd080bfb_3" -> "copyY_div0#copy_move_constructor#17079397845524781987.61211209ec1f961073f3adafcd080bfb_2" ; @@ -68,14 +68,14 @@ digraph cfg { "moveY_div0#copy_move_constructor#15307842160732522395.eee7693240d3ce27d5c30f34d771cb57_3" -> "moveY_div0#copy_move_constructor#15307842160732522395.eee7693240d3ce27d5c30f34d771cb57_2" ; -"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_1" [label="1: Start copy_move_constructor::moveY_moveY_copyY_div0\nFormals: \nLocals: y2:copy_move_constructor::Y y1:copy_move_constructor::Y 0$?%__sil_tmpSIL_materialize_temp__n$1:copy_move_constructor::Y \n DECLARE_LOCALS(&return,&y2,&y1,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 59, column 1]\n " color=yellow style=filled] +"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_1" [label="1: Start copy_move_constructor::moveY_moveY_copyY_div0\nFormals: \nLocals: y2:copy_move_constructor::Y y1:copy_move_constructor::Y 0$?%__sil_tmpSIL_materialize_temp__n$3:copy_move_constructor::Y \n DECLARE_LOCALS(&return,&y2,&y1,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 59, column 1]\n " color=yellow style=filled] "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_1" -> "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_5" ; "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_2" [label="2: Exit copy_move_constructor::moveY_moveY_copyY_div0 \n " color=yellow style=filled] -"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_3" [label="3: Return Stmt \n n$0=*&y2.f:int [line 62, column 14]\n *&return:int=(1 / n$0) [line 62, column 3]\n " shape="box"] +"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_3" [label="3: Return Stmt \n n$0=*&y2.f:int [line 62, column 14]\n *&return:int=(1 / n$0) [line 62, column 3]\n _=*&y2:copy_move_constructor::Y [line 62, column 17]\n _fun_copy_move_constructor::Y_~Y(&y2:copy_move_constructor::Y*) [line 62, column 17]\n _=*&y1:copy_move_constructor::Y [line 62, column 17]\n _fun_copy_move_constructor::Y_~Y(&y1:copy_move_constructor::Y*) [line 62, column 17]\n " shape="box"] "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_3" -> "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_2" ; @@ -83,26 +83,26 @@ digraph cfg { "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_4" -> "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_3" ; -"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_5" [label="5: DeclStmt \n _fun_copy_move_constructor::getY(2:int,&0$?%__sil_tmpSIL_materialize_temp__n$1:copy_move_constructor::Y*) [line 60, column 10]\n _fun_copy_move_constructor::Y_Y(&y1:copy_move_constructor::Y*,&0$?%__sil_tmpSIL_materialize_temp__n$1:copy_move_constructor::Y&) [line 60, column 10]\n " shape="box"] +"moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_5" [label="5: DeclStmt \n _fun_copy_move_constructor::getY(2:int,&0$?%__sil_tmpSIL_materialize_temp__n$3:copy_move_constructor::Y*) [line 60, column 10]\n _fun_copy_move_constructor::Y_Y(&y1:copy_move_constructor::Y*,&0$?%__sil_tmpSIL_materialize_temp__n$3:copy_move_constructor::Y&) [line 60, column 10]\n " shape="box"] "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_5" -> "moveY_moveY_copyY_div0#copy_move_constructor#11319351724516006746.d5d5d96d98dcf1c634b647be30001d2e_4" ; -"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_1" [label="1: Start copy_move_constructor::copyX_moveX_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmpSIL_materialize_temp__n$2:copy_move_constructor::X d1:int x2:copy_move_constructor::X x1:copy_move_constructor::X \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmpSIL_materialize_temp__n$2,&d1,&x2,&x1); [line 65, column 1]\n " color=yellow style=filled] +"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_1" [label="1: Start copy_move_constructor::copyX_moveX_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmpSIL_materialize_temp__n$4:copy_move_constructor::X d1:int x2:copy_move_constructor::X x1:copy_move_constructor::X \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&d1,&x2,&x1); [line 65, column 1]\n " color=yellow style=filled] "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_1" -> "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_8" ; "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_2" [label="2: Exit copy_move_constructor::copyX_moveX_div1 \n " color=yellow style=filled] -"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_3" [label="3: Return Stmt \n n$0=*&d1:int [line 71, column 10]\n n$1=*&d2:int [line 71, column 15]\n *&return:int=(n$0 + n$1) [line 71, column 3]\n " shape="box"] +"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_3" [label="3: Return Stmt \n n$0=*&d1:int [line 71, column 10]\n n$1=*&d2:int [line 71, column 15]\n *&return:int=(n$0 + n$1) [line 71, column 3]\n _=*&x2:copy_move_constructor::X [line 71, column 15]\n _fun_copy_move_constructor::X_~X(&x2:copy_move_constructor::X*) [line 71, column 15]\n _=*&x1:copy_move_constructor::X [line 71, column 15]\n _fun_copy_move_constructor::X_~X(&x1:copy_move_constructor::X*) [line 71, column 15]\n " shape="box"] "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_3" -> "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_2" ; -"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_4" [label="4: DeclStmt \n _fun_copy_move_constructor::getX(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$2:copy_move_constructor::X*) [line 70, column 16]\n n$4=*&0$?%__sil_tmpSIL_materialize_temp__n$2.f:int [line 70, column 16]\n *&d2:int=(1 / n$4) [line 70, column 3]\n " shape="box"] +"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_4" [label="4: DeclStmt \n _fun_copy_move_constructor::getX(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$4:copy_move_constructor::X*) [line 70, column 16]\n n$6=*&0$?%__sil_tmpSIL_materialize_temp__n$4.f:int [line 70, column 16]\n *&d2:int=(1 / n$6) [line 70, column 3]\n " shape="box"] "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_4" -> "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_3" ; -"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_5" [label="5: DeclStmt \n n$5=*&x2.f:int [line 69, column 16]\n *&d1:int=(1 / n$5) [line 69, column 3]\n " shape="box"] +"copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_5" [label="5: DeclStmt \n n$7=*&x2.f:int [line 69, column 16]\n *&d1:int=(1 / n$7) [line 69, column 3]\n " shape="box"] "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_5" -> "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_4" ; @@ -118,22 +118,22 @@ digraph cfg { "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_8" -> "copyX_moveX_div1#copy_move_constructor#6853813819184662211.00e91897e7d9fcfa93de911bba9a1399_7" ; -"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_1" [label="1: Start copy_move_constructor::copyY_moveY_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmpSIL_materialize_temp__n$2:copy_move_constructor::Y d1:int y2:copy_move_constructor::Y y1:copy_move_constructor::Y \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmpSIL_materialize_temp__n$2,&d1,&y2,&y1); [line 74, column 1]\n " color=yellow style=filled] +"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_1" [label="1: Start copy_move_constructor::copyY_moveY_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmpSIL_materialize_temp__n$4:copy_move_constructor::Y d1:int y2:copy_move_constructor::Y y1:copy_move_constructor::Y \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&d1,&y2,&y1); [line 74, column 1]\n " color=yellow style=filled] "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_1" -> "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_8" ; "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_2" [label="2: Exit copy_move_constructor::copyY_moveY_div1 \n " color=yellow style=filled] -"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_3" [label="3: Return Stmt \n n$0=*&d1:int [line 80, column 10]\n n$1=*&d2:int [line 80, column 15]\n *&return:int=(n$0 + n$1) [line 80, column 3]\n " shape="box"] +"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_3" [label="3: Return Stmt \n n$0=*&d1:int [line 80, column 10]\n n$1=*&d2:int [line 80, column 15]\n *&return:int=(n$0 + n$1) [line 80, column 3]\n _=*&y2:copy_move_constructor::Y [line 80, column 15]\n _fun_copy_move_constructor::Y_~Y(&y2:copy_move_constructor::Y*) [line 80, column 15]\n _=*&y1:copy_move_constructor::Y [line 80, column 15]\n _fun_copy_move_constructor::Y_~Y(&y1:copy_move_constructor::Y*) [line 80, column 15]\n " shape="box"] "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_3" -> "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_2" ; -"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_4" [label="4: DeclStmt \n _fun_copy_move_constructor::getY(2:int,&0$?%__sil_tmpSIL_materialize_temp__n$2:copy_move_constructor::Y*) [line 79, column 16]\n n$4=*&0$?%__sil_tmpSIL_materialize_temp__n$2.f:int [line 79, column 16]\n *&d2:int=(1 / n$4) [line 79, column 3]\n " shape="box"] +"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_4" [label="4: DeclStmt \n _fun_copy_move_constructor::getY(2:int,&0$?%__sil_tmpSIL_materialize_temp__n$4:copy_move_constructor::Y*) [line 79, column 16]\n n$6=*&0$?%__sil_tmpSIL_materialize_temp__n$4.f:int [line 79, column 16]\n *&d2:int=(1 / n$6) [line 79, column 3]\n " shape="box"] "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_4" -> "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_3" ; -"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_5" [label="5: DeclStmt \n n$5=*&y2.f:int [line 78, column 16]\n *&d1:int=(1 / n$5) [line 78, column 3]\n " shape="box"] +"copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_5" [label="5: DeclStmt \n n$7=*&y2.f:int [line 78, column 16]\n *&d1:int=(1 / n$7) [line 78, column 3]\n " shape="box"] "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_5" -> "copyY_moveY_div1#copy_move_constructor#5827233588222911615.5716e8b7acbd3ff43f18c7c5954c6565_4" ; @@ -156,11 +156,11 @@ digraph cfg { "getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_2" [label="2: Exit copy_move_constructor::getX \n " color=yellow style=filled] -"getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_3" [label="3: Return Stmt \n n$0=*&__return_param:copy_move_constructor::X* [line 32, column 3]\n _fun_copy_move_constructor::X_X(n$0:copy_move_constructor::X*,&x:copy_move_constructor::X&) [line 32, column 10]\n " shape="box"] +"getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_3" [label="3: Return Stmt \n n$0=*&__return_param:copy_move_constructor::X* [line 32, column 3]\n _fun_copy_move_constructor::X_X(n$0:copy_move_constructor::X*,&x:copy_move_constructor::X&) [line 32, column 10]\n _=*&x:copy_move_constructor::X [line 32, column 10]\n _fun_copy_move_constructor::X_~X(&x:copy_move_constructor::X*) [line 32, column 10]\n " shape="box"] "getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_3" -> "getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_2" ; -"getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 31, column 9]\n *&x.f:int=n$1 [line 31, column 3]\n " shape="box"] +"getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&f:int [line 31, column 9]\n *&x.f:int=n$2 [line 31, column 3]\n " shape="box"] "getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_4" -> "getX#copy_move_constructor#2211685783611424509.876b259ed079b8b199249e0c38ad55df_3" ; @@ -175,11 +175,11 @@ digraph cfg { "getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_2" [label="2: Exit copy_move_constructor::getY \n " color=yellow style=filled] -"getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_3" [label="3: Return Stmt \n n$0=*&__return_param:copy_move_constructor::Y* [line 38, column 3]\n _fun_copy_move_constructor::Y_Y(n$0:copy_move_constructor::Y*,&y:copy_move_constructor::Y&) [line 38, column 10]\n " shape="box"] +"getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_3" [label="3: Return Stmt \n n$0=*&__return_param:copy_move_constructor::Y* [line 38, column 3]\n _fun_copy_move_constructor::Y_Y(n$0:copy_move_constructor::Y*,&y:copy_move_constructor::Y&) [line 38, column 10]\n _=*&y:copy_move_constructor::Y [line 38, column 10]\n _fun_copy_move_constructor::Y_~Y(&y:copy_move_constructor::Y*) [line 38, column 10]\n " shape="box"] "getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_3" -> "getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_2" ; -"getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 37, column 9]\n *&y.f:int=n$1 [line 37, column 3]\n " shape="box"] +"getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&f:int [line 37, column 9]\n *&y.f:int=n$2 [line 37, column 3]\n " shape="box"] "getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_4" -> "getY#copy_move_constructor#1712013823822590270.2c171bbad2707d6170d0b7974ac3c196_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot index b05ddc416..93b5dfab3 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/temp_object.cpp.dot @@ -1,17 +1,17 @@ /* @generated */ digraph cfg { -"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_1" [label="1: Start temp_object::assign_temp_div0\nFormals: \nLocals: x:temp_object::X 0$?%__sil_tmpSIL_materialize_temp__n$2:temp_object::X const \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 28, column 1]\n " color=yellow style=filled] +"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_1" [label="1: Start temp_object::assign_temp_div0\nFormals: \nLocals: x:temp_object::X 0$?%__sil_tmpSIL_materialize_temp__n$3:temp_object::X const \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 28, column 1]\n " color=yellow style=filled] "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_1" -> "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_4" ; "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_2" [label="2: Exit temp_object::assign_temp_div0 \n " color=yellow style=filled] -"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_3" [label="3: Return Stmt \n _=*&x:temp_object::X [line 30, column 10]\n n$1=_fun_temp_object::X_div(&x:temp_object::X&) [line 30, column 10]\n *&return:int=n$1 [line 30, column 3]\n " shape="box"] +"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_3" [label="3: Return Stmt \n _=*&x:temp_object::X [line 30, column 10]\n n$1=_fun_temp_object::X_div(&x:temp_object::X&) [line 30, column 10]\n *&return:int=n$1 [line 30, column 3]\n _=*&x:temp_object::X [line 30, column 16]\n _fun_temp_object::X_~X(&x:temp_object::X*) [line 30, column 16]\n " shape="box"] "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_3" -> "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_2" ; -"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_4" [label="4: DeclStmt \n _fun_temp_object::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:temp_object::X const *,0:int,1:int) [line 29, column 9]\n _fun_temp_object::X_X(&x:temp_object::X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:temp_object::X const &) [line 29, column 9]\n " shape="box"] +"assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_4" [label="4: DeclStmt \n _fun_temp_object::X_X(&0$?%__sil_tmpSIL_materialize_temp__n$3:temp_object::X const *,0:int,1:int) [line 29, column 9]\n _fun_temp_object::X_X(&x:temp_object::X*,&0$?%__sil_tmpSIL_materialize_temp__n$3:temp_object::X const &) [line 29, column 9]\n " shape="box"] "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_4" -> "assign_temp_div0#temp_object#6618523570396537240.fa2055065ca23850cee50c855993cd3a_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot index 2b9fcfaf6..aeabe402f 100644 --- a/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot @@ -1,51 +1,51 @@ /* @generated */ digraph cfg { -"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_1" [label="1: Start bar\nFormals: \nLocals: func:bar::lambda_shared_lambda_lambda1.cpp:11:15 0$?%__sil_tmpSIL_materialize_temp__n$1:bar::lambda_shared_lambda_lambda1.cpp:11:15 \n DECLARE_LOCALS(&return,&func,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 10, column 1]\n " color=yellow style=filled] +"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_1" [label="1: Start bar\nFormals: \nLocals: func:bar::lambda_shared_lambda_lambda1.cpp:11:15 0$?%__sil_tmpSIL_materialize_temp__n$2:bar::lambda_shared_lambda_lambda1.cpp:11:15 \n DECLARE_LOCALS(&return,&func,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 10, column 1]\n " color=yellow style=filled] "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_1" -> "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_4" ; "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_2" [label="2: Exit bar \n " color=yellow style=filled] -"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_3" [label="3: Return Stmt \n n$0=_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()(&func:bar::lambda_shared_lambda_lambda1.cpp:11:15&) [line 15, column 14]\n *&return:int=(7 / n$0) [line 15, column 3]\n " shape="box"] +"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_3" [label="3: Return Stmt \n n$0=_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()(&func:bar::lambda_shared_lambda_lambda1.cpp:11:15&) [line 15, column 14]\n *&return:int=(7 / n$0) [line 15, column 3]\n _=*&func:bar::lambda_shared_lambda_lambda1.cpp:11:15 [line 15, column 19]\n _fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_~(&func:bar::lambda_shared_lambda_lambda1.cpp:11:15*) [line 15, column 19]\n " shape="box"] "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_3" -> "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_2" ; -"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:bar::lambda_shared_lambda_lambda1.cpp:11:15=(_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()) [line 11, column 15]\n _fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_(&func:bar::lambda_shared_lambda_lambda1.cpp:11:15*,&0$?%__sil_tmpSIL_materialize_temp__n$1:bar::lambda_shared_lambda_lambda1.cpp:11:15&) [line 11, column 15]\n " shape="box"] +"bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:bar::lambda_shared_lambda_lambda1.cpp:11:15=(_fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()) [line 11, column 15]\n _fun_bar::lambda_shared_lambda_lambda1.cpp:11:15_(&func:bar::lambda_shared_lambda_lambda1.cpp:11:15*,&0$?%__sil_tmpSIL_materialize_temp__n$2:bar::lambda_shared_lambda_lambda1.cpp:11:15&) [line 11, column 15]\n " shape="box"] "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_4" -> "bar#13629960763458822780.27859d4aca4c920a20241f1b78082005_3" ; -"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_1" [label="1: Start foo\nFormals: \nLocals: y:foo::lambda_shared_lambda_lambda1.cpp:20:12 0$?%__sil_tmpSIL_materialize_temp__n$1:foo::lambda_shared_lambda_lambda1.cpp:20:12 unused:foo::lambda_shared_lambda_lambda1.cpp:19:17 0$?%__sil_tmpSIL_materialize_temp__n$2:foo::lambda_shared_lambda_lambda1.cpp:19:17 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1,&unused,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 18, column 1]\n " color=yellow style=filled] +"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_1" [label="1: Start foo\nFormals: \nLocals: y:foo::lambda_shared_lambda_lambda1.cpp:20:12 0$?%__sil_tmpSIL_materialize_temp__n$3:foo::lambda_shared_lambda_lambda1.cpp:20:12 unused:foo::lambda_shared_lambda_lambda1.cpp:19:17 0$?%__sil_tmpSIL_materialize_temp__n$4:foo::lambda_shared_lambda_lambda1.cpp:19:17 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$3,&unused,&0$?%__sil_tmpSIL_materialize_temp__n$4); [line 18, column 1]\n " color=yellow style=filled] "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_1" -> "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_5" ; "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_2" [label="2: Exit foo \n " color=yellow style=filled] -"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_3" [label="3: Return Stmt \n n$0=_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(&y:foo::lambda_shared_lambda_lambda1.cpp:20:12&,3:int) [line 21, column 19]\n *&return:int=(5 / (4 - n$0)) [line 21, column 3]\n " shape="box"] +"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_3" [label="3: Return Stmt \n n$0=_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(&y:foo::lambda_shared_lambda_lambda1.cpp:20:12&,3:int) [line 21, column 19]\n *&return:int=(5 / (4 - n$0)) [line 21, column 3]\n _=*&y:foo::lambda_shared_lambda_lambda1.cpp:20:12 [line 21, column 23]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_~(&y:foo::lambda_shared_lambda_lambda1.cpp:20:12*) [line 21, column 23]\n _=*&unused:foo::lambda_shared_lambda_lambda1.cpp:19:17 [line 21, column 23]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_~(&unused:foo::lambda_shared_lambda_lambda1.cpp:19:17*) [line 21, column 23]\n " shape="box"] "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_3" -> "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_2" ; -"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:foo::lambda_shared_lambda_lambda1.cpp:20:12=(_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()) [line 20, column 12]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_(&y:foo::lambda_shared_lambda_lambda1.cpp:20:12*,&0$?%__sil_tmpSIL_materialize_temp__n$1:foo::lambda_shared_lambda_lambda1.cpp:20:12&) [line 20, column 12]\n " shape="box"] +"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$3:foo::lambda_shared_lambda_lambda1.cpp:20:12=(_fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()) [line 20, column 12]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:20:12_(&y:foo::lambda_shared_lambda_lambda1.cpp:20:12*,&0$?%__sil_tmpSIL_materialize_temp__n$3:foo::lambda_shared_lambda_lambda1.cpp:20:12&) [line 20, column 12]\n " shape="box"] "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_4" -> "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_3" ; -"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_5" [label="5: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:foo::lambda_shared_lambda_lambda1.cpp:19:17=(_fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()) [line 19, column 17]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_(&unused:foo::lambda_shared_lambda_lambda1.cpp:19:17*,&0$?%__sil_tmpSIL_materialize_temp__n$2:foo::lambda_shared_lambda_lambda1.cpp:19:17&) [line 19, column 17]\n " shape="box"] +"foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_5" [label="5: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$4:foo::lambda_shared_lambda_lambda1.cpp:19:17=(_fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()) [line 19, column 17]\n _fun_foo::lambda_shared_lambda_lambda1.cpp:19:17_(&unused:foo::lambda_shared_lambda_lambda1.cpp:19:17*,&0$?%__sil_tmpSIL_materialize_temp__n$4:foo::lambda_shared_lambda_lambda1.cpp:19:17&) [line 19, column 17]\n " shape="box"] "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_5" -> "foo#972162870672026475.86d7db357d6a36081d09067fb38ce85e_4" ; -"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_1" [label="1: Start fooOK\nFormals: \nLocals: y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12 0$?%__sil_tmpSIL_materialize_temp__n$1:fooOK::lambda_shared_lambda_lambda1.cpp:26:12 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 24, column 1]\n " color=yellow style=filled] +"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_1" [label="1: Start fooOK\nFormals: \nLocals: y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12 0$?%__sil_tmpSIL_materialize_temp__n$2:fooOK::lambda_shared_lambda_lambda1.cpp:26:12 \n DECLARE_LOCALS(&return,&y,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 24, column 1]\n " color=yellow style=filled] "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_1" -> "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_4" ; "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_2" [label="2: Exit fooOK \n " color=yellow style=filled] -"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_3" [label="3: Return Stmt \n n$0=_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()(&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12&,3:int) [line 27, column 19]\n *&return:int=(5 / (4 - n$0)) [line 27, column 3]\n " shape="box"] +"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_3" [label="3: Return Stmt \n n$0=_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()(&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12&,3:int) [line 27, column 19]\n *&return:int=(5 / (4 - n$0)) [line 27, column 3]\n _=*&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12 [line 27, column 23]\n _fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_~(&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12*) [line 27, column 23]\n " shape="box"] "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_3" -> "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_2" ; -"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$1:fooOK::lambda_shared_lambda_lambda1.cpp:26:12=(_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()) [line 26, column 12]\n _fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_(&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12*,&0$?%__sil_tmpSIL_materialize_temp__n$1:fooOK::lambda_shared_lambda_lambda1.cpp:26:12&) [line 26, column 12]\n " shape="box"] +"fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_4" [label="4: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:fooOK::lambda_shared_lambda_lambda1.cpp:26:12=(_fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()) [line 26, column 12]\n _fun_fooOK::lambda_shared_lambda_lambda1.cpp:26:12_(&y:fooOK::lambda_shared_lambda_lambda1.cpp:26:12*,&0$?%__sil_tmpSIL_materialize_temp__n$2:fooOK::lambda_shared_lambda_lambda1.cpp:26:12&) [line 26, column 12]\n " shape="box"] "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_4" -> "fooOK#5521302935427608539.9c36ec052efdd50972817d895666852a_3" ; @@ -129,50 +129,66 @@ digraph cfg { "init_capture2#11582143449720942167.039b5039af3b7807e4b00950523a9f3a_7" -> "init_capture2#11582143449720942167.039b5039af3b7807e4b00950523a9f3a_5" ; -"capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_1" [label="1: Start Capture_capture_this_explicit\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19 0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 54, column 3]\n " color=yellow style=filled] +"capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_1" [label="1: Start Capture_capture_this_explicit\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19 0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 54, column 3]\n " color=yellow style=filled] - "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_1" -> "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_3" ; + "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_1" -> "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_4" ; "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_2" [label="2: Exit Capture_capture_this_explicit \n " color=yellow style=filled] -"capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_3" [label="3: DeclStmt \n n$1=*&this:Capture* [line 55, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19=(_fun_Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19_operator(),(n$1 &this:Capture*)) [line 55, column 19]\n _fun_Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19_(&lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19*,&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19&) [line 55, column 19]\n " shape="box"] +"capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_3" [label="3: Destruction \n _=*&lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19 [line 56, column 3]\n _fun_Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19_~(&lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19*) [line 56, column 3]\n " shape="box"] "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_3" -> "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_2" ; -"capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_1" [label="1: Start Capture_capture_star_this\nFormals: this:Capture*\nLocals: lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19 0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 58, column 3]\n " color=yellow style=filled] +"capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_4" [label="4: DeclStmt \n n$2=*&this:Capture* [line 55, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19=(_fun_Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19_operator(),(n$2 &this:Capture*)) [line 55, column 19]\n _fun_Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19_(&lambda:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19*,&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_explicit::lambda_shared_lambda_lambda1.cpp:55:19&) [line 55, column 19]\n " shape="box"] - "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_1" -> "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_3" ; + "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_4" -> "capture_this_explicit#Capture#(13194085360619722149).2dba35a78268b10ad413414cc832a8f0_3" ; +"capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_1" [label="1: Start Capture_capture_star_this\nFormals: this:Capture*\nLocals: lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19 0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 58, column 3]\n " color=yellow style=filled] + + + "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_1" -> "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_4" ; "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_2" [label="2: Exit Capture_capture_star_this \n " color=yellow style=filled] -"capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_3" [label="3: DeclStmt \n n$1=*&this:Capture* [line 59, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19=(_fun_Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19_operator(),(n$1 &this:Capture*)) [line 59, column 19]\n _fun_Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19_(&lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19*,&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19&) [line 59, column 19]\n " shape="box"] +"capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_3" [label="3: Destruction \n _=*&lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19 [line 62, column 3]\n _fun_Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19_~(&lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19*) [line 62, column 3]\n " shape="box"] "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_3" -> "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_2" ; -"capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_1" [label="1: Start Capture_capture_this_with_equal\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19 0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 64, column 3]\n " color=yellow style=filled] +"capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_4" [label="4: DeclStmt \n n$2=*&this:Capture* [line 59, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19=(_fun_Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19_operator(),(n$2 &this:Capture*)) [line 59, column 19]\n _fun_Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19_(&lambda:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19*,&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_star_this::lambda_shared_lambda_lambda1.cpp:59:19&) [line 59, column 19]\n " shape="box"] + + + "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_4" -> "capture_star_this#Capture#(2506493005619132138).63fd6aa2a7efbd48dc1a62c0c2bd2161_3" ; +"capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_1" [label="1: Start Capture_capture_this_with_equal\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19 0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 64, column 3]\n " color=yellow style=filled] - "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_1" -> "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_3" ; + "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_1" -> "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_4" ; "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_2" [label="2: Exit Capture_capture_this_with_equal \n " color=yellow style=filled] -"capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_3" [label="3: DeclStmt \n n$1=*&this:Capture* [line 65, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19=(_fun_Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19_operator(),(n$1 &this:Capture*)) [line 65, column 19]\n _fun_Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19_(&lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19*,&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19&) [line 65, column 19]\n " shape="box"] +"capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_3" [label="3: Destruction \n _=*&lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19 [line 66, column 3]\n _fun_Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19_~(&lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19*) [line 66, column 3]\n " shape="box"] "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_3" -> "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_2" ; -"capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_1" [label="1: Start Capture_capture_this_with_auto\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19 0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 68, column 3]\n " color=yellow style=filled] +"capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_4" [label="4: DeclStmt \n n$2=*&this:Capture* [line 65, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19=(_fun_Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19_operator(),(n$2 &this:Capture*)) [line 65, column 19]\n _fun_Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19_(&lambda:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19*,&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_equal::lambda_shared_lambda_lambda1.cpp:65:19&) [line 65, column 19]\n " shape="box"] - "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_1" -> "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_3" ; + "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_4" -> "capture_this_with_equal#Capture#(805776379555510952).ecd73e9a4e2bef0d060a242b61508f10_3" ; +"capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_1" [label="1: Start Capture_capture_this_with_auto\nFormals: this:Capture*\nLocals: lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19 0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19 \n DECLARE_LOCALS(&return,&lambda,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 68, column 3]\n " color=yellow style=filled] + + + "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_1" -> "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_4" ; "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_2" [label="2: Exit Capture_capture_this_with_auto \n " color=yellow style=filled] -"capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_3" [label="3: DeclStmt \n n$1=*&this:Capture* [line 69, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19=(_fun_Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19_operator(),(n$1 &this:Capture*)) [line 69, column 19]\n _fun_Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19_(&lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19*,&0$?%__sil_tmpSIL_materialize_temp__n$0:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19&) [line 69, column 19]\n " shape="box"] +"capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_3" [label="3: Destruction \n _=*&lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19 [line 70, column 3]\n _fun_Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19_~(&lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19*) [line 70, column 3]\n " shape="box"] "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_3" -> "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_2" ; +"capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_4" [label="4: DeclStmt \n n$2=*&this:Capture* [line 69, column 19]\n *&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19=(_fun_Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19_operator(),(n$2 &this:Capture*)) [line 69, column 19]\n _fun_Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19_(&lambda:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19*,&0$?%__sil_tmpSIL_materialize_temp__n$1:Capture::capture_this_with_auto::lambda_shared_lambda_lambda1.cpp:69:19&) [line 69, column 19]\n " shape="box"] + + + "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_4" -> "capture_this_with_auto#Capture#(15696525048884093218).38be242109186a45cc282c38962c68e2_3" ; "Capture#Capture#{12117490113068134497|constexpr}.98ffcc03a8acaf01f37e687e09517440_1" [label="1: Start Capture_Capture\nFormals: this:Capture* __param_0:Capture&\nLocals: \n DECLARE_LOCALS(&return); [line 53, column 7]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot index 73e57ef1b..db269d4c2 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/conversion_operator.cpp.dot @@ -7,7 +7,7 @@ digraph cfg { "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_2" [label="2: Exit conversion_operator::branch_div0 \n " color=yellow style=filled] -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 40, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 40, column 10]\n *&return:int=n$1 [line 40, column 3]\n " shape="box"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 40, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 40, column 10]\n *&return:int=n$1 [line 40, column 3]\n _=*&x:conversion_operator::X [line 40, column 10]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 40, column 10]\n " shape="box"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_3" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_2" ; @@ -15,24 +15,24 @@ digraph cfg { "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_4" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_3" ; -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 36, column 7]\n n$3=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 36, column 7]\n " shape="box"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 36, column 7]\n n$4=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 36, column 7]\n " shape="box"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_5" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_6" ; "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_5" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_7" ; -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_6" [label="6: Prune (true branch) \n PRUNE(n$3, true); [line 36, column 7]\n " shape="invhouse"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_6" [label="6: Prune (true branch) \n PRUNE(n$4, true); [line 36, column 7]\n " shape="invhouse"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_6" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_9" ; -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_7" [label="7: Prune (false branch) \n PRUNE(!n$3, false); [line 36, column 7]\n " shape="invhouse"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_7" [label="7: Prune (false branch) \n PRUNE(!n$4, false); [line 36, column 7]\n " shape="invhouse"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_7" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_4" ; -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_8" [label="8: Return Stmt \n n$4=*&v:int [line 38, column 16]\n *&return:int=(1 / n$4) [line 38, column 5]\n " shape="box"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_8" [label="8: Return Stmt \n n$5=*&v:int [line 38, column 16]\n *&return:int=(1 / n$5) [line 38, column 5]\n _=*&x:conversion_operator::X [line 38, column 16]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 38, column 16]\n " shape="box"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_8" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_2" ; -"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 37, column 13]\n n$6=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 37, column 13]\n *&v:int=n$6 [line 37, column 5]\n " shape="box"] +"branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 37, column 13]\n n$8=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 37, column 13]\n *&v:int=n$8 [line 37, column 5]\n " shape="box"] "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_9" -> "branch_div0#conversion_operator#6762751670974669482.0ad6ec49c1dc8988836c6e44e9d2b402_8" ; @@ -95,7 +95,7 @@ digraph cfg { "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_2" [label="2: Exit conversion_operator::branch_no_div \n " color=yellow style=filled] -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 60, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 60, column 10]\n *&return:int=n$1 [line 60, column 3]\n " shape="box"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 60, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 60, column 10]\n *&return:int=n$1 [line 60, column 3]\n _=*&x:conversion_operator::X [line 60, column 10]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 60, column 10]\n " shape="box"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_3" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_2" ; @@ -103,24 +103,24 @@ digraph cfg { "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_4" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_3" ; -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 56, column 7]\n n$3=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 56, column 7]\n " shape="box"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 56, column 7]\n n$4=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 56, column 7]\n " shape="box"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_5" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_6" ; "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_5" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_7" ; -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_6" [label="6: Prune (true branch) \n PRUNE(n$3, true); [line 56, column 7]\n " shape="invhouse"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_6" [label="6: Prune (true branch) \n PRUNE(n$4, true); [line 56, column 7]\n " shape="invhouse"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_6" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_9" ; -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_7" [label="7: Prune (false branch) \n PRUNE(!n$3, false); [line 56, column 7]\n " shape="invhouse"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_7" [label="7: Prune (false branch) \n PRUNE(!n$4, false); [line 56, column 7]\n " shape="invhouse"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_7" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_4" ; -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_8" [label="8: Return Stmt \n n$4=*&v:int [line 58, column 16]\n *&return:int=(1 / n$4) [line 58, column 5]\n " shape="box"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_8" [label="8: Return Stmt \n n$5=*&v:int [line 58, column 16]\n *&return:int=(1 / n$5) [line 58, column 5]\n _=*&x:conversion_operator::X [line 58, column 16]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 58, column 16]\n " shape="box"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_8" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_2" ; -"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 57, column 13]\n n$6=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 57, column 13]\n *&v:int=n$6 [line 57, column 5]\n " shape="box"] +"branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 57, column 13]\n n$8=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 57, column 13]\n *&v:int=n$8 [line 57, column 5]\n " shape="box"] "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_9" -> "branch_no_div#conversion_operator#18429458682592639842.4c7cf0cc20989fd2ea431840e11b2521_8" ; @@ -135,7 +135,7 @@ digraph cfg { "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_2" [label="2: Exit conversion_operator::branch_div1 \n " color=yellow style=filled] -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 69, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 69, column 10]\n *&return:int=n$1 [line 69, column 3]\n " shape="box"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_3" [label="3: Return Stmt \n _=*&x:conversion_operator::X [line 69, column 10]\n n$1=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 69, column 10]\n *&return:int=n$1 [line 69, column 3]\n _=*&x:conversion_operator::X [line 69, column 10]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 69, column 10]\n " shape="box"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_3" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_2" ; @@ -143,24 +143,24 @@ digraph cfg { "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_4" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_3" ; -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 65, column 7]\n n$3=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 65, column 7]\n " shape="box"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_5" [label="5: Call _fun_conversion_operator::X_operator_bool \n _=*&x:conversion_operator::X [line 65, column 7]\n n$4=_fun_conversion_operator::X_operator_bool(&x:conversion_operator::X&) [line 65, column 7]\n " shape="box"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_5" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_6" ; "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_5" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_7" ; -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_6" [label="6: Prune (true branch) \n PRUNE(n$3, true); [line 65, column 7]\n " shape="invhouse"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_6" [label="6: Prune (true branch) \n PRUNE(n$4, true); [line 65, column 7]\n " shape="invhouse"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_6" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_9" ; -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_7" [label="7: Prune (false branch) \n PRUNE(!n$3, false); [line 65, column 7]\n " shape="invhouse"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_7" [label="7: Prune (false branch) \n PRUNE(!n$4, false); [line 65, column 7]\n " shape="invhouse"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_7" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_4" ; -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_8" [label="8: Return Stmt \n n$4=*&v:int [line 67, column 16]\n *&return:int=(1 / n$4) [line 67, column 5]\n " shape="box"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_8" [label="8: Return Stmt \n n$5=*&v:int [line 67, column 16]\n *&return:int=(1 / n$5) [line 67, column 5]\n _=*&x:conversion_operator::X [line 67, column 16]\n _fun_conversion_operator::X_~X(&x:conversion_operator::X*) [line 67, column 16]\n " shape="box"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_8" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_2" ; -"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 66, column 13]\n n$6=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 66, column 13]\n *&v:int=n$6 [line 66, column 5]\n " shape="box"] +"branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_9" [label="9: DeclStmt \n _=*&x:conversion_operator::X [line 66, column 13]\n n$8=_fun_conversion_operator::X_operator_int(&x:conversion_operator::X&) [line 66, column 13]\n *&v:int=n$8 [line 66, column 5]\n " shape="box"] "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_9" -> "branch_div1#conversion_operator#6025807300888085665.f3ee34cea9ff5d10407119d4b377adc2_8" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot index 3f9ceb5e8..a103f1f14 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot @@ -1,17 +1,17 @@ /* @generated */ digraph cfg { -"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_1" [label="1: Start test\nFormals: a:A*\nLocals: x:X 0$?%__sil_tmpSIL_materialize_temp__n$1:X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 21, column 1]\n " color=yellow style=filled] +"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_1" [label="1: Start test\nFormals: a:A*\nLocals: x:X 0$?%__sil_tmpSIL_materialize_temp__n$2:X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 21, column 1]\n " color=yellow style=filled] "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_1" -> "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_4" ; "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_2" [label="2: Exit test \n " color=yellow style=filled] -"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 23, column 14]\n *&return:int=(1 / n$0) [line 23, column 3]\n " shape="box"] +"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 23, column 14]\n *&return:int=(1 / n$0) [line 23, column 3]\n _=*&x:X [line 23, column 16]\n _fun_X_~X(&x:X*) [line 23, column 16]\n " shape="box"] "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_3" -> "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_2" ; -"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_4" [label="4: DeclStmt \n n$2=*&a:A* [line 22, column 9]\n _=*n$2:A [line 22, column 9]\n _fun_A_get(n$2:A*,1:int,&0$?%__sil_tmpSIL_materialize_temp__n$1:X*) [line 22, column 9]\n _fun_X_X(&x:X*,&0$?%__sil_tmpSIL_materialize_temp__n$1:X&) [line 22, column 9]\n " shape="box"] +"test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_4" [label="4: DeclStmt \n n$3=*&a:A* [line 22, column 9]\n _=*n$3:A [line 22, column 9]\n _fun_A_get(n$3:A*,1:int,&0$?%__sil_tmpSIL_materialize_temp__n$2:X*) [line 22, column 9]\n _fun_X_X(&x:X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:X&) [line 22, column 9]\n " shape="box"] "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_4" -> "test#14183353284361723530.9ab958283f2da536d334b673bc9197cb_3" ; @@ -22,7 +22,7 @@ digraph cfg { "get#A#(1761444600576643509).c838940fa5c6fe767006cf7dd748d7f6_2" [label="2: Exit A_get \n " color=yellow style=filled] -"get#A#(1761444600576643509).c838940fa5c6fe767006cf7dd748d7f6_3" [label="3: Return Stmt \n n$0=*&__return_param:X* [line 17, column 5]\n _fun_X_X(n$0:X*,&x:X&) [line 17, column 12]\n " shape="box"] +"get#A#(1761444600576643509).c838940fa5c6fe767006cf7dd748d7f6_3" [label="3: Return Stmt \n n$0=*&__return_param:X* [line 17, column 5]\n _fun_X_X(n$0:X*,&x:X&) [line 17, column 12]\n _=*&x:X [line 17, column 12]\n _fun_X_~X(&x:X*) [line 17, column 12]\n " shape="box"] "get#A#(1761444600576643509).c838940fa5c6fe767006cf7dd748d7f6_3" -> "get#A#(1761444600576643509).c838940fa5c6fe767006cf7dd748d7f6_2" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot index fc1646fb2..032efa8ca 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/virtual_methods.cpp.dot @@ -7,11 +7,11 @@ digraph cfg { "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_2" [label="2: Exit rect_area \n " color=yellow style=filled] -"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" [label="3: Return Stmt \n n$0=*&ppoly1:Polygon* [line 42, column 15]\n _=*n$0:Polygon [line 42, column 15]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 42, column 15]\n *&return:int=(1 / (n$2 - 20)) [line 42, column 3]\n " shape="box"] +"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" [label="3: Return Stmt \n n$0=*&ppoly1:Polygon* [line 42, column 15]\n _=*n$0:Polygon [line 42, column 15]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 42, column 15]\n *&return:int=(1 / (n$2 - 20)) [line 42, column 3]\n _=*&rect:Rectangle [line 42, column 34]\n _fun_Rectangle_~Rectangle(&rect:Rectangle*) virtual [line 42, column 34]\n " shape="box"] "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_2" ; -"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" [label="4: Call _fun_Polygon_set_values \n n$3=*&ppoly1:Polygon* [line 41, column 3]\n _=*n$3:Polygon [line 41, column 3]\n _fun_Polygon_set_values(n$3:Polygon*,4:int,5:int) [line 41, column 3]\n " shape="box"] +"rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" [label="4: Call _fun_Polygon_set_values \n n$4=*&ppoly1:Polygon* [line 41, column 3]\n _=*n$4:Polygon [line 41, column 3]\n _fun_Polygon_set_values(n$4:Polygon*,4:int,5:int) [line 41, column 3]\n " shape="box"] "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_4" -> "rect_area#9087317270636867019.dedb17c23e2d96ddd6e1087003e78815_3" ; @@ -30,11 +30,11 @@ digraph cfg { "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_2" [label="2: Exit tri_area \n " color=yellow style=filled] -"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 50, column 15]\n _=*n$0:Polygon [line 50, column 15]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 50, column 15]\n *&return:int=(1 / (n$2 - 10)) [line 50, column 3]\n _=*&trgl:Triangle [line 50, column 34]\n _fun_Triangle_~Triangle(&trgl:Triangle*) virtual [line 50, column 34]\n " shape="box"] +"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 50, column 15]\n _=*n$0:Polygon [line 50, column 15]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 50, column 15]\n *&return:int=(1 / (n$2 - 10)) [line 50, column 3]\n _=*&poly:Polygon [line 50, column 34]\n _fun_Polygon_~Polygon(&poly:Polygon*) virtual [line 50, column 34]\n _=*&trgl:Triangle [line 50, column 34]\n _fun_Triangle_~Triangle(&trgl:Triangle*) virtual [line 50, column 34]\n " shape="box"] "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_2" ; -"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" [label="4: Call _fun_Polygon_set_values \n n$4=*&ppoly2:Polygon* [line 49, column 3]\n _=*n$4:Polygon [line 49, column 3]\n _fun_Polygon_set_values(n$4:Polygon*,4:int,5:int) [line 49, column 3]\n " shape="box"] +"tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" [label="4: Call _fun_Polygon_set_values \n n$5=*&ppoly2:Polygon* [line 49, column 3]\n _=*n$5:Polygon [line 49, column 3]\n _fun_Polygon_set_values(n$5:Polygon*,4:int,5:int) [line 49, column 3]\n " shape="box"] "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_4" -> "tri_area#1215149030941579879.cc7663ab4ea89457778545059b70bc38_3" ; @@ -57,7 +57,7 @@ digraph cfg { "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_2" [label="2: Exit poly_area \n " color=yellow style=filled] -"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" [label="3: Return Stmt \n n$0=*&ppoly3:Polygon* [line 56, column 14]\n _=*n$0:Polygon [line 56, column 14]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 56, column 14]\n *&return:int=(1 / n$2) [line 56, column 3]\n " shape="box"] +"poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" [label="3: Return Stmt \n n$0=*&ppoly3:Polygon* [line 56, column 14]\n _=*n$0:Polygon [line 56, column 14]\n n$2=_fun_Polygon_area(n$0:Polygon*) virtual [line 56, column 14]\n *&return:int=(1 / n$2) [line 56, column 3]\n _=*&poly:Polygon [line 56, column 27]\n _fun_Polygon_~Polygon(&poly:Polygon*) virtual [line 56, column 27]\n " shape="box"] "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_3" -> "poly_area#4209622570361008343.816833144841084a7fd6071bbff4c354_2" ; @@ -76,11 +76,11 @@ digraph cfg { "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_2" [label="2: Exit tri_not_virtual_area \n " color=yellow style=filled] -"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 64, column 14]\n _=*n$0:Polygon [line 64, column 14]\n n$2=_fun_Polygon_area(n$0:Polygon*) [line 64, column 14]\n *&return:int=(1 / n$2) [line 64, column 3]\n _=*&trgl:Triangle [line 64, column 36]\n _fun_Triangle_~Triangle(&trgl:Triangle*) virtual [line 64, column 36]\n " shape="box"] +"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" [label="3: Return Stmt \n n$0=*&ppoly2:Polygon* [line 64, column 14]\n _=*n$0:Polygon [line 64, column 14]\n n$2=_fun_Polygon_area(n$0:Polygon*) [line 64, column 14]\n *&return:int=(1 / n$2) [line 64, column 3]\n _=*&poly:Polygon [line 64, column 36]\n _fun_Polygon_~Polygon(&poly:Polygon*) virtual [line 64, column 36]\n _=*&trgl:Triangle [line 64, column 36]\n _fun_Triangle_~Triangle(&trgl:Triangle*) virtual [line 64, column 36]\n " shape="box"] "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_2" ; -"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" [label="4: Call _fun_Polygon_set_values \n n$4=*&ppoly2:Polygon* [line 63, column 3]\n _=*n$4:Polygon [line 63, column 3]\n _fun_Polygon_set_values(n$4:Polygon*,4:int,5:int) [line 63, column 3]\n " shape="box"] +"tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" [label="4: Call _fun_Polygon_set_values \n n$5=*&ppoly2:Polygon* [line 63, column 3]\n _=*n$5:Polygon [line 63, column 3]\n _fun_Polygon_set_values(n$5:Polygon*,4:int,5:int) [line 63, column 3]\n " shape="box"] "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_4" -> "tri_not_virtual_area#9435562296359660595.88e7106fc7dcfd34401502a9deb415ac_3" ; @@ -195,10 +195,14 @@ digraph cfg { "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_1" [label="1: Start Triangle___infer_inner_destructor_~Triangle\nFormals: this:Triangle*\nLocals: \n DECLARE_LOCALS(&return); [line 31, column 3]\n " color=yellow style=filled] - "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_1" -> "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_2" ; + "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_1" -> "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_3" ; "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_2" [label="2: Exit Triangle___infer_inner_destructor_~Triangle \n " color=yellow style=filled] +"__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_3" [label="3: Destruction \n n$0=*&this:Triangle* [line 31, column 15]\n _=*n$0:Triangle [line 31, column 15]\n _fun_Polygon___infer_inner_destructor_~Polygon(n$0:Triangle*) virtual [line 31, column 15]\n " shape="box"] + + + "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_3" -> "__infer_inner_destructor_~Triangle#Triangle#(14073216405110724792).c04c3fa3cd50a3125c149616f3af0105_2" ; "~Triangle#Triangle#(14073216405110724792).8adff4889e6d988a35e49531a9afaad5_1" [label="1: Start Triangle_~Triangle\nFormals: this:Triangle*\nLocals: \n DECLARE_LOCALS(&return); [line 31, column 3]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot index 16b3434f8..3f3b81681 100644 --- a/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot @@ -7,7 +7,7 @@ digraph cfg { "ref_F_div0#reference_field#11041134718140208132.6e58f8c7050613499e915a7d12b0f081_2" [label="2: Exit reference_field::ref_F_div0 \n " color=yellow style=filled] -"ref_F_div0#reference_field#11041134718140208132.6e58f8c7050613499e915a7d12b0f081_3" [label="3: Return Stmt \n n$0=*&r.x:reference_field::X& [line 53, column 14]\n n$1=*n$0.f:int [line 53, column 14]\n *&return:int=(1 / n$1) [line 53, column 3]\n " shape="box"] +"ref_F_div0#reference_field#11041134718140208132.6e58f8c7050613499e915a7d12b0f081_3" [label="3: Return Stmt \n n$0=*&r.x:reference_field::X& [line 53, column 14]\n n$1=*n$0.f:int [line 53, column 14]\n *&return:int=(1 / n$1) [line 53, column 3]\n _=*&x:reference_field::X [line 53, column 18]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 53, column 18]\n " shape="box"] "ref_F_div0#reference_field#11041134718140208132.6e58f8c7050613499e915a7d12b0f081_3" -> "ref_F_div0#reference_field#11041134718140208132.6e58f8c7050613499e915a7d12b0f081_2" ; @@ -34,7 +34,7 @@ digraph cfg { "ref_I_div0#reference_field#12578013844532400739.b911fdef1ca9c73b658bff3d5d964b9b_2" [label="2: Exit reference_field::ref_I_div0 \n " color=yellow style=filled] -"ref_I_div0#reference_field#12578013844532400739.b911fdef1ca9c73b658bff3d5d964b9b_3" [label="3: Return Stmt \n n$0=*&r.i:int& [line 61, column 14]\n n$1=*n$0:int [line 61, column 14]\n *&return:int=(1 / n$1) [line 61, column 3]\n " shape="box"] +"ref_I_div0#reference_field#12578013844532400739.b911fdef1ca9c73b658bff3d5d964b9b_3" [label="3: Return Stmt \n n$0=*&r.i:int& [line 61, column 14]\n n$1=*n$0:int [line 61, column 14]\n *&return:int=(1 / n$1) [line 61, column 3]\n _=*&x:reference_field::X [line 61, column 16]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 61, column 16]\n " shape="box"] "ref_I_div0#reference_field#12578013844532400739.b911fdef1ca9c73b658bff3d5d964b9b_3" -> "ref_I_div0#reference_field#12578013844532400739.b911fdef1ca9c73b658bff3d5d964b9b_2" ; @@ -61,7 +61,7 @@ digraph cfg { "ref_getF_div0#reference_field#2481930918988851369.2dc7181f26bf9bad7c2f06846f4d7ec4_2" [label="2: Exit reference_field::ref_getF_div0 \n " color=yellow style=filled] -"ref_getF_div0#reference_field#2481930918988851369.2dc7181f26bf9bad7c2f06846f4d7ec4_3" [label="3: Return Stmt \n _=*&r:reference_field::Ref [line 69, column 14]\n n$1=_fun_reference_field::Ref_getF(&r:reference_field::Ref&) [line 69, column 14]\n *&return:int=(1 / n$1) [line 69, column 3]\n " shape="box"] +"ref_getF_div0#reference_field#2481930918988851369.2dc7181f26bf9bad7c2f06846f4d7ec4_3" [label="3: Return Stmt \n _=*&r:reference_field::Ref [line 69, column 14]\n n$1=_fun_reference_field::Ref_getF(&r:reference_field::Ref&) [line 69, column 14]\n *&return:int=(1 / n$1) [line 69, column 3]\n _=*&x:reference_field::X [line 69, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 69, column 21]\n " shape="box"] "ref_getF_div0#reference_field#2481930918988851369.2dc7181f26bf9bad7c2f06846f4d7ec4_3" -> "ref_getF_div0#reference_field#2481930918988851369.2dc7181f26bf9bad7c2f06846f4d7ec4_2" ; @@ -88,7 +88,7 @@ digraph cfg { "ref_getI_div0#reference_field#17267881158640772750.8919328183561d84930ec2a40da70667_2" [label="2: Exit reference_field::ref_getI_div0 \n " color=yellow style=filled] -"ref_getI_div0#reference_field#17267881158640772750.8919328183561d84930ec2a40da70667_3" [label="3: Return Stmt \n _=*&r:reference_field::Ref [line 77, column 14]\n n$1=_fun_reference_field::Ref_getI(&r:reference_field::Ref&) [line 77, column 14]\n *&return:int=(1 / n$1) [line 77, column 3]\n " shape="box"] +"ref_getI_div0#reference_field#17267881158640772750.8919328183561d84930ec2a40da70667_3" [label="3: Return Stmt \n _=*&r:reference_field::Ref [line 77, column 14]\n n$1=_fun_reference_field::Ref_getI(&r:reference_field::Ref&) [line 77, column 14]\n *&return:int=(1 / n$1) [line 77, column 3]\n _=*&x:reference_field::X [line 77, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 77, column 21]\n " shape="box"] "ref_getI_div0#reference_field#17267881158640772750.8919328183561d84930ec2a40da70667_3" -> "ref_getI_div0#reference_field#17267881158640772750.8919328183561d84930ec2a40da70667_2" ; @@ -115,7 +115,7 @@ digraph cfg { "ptr_F_div0#reference_field#14005768761742554773.fa7bac24d70ab0b747e7fb5360157c5f_2" [label="2: Exit reference_field::ptr_F_div0 \n " color=yellow style=filled] -"ptr_F_div0#reference_field#14005768761742554773.fa7bac24d70ab0b747e7fb5360157c5f_3" [label="3: Return Stmt \n n$0=*&r.x:reference_field::X* [line 86, column 14]\n n$1=*n$0.f:int [line 86, column 14]\n *&return:int=(1 / n$1) [line 86, column 3]\n " shape="box"] +"ptr_F_div0#reference_field#14005768761742554773.fa7bac24d70ab0b747e7fb5360157c5f_3" [label="3: Return Stmt \n n$0=*&r.x:reference_field::X* [line 86, column 14]\n n$1=*n$0.f:int [line 86, column 14]\n *&return:int=(1 / n$1) [line 86, column 3]\n _=*&x:reference_field::X [line 86, column 19]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 86, column 19]\n " shape="box"] "ptr_F_div0#reference_field#14005768761742554773.fa7bac24d70ab0b747e7fb5360157c5f_3" -> "ptr_F_div0#reference_field#14005768761742554773.fa7bac24d70ab0b747e7fb5360157c5f_2" ; @@ -142,7 +142,7 @@ digraph cfg { "ptr_I_div0#reference_field#18255668366877010738.5b1f39b2d5e2810cbdbf96621d88c2d0_2" [label="2: Exit reference_field::ptr_I_div0 \n " color=yellow style=filled] -"ptr_I_div0#reference_field#18255668366877010738.5b1f39b2d5e2810cbdbf96621d88c2d0_3" [label="3: Return Stmt \n n$0=*&r.i:int* [line 94, column 15]\n n$1=*n$0:int [line 94, column 14]\n *&return:int=(1 / n$1) [line 94, column 3]\n " shape="box"] +"ptr_I_div0#reference_field#18255668366877010738.5b1f39b2d5e2810cbdbf96621d88c2d0_3" [label="3: Return Stmt \n n$0=*&r.i:int* [line 94, column 15]\n n$1=*n$0:int [line 94, column 14]\n *&return:int=(1 / n$1) [line 94, column 3]\n _=*&x:reference_field::X [line 94, column 17]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 94, column 17]\n " shape="box"] "ptr_I_div0#reference_field#18255668366877010738.5b1f39b2d5e2810cbdbf96621d88c2d0_3" -> "ptr_I_div0#reference_field#18255668366877010738.5b1f39b2d5e2810cbdbf96621d88c2d0_2" ; @@ -169,7 +169,7 @@ digraph cfg { "ptr_getF_div0#reference_field#3337646019334387234.41e241b3e1d6a6f7c629a1c6ca69cf07_2" [label="2: Exit reference_field::ptr_getF_div0 \n " color=yellow style=filled] -"ptr_getF_div0#reference_field#3337646019334387234.41e241b3e1d6a6f7c629a1c6ca69cf07_3" [label="3: Return Stmt \n _=*&r:reference_field::Ptr [line 102, column 14]\n n$1=_fun_reference_field::Ptr_getF(&r:reference_field::Ptr&) [line 102, column 14]\n *&return:int=(1 / n$1) [line 102, column 3]\n " shape="box"] +"ptr_getF_div0#reference_field#3337646019334387234.41e241b3e1d6a6f7c629a1c6ca69cf07_3" [label="3: Return Stmt \n _=*&r:reference_field::Ptr [line 102, column 14]\n n$1=_fun_reference_field::Ptr_getF(&r:reference_field::Ptr&) [line 102, column 14]\n *&return:int=(1 / n$1) [line 102, column 3]\n _=*&x:reference_field::X [line 102, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 102, column 21]\n " shape="box"] "ptr_getF_div0#reference_field#3337646019334387234.41e241b3e1d6a6f7c629a1c6ca69cf07_3" -> "ptr_getF_div0#reference_field#3337646019334387234.41e241b3e1d6a6f7c629a1c6ca69cf07_2" ; @@ -196,7 +196,7 @@ digraph cfg { "ptr_getI_div0#reference_field#2818660867908728453.99667cea541002986498839338031f13_2" [label="2: Exit reference_field::ptr_getI_div0 \n " color=yellow style=filled] -"ptr_getI_div0#reference_field#2818660867908728453.99667cea541002986498839338031f13_3" [label="3: Return Stmt \n _=*&r:reference_field::Ptr [line 110, column 14]\n n$1=_fun_reference_field::Ptr_getI(&r:reference_field::Ptr&) [line 110, column 14]\n *&return:int=(1 / n$1) [line 110, column 3]\n " shape="box"] +"ptr_getI_div0#reference_field#2818660867908728453.99667cea541002986498839338031f13_3" [label="3: Return Stmt \n _=*&r:reference_field::Ptr [line 110, column 14]\n n$1=_fun_reference_field::Ptr_getI(&r:reference_field::Ptr&) [line 110, column 14]\n *&return:int=(1 / n$1) [line 110, column 3]\n _=*&x:reference_field::X [line 110, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 110, column 21]\n " shape="box"] "ptr_getI_div0#reference_field#2818660867908728453.99667cea541002986498839338031f13_3" -> "ptr_getI_div0#reference_field#2818660867908728453.99667cea541002986498839338031f13_2" ; @@ -223,7 +223,7 @@ digraph cfg { "val_F_div0#reference_field#8428286850923379914.8fdee85eabf77b0016437fa0006d373c_2" [label="2: Exit reference_field::val_F_div0 \n " color=yellow style=filled] -"val_F_div0#reference_field#8428286850923379914.8fdee85eabf77b0016437fa0006d373c_3" [label="3: Return Stmt \n n$0=*&r.x.f:int [line 119, column 14]\n *&return:int=(1 / n$0) [line 119, column 3]\n " shape="box"] +"val_F_div0#reference_field#8428286850923379914.8fdee85eabf77b0016437fa0006d373c_3" [label="3: Return Stmt \n n$0=*&r.x.f:int [line 119, column 14]\n *&return:int=(1 / n$0) [line 119, column 3]\n _=*&x:reference_field::X [line 119, column 18]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 119, column 18]\n " shape="box"] "val_F_div0#reference_field#8428286850923379914.8fdee85eabf77b0016437fa0006d373c_3" -> "val_F_div0#reference_field#8428286850923379914.8fdee85eabf77b0016437fa0006d373c_2" ; @@ -250,7 +250,7 @@ digraph cfg { "val_I_div0#reference_field#17788064844610257149.11b45a3e82e229e7a7714480217c1af3_2" [label="2: Exit reference_field::val_I_div0 \n " color=yellow style=filled] -"val_I_div0#reference_field#17788064844610257149.11b45a3e82e229e7a7714480217c1af3_3" [label="3: Return Stmt \n n$0=*&r.i:int [line 127, column 14]\n *&return:int=(1 / n$0) [line 127, column 3]\n " shape="box"] +"val_I_div0#reference_field#17788064844610257149.11b45a3e82e229e7a7714480217c1af3_3" [label="3: Return Stmt \n n$0=*&r.i:int [line 127, column 14]\n *&return:int=(1 / n$0) [line 127, column 3]\n _=*&x:reference_field::X [line 127, column 16]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 127, column 16]\n " shape="box"] "val_I_div0#reference_field#17788064844610257149.11b45a3e82e229e7a7714480217c1af3_3" -> "val_I_div0#reference_field#17788064844610257149.11b45a3e82e229e7a7714480217c1af3_2" ; @@ -277,7 +277,7 @@ digraph cfg { "val_getF_div0#reference_field#16910887455441500799.24fc3c9591435f1b92c06c5c7da4bd2e_2" [label="2: Exit reference_field::val_getF_div0 \n " color=yellow style=filled] -"val_getF_div0#reference_field#16910887455441500799.24fc3c9591435f1b92c06c5c7da4bd2e_3" [label="3: Return Stmt \n _=*&r:reference_field::Val [line 135, column 14]\n n$1=_fun_reference_field::Val_getF(&r:reference_field::Val&) [line 135, column 14]\n *&return:int=(1 / n$1) [line 135, column 3]\n " shape="box"] +"val_getF_div0#reference_field#16910887455441500799.24fc3c9591435f1b92c06c5c7da4bd2e_3" [label="3: Return Stmt \n _=*&r:reference_field::Val [line 135, column 14]\n n$1=_fun_reference_field::Val_getF(&r:reference_field::Val&) [line 135, column 14]\n *&return:int=(1 / n$1) [line 135, column 3]\n _=*&x:reference_field::X [line 135, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 135, column 21]\n " shape="box"] "val_getF_div0#reference_field#16910887455441500799.24fc3c9591435f1b92c06c5c7da4bd2e_3" -> "val_getF_div0#reference_field#16910887455441500799.24fc3c9591435f1b92c06c5c7da4bd2e_2" ; @@ -304,7 +304,7 @@ digraph cfg { "val_getI_div0#reference_field#1916539470996695608.683d462cf87abbc81874a14e4872564a_2" [label="2: Exit reference_field::val_getI_div0 \n " color=yellow style=filled] -"val_getI_div0#reference_field#1916539470996695608.683d462cf87abbc81874a14e4872564a_3" [label="3: Return Stmt \n _=*&r:reference_field::Val [line 143, column 14]\n n$1=_fun_reference_field::Val_getI(&r:reference_field::Val&) [line 143, column 14]\n *&return:int=(1 / n$1) [line 143, column 3]\n " shape="box"] +"val_getI_div0#reference_field#1916539470996695608.683d462cf87abbc81874a14e4872564a_3" [label="3: Return Stmt \n _=*&r:reference_field::Val [line 143, column 14]\n n$1=_fun_reference_field::Val_getI(&r:reference_field::Val&) [line 143, column 14]\n *&return:int=(1 / n$1) [line 143, column 3]\n _=*&x:reference_field::X [line 143, column 21]\n _fun_reference_field::X_~X(&x:reference_field::X*) [line 143, column 21]\n " shape="box"] "val_getI_div0#reference_field#1916539470996695608.683d462cf87abbc81874a14e4872564a_3" -> "val_getI_div0#reference_field#1916539470996695608.683d462cf87abbc81874a14e4872564a_2" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot index 8ef2b08e2..2ec8b5ff3 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_casts.cpp.dot @@ -51,11 +51,11 @@ digraph cfg { "getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_2" [label="2: Exit inheritance_casts::getA \n " color=yellow style=filled] -"getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_3" [label="3: Return Stmt \n n$0=*&__return_param:inheritance_casts::A* [line 23, column 3]\n _fun_inheritance_casts::A_A(n$0:inheritance_casts::A*,&x:inheritance_casts::A&) [line 23, column 10]\n " shape="box"] +"getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_3" [label="3: Return Stmt \n n$0=*&__return_param:inheritance_casts::A* [line 23, column 3]\n _fun_inheritance_casts::A_A(n$0:inheritance_casts::A*,&x:inheritance_casts::A&) [line 23, column 10]\n _=*&x:inheritance_casts::A [line 23, column 10]\n _fun_inheritance_casts::A_~A(&x:inheritance_casts::A*) [line 23, column 10]\n " shape="box"] "getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_3" -> "getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_2" ; -"getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 22, column 9]\n *&x.f:int=n$1 [line 22, column 3]\n " shape="box"] +"getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&f:int [line 22, column 9]\n *&x.f:int=n$2 [line 22, column 3]\n " shape="box"] "getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_4" -> "getA#inheritance_casts#5702196550029280494.a31441c26ae3c842bca5b13c0e4f700e_3" ; @@ -70,11 +70,11 @@ digraph cfg { "getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_2" [label="2: Exit inheritance_casts::getB \n " color=yellow style=filled] -"getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_3" [label="3: Return Stmt \n n$0=*&__return_param:inheritance_casts::B* [line 18, column 3]\n _fun_inheritance_casts::B_B(n$0:inheritance_casts::B*,&x:inheritance_casts::B&) [line 18, column 10]\n " shape="box"] +"getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_3" [label="3: Return Stmt \n n$0=*&__return_param:inheritance_casts::B* [line 18, column 3]\n _fun_inheritance_casts::B_B(n$0:inheritance_casts::B*,&x:inheritance_casts::B&) [line 18, column 10]\n _=*&x:inheritance_casts::B [line 18, column 10]\n _fun_inheritance_casts::B_~B(&x:inheritance_casts::B*) [line 18, column 10]\n " shape="box"] "getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_3" -> "getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_2" ; -"getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 17, column 9]\n *&x.f:int=n$1 [line 17, column 3]\n " shape="box"] +"getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&f:int [line 17, column 9]\n *&x.f:int=n$2 [line 17, column 3]\n " shape="box"] "getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_4" -> "getB#inheritance_casts#7572693428029732371.2a52889292973e0a59e81bc3aa93b9cd_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot index d2f84c758..697058184 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/return_struct.cpp.dot @@ -1,17 +1,17 @@ /* @generated */ digraph cfg { -"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_1" [label="1: Start return_struct::get_div0\nFormals: \nLocals: x:return_struct::X 0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 27, column 1]\n " color=yellow style=filled] +"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_1" [label="1: Start return_struct::get_div0\nFormals: \nLocals: x:return_struct::X 0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 27, column 1]\n " color=yellow style=filled] "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_1" -> "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_4" ; "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_2" [label="2: Exit return_struct::get_div0 \n " color=yellow style=filled] -"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 29, column 14]\n *&return:int=(1 / n$0) [line 29, column 3]\n " shape="box"] +"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 29, column 14]\n *&return:int=(1 / n$0) [line 29, column 3]\n _=*&x:return_struct::X [line 29, column 16]\n _fun_return_struct::X_~X(&x:return_struct::X*) [line 29, column 16]\n " shape="box"] "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_3" -> "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_2" ; -"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_4" [label="4: DeclStmt \n _fun_return_struct::get(0:int,&0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X*) [line 28, column 9]\n _fun_return_struct::X_X(&x:return_struct::X*,&0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X&) [line 28, column 9]\n " shape="box"] +"get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_4" [label="4: DeclStmt \n _fun_return_struct::get(0:int,&0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X*) [line 28, column 9]\n _fun_return_struct::X_X(&x:return_struct::X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X&) [line 28, column 9]\n " shape="box"] "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_4" -> "get_div0#return_struct#3543093399648500387.0c3db3a444952aefeee44e54da50327a_3" ; @@ -41,18 +41,18 @@ digraph cfg { "get_method_div0#return_struct#1033779568239724265.1e897486d64ba4a977e56cdd041d6ba7_3" -> "get_method_div0#return_struct#1033779568239724265.1e897486d64ba4a977e56cdd041d6ba7_2" ; -"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_1" [label="1: Start return_struct::get_div1\nFormals: \nLocals: x:return_struct::X 0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 39, column 1]\n " color=yellow style=filled] +"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_1" [label="1: Start return_struct::get_div1\nFormals: \nLocals: x:return_struct::X 0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 39, column 1]\n " color=yellow style=filled] "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_1" -> "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_4" ; "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_2" [label="2: Exit return_struct::get_div1 \n " color=yellow style=filled] -"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 41, column 14]\n *&return:int=(1 / n$0) [line 41, column 3]\n " shape="box"] +"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 41, column 14]\n *&return:int=(1 / n$0) [line 41, column 3]\n _=*&x:return_struct::X [line 41, column 16]\n _fun_return_struct::X_~X(&x:return_struct::X*) [line 41, column 16]\n " shape="box"] "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_3" -> "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_2" ; -"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_4" [label="4: DeclStmt \n _fun_return_struct::get(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X*) [line 40, column 9]\n _fun_return_struct::X_X(&x:return_struct::X*,&0$?%__sil_tmpSIL_materialize_temp__n$1:return_struct::X&) [line 40, column 9]\n " shape="box"] +"get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_4" [label="4: DeclStmt \n _fun_return_struct::get(1:int,&0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X*) [line 40, column 9]\n _fun_return_struct::X_X(&x:return_struct::X*,&0$?%__sil_tmpSIL_materialize_temp__n$2:return_struct::X&) [line 40, column 9]\n " shape="box"] "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_4" -> "get_div1#return_struct#4287655186293816212.dabfacf04a7d838f8bdc3ef21786303d_3" ; @@ -85,11 +85,11 @@ digraph cfg { "get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_2" [label="2: Exit return_struct::get \n " color=yellow style=filled] -"get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_3" [label="3: Return Stmt \n n$0=*&__return_param:return_struct::X* [line 24, column 3]\n _fun_return_struct::X_X(n$0:return_struct::X*,&x:return_struct::X&) [line 24, column 10]\n " shape="box"] +"get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_3" [label="3: Return Stmt \n n$0=*&__return_param:return_struct::X* [line 24, column 3]\n _fun_return_struct::X_X(n$0:return_struct::X*,&x:return_struct::X&) [line 24, column 10]\n _=*&x:return_struct::X [line 24, column 10]\n _fun_return_struct::X_~X(&x:return_struct::X*) [line 24, column 10]\n " shape="box"] "get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_3" -> "get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_2" ; -"get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_4" [label="4: BinaryOperatorStmt: Assign \n n$1=*&a:int [line 23, column 9]\n *&x.f:int=n$1 [line 23, column 3]\n " shape="box"] +"get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_4" [label="4: BinaryOperatorStmt: Assign \n n$2=*&a:int [line 23, column 9]\n *&x.f:int=n$2 [line 23, column 3]\n " shape="box"] "get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_4" -> "get#return_struct#15206943163581446197.ccfaa809d6b1c936572851236a9ccb10_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot index 9ff0d6460..eb2830ffc 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/struct_pass_by_value.cpp.dot @@ -7,7 +7,7 @@ digraph cfg { "var_div0#struct_pass_by_value#10764880494979445665.44da929aedf0cdc1afaea064cb399051_2" [label="2: Exit struct_pass_by_value::var_div0 \n " color=yellow style=filled] -"var_div0#struct_pass_by_value#10764880494979445665.44da929aedf0cdc1afaea064cb399051_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 29, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 29, column 14]\n *&return:int=(1 / n$1) [line 29, column 3]\n " shape="box"] +"var_div0#struct_pass_by_value#10764880494979445665.44da929aedf0cdc1afaea064cb399051_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 29, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 29, column 14]\n *&return:int=(1 / n$1) [line 29, column 3]\n _=*&x:struct_pass_by_value::X [line 29, column 21]\n _fun_struct_pass_by_value::X_~X(&x:struct_pass_by_value::X*) [line 29, column 21]\n " shape="box"] "var_div0#struct_pass_by_value#10764880494979445665.44da929aedf0cdc1afaea064cb399051_3" -> "var_div0#struct_pass_by_value#10764880494979445665.44da929aedf0cdc1afaea064cb399051_2" ; @@ -22,7 +22,7 @@ digraph cfg { "var_div1#struct_pass_by_value#11501824865066029482.b667f3a6d8153cf4e571282bd064fc22_2" [label="2: Exit struct_pass_by_value::var_div1 \n " color=yellow style=filled] -"var_div1#struct_pass_by_value#11501824865066029482.b667f3a6d8153cf4e571282bd064fc22_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 34, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 34, column 14]\n *&return:int=(1 / n$1) [line 34, column 3]\n " shape="box"] +"var_div1#struct_pass_by_value#11501824865066029482.b667f3a6d8153cf4e571282bd064fc22_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 34, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 34, column 14]\n *&return:int=(1 / n$1) [line 34, column 3]\n _=*&x:struct_pass_by_value::X [line 34, column 21]\n _fun_struct_pass_by_value::X_~X(&x:struct_pass_by_value::X*) [line 34, column 21]\n " shape="box"] "var_div1#struct_pass_by_value#11501824865066029482.b667f3a6d8153cf4e571282bd064fc22_3" -> "var_div1#struct_pass_by_value#11501824865066029482.b667f3a6d8153cf4e571282bd064fc22_2" ; @@ -59,7 +59,7 @@ digraph cfg { "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_2" [label="2: Exit struct_pass_by_value::field_div0 \n " color=yellow style=filled] -"field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&y.x:struct_pass_by_value::X&) [line 44, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 44, column 14]\n *&return:int=(1 / n$1) [line 44, column 3]\n " shape="box"] +"field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_3" [label="3: Return Stmt \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X*,&y.x:struct_pass_by_value::X&) [line 44, column 20]\n n$1=_fun_struct_pass_by_value::get_f(&0$?%__sil_tmp__temp_construct_n$0:struct_pass_by_value::X) [line 44, column 14]\n *&return:int=(1 / n$1) [line 44, column 3]\n _=*&x:struct_pass_by_value::X [line 44, column 23]\n _fun_struct_pass_by_value::X_~X(&x:struct_pass_by_value::X*) [line 44, column 23]\n " shape="box"] "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_3" -> "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_2" ; @@ -71,18 +71,18 @@ digraph cfg { "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_5" -> "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_4" ; -"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_1" [label="1: Start struct_pass_by_value::param_get_copied_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X x:struct_pass_by_value::X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$1,&x); [line 47, column 1]\n " color=yellow style=filled] +"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_1" [label="1: Start struct_pass_by_value::param_get_copied_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X x:struct_pass_by_value::X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$2,&x); [line 47, column 1]\n " color=yellow style=filled] "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_1" -> "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_5" ; "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_2" [label="2: Exit struct_pass_by_value::param_get_copied_div0 \n " color=yellow style=filled] -"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 50, column 14]\n *&return:int=(1 / n$0) [line 50, column 3]\n " shape="box"] +"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 50, column 14]\n *&return:int=(1 / n$0) [line 50, column 3]\n _=*&x:struct_pass_by_value::X [line 50, column 16]\n _fun_struct_pass_by_value::X_~X(&x:struct_pass_by_value::X*) [line 50, column 16]\n " shape="box"] "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_3" -> "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_2" ; -"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_4" [label="4: Call _fun_struct_pass_by_value::set_f \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 49, column 9]\n _fun_struct_pass_by_value::set_f(&0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X,1:int) [line 49, column 3]\n " shape="box"] +"param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_4" [label="4: Call _fun_struct_pass_by_value::set_f \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 49, column 9]\n _fun_struct_pass_by_value::set_f(&0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X,1:int) [line 49, column 3]\n " shape="box"] "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_4" -> "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_3" ; @@ -90,18 +90,18 @@ digraph cfg { "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_5" -> "param_get_copied_div0#struct_pass_by_value#5422600122206315156.a9ecc5bcf15beb35ee10b7d5c038ad8e_4" ; -"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_1" [label="1: Start struct_pass_by_value::param_get_copied_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X x:struct_pass_by_value::X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$1,&x); [line 53, column 1]\n " color=yellow style=filled] +"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_1" [label="1: Start struct_pass_by_value::param_get_copied_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X x:struct_pass_by_value::X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$2,&x); [line 53, column 1]\n " color=yellow style=filled] "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_1" -> "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_5" ; "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_2" [label="2: Exit struct_pass_by_value::param_get_copied_div1 \n " color=yellow style=filled] -"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 56, column 14]\n *&return:int=(1 / n$0) [line 56, column 3]\n " shape="box"] +"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_3" [label="3: Return Stmt \n n$0=*&x.f:int [line 56, column 14]\n *&return:int=(1 / n$0) [line 56, column 3]\n _=*&x:struct_pass_by_value::X [line 56, column 16]\n _fun_struct_pass_by_value::X_~X(&x:struct_pass_by_value::X*) [line 56, column 16]\n " shape="box"] "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_3" -> "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_2" ; -"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_4" [label="4: Call _fun_struct_pass_by_value::set_f \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 55, column 9]\n _fun_struct_pass_by_value::set_f(&0$?%__sil_tmp__temp_construct_n$1:struct_pass_by_value::X,0:int) [line 55, column 3]\n " shape="box"] +"param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_4" [label="4: Call _fun_struct_pass_by_value::set_f \n _fun_struct_pass_by_value::X_X(&0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X*,&x:struct_pass_by_value::X&) [line 55, column 9]\n _fun_struct_pass_by_value::set_f(&0$?%__sil_tmp__temp_construct_n$2:struct_pass_by_value::X,0:int) [line 55, column 3]\n " shape="box"] "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_4" -> "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_3" ;