From 45df254a99fe867b5cd3143a684378a6a2696e9e Mon Sep 17 00:00:00 2001 From: Dulma Churchill Date: Mon, 20 Nov 2017 05:48:13 -0800 Subject: [PATCH] [infer][PR] [C/C++] Encode filename into the Procname of global initializers Summary: This resolves #796 . Effectively it adds file specific suffix to name of all global initializers (so initializersof two global variable of the same name will have unique Typ.Procname). which is the same rule as currently used by constructing Procname for the static functions. However this change applies to initializers of all global variables and not just static (arguably it's a right thing. since GCC used to allow multiple global variables with the same name). Consequences of this change that it becomes impossible to know name of generated initialization function of global ('extern') variables. However get_initializer_pname function is only referenced by the frontend (when creating initializer for the defined global variables) and by the SIOF checker. Closes https://github.com/facebook/infer/pull/801 Reviewed By: jvillard Differential Revision: D6335034 Pulled By: dulmarod fbshipit-source-id: 1a92c08 --- facebook-clang-plugins | 2 +- infer/src/IR/Pvar.ml | 41 ++++++++++++------- infer/src/IR/Pvar.mli | 3 +- infer/src/clang/cGeneral_utils.ml | 8 +++- .../frontend/globals/global_const1.cpp.dot | 10 ++--- .../cpp/frontend/globals/initializer.cpp.dot | 20 ++++----- .../objc/frontend/types/testloop.m.dot | 20 ++++----- .../frontend/global_const/global_const.mm.dot | 10 ++--- 8 files changed, 67 insertions(+), 47 deletions(-) diff --git a/facebook-clang-plugins b/facebook-clang-plugins index 00a64caee..ac0bceaa0 160000 --- a/facebook-clang-plugins +++ b/facebook-clang-plugins @@ -1 +1 @@ -Subproject commit 00a64caee5877d6cd23816776b8ed56c704f376e +Subproject commit ac0bceaa019efded13109c192a2f955f476e2b27 diff --git a/infer/src/IR/Pvar.ml b/infer/src/IR/Pvar.ml index c99ae2109..b83a3a79a 100644 --- a/infer/src/IR/Pvar.ml +++ b/infer/src/IR/Pvar.ml @@ -24,9 +24,9 @@ type pvar_kind = (** synthetic variable to represent return value *) | Abduced_ref_param of Typ.Procname.t * int * Location.t (** synthetic variable to represent param passed by reference *) - | Global_var of (translation_unit * bool * bool * bool) + | Global_var of (translation_unit * bool * bool * bool * bool) (** global variable: translation unit + is it compile constant? + is it POD? + is it a static - local? *) + local? + is it a static global *) | Seed_var (** variable used to store the initial value of formal parameters *) [@@deriving compare] @@ -77,7 +77,7 @@ let pp_ f pv = | Abduced_ref_param (n, index, l) -> if !Config.pp_simple then F.fprintf f "%a|abducedRefParam%d" Mangled.pp name index else F.fprintf f "%a$[%a]%a|abducedRefParam" Typ.Procname.pp n Location.pp l Mangled.pp name - | Global_var (translation_unit, is_const, is_pod, _) -> + | Global_var (translation_unit, is_const, is_pod, _, _) -> F.fprintf f "#GB<%a%s%s>$%a" pp_translation_unit translation_unit (if is_const then "|const" else "") (if not is_pod then "|!pod" else "") @@ -161,7 +161,7 @@ let is_seed pv = match pv.pv_kind with Seed_var -> true | _ -> false (** Check if the pvar is a global var *) let is_global pv = match pv.pv_kind with Global_var _ -> true | _ -> false -let is_static_local pv = match pv.pv_kind with Global_var (_, _, _, true) -> true | _ -> false +let is_static_local pv = match pv.pv_kind with Global_var (_, _, _, true, _) -> true | _ -> false (** Check if a pvar is the special "this" var *) let is_this pvar = Mangled.equal (get_name pvar) (Mangled.from_string "this") @@ -233,11 +233,12 @@ let mk_callee (name: Mangled.t) (proc_name: Typ.Procname.t) : t = (** create a global variable with the given name *) -let mk_global ?(is_constexpr= false) ?(is_pod= true) ?(is_static_local= false) (name: Mangled.t) - translation_unit : t = +let mk_global ?(is_constexpr= false) ?(is_pod= true) ?(is_static_local= false) + ?(is_static_global= false) (name: Mangled.t) translation_unit : t = { pv_hash= name_hash name ; pv_name= name - ; pv_kind= Global_var (translation_unit, is_constexpr, is_pod, is_static_local) } + ; pv_kind= Global_var (translation_unit, is_constexpr, is_pod, is_static_local, is_static_global) + } (** create a fresh temporary variable local to procedure [pname]. for use in the frontends only! *) @@ -260,22 +261,34 @@ let mk_abduced_ref_param (proc_name: Typ.Procname.t) (index: int) (loc: Location let get_translation_unit pvar = match pvar.pv_kind with - | Global_var (tu, _, _, _) -> + | Global_var (tu, _, _, _, _) -> tu | _ -> L.(die InternalError) "Expected a global variable" -let is_compile_constant pvar = match pvar.pv_kind with Global_var (_, b, _, _) -> b | _ -> false +let is_compile_constant pvar = + match pvar.pv_kind with Global_var (_, b, _, _, _) -> b | _ -> false -let is_pod pvar = match pvar.pv_kind with Global_var (_, _, b, _) -> b | _ -> true + +let is_pod pvar = match pvar.pv_kind with Global_var (_, _, b, _, _) -> b | _ -> true let get_initializer_pname {pv_name; pv_kind} = match pv_kind with - | Global_var _ -> - Some - (Typ.Procname.from_string_c_fun - (Config.clang_initializer_prefix ^ Mangled.to_string_full pv_name)) + | Global_var (translation, _, _, _, is_static_global) -> + let name = Config.clang_initializer_prefix ^ Mangled.to_string_full pv_name in + if is_static_global then + match translation with + | TUFile file -> + let mangled = SourceFile.to_string file |> Utils.string_crc_hex32 in + Typ.Procname.C + (Typ.Procname.c + (QualifiedCppName.of_qual_string name) + mangled Typ.NoTemplate ~is_generic_model:false) + |> Option.return + | TUExtern -> + None + else Some (Typ.Procname.from_string_c_fun name) | _ -> None diff --git a/infer/src/IR/Pvar.mli b/infer/src/IR/Pvar.mli index 4d2937545..d2d459a15 100644 --- a/infer/src/IR/Pvar.mli +++ b/infer/src/IR/Pvar.mli @@ -92,7 +92,8 @@ val mk_callee : Mangled.t -> Typ.Procname.t -> t for a callee function with the given function name *) val mk_global : - ?is_constexpr:bool -> ?is_pod:bool -> ?is_static_local:bool -> Mangled.t -> translation_unit -> t + ?is_constexpr:bool -> ?is_pod:bool -> ?is_static_local:bool -> ?is_static_global:bool + -> Mangled.t -> translation_unit -> t (** create a global variable with the given name *) val mk_tmp : string -> Typ.Procname.t -> t diff --git a/infer/src/clang/cGeneral_utils.ml b/infer/src/clang/cGeneral_utils.ml index a1b8ac386..197dcf358 100644 --- a/infer/src/clang/cGeneral_utils.ml +++ b/infer/src/clang/cGeneral_utils.ml @@ -154,8 +154,14 @@ let mk_sil_global_var {CFrontend_config.source_file} ?(mk_name= fun _ x -> x) na | _ -> true ) in + let is_static_global = + var_decl_info.Clang_ast_t.vdi_is_global + (* only top level declarations are really have file scope, static field members have a global scope *) + && not var_decl_info.Clang_ast_t.vdi_is_static_data_member + && match var_decl_info.Clang_ast_t.vdi_storage_class with Some "static" -> true | _ -> false + in Pvar.mk_global ~is_constexpr ~is_pod - ~is_static_local:var_decl_info.Clang_ast_t.vdi_is_static_local + ~is_static_local:var_decl_info.Clang_ast_t.vdi_is_static_local ~is_static_global (mk_name name_string simple_name) translation_unit diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot index 1b4701408..c850c0928 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot @@ -11,17 +11,17 @@ digraph iCFG { "__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_3" -> "__infer_globals_initializer_global.bdc08c089842ce08b974b22a75daf78e_2" ; -"__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_1" [label="1: Start __infer_globals_initializer_v\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17, column 1]\n " color=yellow style=filled] +"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_1" [label="1: Start __infer_globals_initializer_v\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 17, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_1" -> "__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_3" ; -"__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_2" [label="2: Exit __infer_globals_initializer_v \n " color=yellow style=filled] + "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_1" -> "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" ; +"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_2" [label="2: Exit __infer_globals_initializer_v \n " color=yellow style=filled] -"__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_3" [label="3: DeclStmt \n *&#GB$v:int=2 [line 17, column 1]\n " shape="box"] +"__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" [label="3: DeclStmt \n *&#GB$v:int=2 [line 17, column 1]\n " shape="box"] - "__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_3" -> "__infer_globals_initializer_v.4e4b88201c5f529e31ed314500b0b0e5_2" ; + "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_3" -> "__infer_globals_initializer_v#708fabe5dc8ff523caaa5f44184921e8.588095fa475e4a9e8c83f50f26a48ea9_2" ; "test2#3587805488049044947.69e45cfdc4e36a6f741ce3985858724b_1" [label="1: Start test2\nFormals: \nLocals: local:int \n DECLARE_LOCALS(&return,&local); [line 19, column 1]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot index baa16a0c8..ea21eea00 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/initializer.cpp.dot @@ -1,25 +1,25 @@ /* @generated */ digraph iCFG { -"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_1" [label="1: Start __infer_globals_initializer_x\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14, column 1]\n " color=yellow style=filled] +"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_1" [label="1: Start __infer_globals_initializer_x\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 14, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_1" -> "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" ; -"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_2" [label="2: Exit __infer_globals_initializer_x \n " color=yellow style=filled] + "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_1" -> "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" ; +"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_2" [label="2: Exit __infer_globals_initializer_x \n " color=yellow style=filled] -"__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" [label="3: DeclStmt \n n$0=_fun_foo() [line 14, column 16]\n *&#GB$x:int=(n$0 + 5) [line 14, column 1]\n " shape="box"] +"__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" [label="3: DeclStmt \n n$0=_fun_foo() [line 14, column 16]\n *&#GB$x:int=(n$0 + 5) [line 14, column 1]\n " shape="box"] - "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_3" -> "__infer_globals_initializer_x.90ed5779794b6c6f0b00544949bb1047_2" ; -"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" [label="1: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled] + "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_3" -> "__infer_globals_initializer_x#346c89dda90b0be6289346ddbf0528bc.83245b9f254e67fb6f879cc1e35a1bb1_2" ; +"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_1" [label="1: Start __infer_globals_initializer_y\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 15, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_1" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" ; -"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" [label="2: Exit __infer_globals_initializer_y \n " color=yellow style=filled] + "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_1" -> "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" ; +"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_2" [label="2: Exit __infer_globals_initializer_y \n " color=yellow style=filled] -"__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" [label="3: DeclStmt \n n$0=*&#GB$x:int [line 15, column 16]\n n$1=*&#GB$z:int [line 15, column 20]\n *&#GB$y:int=((n$0 + n$1) + 1) [line 15, column 1]\n " shape="box"] +"__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" [label="3: DeclStmt \n n$0=*&#GB$x:int [line 15, column 16]\n n$1=*&#GB$z:int [line 15, column 20]\n *&#GB$y:int=((n$0 + n$1) + 1) [line 15, column 1]\n " shape="box"] - "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_3" -> "__infer_globals_initializer_y.0ea250be2dd991733c9131c53abc3c54_2" ; + "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_3" -> "__infer_globals_initializer_y#346c89dda90b0be6289346ddbf0528bc.e7d659d11156f551397be6d5db27f31c_2" ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot b/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot index 2fb61a7f2..f69f71365 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/testloop.m.dot @@ -1,27 +1,27 @@ /* @generated */ digraph iCFG { -"__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_1" [label="1: Start __infer_globals_initializer___iPadVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 26, column 1]\n " color=yellow style=filled] +"__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_1" [label="1: Start __infer_globals_initializer___iPadVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 26, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_1" -> "__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_3" ; -"__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_2" [label="2: Exit __infer_globals_initializer___iPadVideoAdLayout \n " color=yellow style=filled] + "__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_1" -> "__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_3" ; +"__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_2" [label="2: Exit __infer_globals_initializer___iPadVideoAdLayout \n " color=yellow style=filled] -"__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_3" [label="3: DeclStmt \n *&#GB$__iPadVideoAdLayout.placeHolderWidth:float=554 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.placeHolderHeight:float=350 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentLeftSidePadding:float=140 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentRightSidePadding:float=60 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.additionalPlaceholderOffset:float=40 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentGap:float=11 [line 26, column 52]\n " shape="box"] +"__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_3" [label="3: DeclStmt \n *&#GB$__iPadVideoAdLayout.placeHolderWidth:float=554 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.placeHolderHeight:float=350 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentLeftSidePadding:float=140 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentRightSidePadding:float=60 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.additionalPlaceholderOffset:float=40 [line 26, column 52]\n *&#GB$__iPadVideoAdLayout.contentGap:float=11 [line 26, column 52]\n " shape="box"] - "__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_3" -> "__infer_globals_initializer___iPadVideoAdLayout.82a4d90dac0bb09630a78b276b79e1ca_2" ; -"__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_1" [label="1: Start __infer_globals_initializer___iPhoneVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 35, column 1]\n " color=yellow style=filled] + "__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_3" -> "__infer_globals_initializer___iPadVideoAdLayout#774934d200ab6ea201ea7444923ebf03.91a439a98050a5c80fe23fc56f573207_2" ; +"__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_1" [label="1: Start __infer_globals_initializer___iPhoneVideoAdLayout\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 35, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_1" -> "__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_3" ; -"__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_2" [label="2: Exit __infer_globals_initializer___iPhoneVideoAdLayout \n " color=yellow style=filled] + "__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_1" -> "__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_3" ; +"__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_2" [label="2: Exit __infer_globals_initializer___iPhoneVideoAdLayout \n " color=yellow style=filled] -"__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_3" [label="3: DeclStmt \n *&#GB$__iPhoneVideoAdLayout.placeHolderWidth:float=244 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.placeHolderHeight:float=175 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentLeftSidePadding:float=20 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentRightSidePadding:float=20 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.additionalPlaceholderOffset:float=0 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentGap:float=7 [line 35, column 54]\n " shape="box"] +"__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_3" [label="3: DeclStmt \n *&#GB$__iPhoneVideoAdLayout.placeHolderWidth:float=244 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.placeHolderHeight:float=175 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentLeftSidePadding:float=20 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentRightSidePadding:float=20 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.additionalPlaceholderOffset:float=0 [line 35, column 54]\n *&#GB$__iPhoneVideoAdLayout.contentGap:float=7 [line 35, column 54]\n " shape="box"] - "__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_3" -> "__infer_globals_initializer___iPhoneVideoAdLayout.b0bc97c09b8fbd16a06b17b7a5d22042_2" ; + "__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_3" -> "__infer_globals_initializer___iPhoneVideoAdLayout#774934d200ab6ea201ea7444923ebf03.1e6bd750ce4ce65119ad54cee8ee01a8_2" ; "layoutToUse#FBScrollViewDelegateProxy#class.0fb14252876875c85e9253ab00bfb755_1" [label="1: Start FBScrollViewDelegateProxy_layoutToUse\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 44, column 1]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot b/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot index 25c821cdf..025de9c93 100644 --- a/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot +++ b/infer/tests/codetoanalyze/objcpp/frontend/global_const/global_const.mm.dot @@ -1,16 +1,16 @@ /* @generated */ digraph iCFG { -"__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_1" [label="1: Start __infer_globals_initializer___someFields\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16, column 1]\n " color=yellow style=filled] +"__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_1" [label="1: Start __infer_globals_initializer___someFields\nFormals: \nLocals: \n DECLARE_LOCALS(&return); [line 16, column 1]\n " color=yellow style=filled] - "__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_1" -> "__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_3" ; -"__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_2" [label="2: Exit __infer_globals_initializer___someFields \n " color=yellow style=filled] + "__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_1" -> "__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_3" ; +"__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_2" [label="2: Exit __infer_globals_initializer___someFields \n " color=yellow style=filled] -"__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_3" [label="3: DeclStmt \n *&#GB$__someFields.field1:float=1 [line 16, column 36]\n *&#GB$__someFields.field2:float=2 [line 16, column 36]\n *&#GB$__someFields.field3:float=3 [line 16, column 36]\n " shape="box"] +"__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_3" [label="3: DeclStmt \n *&#GB$__someFields.field1:float=1 [line 16, column 36]\n *&#GB$__someFields.field2:float=2 [line 16, column 36]\n *&#GB$__someFields.field3:float=3 [line 16, column 36]\n " shape="box"] - "__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_3" -> "__infer_globals_initializer___someFields.1930c0ca3aad91e2bee375979857d426_2" ; + "__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_3" -> "__infer_globals_initializer___someFields#305cac08d8197bd145f7f55cc8a06d16.794b83eea8b5794c71808060b1f3b5c7_2" ; "fields#3037629886785813687.69ed098353fab08d543db5cb8ab409b5_1" [label="1: Start fields\nFormals: __return_param:Fields*\nLocals: \n DECLARE_LOCALS(&return); [line 20, column 1]\n " color=yellow style=filled]