diff --git a/infer/src/IR/ProcAttributes.ml b/infer/src/IR/ProcAttributes.ml index 9c58a50fd..87773712a 100644 --- a/infer/src/IR/ProcAttributes.ml +++ b/infer/src/IR/ProcAttributes.ml @@ -54,7 +54,6 @@ type t = ; exceptions: string list (** exceptions thrown by the procedure *) ; formals: (Mangled.t * Typ.t) list (** name and type of formal parameters *) ; const_formals: int list (** list of indices of formals that are const-qualified *) - ; by_vals: int list (** list of indices of formals that are passed by-value *) ; func_attributes: PredSymb.func_attribute list ; is_abstract: bool (** the procedure is abstract *) ; is_bridge_method: bool (** the procedure is a bridge method *) @@ -82,7 +81,6 @@ let default translation_unit proc_name = ; exceptions= [] ; formals= [] ; const_formals= [] - ; by_vals= [] ; func_attributes= [] ; is_abstract= false ; is_bridge_method= false @@ -115,7 +113,6 @@ let pp f ; exceptions ; formals ; const_formals - ; by_vals ; func_attributes ; is_abstract ; is_bridge_method @@ -156,10 +153,6 @@ let pp f F.fprintf f "; const_formals= [@[%a@]]@," (Pp.semicolon_seq ~print_env:Pp.text_break F.pp_print_int) const_formals ; - if not ([%compare.equal: int list] default.by_vals by_vals) then - F.fprintf f "; by_vals= [@[%a@]]@," - (Pp.semicolon_seq ~print_env:Pp.text_break F.pp_print_int) - by_vals ; if not ([%compare.equal: PredSymb.func_attribute list] default.func_attributes func_attributes) then F.fprintf f "; func_attributes= [@[%a@]]@," diff --git a/infer/src/IR/ProcAttributes.mli b/infer/src/IR/ProcAttributes.mli index 1c3680d0b..ef7a6c56a 100644 --- a/infer/src/IR/ProcAttributes.mli +++ b/infer/src/IR/ProcAttributes.mli @@ -29,7 +29,6 @@ type t = ; exceptions: string list (** exceptions thrown by the procedure *) ; formals: (Mangled.t * Typ.t) list (** name and type of formal parameters *) ; const_formals: int list (** list of indices of formals that are const-qualified *) - ; by_vals: int list (** list of indices of formals that are passed by-value *) ; func_attributes: PredSymb.func_attribute list ; is_abstract: bool (** the procedure is abstract *) ; is_bridge_method: bool (** the procedure is a bridge method *) diff --git a/infer/src/backend/dotty.ml b/infer/src/backend/dotty.ml index 74ae82db0..6cfcdf826 100644 --- a/infer/src/backend/dotty.ml +++ b/infer/src/backend/dotty.ml @@ -1071,13 +1071,9 @@ let pp_cfgnodename pname fmt (n : Procdesc.Node.t) = (Procdesc.Node.get_id n :> int) -let pp_etlist byvals fmt etl = - List.iteri - ~f:(fun index (id, typ) -> - let byval_mark = - if Typ.is_pointer typ && List.mem byvals index ~equal:Int.equal then "(byval)" else "" - in - Format.fprintf fmt " %a:%a%s" Mangled.pp id (Typ.pp_full Pp.text) typ byval_mark ) +let pp_etlist fmt etl = + List.iter + ~f:(fun (id, typ) -> Format.fprintf fmt " %a:%a" Mangled.pp id (Typ.pp_full Pp.text) typ) etl @@ -1096,8 +1092,7 @@ let pp_cfgnodelabel pdesc fmt (n : Procdesc.Node.t) = let pname = Procdesc.Node.get_proc_name n in let pname_string = Escape.escape_dotty (Typ.Procname.to_string pname) in let attributes = Procdesc.get_attributes pdesc in - let byvals = attributes.ProcAttributes.by_vals in - Format.fprintf fmt "Start %s\\nFormals: %a\\nLocals: %a" pname_string (pp_etlist byvals) + Format.fprintf fmt "Start %s\\nFormals: %a\\nLocals: %a" pname_string pp_etlist (Procdesc.get_formals pdesc) pp_local_list (Procdesc.get_locals pdesc) ; if not (List.is_empty (Procdesc.get_captured pdesc)) then Format.fprintf fmt "\\nCaptured: %a" pp_var_list (Procdesc.get_captured pdesc) ; diff --git a/infer/src/clang/CType.ml b/infer/src/clang/CType.ml index 904563af3..c7b78c699 100644 --- a/infer/src/clang/CType.ml +++ b/infer/src/clang/CType.ml @@ -83,75 +83,3 @@ let is_pointer_to_const {Clang_ast_t.qt_type_ptr} = qt_is_const | _ -> false - - -let is_value {Clang_ast_t.qt_type_ptr} = - match qt_type_ptr with - | Clang_ast_extend.Builtin _ - (* We rely on the assumption here that Clang_ast_extend.ReferenceOf is only created for pass-by-value structs. *) - (* TODO: Create a dedicated variant in Clang_ast_extend for pass-by-val params *) - | Clang_ast_extend.ReferenceOf _ -> - true - | Clang_ast_types.TypePtr.Ptr _ -> - let rec is_value_raw qt_type_ptr = - match CAst_utils.get_type qt_type_ptr with - | Some (BuiltinType _) - | Some (ComplexType _) - | Some (DependentSizedExtVectorType _) - | Some (VectorType _) - | Some (ExtVectorType _) - | Some (RecordType _) - | Some (EnumType _) - | Some (InjectedClassNameType _) - | Some (ObjCObjectType _) - | Some (ObjCInterfaceType _) -> - true - | Some (AdjustedType (_, {Clang_ast_t.qt_type_ptr})) - | Some (DecayedType (_, {Clang_ast_t.qt_type_ptr})) - | Some (ParenType (_, {Clang_ast_t.qt_type_ptr})) - | Some (DecltypeType (_, {Clang_ast_t.qt_type_ptr})) - | Some (AtomicType (_, {Clang_ast_t.qt_type_ptr})) -> - is_value_raw qt_type_ptr - | Some (TypedefType (_, {Clang_ast_t.tti_child_type})) -> - is_value_raw tti_child_type.Clang_ast_t.qt_type_ptr - (* These types could be value types, and we try our best to resolve them *) - | Some (AttributedType ({Clang_ast_t.ti_desugared_type}, _)) - | Some (TypeOfExprType {Clang_ast_t.ti_desugared_type}) - | Some (TypeOfType {Clang_ast_t.ti_desugared_type}) - | Some (UnaryTransformType {Clang_ast_t.ti_desugared_type}) - | Some (ElaboratedType {Clang_ast_t.ti_desugared_type}) - | Some (AutoType {Clang_ast_t.ti_desugared_type}) - | Some (DependentNameType {Clang_ast_t.ti_desugared_type}) - | Some (DeducedTemplateSpecializationType {Clang_ast_t.ti_desugared_type}) - | Some (TemplateSpecializationType {Clang_ast_t.ti_desugared_type}) - | Some (DependentTemplateSpecializationType {Clang_ast_t.ti_desugared_type}) - | Some (TemplateTypeParmType {Clang_ast_t.ti_desugared_type}) - | Some (SubstTemplateTypeParmType {Clang_ast_t.ti_desugared_type}) - | Some (SubstTemplateTypeParmPackType {Clang_ast_t.ti_desugared_type}) - | Some (PackExpansionType {Clang_ast_t.ti_desugared_type}) - | Some (UnresolvedUsingType {Clang_ast_t.ti_desugared_type}) -> ( - match ti_desugared_type with Some ptr -> is_value_raw ptr | None -> false ) - (* These types are known to be non-value types *) - | Some (PointerType _) - | Some (BlockPointerType _) - | Some (LValueReferenceType _) - | Some (RValueReferenceType _) - | Some (MemberPointerType _) - | Some (ConstantArrayType _) - | Some (IncompleteArrayType _) - | Some (VariableArrayType _) - | Some (DependentSizedArrayType _) - | Some (FunctionProtoType _) - | Some (FunctionNoProtoType _) - | Some (ObjCObjectPointerType _) - | Some (NoneType _) - | Some (DependentAddressSpaceType _) - (* These types I don't know what they are. Be conservative and treat them as non value types *) - | Some (ObjCTypeParamType _) - | Some (PipeType _) - | None -> - false - in - is_value_raw qt_type_ptr - | _ -> - false diff --git a/infer/src/clang/CType.mli b/infer/src/clang/CType.mli index 7a58dc182..f6ed8c26a 100644 --- a/infer/src/clang/CType.mli +++ b/infer/src/clang/CType.mli @@ -22,5 +22,3 @@ val is_block_type : Clang_ast_t.qual_type -> bool val is_reference_type : Clang_ast_t.qual_type -> bool val is_pointer_to_const : Clang_ast_t.qual_type -> bool - -val is_value : Clang_ast_t.qual_type -> bool diff --git a/infer/src/clang/CType_decl.ml b/infer/src/clang/CType_decl.ml index af5d4714d..17e70a31c 100644 --- a/infer/src/clang/CType_decl.ml +++ b/infer/src/clang/CType_decl.ml @@ -22,10 +22,9 @@ module BuildMethodSignature = struct let param_type_of_qual_type qual_type_to_sil_type tenv name qual_type = let typ = qual_type_to_sil_type tenv qual_type in - let is_value = CType.is_value qual_type in let is_pointer_to_const = CType.is_pointer_to_const qual_type in let annot = CAst_utils.sil_annot_of_type qual_type in - Some (CMethodSignature.mk_param_type ~is_value ~is_pointer_to_const ~annot name typ) + Some (CMethodSignature.mk_param_type ~is_pointer_to_const ~annot name typ) let get_class_param qual_type_to_sil_type tenv method_decl = @@ -96,9 +95,8 @@ module BuildMethodSignature = struct |> qual_type_to_sil_type tenv in let is_pointer_to_const = CType.is_pointer_to_const qt in - let is_value = CType.is_value qt in let annot = CAst_utils.sil_annot_of_type qt in - CMethodSignature.mk_param_type name typ ~is_value ~is_pointer_to_const ~annot + CMethodSignature.mk_param_type name typ ~is_pointer_to_const ~annot | _ -> raise CFrontend_config.Invalid_declaration in diff --git a/infer/src/clang/cMethodSignature.ml b/infer/src/clang/cMethodSignature.ml index 532e64399..5c589bbd3 100644 --- a/infer/src/clang/cMethodSignature.ml +++ b/infer/src/clang/cMethodSignature.ml @@ -12,12 +12,10 @@ open! IStd module F = Format -type param_type = - {name: Mangled.t; typ: Typ.t; is_pointer_to_const: bool; is_value: bool; annot: Annot.Item.t} +type param_type = {name: Mangled.t; typ: Typ.t; is_pointer_to_const: bool; annot: Annot.Item.t} -let mk_param_type ?(is_value = false) ?(is_pointer_to_const = false) ?(annot = Annot.Item.empty) - name typ = - {name; typ; is_value; is_pointer_to_const; annot} +let mk_param_type ?(is_pointer_to_const = false) ?(annot = Annot.Item.empty) name typ = + {name; typ; is_pointer_to_const; annot} type t = diff --git a/infer/src/clang/cMethodSignature.mli b/infer/src/clang/cMethodSignature.mli index 3b34f03b6..9eb07aa60 100644 --- a/infer/src/clang/cMethodSignature.mli +++ b/infer/src/clang/cMethodSignature.mli @@ -10,8 +10,7 @@ open! IStd (** Define the signature of a method consisting of its name, its arguments, return type, location and whether its an instance method. *) -type param_type = - {name: Mangled.t; typ: Typ.t; is_pointer_to_const: bool; is_value: bool; annot: Annot.Item.t} +type param_type = {name: Mangled.t; typ: Typ.t; is_pointer_to_const: bool; annot: Annot.Item.t} type t = { name: Typ.Procname.t @@ -56,9 +55,4 @@ val mk : val pp : Format.formatter -> t -> unit val mk_param_type : - ?is_value:bool - -> ?is_pointer_to_const:bool - -> ?annot:Annot.Item.t - -> Mangled.t - -> Typ.t - -> param_type + ?is_pointer_to_const:bool -> ?annot:Annot.Item.t -> Mangled.t -> Typ.t -> param_type diff --git a/infer/src/clang/cMethod_trans.ml b/infer/src/clang/cMethod_trans.ml index c04de1215..9d219fbd5 100644 --- a/infer/src/clang/cMethod_trans.ml +++ b/infer/src/clang/cMethod_trans.ml @@ -168,12 +168,6 @@ let get_const_params_indices ~shift params = aux [] params -let get_byval_params_indices ~shift params = - List.filter_mapi params ~f:(fun index ({is_value} : CMethodSignature.param_type) -> - let index' = index + shift in - Option.some_if is_value index' ) - - let get_objc_property_accessor tenv ms = let open Clang_ast_t in match CAst_utils.get_decl_opt ms.CMethodSignature.pointer_to_property_opt with @@ -244,13 +238,9 @@ let create_local_procdesc ?(set_objc_accessor_attr = false) trans_unit_ctx cfg t let const_formals = get_const_params_indices ~shift:(List.length captured_mangled) all_params in - let by_vals = get_byval_params_indices ~shift:(List.length captured_mangled) all_params in let source_range = ms.CMethodSignature.loc in L.(debug Capture Verbose) "@\nCreating a new procdesc for function: '%s'@\n@." pname ; L.(debug Capture Verbose) "@\nms = %a@\n@." CMethodSignature.pp ms ; - L.(debug Capture Verbose) - "@\nbyvals = [ %s ]@\n@." - (String.concat ~sep:", " (List.map by_vals ~f:string_of_int)) ; let loc_start = CLocation.location_of_source_range trans_unit_ctx.CFrontend_config.source_file source_range in @@ -269,7 +259,6 @@ let create_local_procdesc ?(set_objc_accessor_attr = false) trans_unit_ctx cfg t ProcAttributes.captured= captured_mangled ; formals ; const_formals - ; by_vals ; has_added_return_param ; access ; func_attributes= attributes diff --git a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot index 12f17d93c..b15c6b352 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot @@ -1,6 +1,6 @@ /* @generated */ digraph cfg { -"operator!=#4715710375716659667.eb4126b3edd381f3092a9e38275754d4_1" [label="1: Start operator!=\nFormals: i1:iterator&(byval) i2:iterator&(byval)\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:_Bool \n " color=yellow style=filled] +"operator!=#4715710375716659667.eb4126b3edd381f3092a9e38275754d4_1" [label="1: Start operator!=\nFormals: i1:iterator& i2:iterator&\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:_Bool \n " color=yellow style=filled] "operator!=#4715710375716659667.eb4126b3edd381f3092a9e38275754d4_1" -> "operator!=#4715710375716659667.eb4126b3edd381f3092a9e38275754d4_4" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot index 1f75c423c..45200ecb8 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_struct_init_list.cpp.dot @@ -11,7 +11,7 @@ digraph cfg { "test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_3" -> "test#18241244337164948030.afc14f193ad97442f67ac7183be789bc_2" ; -"Person#Person#{5857402560744521252}.6ef0efc697f825c2030746b71de7fd56_1" [label="1: Start Person_Person\nFormals: this:Person* l:Insets const &(byval)\nLocals: \n " color=yellow style=filled] +"Person#Person#{5857402560744521252}.6ef0efc697f825c2030746b71de7fd56_1" [label="1: Start Person_Person\nFormals: this:Person* l:Insets const &\nLocals: \n " color=yellow style=filled] "Person#Person#{5857402560744521252}.6ef0efc697f825c2030746b71de7fd56_1" -> "Person#Person#{5857402560744521252}.6ef0efc697f825c2030746b71de7fd56_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot index 51c088068..c51c343c3 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/std_init_list.cpp.dot @@ -11,7 +11,7 @@ digraph cfg { "main.fad58de7366495db4650cfefac2fcd61_3" -> "main.fad58de7366495db4650cfefac2fcd61_2" ; -"X#X#{15236476731743367432}.ce83f097b510e48ce3d42aa5df1bb3be_1" [label="1: Start X_X\nFormals: this:X* list:std::initializer_list&(byval)\nLocals: i:int const * \n " color=yellow style=filled] +"X#X#{15236476731743367432}.ce83f097b510e48ce3d42aa5df1bb3be_1" [label="1: Start X_X\nFormals: this:X* list:std::initializer_list&\nLocals: i:int const * \n " color=yellow style=filled] "X#X#{15236476731743367432}.ce83f097b510e48ce3d42aa5df1bb3be_1" -> "X#X#{15236476731743367432}.ce83f097b510e48ce3d42aa5df1bb3be_4" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/methods/byvals.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/methods/byvals.cpp.dot index 694c6c6f3..b0ea769c6 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/byvals.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/byvals.cpp.dot @@ -11,7 +11,7 @@ digraph cfg { "decltype_by_ref#pass_by_val#7827598625585178144.8fa35b5b24f764bae803ce1f6e468516_3" -> "decltype_by_ref#pass_by_val#7827598625585178144.8fa35b5b24f764bae803ce1f6e468516_2" ; -"decltype_by_val#pass_by_val#14279156289723785232.72f90cb8cd80d6281316dd4fe0c3453c_1" [label="1: Start pass_by_val::decltype_by_val\nFormals: p:pass_by_val::PlainStruct&(byval)\nLocals: \n " color=yellow style=filled] +"decltype_by_val#pass_by_val#14279156289723785232.72f90cb8cd80d6281316dd4fe0c3453c_1" [label="1: Start pass_by_val::decltype_by_val\nFormals: p:pass_by_val::PlainStruct&\nLocals: \n " color=yellow style=filled] "decltype_by_val#pass_by_val#14279156289723785232.72f90cb8cd80d6281316dd4fe0c3453c_1" -> "decltype_by_val#pass_by_val#14279156289723785232.72f90cb8cd80d6281316dd4fe0c3453c_3" ; @@ -33,7 +33,7 @@ digraph cfg { "dependent_by_ref#pass_by_val#15143379324942623593.5ccf1ab5c879a0bcfec55b566c6a60db_3" -> "dependent_by_ref#pass_by_val#15143379324942623593.5ccf1ab5c879a0bcfec55b566c6a60db_2" ; -"dependent_by_val#pass_by_val#16173371529174507122.c006229ea6b255a1298dc7d547bac014_1" [label="1: Start pass_by_val::dependent_by_val\nFormals: p:pass_by_val::PlainStruct&(byval)\nLocals: \n " color=yellow style=filled] +"dependent_by_val#pass_by_val#16173371529174507122.c006229ea6b255a1298dc7d547bac014_1" [label="1: Start pass_by_val::dependent_by_val\nFormals: p:pass_by_val::PlainStruct&\nLocals: \n " color=yellow style=filled] "dependent_by_val#pass_by_val#16173371529174507122.c006229ea6b255a1298dc7d547bac014_1" -> "dependent_by_val#pass_by_val#16173371529174507122.c006229ea6b255a1298dc7d547bac014_3" ; @@ -118,7 +118,7 @@ digraph cfg { "plain_struct_by_ref#pass_by_val(class pass_by_val::PlainStruct)#2657428317109106311.ebb1ec27d296c7f7c7c76440cd2435a6_3" -> "plain_struct_by_ref#pass_by_val(class pass_by_val::PlainStruct)#2657428317109106311.ebb1ec27d296c7f7c7c76440cd2435a6_2" ; -"plain_struct_by_val#pass_by_val#7415219466606029544.eb0e0bdde375e8d1716470ec792b2450_1" [label="1: Start pass_by_val::plain_struct_by_val\nFormals: p:pass_by_val::PlainStruct&(byval)\nLocals: \n " color=yellow style=filled] +"plain_struct_by_val#pass_by_val#7415219466606029544.eb0e0bdde375e8d1716470ec792b2450_1" [label="1: Start pass_by_val::plain_struct_by_val\nFormals: p:pass_by_val::PlainStruct&\nLocals: \n " color=yellow style=filled] "plain_struct_by_val#pass_by_val#7415219466606029544.eb0e0bdde375e8d1716470ec792b2450_1" -> "plain_struct_by_val#pass_by_val#7415219466606029544.eb0e0bdde375e8d1716470ec792b2450_3" ; @@ -162,7 +162,7 @@ digraph cfg { "type_alias_by_ref#pass_by_val(class pass_by_val::PlainStruct,class pass_by_val::PlainStruct)#1261506.a3dda6b37896a0f836342db8df5fffd2_3" -> "type_alias_by_ref#pass_by_val(class pass_by_val::PlainStruct,class pass_by_val::PlainStruct)#1261506.a3dda6b37896a0f836342db8df5fffd2_2" ; -"type_alias_by_val#pass_by_val#9273827923998572097.425db1bd7e6b48116fa99ed40b0b6415_1" [label="1: Start pass_by_val::type_alias_by_val\nFormals: p1:pass_by_val::PlainStruct&(byval) p2:pass_by_val::PlainStruct&(byval)\nLocals: 0$?%__sil_tmp__temp_construct_n$0:pass_by_val::PlainStruct 0$?%__sil_tmp__temp_construct_n$4:pass_by_val::PlainStruct \n " color=yellow style=filled] +"type_alias_by_val#pass_by_val#9273827923998572097.425db1bd7e6b48116fa99ed40b0b6415_1" [label="1: Start pass_by_val::type_alias_by_val\nFormals: p1:pass_by_val::PlainStruct& p2:pass_by_val::PlainStruct&\nLocals: 0$?%__sil_tmp__temp_construct_n$0:pass_by_val::PlainStruct 0$?%__sil_tmp__temp_construct_n$4:pass_by_val::PlainStruct \n " color=yellow style=filled] "type_alias_by_val#pass_by_val#9273827923998572097.425db1bd7e6b48116fa99ed40b0b6415_1" -> "type_alias_by_val#pass_by_val#9273827923998572097.425db1bd7e6b48116fa99ed40b0b6415_3" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/reference/ptr_mem.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/reference/ptr_mem.cpp.dot index 2ba3b2349..32e1da7db 100644 --- a/infer/tests/codetoanalyze/cpp/shared/reference/ptr_mem.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/reference/ptr_mem.cpp.dot @@ -1,6 +1,6 @@ /* @generated */ digraph cfg { -"noskip#6149941428299352091.c0e56085ae3c9567084b0f9e4211cfc0_1" [label="1: Start noskip\nFormals: l:List&(byval)\nLocals: i:item \n " color=yellow style=filled] +"noskip#6149941428299352091.c0e56085ae3c9567084b0f9e4211cfc0_1" [label="1: Start noskip\nFormals: l:List&\nLocals: i:item \n " color=yellow style=filled] "noskip#6149941428299352091.c0e56085ae3c9567084b0f9e4211cfc0_1" -> "noskip#6149941428299352091.c0e56085ae3c9567084b0f9e4211cfc0_5" ; diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot index 8f66e5d52..08fc42519 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance_field.cpp.dot @@ -1,6 +1,6 @@ /* @generated */ digraph cfg { -"div0_b1#17650173920024552929.38acfc238efbf35c1ac5da7290b49422_1" [label="1: Start div0_b1\nFormals: s:Sub&(byval)\nLocals: \n " color=yellow style=filled] +"div0_b1#17650173920024552929.38acfc238efbf35c1ac5da7290b49422_1" [label="1: Start div0_b1\nFormals: s:Sub&\nLocals: \n " color=yellow style=filled] "div0_b1#17650173920024552929.38acfc238efbf35c1ac5da7290b49422_1" -> "div0_b1#17650173920024552929.38acfc238efbf35c1ac5da7290b49422_4" ; @@ -34,7 +34,7 @@ digraph cfg { "div0_b1_s(class Sub)#4574535260514480977.bea603e96ca808f341ce0e5424d96c83_5" -> "div0_b1_s(class Sub)#4574535260514480977.bea603e96ca808f341ce0e5424d96c83_4" ; -"div0_b2#6935029956526426132.ef88e6d1eac891cdde3f345b9b55439c_1" [label="1: Start div0_b2\nFormals: s:Sub&(byval)\nLocals: \n " color=yellow style=filled] +"div0_b2#6935029956526426132.ef88e6d1eac891cdde3f345b9b55439c_1" [label="1: Start div0_b2\nFormals: s:Sub&\nLocals: \n " color=yellow style=filled] "div0_b2#6935029956526426132.ef88e6d1eac891cdde3f345b9b55439c_1" -> "div0_b2#6935029956526426132.ef88e6d1eac891cdde3f345b9b55439c_4" ; @@ -68,7 +68,7 @@ digraph cfg { "div0_cast(class Sub)#5945090778893539301.57c132b2d87bb7310c8cb0085dede4d5_5" -> "div0_cast(class Sub)#5945090778893539301.57c132b2d87bb7310c8cb0085dede4d5_4" ; -"div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_1" [label="1: Start div0_cast_ref\nFormals: s:Sub&(byval)\nLocals: b:Base1& \n " color=yellow style=filled] +"div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_1" [label="1: Start div0_cast_ref\nFormals: s:Sub&\nLocals: b:Base1& \n " color=yellow style=filled] "div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_1" -> "div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_5" ; @@ -87,7 +87,7 @@ digraph cfg { "div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_5" -> "div0_cast_ref#11427648331886451822.4f535c7752ac1b6e5f35ab1a83dc2bd8_4" ; -"div0_s#16566672704220882536.127f1e4fb94cf0b77844a4e153e0f991_1" [label="1: Start div0_s\nFormals: s:Sub&(byval)\nLocals: \n " color=yellow style=filled] +"div0_s#16566672704220882536.127f1e4fb94cf0b77844a4e153e0f991_1" [label="1: Start div0_s\nFormals: s:Sub&\nLocals: \n " color=yellow style=filled] "div0_s#16566672704220882536.127f1e4fb94cf0b77844a4e153e0f991_1" -> "div0_s#16566672704220882536.127f1e4fb94cf0b77844a4e153e0f991_4" ; @@ -121,7 +121,7 @@ digraph cfg { "div0_s_b1(class Sub)#6365361903134380141.eab3ecee328fdfa57b4dc825af3f2f72_5" -> "div0_s_b1(class Sub)#6365361903134380141.eab3ecee328fdfa57b4dc825af3f2f72_4" ; -"div1_b1#14974413951234929464.2d37fbc87faf449081172c1e2711163f_1" [label="1: Start div1_b1\nFormals: s:Sub&(byval)\nLocals: \n " color=yellow style=filled] +"div1_b1#14974413951234929464.2d37fbc87faf449081172c1e2711163f_1" [label="1: Start div1_b1\nFormals: s:Sub&\nLocals: \n " color=yellow style=filled] "div1_b1#14974413951234929464.2d37fbc87faf449081172c1e2711163f_1" -> "div1_b1#14974413951234929464.2d37fbc87faf449081172c1e2711163f_4" ; 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 7b8651789..275542dc4 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 @@ -19,7 +19,7 @@ digraph cfg { "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_5" -> "field_div0#struct_pass_by_value#10739265731582012189.309f906a63458fd1d3c6651d011f1020_4" ; -"get_f#struct_pass_by_value#16901161791851138670.e181cdd22ed5b9b12bfb0f726d36256b_1" [label="1: Start struct_pass_by_value::get_f\nFormals: val:struct_pass_by_value::X&(byval)\nLocals: \n " color=yellow style=filled] +"get_f#struct_pass_by_value#16901161791851138670.e181cdd22ed5b9b12bfb0f726d36256b_1" [label="1: Start struct_pass_by_value::get_f\nFormals: val:struct_pass_by_value::X&\nLocals: \n " color=yellow style=filled] "get_f#struct_pass_by_value#16901161791851138670.e181cdd22ed5b9b12bfb0f726d36256b_1" -> "get_f#struct_pass_by_value#16901161791851138670.e181cdd22ed5b9b12bfb0f726d36256b_3" ; @@ -68,7 +68,7 @@ digraph cfg { "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_5" -> "param_get_copied_div1#struct_pass_by_value#4678038335560999331.58ffd03114defd7dfa2ce1d8e7c84b46_4" ; -"set_f#struct_pass_by_value#449985082730240817.3244dc0de9a72d4ec2d03e236d94d06e_1" [label="1: Start struct_pass_by_value::set_f\nFormals: val:struct_pass_by_value::X&(byval) f:int\nLocals: \n " color=yellow style=filled] +"set_f#struct_pass_by_value#449985082730240817.3244dc0de9a72d4ec2d03e236d94d06e_1" [label="1: Start struct_pass_by_value::set_f\nFormals: val:struct_pass_by_value::X& f:int\nLocals: \n " color=yellow style=filled] "set_f#struct_pass_by_value#449985082730240817.3244dc0de9a72d4ec2d03e236d94d06e_1" -> "set_f#struct_pass_by_value#449985082730240817.3244dc0de9a72d4ec2d03e236d94d06e_3" ;