diff --git a/infer/src/IR/Procname.re b/infer/src/IR/Procname.re index 0cd8f7a3d..34fa994cf 100644 --- a/infer/src/IR/Procname.re +++ b/infer/src/IR/Procname.re @@ -46,7 +46,7 @@ type c = (string, option string) [@@deriving compare]; type objc_cpp_method_kind = | CPPMethod (option string) /** with mangling */ - | CPPConstructor (option string) /** with mangling */ + | CPPConstructor (option string, bool) /** with mangling + is it constexpr? */ | ObjCClassMethod | ObjCInstanceMethod | ObjCInternalMethod @@ -164,6 +164,11 @@ let is_c_method = | ObjC_Cpp _ => true | _ => false; +let is_constexpr = + fun + | ObjC_Cpp {kind: CPPConstructor (_, true)} => true + | _ => false; + /** Replace the class name component of a procedure name. In case of Java, replace package and class name. */ @@ -479,14 +484,15 @@ let c_method_to_string osig detail_level => | Some s => s } ) ^ ")" - | CPPConstructor m => + | CPPConstructor (m, is_constexpr) => "{" ^ ( switch m { | None => "" | Some s => s } - ) ^ "}" + ) ^ + (if is_constexpr {"|constexpr"} else {""}) ^ "}" | ObjCClassMethod => "class" | ObjCInstanceMethod => "instance" | ObjCInternalMethod => "internal" diff --git a/infer/src/IR/Procname.rei b/infer/src/IR/Procname.rei index 80c91b92f..958032d69 100644 --- a/infer/src/IR/Procname.rei +++ b/infer/src/IR/Procname.rei @@ -52,7 +52,7 @@ type method_kind = type objc_cpp_method_kind = | CPPMethod (option string) /** with mangling */ - | CPPConstructor (option string) /** with mangling */ + | CPPConstructor (option string, bool) /** with mangling + is it constexpr? */ | ObjCClassMethod | ObjCInstanceMethod | ObjCInternalMethod; @@ -110,6 +110,10 @@ let is_objc_constructor: string => bool; let is_constructor: t => bool; +/** Check if this is a constexpr function. */ +let is_constexpr: t => bool; + + /** Check if this is a Java procedure name. */ let is_java: t => bool; diff --git a/infer/src/checkers/Siof.ml b/infer/src/checkers/Siof.ml index b030a831a..b28df7233 100644 --- a/infer/src/checkers/Siof.ml +++ b/infer/src/checkers/Siof.ml @@ -27,12 +27,23 @@ module TransferFunctions (CFG : ProcCfg.S) = struct module Domain = SiofDomain type extras = ProcData.no_extras - let get_globals astate loc e = + let is_compile_time_constructed pdesc pv = + let init_pname = Pvar.get_initializer_pname pv in + match Option.map_default (Summary.read_summary pdesc) None init_pname with + | Some Domain.Bottom -> + (* we analyzed the initializer for this global and found that it doesn't require any runtime + initialization so cannot participate in SIOF *) + true + | _ -> + false + + let get_globals astate pdesc loc e = let is_dangerous_global pv = Pvar.is_global pv && not (Pvar.is_static_local pv) && not (Pvar.is_pod pv) - && not (Pvar.is_compile_constant pv) in + && not (Pvar.is_compile_constant pv) + && not (is_compile_time_constructed pdesc pv) in let globals = Exp.get_vars e |> snd |> IList.filter is_dangerous_global in if globals = [] then Domain.Bottom @@ -47,9 +58,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct globals in Domain.NonBottom globals_trace - let add_params_globals astate loc params = + let add_params_globals astate pdesc loc params = IList.map fst params - |> IList.map (fun e -> get_globals astate loc e) + |> IList.map (fun e -> get_globals astate pdesc loc e) |> IList.fold_left Domain.join astate let at_least_bottom = @@ -59,7 +70,11 @@ module TransferFunctions (CFG : ProcCfg.S) = struct | Load (_, exp, _, loc) | Store (_, _, exp, loc) | Prune (exp, loc, _, _) -> - Domain.join astate (get_globals astate loc exp) + Domain.join astate (get_globals astate pdesc loc exp) + | Call (_, Const (Cfun callee_pname), _::params_without_self, loc, _) + when Procname.is_c_method callee_pname && Procname.is_constructor callee_pname + && Procname.is_constexpr callee_pname -> + add_params_globals astate pdesc loc params_without_self | Call (_, Const (Cfun callee_pname), params, loc, _) -> let callsite = CallSite.make callee_pname loc in let callee_globals = @@ -68,13 +83,13 @@ module TransferFunctions (CFG : ProcCfg.S) = struct Domain.NonBottom (SiofTrace.with_callsite trace callsite) | _ -> Domain.Bottom in - add_params_globals astate loc params + add_params_globals astate pdesc loc params |> Domain.join callee_globals |> (* make sure it's not Bottom: we made a function call so this needs initialization *) at_least_bottom | Call (_, _, params, loc, _) -> - add_params_globals astate loc params + add_params_globals astate pdesc loc params |> (* make sure it's not Bottom: we made a function call so this needs initialization *) at_least_bottom diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index 04bc39217..45dc181a3 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -687,8 +687,8 @@ struct let mk_procname_from_cpp_method class_name method_name ?meth_decl mangled = let method_kind = match meth_decl with - | Some (Clang_ast_t.CXXConstructorDecl _) -> - Procname.CPPConstructor mangled + | Some (Clang_ast_t.CXXConstructorDecl (_, _, _, _, {xmdi_is_constexpr})) -> + Procname.CPPConstructor (mangled, xmdi_is_constexpr) | _ -> Procname.CPPMethod mangled in Procname.ObjC_Cpp diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot index 2186aa472..f41717c24 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main.cpp.dot @@ -75,21 +75,21 @@ digraph iCFG { "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" ; + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ; "std::__1::shared_ptr_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled] diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot index 2186aa472..f41717c24 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_root.cpp.dot @@ -75,21 +75,21 @@ digraph iCFG { "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" ; + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ; "std::__1::shared_ptr_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled] diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot index 2186aa472..f41717c24 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_default_symlink.cpp.dot @@ -75,21 +75,21 @@ digraph iCFG { "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" ; + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ; "std::__1::shared_ptr_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled] diff --git a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot index 2186aa472..f41717c24 100644 --- a/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot +++ b/infer/tests/build_systems/codetoanalyze/clang_translation/src/main_symlink.cpp.dot @@ -75,21 +75,21 @@ digraph iCFG { "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_3" -> "std::__1::shared_ptr_model_set(_ZNSt3__110shared_ptrIiE9model_setEPPKvS3_).c02dbe299962364cf3c5255e9c8d287d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" [label="1: Start std::__1::shared_ptr_shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 84]\n " color=yellow style=filled] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_1" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" [label="2: Exit std::__1::shared_ptr_shared_ptr \n " color=yellow style=filled] -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" [label="3: Call _fun_std::__1::shared_ptr_model_set \n n$0=*&this:int** [line 85]\n _fun_std::__1::shared_ptr_model_set(n$0:void**,null:void*) [line 85]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_2" ; -"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_2" ; +"std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" [label="4: Constructor Init \n n$1=*&this:int** [line 85]\n _fun_std::__1::std__shared_ptr_std__shared_ptr(n$1:int**) [line 84]\n n$2=*n$1:int* [line 84]\n " shape="box"] - "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev}.2e163b5142d39d575d5eeb568316078d_3" ; + "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_4" -> "std::__1::shared_ptr_shared_ptr{_ZNSt3__110shared_ptrIiEC1Ev|constexpr}.be99763d4002918a1c3f3b37430d6542_3" ; "std::__1::shared_ptr_~shared_ptr(_ZNSt3__110shared_ptrIiED0Ev).388e7f06faa2f498fd08f3d3c50ca31a_1" [label="1: Start std::__1::shared_ptr_~shared_ptr\nFormals: this:int**\nLocals: \n DECLARE_LOCALS(&return); [line 165]\n " color=yellow style=filled] diff --git a/infer/tests/clang.make b/infer/tests/clang.make index af2a37727..817c72e7a 100644 --- a/infer/tests/clang.make +++ b/infer/tests/clang.make @@ -12,7 +12,7 @@ CLEAN_EXTRA += duplicates.txt include $(TESTS_DIR)/base.make -infer-out/report.json: $(CLANG_DEPS) $(SOURCES) +infer-out/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(call silent_on_success,\ $(INFER_BIN) --check-duplicate-symbols $(INFER_OPTIONS) -a $(ANALYZER) -- clang $(CLANG_OPTIONS) $(SOURCES) 2>duplicates.txt) grep "DUPLICATE_SYMBOLS" duplicates.txt; test $$? -ne 0 diff --git a/infer/tests/codetoanalyze/cpp/checkers/Makefile b/infer/tests/codetoanalyze/cpp/checkers/Makefile index 7963c84cf..4c41574a8 100644 --- a/infer/tests/codetoanalyze/cpp/checkers/Makefile +++ b/infer/tests/codetoanalyze/cpp/checkers/Makefile @@ -23,4 +23,6 @@ SOURCES = \ siof/siof_templated.cpp \ siof/siof_different_tu.cpp \ +HEADERS = siof/siof_types.h + include $(TESTS_DIR)/clang.make diff --git a/infer/tests/codetoanalyze/cpp/checkers/siof/siof.cpp b/infer/tests/codetoanalyze/cpp/checkers/siof/siof.cpp index 063222abf..67263f60f 100644 --- a/infer/tests/codetoanalyze/cpp/checkers/siof/siof.cpp +++ b/infer/tests/codetoanalyze/cpp/checkers/siof/siof.cpp @@ -11,7 +11,6 @@ extern SomeNonPODObject extern_global_object; SomeNonPODObject global_object; - extern int access_to_non_pod(); struct SomeOtherNonPODObject { @@ -41,3 +40,10 @@ int X::static_pod_accesses_non_pod = access_to_non_pod(); // SIOF! SomeNonPODObject initWithStatic = getFunctionStaticNonPOD(); // OK SomeNonPODObject initWithGlobal = getGlobalNonPOD(); // SIOF! + +extern SomeConstexprObject& getGlobalConstexpr(); +SomeConstexprObject initWithConstexpr = getGlobalConstexpr(); + +extern SomeTemplatedConstexprObject& getGlobalTemplatedConstexpr(); +SomeTemplatedConstexprObject initWithTemplatedConstexpr = + getGlobalTemplatedConstexpr(); diff --git a/infer/tests/codetoanalyze/cpp/checkers/siof/siof_different_tu.cpp b/infer/tests/codetoanalyze/cpp/checkers/siof/siof_different_tu.cpp index 5b9a3383b..5809ad90d 100644 --- a/infer/tests/codetoanalyze/cpp/checkers/siof/siof_different_tu.cpp +++ b/infer/tests/codetoanalyze/cpp/checkers/siof/siof_different_tu.cpp @@ -26,3 +26,17 @@ SomeNonPODObject& getFunctionStaticNonPOD() { } SomeNonPODObject& getGlobalNonPOD() { return global_object2; } + +// initialise static class field +SomeConstexprObject SomeConstexprObject::instance_; + +SomeConstexprObject& getGlobalConstexpr() { + return SomeConstexprObject::singletonMethod(); +} + +// initialise static class field +template +SomeTemplatedConstexprObject SomeTemplatedConstexprObject::instance_; +SomeTemplatedConstexprObject& getGlobalTemplatedConstexpr() { + return SomeTemplatedConstexprObject::singletonMethod(); +} diff --git a/infer/tests/codetoanalyze/cpp/checkers/siof/siof_types.h b/infer/tests/codetoanalyze/cpp/checkers/siof/siof_types.h index f6a78e65b..07c520943 100644 --- a/infer/tests/codetoanalyze/cpp/checkers/siof/siof_types.h +++ b/infer/tests/codetoanalyze/cpp/checkers/siof/siof_types.h @@ -7,13 +7,50 @@ * of patent rights can be found in the PATENTS file in the same directory. */ +extern void some_undefined_function(); + struct SomeNonPODObject { virtual void some_method(); + SomeNonPODObject() { + // make constructor non-constexpr + some_undefined_function(); + } +}; + +class SomeConstexprObject { + public: + int foo; + virtual SomeConstexprObject& someMethod(); + static SomeConstexprObject instance_; + static SomeConstexprObject& singletonMethod() { + return instance_.someMethod(); + } + + private: + constexpr SomeConstexprObject() : foo(42) {} }; template struct SomeTemplatedNonPODObject { virtual T some_method(); + SomeTemplatedNonPODObject() { + // make constructor non-constexpr + some_undefined_function(); + } +}; + +template +class SomeTemplatedConstexprObject { + public: + int foo; + virtual SomeTemplatedConstexprObject& someMethod(); + static SomeTemplatedConstexprObject instance_; + static SomeTemplatedConstexprObject& singletonMethod() { + return instance_.someMethod(); + } + + private: + constexpr SomeTemplatedConstexprObject() : foo(42) {} }; int access_to_templated_non_pod(); 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 ec8c4399c..0dd421792 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/globals/global_const1.cpp.dot @@ -55,11 +55,11 @@ digraph iCFG { "X_X{_ZN1XC1Ev}.dbc1390b15606562094682699e12caba_2" [label="2: Exit X_X \n " color=yellow style=filled] -"X_X{_ZN1XC1ERKS_}.abc525d74d1815a6e1a874d1ed502de3_1" [label="1: Start X_X\nFormals: this:class X* __param_0:class X&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] +"X_X{_ZN1XC1ERKS_|constexpr}.4acd4f2317b1ef02fbc4080f85514fa3_1" [label="1: Start X_X\nFormals: this:class X* __param_0:class X&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - "X_X{_ZN1XC1ERKS_}.abc525d74d1815a6e1a874d1ed502de3_1" -> "X_X{_ZN1XC1ERKS_}.abc525d74d1815a6e1a874d1ed502de3_2" ; -"X_X{_ZN1XC1ERKS_}.abc525d74d1815a6e1a874d1ed502de3_2" [label="2: Exit X_X \n " color=yellow style=filled] + "X_X{_ZN1XC1ERKS_|constexpr}.4acd4f2317b1ef02fbc4080f85514fa3_1" -> "X_X{_ZN1XC1ERKS_|constexpr}.4acd4f2317b1ef02fbc4080f85514fa3_2" ; +"X_X{_ZN1XC1ERKS_|constexpr}.4acd4f2317b1ef02fbc4080f85514fa3_2" [label="2: Exit X_X \n " color=yellow style=filled] } diff --git a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot index 82628af41..b6a52de4e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot @@ -96,11 +96,11 @@ digraph iCFG { "A_div0(_ZN1A4div0Ev).a57f6f9d35e6a2053e6f8f5e86b8a040_3" -> "A_div0(_ZN1A4div0Ev).a57f6f9d35e6a2053e6f8f5e86b8a040_2" ; -"B_B{_ZN1BI1AEC1Ev}.8f5152d327f8fb16714da77a1cf709d7_1" [label="1: Start B_B\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] +"B_B{_ZN1BI1AEC1Ev|constexpr}.cf068a195e22b078f6ed82a38e99bad4_1" [label="1: Start B_B\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] - "B_B{_ZN1BI1AEC1Ev}.8f5152d327f8fb16714da77a1cf709d7_1" -> "B_B{_ZN1BI1AEC1Ev}.8f5152d327f8fb16714da77a1cf709d7_2" ; -"B_B{_ZN1BI1AEC1Ev}.8f5152d327f8fb16714da77a1cf709d7_2" [label="2: Exit B_B \n " color=yellow style=filled] + "B_B{_ZN1BI1AEC1Ev|constexpr}.cf068a195e22b078f6ed82a38e99bad4_1" -> "B_B{_ZN1BI1AEC1Ev|constexpr}.cf068a195e22b078f6ed82a38e99bad4_2" ; +"B_B{_ZN1BI1AEC1Ev|constexpr}.cf068a195e22b078f6ed82a38e99bad4_2" [label="2: Exit B_B \n " color=yellow style=filled] "B_div0(_ZN1BI1AE4div0Ev).f18868f324b2038b2d87c90f3ffeeee3_1" [label="1: Start B_div0\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] @@ -114,11 +114,11 @@ digraph iCFG { "B_div0(_ZN1BI1AE4div0Ev).f18868f324b2038b2d87c90f3ffeeee3_3" -> "B_div0(_ZN1BI1AE4div0Ev).f18868f324b2038b2d87c90f3ffeeee3_2" ; -"B_B{_ZN1BIiEC1Ev}.0ea2ad6596256d0d6b6107dd3d2895ef_1" [label="1: Start B_B\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] +"B_B{_ZN1BIiEC1Ev|constexpr}.e3f04c30666d48eaf0f5ef57849527bd_1" [label="1: Start B_B\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] - "B_B{_ZN1BIiEC1Ev}.0ea2ad6596256d0d6b6107dd3d2895ef_1" -> "B_B{_ZN1BIiEC1Ev}.0ea2ad6596256d0d6b6107dd3d2895ef_2" ; -"B_B{_ZN1BIiEC1Ev}.0ea2ad6596256d0d6b6107dd3d2895ef_2" [label="2: Exit B_B \n " color=yellow style=filled] + "B_B{_ZN1BIiEC1Ev|constexpr}.e3f04c30666d48eaf0f5ef57849527bd_1" -> "B_B{_ZN1BIiEC1Ev|constexpr}.e3f04c30666d48eaf0f5ef57849527bd_2" ; +"B_B{_ZN1BIiEC1Ev|constexpr}.e3f04c30666d48eaf0f5ef57849527bd_2" [label="2: Exit B_B \n " color=yellow style=filled] "B_div0(_ZN1BIiE4div0Ev).9551e764ca77ab3d3fd6584814575acf_1" [label="1: Start B_div0\nFormals: this:class B*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot index 17a5f61da..ad0cfb37e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot @@ -81,28 +81,28 @@ digraph iCFG { "iterator_operator*(_ZN8iteratordeEv).e460522f307f6432268293a6c37dd0aa_3" -> "iterator_operator*(_ZN8iteratordeEv).e460522f307f6432268293a6c37dd0aa_2" ; -"iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_1" [label="1: Start iterator_iterator\nFormals: this:class iterator* __param_0:class iterator&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] +"iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_1" [label="1: Start iterator_iterator\nFormals: this:class iterator* __param_0:class iterator&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - "iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_1" -> "iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_3" ; -"iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_2" [label="2: Exit iterator_iterator \n " color=yellow style=filled] + "iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_1" -> "iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_3" ; +"iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_2" [label="2: Exit iterator_iterator \n " color=yellow style=filled] -"iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_3" [label="3: Constructor Init \n n$0=*&this:class iterator* [line 11]\n n$1=*&__param_0:class iterator& [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int=n$2 [line 11]\n " shape="box"] +"iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_3" [label="3: Constructor Init \n n$0=*&this:class iterator* [line 11]\n n$1=*&__param_0:class iterator& [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int=n$2 [line 11]\n " shape="box"] - "iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_3" -> "iterator_iterator{_ZN8iteratorC1EOS_}.ce89d5b0065e7c4158c49d59661dc5c1_2" ; -"iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_1" [label="1: Start iterator_iterator\nFormals: this:class iterator* __param_0:class iterator&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] + "iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_3" -> "iterator_iterator{_ZN8iteratorC1EOS_|constexpr}.02bf867c5c08119ea1e4e5a49731a911_2" ; +"iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_1" [label="1: Start iterator_iterator\nFormals: this:class iterator* __param_0:class iterator&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - "iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_1" -> "iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_3" ; -"iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_2" [label="2: Exit iterator_iterator \n " color=yellow style=filled] + "iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_1" -> "iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_3" ; +"iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_2" [label="2: Exit iterator_iterator \n " color=yellow style=filled] -"iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_3" [label="3: Constructor Init \n n$0=*&this:class iterator* [line 11]\n n$1=*&__param_0:class iterator& [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int=n$2 [line 11]\n " shape="box"] +"iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_3" [label="3: Constructor Init \n n$0=*&this:class iterator* [line 11]\n n$1=*&__param_0:class iterator& [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int=n$2 [line 11]\n " shape="box"] - "iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_3" -> "iterator_iterator{_ZN8iteratorC1ERKS_}.fcda12fc9b260caa840e7342dd86ae6f_2" ; + "iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_3" -> "iterator_iterator{_ZN8iteratorC1ERKS_|constexpr}.e0826b419ded91dfb3fbf81a23936b26_2" ; "iterator_operator++(_ZN8iteratorppEv).2e1161a14150ad94339284d7de16e655_1" [label="1: Start iterator_operator++\nFormals: this:class iterator* __return_param:class iterator*\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] 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 b41881a15..cdd11da99 100644 --- a/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/conditional/binary_conditional.cpp.dot @@ -99,11 +99,11 @@ digraph iCFG { "binary_conditional::getX{d41d8cd98f00b204e9800998ecf8427e_ZN18binary_conditional4getXEv}.1a31099193fd0f833e07c4796d3b0f85_4" -> "binary_conditional::getX{d41d8cd98f00b204e9800998ecf8427e_ZN18binary_conditional4getXEv}.1a31099193fd0f833e07c4796d3b0f85_3" ; -"binary_conditional::X_X{_ZN18binary_conditional1XC1Ev}.8b205ac1bfab1089a003718675527bf2_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"binary_conditional::X_X{_ZN18binary_conditional1XC1Ev|constexpr}.43501b0c5bee4cc66b4a4bdd3e86bd8b_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "binary_conditional::X_X{_ZN18binary_conditional1XC1Ev}.8b205ac1bfab1089a003718675527bf2_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1Ev}.8b205ac1bfab1089a003718675527bf2_2" ; -"binary_conditional::X_X{_ZN18binary_conditional1XC1Ev}.8b205ac1bfab1089a003718675527bf2_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] + "binary_conditional::X_X{_ZN18binary_conditional1XC1Ev|constexpr}.43501b0c5bee4cc66b4a4bdd3e86bd8b_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1Ev|constexpr}.43501b0c5bee4cc66b4a4bdd3e86bd8b_2" ; +"binary_conditional::X_X{_ZN18binary_conditional1XC1Ev|constexpr}.43501b0c5bee4cc66b4a4bdd3e86bd8b_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] "binary_conditional::X_operator_bool(_ZN18binary_conditional1XcvbEv).ac4783c70fd7f052bb11fb683aec2300_1" [label="1: Start binary_conditional::X_operator_bool\nFormals: this:class binary_conditional::X*\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] @@ -117,18 +117,18 @@ digraph iCFG { "binary_conditional::X_operator_bool(_ZN18binary_conditional1XcvbEv).ac4783c70fd7f052bb11fb683aec2300_3" -> "binary_conditional::X_operator_bool(_ZN18binary_conditional1XcvbEv).ac4783c70fd7f052bb11fb683aec2300_2" ; -"binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_}.4bd5b5f6d082e3a4895874a95aa2bc28_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X* __param_0:class binary_conditional::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_|constexpr}.c4d321c7f5c708d16190fb6820e885f9_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X* __param_0:class binary_conditional::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_}.4bd5b5f6d082e3a4895874a95aa2bc28_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_}.4bd5b5f6d082e3a4895874a95aa2bc28_2" ; -"binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_}.4bd5b5f6d082e3a4895874a95aa2bc28_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] + "binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_|constexpr}.c4d321c7f5c708d16190fb6820e885f9_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_|constexpr}.c4d321c7f5c708d16190fb6820e885f9_2" ; +"binary_conditional::X_X{_ZN18binary_conditional1XC1EOS0_|constexpr}.c4d321c7f5c708d16190fb6820e885f9_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] -"binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_}.0e1cd4b0d7172e9f75221a1b50d4832a_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X* __param_0:class binary_conditional::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_|constexpr}.73073fa41717e4c98ac15cab51af655b_1" [label="1: Start binary_conditional::X_X\nFormals: this:class binary_conditional::X* __param_0:class binary_conditional::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_}.0e1cd4b0d7172e9f75221a1b50d4832a_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_}.0e1cd4b0d7172e9f75221a1b50d4832a_2" ; -"binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_}.0e1cd4b0d7172e9f75221a1b50d4832a_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] + "binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_|constexpr}.73073fa41717e4c98ac15cab51af655b_1" -> "binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_|constexpr}.73073fa41717e4c98ac15cab51af655b_2" ; +"binary_conditional::X_X{_ZN18binary_conditional1XC1ERKS0_|constexpr}.73073fa41717e4c98ac15cab51af655b_2" [label="2: Exit binary_conditional::X_X \n " color=yellow style=filled] } diff --git a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot index 86ab03acd..d7e0f0a9d 100644 --- a/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/constructors/constructor_array.cpp.dot @@ -71,17 +71,17 @@ digraph iCFG { "Person_Person{_ZN6PersonC1Ev}.eae7ac90d0b106ac1ffce8f205a2d898_2" [label="2: Exit Person_Person \n " color=yellow style=filled] -"Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_1" [label="1: Start Person_Person\nFormals: this:class Person* __param_0:class Person&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] +"Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_1" [label="1: Start Person_Person\nFormals: this:class Person* __param_0:class Person&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - "Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_1" -> "Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_3" ; -"Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_2" [label="2: Exit Person_Person \n " color=yellow style=filled] + "Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_1" -> "Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_3" ; +"Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_2" [label="2: Exit Person_Person \n " color=yellow style=filled] -"Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_3" [label="3: Constructor Init \n n$0=*&this:class Person* [line 10]\n n$1=*&__param_0:class Person& [line 10]\n n$2=*n$1.x:int [line 10]\n *n$0.x:int=n$2 [line 10]\n " shape="box"] +"Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_3" [label="3: Constructor Init \n n$0=*&this:class Person* [line 10]\n n$1=*&__param_0:class Person& [line 10]\n n$2=*n$1.x:int [line 10]\n *n$0.x:int=n$2 [line 10]\n " shape="box"] - "Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_3" -> "Person_Person{_ZN6PersonC1EOS_}.6d4e3106e5a54c5fcbdd4905bee9b887_2" ; + "Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_3" -> "Person_Person{_ZN6PersonC1EOS_|constexpr}.9c3361ee83cd8f234fb4a21cc7f7685e_2" ; "Person_Person{_ZN6PersonC1Ei}.2819442115554db893a15b95877c8b8d_1" [label="1: Start Person_Person\nFormals: this:class Person* i:int\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] @@ -100,19 +100,19 @@ digraph iCFG { "Z_Z{_ZN1ZC1Ev}.e5db815c377ac8d89bbc83caf274d4d3_2" [label="2: Exit Z_Z \n " color=yellow style=filled] -"Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_1" [label="1: Start Z_Z\nFormals: this:class Z* __param_0:class Z&\nLocals: \n DECLARE_LOCALS(&return); [line 27]\n " color=yellow style=filled] +"Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_1" [label="1: Start Z_Z\nFormals: this:class Z* __param_0:class Z&\nLocals: \n DECLARE_LOCALS(&return); [line 27]\n " color=yellow style=filled] - "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_1" -> "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_4" ; -"Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_2" [label="2: Exit Z_Z \n " color=yellow style=filled] + "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_1" -> "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_4" ; +"Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_2" [label="2: Exit Z_Z \n " color=yellow style=filled] -"Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_3" [label="3: Constructor Init \n n$0=*&this:class Z* [line 27]\n n$1=*&__param_0:class Z& [line 27]\n n$2=*n$1.b:int [line 27]\n *n$0.b:int=n$2 [line 27]\n " shape="box"] +"Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_3" [label="3: Constructor Init \n n$0=*&this:class Z* [line 27]\n n$1=*&__param_0:class Z& [line 27]\n n$2=*n$1.b:int [line 27]\n *n$0.b:int=n$2 [line 27]\n " shape="box"] - "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_3" -> "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_2" ; -"Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_4" [label="4: Constructor Init \n n$3=*&this:class Z* [line 27]\n n$4=*&__param_0:class Z& [line 27]\n n$5=*n$4.a:int [line 27]\n *n$3.a:int=n$5 [line 27]\n " shape="box"] + "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_3" -> "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_2" ; +"Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_4" [label="4: Constructor Init \n n$3=*&this:class Z* [line 27]\n n$4=*&__param_0:class Z& [line 27]\n n$5=*n$4.a:int [line 27]\n *n$3.a:int=n$5 [line 27]\n " shape="box"] - "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_4" -> "Z_Z{_ZN1ZC1ERKS_}.123cfb51e40551ce9740cbf4b98a93b1_3" ; + "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_4" -> "Z_Z{_ZN1ZC1ERKS_|constexpr}.a65ace47d546d197806dd3efa7b31b62_3" ; } 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 c8c626a5a..be6ee32f0 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 @@ -194,28 +194,28 @@ digraph iCFG { "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1Ev}.43eb711dd0840594dd55a622c469a871_2" [label="2: Exit copy_move_constructor::X_X \n " color=yellow style=filled] -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_1" [label="1: Start copy_move_constructor::X_X\nFormals: this:class copy_move_constructor::X* __param_0:class copy_move_constructor::X&\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_1" [label="1: Start copy_move_constructor::X_X\nFormals: this:class copy_move_constructor::X* __param_0:class copy_move_constructor::X&\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] - "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_1" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_3" ; -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_2" [label="2: Exit copy_move_constructor::X_X \n " color=yellow style=filled] + "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_1" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_3" ; +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_2" [label="2: Exit copy_move_constructor::X_X \n " color=yellow style=filled] -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::X* [line 15]\n n$1=*&__param_0:class copy_move_constructor::X& [line 15]\n n$2=*n$1.f:int [line 15]\n *n$0.f:int=n$2 [line 15]\n " shape="box"] +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::X* [line 15]\n n$1=*&__param_0:class copy_move_constructor::X& [line 15]\n n$2=*n$1.f:int [line 15]\n *n$0.f:int=n$2 [line 15]\n " shape="box"] - "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_3" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_}.e24ff40e22addf38aee51c3eff30d413_2" ; -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_1" [label="1: Start copy_move_constructor::X_X\nFormals: this:class copy_move_constructor::X* __param_0:class copy_move_constructor::X&\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] + "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_3" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1EOS0_|constexpr}.9eb4781e987d95e01d1a0cec0b5428f8_2" ; +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_1" [label="1: Start copy_move_constructor::X_X\nFormals: this:class copy_move_constructor::X* __param_0:class copy_move_constructor::X&\nLocals: \n DECLARE_LOCALS(&return); [line 15]\n " color=yellow style=filled] - "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_1" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_3" ; -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_2" [label="2: Exit copy_move_constructor::X_X \n " color=yellow style=filled] + "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_1" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_3" ; +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_2" [label="2: Exit copy_move_constructor::X_X \n " color=yellow style=filled] -"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::X* [line 15]\n n$1=*&__param_0:class copy_move_constructor::X& [line 15]\n n$2=*n$1.f:int [line 15]\n *n$0.f:int=n$2 [line 15]\n " shape="box"] +"copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::X* [line 15]\n n$1=*&__param_0:class copy_move_constructor::X& [line 15]\n n$2=*n$1.f:int [line 15]\n *n$0.f:int=n$2 [line 15]\n " shape="box"] - "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_3" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_}.938921af7dd4069cf40dd76f4a734a03_2" ; + "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_3" -> "copy_move_constructor::X_X{_ZN21copy_move_constructor1XC1ERKS0_|constexpr}.3e5913d296c76710a67f471132859352_2" ; "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1Ev}.eee3477952b6b0c121f13c26764fcc89_1" [label="1: Start copy_move_constructor::Y_Y\nFormals: this:class copy_move_constructor::Y*\nLocals: \n DECLARE_LOCALS(&return); [line 23]\n " color=yellow style=filled] @@ -223,17 +223,17 @@ digraph iCFG { "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1Ev}.eee3477952b6b0c121f13c26764fcc89_2" [label="2: Exit copy_move_constructor::Y_Y \n " color=yellow style=filled] -"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_1" [label="1: Start copy_move_constructor::Y_Y\nFormals: this:class copy_move_constructor::Y* y:class copy_move_constructor::Y&\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] +"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_1" [label="1: Start copy_move_constructor::Y_Y\nFormals: this:class copy_move_constructor::Y* y:class copy_move_constructor::Y&\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] - "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_1" -> "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_3" ; -"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_2" [label="2: Exit copy_move_constructor::Y_Y \n " color=yellow style=filled] + "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_1" -> "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_3" ; +"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_2" [label="2: Exit copy_move_constructor::Y_Y \n " color=yellow style=filled] -"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::Y* [line 24]\n n$1=*&y:class copy_move_constructor::Y& [line 24]\n n$2=*n$1.f:int [line 24]\n *n$0.f:int=n$2 [line 24]\n " shape="box"] +"copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_3" [label="3: Constructor Init \n n$0=*&this:class copy_move_constructor::Y* [line 24]\n n$1=*&y:class copy_move_constructor::Y& [line 24]\n n$2=*n$1.f:int [line 24]\n *n$0.f:int=n$2 [line 24]\n " shape="box"] - "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_3" -> "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_}.a1bb59feb4c97e47fb0df8989fc1ca51_2" ; + "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_3" -> "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1ERKS0_|constexpr}.4b714d20214f77c3c77b0316ea46ba2a_2" ; "copy_move_constructor::Y_Y{_ZN21copy_move_constructor1YC1EOKS0_}.5f8ffb0efd14c4e2a52eda68cb73ab09_1" [label="1: Start copy_move_constructor::Y_Y\nFormals: this:class copy_move_constructor::Y* y:class copy_move_constructor::Y&\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot index d13335a77..3783ed8dc 100644 --- a/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/lambda/lambda1.cpp.dot @@ -64,11 +64,11 @@ digraph iCFG { "bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()(_ZZ3barvENK3$_0clEv).cb0ea2b31d556c91fda839346a13c429_4" -> "bar::lambda_shared_lambda_lambda1.cpp:11:15_operator()(_ZZ3barvENK3$_0clEv).cb0ea2b31d556c91fda839346a13c429_3" ; -"bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_}.6a9e9fc47abfe378dd0d5c66eaa11486_1" [label="1: Start bar::lambda_shared_lambda_lambda1.cpp:11:15_\nFormals: this:class bar::lambda_shared_lambda_lambda1.cpp:11:15* __param_0:class bar::lambda_shared_lambda_lambda1.cpp:11:15&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] +"bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_|constexpr}.68f000ed84f149c35db36dbee322ee91_1" [label="1: Start bar::lambda_shared_lambda_lambda1.cpp:11:15_\nFormals: this:class bar::lambda_shared_lambda_lambda1.cpp:11:15* __param_0:class bar::lambda_shared_lambda_lambda1.cpp:11:15&\nLocals: \n DECLARE_LOCALS(&return); [line 11]\n " color=yellow style=filled] - "bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_}.6a9e9fc47abfe378dd0d5c66eaa11486_1" -> "bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_}.6a9e9fc47abfe378dd0d5c66eaa11486_2" ; -"bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_}.6a9e9fc47abfe378dd0d5c66eaa11486_2" [label="2: Exit bar::lambda_shared_lambda_lambda1.cpp:11:15_ \n " color=yellow style=filled] + "bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_|constexpr}.68f000ed84f149c35db36dbee322ee91_1" -> "bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_|constexpr}.68f000ed84f149c35db36dbee322ee91_2" ; +"bar::lambda_shared_lambda_lambda1.cpp:11:15_{_ZZ3barvEN3$_0C1EOS_|constexpr}.68f000ed84f149c35db36dbee322ee91_2" [label="2: Exit bar::lambda_shared_lambda_lambda1.cpp:11:15_ \n " color=yellow style=filled] "foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()(_ZZ3foovENK3$_1clEv).985fe31737ac21d3fc164c617feba422_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:19:17*\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] @@ -82,18 +82,18 @@ digraph iCFG { "foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()(_ZZ3foovENK3$_1clEv).985fe31737ac21d3fc164c617feba422_3" -> "foo::lambda_shared_lambda_lambda1.cpp:19:17_operator()(_ZZ3foovENK3$_1clEv).985fe31737ac21d3fc164c617feba422_2" ; -"foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_}.5561ce7b5dc8b401fdf94ad612389a2a_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:19:17_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:19:17* __param_0:class foo::lambda_shared_lambda_lambda1.cpp:19:17&\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] +"foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_|constexpr}.25ecbe4cd4358789b7faa260bac47ee9_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:19:17_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:19:17* __param_0:class foo::lambda_shared_lambda_lambda1.cpp:19:17&\nLocals: \n DECLARE_LOCALS(&return); [line 19]\n " color=yellow style=filled] - "foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_}.5561ce7b5dc8b401fdf94ad612389a2a_1" -> "foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_}.5561ce7b5dc8b401fdf94ad612389a2a_2" ; -"foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_}.5561ce7b5dc8b401fdf94ad612389a2a_2" [label="2: Exit foo::lambda_shared_lambda_lambda1.cpp:19:17_ \n " color=yellow style=filled] + "foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_|constexpr}.25ecbe4cd4358789b7faa260bac47ee9_1" -> "foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_|constexpr}.25ecbe4cd4358789b7faa260bac47ee9_2" ; +"foo::lambda_shared_lambda_lambda1.cpp:19:17_{_ZZ3foovEN3$_1C1EOS_|constexpr}.25ecbe4cd4358789b7faa260bac47ee9_2" [label="2: Exit foo::lambda_shared_lambda_lambda1.cpp:19:17_ \n " color=yellow style=filled] -"foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_}.0e1564c2cc993b8beca9a7d9955e04a5_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:20:12_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:20:12* __param_0:class foo::lambda_shared_lambda_lambda1.cpp:20:12&\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] +"foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_|constexpr}.14018904662c08772f67990b03baa6c4_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:20:12_\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:20:12* __param_0:class foo::lambda_shared_lambda_lambda1.cpp:20:12&\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] - "foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_}.0e1564c2cc993b8beca9a7d9955e04a5_1" -> "foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_}.0e1564c2cc993b8beca9a7d9955e04a5_2" ; -"foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_}.0e1564c2cc993b8beca9a7d9955e04a5_2" [label="2: Exit foo::lambda_shared_lambda_lambda1.cpp:20:12_ \n " color=yellow style=filled] + "foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_|constexpr}.14018904662c08772f67990b03baa6c4_1" -> "foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_|constexpr}.14018904662c08772f67990b03baa6c4_2" ; +"foo::lambda_shared_lambda_lambda1.cpp:20:12_{_ZZ3foovEN3$_2C1EOS_|constexpr}.14018904662c08772f67990b03baa6c4_2" [label="2: Exit foo::lambda_shared_lambda_lambda1.cpp:20:12_ \n " color=yellow style=filled] "foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(_ZZ3foovENK3$_2clEi).83f062e992857d1735d2bdb1eb5970f7_1" [label="1: Start foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()\nFormals: this:class foo::lambda_shared_lambda_lambda1.cpp:20:12* i:int\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] @@ -107,11 +107,11 @@ digraph iCFG { "foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(_ZZ3foovENK3$_2clEi).83f062e992857d1735d2bdb1eb5970f7_3" -> "foo::lambda_shared_lambda_lambda1.cpp:20:12_operator()(_ZZ3foovENK3$_2clEi).83f062e992857d1735d2bdb1eb5970f7_2" ; -"fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_}.53c636602c55e8b65c0551285317a32e_1" [label="1: Start fooOK::lambda_shared_lambda_lambda1.cpp:26:12_\nFormals: this:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12* __param_0:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12&\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] +"fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_|constexpr}.e40f482f89dbbcf3e614ef60cf608ecb_1" [label="1: Start fooOK::lambda_shared_lambda_lambda1.cpp:26:12_\nFormals: this:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12* __param_0:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12&\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] - "fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_}.53c636602c55e8b65c0551285317a32e_1" -> "fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_}.53c636602c55e8b65c0551285317a32e_2" ; -"fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_}.53c636602c55e8b65c0551285317a32e_2" [label="2: Exit fooOK::lambda_shared_lambda_lambda1.cpp:26:12_ \n " color=yellow style=filled] + "fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_|constexpr}.e40f482f89dbbcf3e614ef60cf608ecb_1" -> "fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_|constexpr}.e40f482f89dbbcf3e614ef60cf608ecb_2" ; +"fooOK::lambda_shared_lambda_lambda1.cpp:26:12_{_ZZ5fooOKvEN3$_3C1EOS_|constexpr}.e40f482f89dbbcf3e614ef60cf608ecb_2" [label="2: Exit fooOK::lambda_shared_lambda_lambda1.cpp:26:12_ \n " color=yellow style=filled] "fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()(_ZZ5fooOKvENK3$_3clEi).28114dfeeb5c9cb201f2f32c650e906c_1" [label="1: Start fooOK::lambda_shared_lambda_lambda1.cpp:26:12_operator()\nFormals: this:class fooOK::lambda_shared_lambda_lambda1.cpp:26:12* i:int\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] 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 4bfcf8f7d..df468e8b2 100644 --- a/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/methods/return_struct.cpp.dot @@ -37,15 +37,15 @@ digraph iCFG { "X_X{_ZN1XC1Ev}.dbc1390b15606562094682699e12caba_2" [label="2: Exit X_X \n " color=yellow style=filled] -"X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_1" [label="1: Start X_X\nFormals: this:class X* __param_0:class X&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] +"X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_1" [label="1: Start X_X\nFormals: this:class X* __param_0:class X&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - "X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_1" -> "X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_3" ; -"X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_2" [label="2: Exit X_X \n " color=yellow style=filled] + "X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_1" -> "X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_3" ; +"X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_2" [label="2: Exit X_X \n " color=yellow style=filled] -"X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_3" [label="3: Constructor Init \n n$0=*&this:class X* [line 10]\n n$1=*&__param_0:class X& [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int=n$2 [line 10]\n " shape="box"] +"X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_3" [label="3: Constructor Init \n n$0=*&this:class X* [line 10]\n n$1=*&__param_0:class X& [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int=n$2 [line 10]\n " shape="box"] - "X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_3" -> "X_X{_ZN1XC1EOS_}.886a759a564f2c7a7ef4e4bdc83fae77_2" ; + "X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_3" -> "X_X{_ZN1XC1EOS_|constexpr}.3e060441598e964a9586ee2ad07c20c6_2" ; } 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 f1023fdc9..76bbc2618 100644 --- a/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/reference/reference_field.cpp.dot @@ -442,15 +442,15 @@ digraph iCFG { "reference_field::X_X{_ZN15reference_field1XC1Ev}.d92592407d19483b6f2df6b27aa0ca25_2" [label="2: Exit reference_field::X_X \n " color=yellow style=filled] -"reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_1" [label="1: Start reference_field::X_X\nFormals: this:class reference_field::X* __param_0:class reference_field::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_1" [label="1: Start reference_field::X_X\nFormals: this:class reference_field::X* __param_0:class reference_field::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_1" -> "reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_3" ; -"reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_2" [label="2: Exit reference_field::X_X \n " color=yellow style=filled] + "reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_1" -> "reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_3" ; +"reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_2" [label="2: Exit reference_field::X_X \n " color=yellow style=filled] -"reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_3" [label="3: Constructor Init \n n$0=*&this:class reference_field::X* [line 12]\n n$1=*&__param_0:class reference_field::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] +"reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_3" [label="3: Constructor Init \n n$0=*&this:class reference_field::X* [line 12]\n n$1=*&__param_0:class reference_field::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] - "reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_3" -> "reference_field::X_X{_ZN15reference_field1XC1ERKS0_}.a58ad170d580c772bddf4fd30ed8254d_2" ; + "reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_3" -> "reference_field::X_X{_ZN15reference_field1XC1ERKS0_|constexpr}.5eabe08f6a2841b87d515547682ba2e6_2" ; } diff --git a/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot index b82f49ff9..2477b1b47 100644 --- a/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/templates/function.cpp.dot @@ -112,11 +112,11 @@ digraph iCFG { "function::div1_create_and_get_val{d41d8cd98f00b204e9800998ecf8427e_ZN8function23div1_create_and_get_.196671f44f478621c0c5fce9d52e470d_3" -> "function::div1_create_and_get_val{d41d8cd98f00b204e9800998ecf8427e_ZN8function23div1_create_and_get_.196671f44f478621c0c5fce9d52e470d_2" ; -"function::X1_X1{_ZN8function2X1C1Ev}.2af0b35268d3226ea8d5932e7ebc85b9_1" [label="1: Start function::X1_X1\nFormals: this:class function::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"function::X1_X1{_ZN8function2X1C1Ev|constexpr}.d70114d1cc16d2814756f7458be1da00_1" [label="1: Start function::X1_X1\nFormals: this:class function::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "function::X1_X1{_ZN8function2X1C1Ev}.2af0b35268d3226ea8d5932e7ebc85b9_1" -> "function::X1_X1{_ZN8function2X1C1Ev}.2af0b35268d3226ea8d5932e7ebc85b9_2" ; -"function::X1_X1{_ZN8function2X1C1Ev}.2af0b35268d3226ea8d5932e7ebc85b9_2" [label="2: Exit function::X1_X1 \n " color=yellow style=filled] + "function::X1_X1{_ZN8function2X1C1Ev|constexpr}.d70114d1cc16d2814756f7458be1da00_1" -> "function::X1_X1{_ZN8function2X1C1Ev|constexpr}.d70114d1cc16d2814756f7458be1da00_2" ; +"function::X1_X1{_ZN8function2X1C1Ev|constexpr}.d70114d1cc16d2814756f7458be1da00_2" [label="2: Exit function::X1_X1 \n " color=yellow style=filled] "function::X1_getVal(_ZN8function2X16getValEv).e9f63e9946adfb180c8a1aa70b5f67be_1" [label="1: Start function::X1_getVal\nFormals: this:class function::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] @@ -141,11 +141,11 @@ digraph iCFG { "function::X2_getVal(_ZN8function2X26getValEv).08a78a7624b8c528a9115d6545ca7d87_3" -> "function::X2_getVal(_ZN8function2X26getValEv).08a78a7624b8c528a9115d6545ca7d87_2" ; -"function::X3_X3{_ZN8function2X3C1Ev}.8dd5b7e648f6e1760b4365f3e42720db_1" [label="1: Start function::X3_X3\nFormals: this:class function::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] +"function::X3_X3{_ZN8function2X3C1Ev|constexpr}.dd49de90bff9fe17df24a39f37fbfb5e_1" [label="1: Start function::X3_X3\nFormals: this:class function::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] - "function::X3_X3{_ZN8function2X3C1Ev}.8dd5b7e648f6e1760b4365f3e42720db_1" -> "function::X3_X3{_ZN8function2X3C1Ev}.8dd5b7e648f6e1760b4365f3e42720db_2" ; -"function::X3_X3{_ZN8function2X3C1Ev}.8dd5b7e648f6e1760b4365f3e42720db_2" [label="2: Exit function::X3_X3 \n " color=yellow style=filled] + "function::X3_X3{_ZN8function2X3C1Ev|constexpr}.dd49de90bff9fe17df24a39f37fbfb5e_1" -> "function::X3_X3{_ZN8function2X3C1Ev|constexpr}.dd49de90bff9fe17df24a39f37fbfb5e_2" ; +"function::X3_X3{_ZN8function2X3C1Ev|constexpr}.dd49de90bff9fe17df24a39f37fbfb5e_2" [label="2: Exit function::X3_X3 \n " color=yellow style=filled] "function::X3_get(_ZN8function2X33getEv).36ddcd58af5a86b9c0b85830a216fad3_1" [label="1: Start function::X3_get\nFormals: this:class function::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot index b9f6bc660..2db553645 100644 --- a/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/templates/method.cpp.dot @@ -130,11 +130,11 @@ digraph iCFG { "method::div1_getter_templ2{d41d8cd98f00b204e9800998ecf8427e_ZN6method18div1_getter_templ2Ev}.e7b161dce40ef80e85fd9f2ccc57e6ec_6" -> "method::div1_getter_templ2{d41d8cd98f00b204e9800998ecf8427e_ZN6method18div1_getter_templ2Ev}.e7b161dce40ef80e85fd9f2ccc57e6ec_5" ; -"method::Getter_Getter{_ZN6method6GetterC1Ev}.da94695cba54f2d041689230d7249330_1" [label="1: Start method::Getter_Getter\nFormals: this:class method::Getter*\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] +"method::Getter_Getter{_ZN6method6GetterC1Ev|constexpr}.d128e36e3b02a438691df8243919105b_1" [label="1: Start method::Getter_Getter\nFormals: this:class method::Getter*\nLocals: \n DECLARE_LOCALS(&return); [line 24]\n " color=yellow style=filled] - "method::Getter_Getter{_ZN6method6GetterC1Ev}.da94695cba54f2d041689230d7249330_1" -> "method::Getter_Getter{_ZN6method6GetterC1Ev}.da94695cba54f2d041689230d7249330_2" ; -"method::Getter_Getter{_ZN6method6GetterC1Ev}.da94695cba54f2d041689230d7249330_2" [label="2: Exit method::Getter_Getter \n " color=yellow style=filled] + "method::Getter_Getter{_ZN6method6GetterC1Ev|constexpr}.d128e36e3b02a438691df8243919105b_1" -> "method::Getter_Getter{_ZN6method6GetterC1Ev|constexpr}.d128e36e3b02a438691df8243919105b_2" ; +"method::Getter_Getter{_ZN6method6GetterC1Ev|constexpr}.d128e36e3b02a438691df8243919105b_2" [label="2: Exit method::Getter_Getter \n " color=yellow style=filled] "method::Getter_get(_ZN6method6Getter3getINS_2X1EEEiRT_).80d274ae0eea8a42827f3ee5d82d22ec_1" [label="1: Start method::Getter_get\nFormals: this:class method::Getter* s:class method::X1&\nLocals: \n DECLARE_LOCALS(&return); [line 26]\n " color=yellow style=filled] @@ -159,11 +159,11 @@ digraph iCFG { "method::Getter_get(_ZN6method6Getter3getINS_2X2EEEiRT_).f1459c43231792fae979e813829e9a89_3" -> "method::Getter_get(_ZN6method6Getter3getINS_2X2EEEiRT_).f1459c43231792fae979e813829e9a89_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev}.437eaf33f694c0d050cfba2776c18593_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev|constexpr}.99cb20fdc45ff99a79df49aaa384be93_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] - "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev}.437eaf33f694c0d050cfba2776c18593_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev}.437eaf33f694c0d050cfba2776c18593_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev}.437eaf33f694c0d050cfba2776c18593_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] + "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev|constexpr}.99cb20fdc45ff99a79df49aaa384be93_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev|constexpr}.99cb20fdc45ff99a79df49aaa384be93_2" ; +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X1EEC1Ev|constexpr}.99cb20fdc45ff99a79df49aaa384be93_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X1EE3getIS1_EEiRS1_RT_).cfdb3dd8a7f15c49f42389f94b3f8bc7_1" [label="1: Start method::GetterTempl_get\nFormals: this:class method::GetterTempl* t:class method::X1& s:class method::X1&\nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] @@ -177,11 +177,11 @@ digraph iCFG { "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X1EE3getIS1_EEiRS1_RT_).cfdb3dd8a7f15c49f42389f94b3f8bc7_3" -> "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X1EE3getIS1_EEiRS1_RT_).cfdb3dd8a7f15c49f42389f94b3f8bc7_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev}.f096fcbcaf25ca13b754a9505447ff1c_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev|constexpr}.010694f20681bb0e41c88279a8b1dea2_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] - "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev}.f096fcbcaf25ca13b754a9505447ff1c_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev}.f096fcbcaf25ca13b754a9505447ff1c_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev}.f096fcbcaf25ca13b754a9505447ff1c_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] + "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev|constexpr}.010694f20681bb0e41c88279a8b1dea2_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev|constexpr}.010694f20681bb0e41c88279a8b1dea2_2" ; +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X2EEC1Ev|constexpr}.010694f20681bb0e41c88279a8b1dea2_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X2EE3getINS_2X1EEEiRS1_RT_).50eaec9bda9895bdc81a6c246d9ea459_1" [label="1: Start method::GetterTempl_get\nFormals: this:class method::GetterTempl* t:class method::X2& s:class method::X1&\nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] @@ -206,11 +206,11 @@ digraph iCFG { "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X2EE3getIS1_EEiRS1_RT_).1ed26b1d272224ecb2da552b376bc478_3" -> "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X2EE3getIS1_EEiRS1_RT_).1ed26b1d272224ecb2da552b376bc478_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev}.456ed7970a3c5fb7ada2553bbce85a95_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev|constexpr}.fe29dc8f5882f416cccaa3bd07be8d4d_1" [label="1: Start method::GetterTempl_GetterTempl\nFormals: this:class method::GetterTempl*\nLocals: \n DECLARE_LOCALS(&return); [line 32]\n " color=yellow style=filled] - "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev}.456ed7970a3c5fb7ada2553bbce85a95_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev}.456ed7970a3c5fb7ada2553bbce85a95_2" ; -"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev}.456ed7970a3c5fb7ada2553bbce85a95_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] + "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev|constexpr}.fe29dc8f5882f416cccaa3bd07be8d4d_1" -> "method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev|constexpr}.fe29dc8f5882f416cccaa3bd07be8d4d_2" ; +"method::GetterTempl_GetterTempl{_ZN6method11GetterTemplINS_2X3EEC1Ev|constexpr}.fe29dc8f5882f416cccaa3bd07be8d4d_2" [label="2: Exit method::GetterTempl_GetterTempl \n " color=yellow style=filled] "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X3EE3getINS_2X2EEEiRS1_RT_).d93b4f2835d5b2fd36296c63e70f58c2_1" [label="1: Start method::GetterTempl_get\nFormals: this:class method::GetterTempl* t:class method::X3& s:class method::X2&\nLocals: \n DECLARE_LOCALS(&return); [line 34]\n " color=yellow style=filled] @@ -224,11 +224,11 @@ digraph iCFG { "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X3EE3getINS_2X2EEEiRS1_RT_).d93b4f2835d5b2fd36296c63e70f58c2_3" -> "method::GetterTempl_get(_ZN6method11GetterTemplINS_2X3EE3getINS_2X2EEEiRS1_RT_).d93b4f2835d5b2fd36296c63e70f58c2_2" ; -"method::X1_X1{_ZN6method2X1C1Ev}.8cb38ad325fedb5620011ba6bd7680c1_1" [label="1: Start method::X1_X1\nFormals: this:class method::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"method::X1_X1{_ZN6method2X1C1Ev|constexpr}.5c9da210984420e58374ce0e958b18be_1" [label="1: Start method::X1_X1\nFormals: this:class method::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "method::X1_X1{_ZN6method2X1C1Ev}.8cb38ad325fedb5620011ba6bd7680c1_1" -> "method::X1_X1{_ZN6method2X1C1Ev}.8cb38ad325fedb5620011ba6bd7680c1_2" ; -"method::X1_X1{_ZN6method2X1C1Ev}.8cb38ad325fedb5620011ba6bd7680c1_2" [label="2: Exit method::X1_X1 \n " color=yellow style=filled] + "method::X1_X1{_ZN6method2X1C1Ev|constexpr}.5c9da210984420e58374ce0e958b18be_1" -> "method::X1_X1{_ZN6method2X1C1Ev|constexpr}.5c9da210984420e58374ce0e958b18be_2" ; +"method::X1_X1{_ZN6method2X1C1Ev|constexpr}.5c9da210984420e58374ce0e958b18be_2" [label="2: Exit method::X1_X1 \n " color=yellow style=filled] "method::X1_get(_ZN6method2X13getEv).c19bee41d10fec73ba5982eab7aff9bc_1" [label="1: Start method::X1_get\nFormals: this:class method::X1*\nLocals: \n DECLARE_LOCALS(&return); [line 13]\n " color=yellow style=filled] @@ -242,11 +242,11 @@ digraph iCFG { "method::X1_get(_ZN6method2X13getEv).c19bee41d10fec73ba5982eab7aff9bc_3" -> "method::X1_get(_ZN6method2X13getEv).c19bee41d10fec73ba5982eab7aff9bc_2" ; -"method::X2_X2{_ZN6method2X2C1Ev}.0e26302c6141b4417297e231825a8f30_1" [label="1: Start method::X2_X2\nFormals: this:class method::X2*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] +"method::X2_X2{_ZN6method2X2C1Ev|constexpr}.2cdd5e120ff21c2501fa0bb4e9b5fc0a_1" [label="1: Start method::X2_X2\nFormals: this:class method::X2*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] - "method::X2_X2{_ZN6method2X2C1Ev}.0e26302c6141b4417297e231825a8f30_1" -> "method::X2_X2{_ZN6method2X2C1Ev}.0e26302c6141b4417297e231825a8f30_2" ; -"method::X2_X2{_ZN6method2X2C1Ev}.0e26302c6141b4417297e231825a8f30_2" [label="2: Exit method::X2_X2 \n " color=yellow style=filled] + "method::X2_X2{_ZN6method2X2C1Ev|constexpr}.2cdd5e120ff21c2501fa0bb4e9b5fc0a_1" -> "method::X2_X2{_ZN6method2X2C1Ev|constexpr}.2cdd5e120ff21c2501fa0bb4e9b5fc0a_2" ; +"method::X2_X2{_ZN6method2X2C1Ev|constexpr}.2cdd5e120ff21c2501fa0bb4e9b5fc0a_2" [label="2: Exit method::X2_X2 \n " color=yellow style=filled] "method::X2_get(_ZN6method2X23getEv).3f95c152d065b47a66bdd4899bf84447_1" [label="1: Start method::X2_get\nFormals: this:class method::X2*\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] @@ -260,11 +260,11 @@ digraph iCFG { "method::X2_get(_ZN6method2X23getEv).3f95c152d065b47a66bdd4899bf84447_3" -> "method::X2_get(_ZN6method2X23getEv).3f95c152d065b47a66bdd4899bf84447_2" ; -"method::X3_X3{_ZN6method2X3C1Ev}.4a21083a9d67665819c3bb8a34a23eb1_1" [label="1: Start method::X3_X3\nFormals: this:class method::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] +"method::X3_X3{_ZN6method2X3C1Ev|constexpr}.30edcbb25b963828789ed90cc7bb6dfa_1" [label="1: Start method::X3_X3\nFormals: this:class method::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 20]\n " color=yellow style=filled] - "method::X3_X3{_ZN6method2X3C1Ev}.4a21083a9d67665819c3bb8a34a23eb1_1" -> "method::X3_X3{_ZN6method2X3C1Ev}.4a21083a9d67665819c3bb8a34a23eb1_2" ; -"method::X3_X3{_ZN6method2X3C1Ev}.4a21083a9d67665819c3bb8a34a23eb1_2" [label="2: Exit method::X3_X3 \n " color=yellow style=filled] + "method::X3_X3{_ZN6method2X3C1Ev|constexpr}.30edcbb25b963828789ed90cc7bb6dfa_1" -> "method::X3_X3{_ZN6method2X3C1Ev|constexpr}.30edcbb25b963828789ed90cc7bb6dfa_2" ; +"method::X3_X3{_ZN6method2X3C1Ev|constexpr}.30edcbb25b963828789ed90cc7bb6dfa_2" [label="2: Exit method::X3_X3 \n " color=yellow style=filled] "method::X3_get(_ZN6method2X33getEv).11ad10e5bda3b9c50c787dd79afd7cd9_1" [label="1: Start method::X3_get\nFormals: this:class method::X3*\nLocals: \n DECLARE_LOCALS(&return); [line 21]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot index cdda764c6..0d343aa4c 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/inheritance.cpp.dot @@ -43,11 +43,11 @@ digraph iCFG { "call_static_methods{d41d8cd98f00b204e9800998ecf8427e_Z19call_static_methodsv}.80a5a710290bbd90a5d2eec37b51abcb_11" -> "call_static_methods{d41d8cd98f00b204e9800998ecf8427e_Z19call_static_methodsv}.80a5a710290bbd90a5d2eec37b51abcb_10" ; -"Base_Base{_ZN4BaseC1Ev}.799e983fe556198fde77c9b30f700f78_1" [label="1: Start Base_Base\nFormals: this:class Base*\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] +"Base_Base{_ZN4BaseC1Ev|constexpr}.752393f4a5865e55fc71fb61fd2e59dc_1" [label="1: Start Base_Base\nFormals: this:class Base*\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - "Base_Base{_ZN4BaseC1Ev}.799e983fe556198fde77c9b30f700f78_1" -> "Base_Base{_ZN4BaseC1Ev}.799e983fe556198fde77c9b30f700f78_2" ; -"Base_Base{_ZN4BaseC1Ev}.799e983fe556198fde77c9b30f700f78_2" [label="2: Exit Base_Base \n " color=yellow style=filled] + "Base_Base{_ZN4BaseC1Ev|constexpr}.752393f4a5865e55fc71fb61fd2e59dc_1" -> "Base_Base{_ZN4BaseC1Ev|constexpr}.752393f4a5865e55fc71fb61fd2e59dc_2" ; +"Base_Base{_ZN4BaseC1Ev|constexpr}.752393f4a5865e55fc71fb61fd2e59dc_2" [label="2: Exit Base_Base \n " color=yellow style=filled] "Base_fun(_ZN4Base3funEv).5291f62e433dd838b82ff4ba6204f568_1" [label="1: Start Base_fun\nFormals: this:class Base*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] @@ -72,17 +72,17 @@ digraph iCFG { "Base_fun_redefine(_ZN4Base12fun_redefineEv).e6cca72a64528085bd97e9ac4e428e27_3" -> "Base_fun_redefine(_ZN4Base12fun_redefineEv).e6cca72a64528085bd97e9ac4e428e27_2" ; -"Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_1" [label="1: Start Sub_Sub\nFormals: this:class Sub*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] +"Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_1" [label="1: Start Sub_Sub\nFormals: this:class Sub*\nLocals: \n DECLARE_LOCALS(&return); [line 16]\n " color=yellow style=filled] - "Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_1" -> "Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_3" ; -"Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_2" [label="2: Exit Sub_Sub \n " color=yellow style=filled] + "Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_1" -> "Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_3" ; +"Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_2" [label="2: Exit Sub_Sub \n " color=yellow style=filled] -"Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_3" [label="3: Constructor Init \n n$0=*&this:class Sub* [line 16]\n _fun_Base_Base(n$0:class Sub*) [line 16]\n " shape="box"] +"Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_3" [label="3: Constructor Init \n n$0=*&this:class Sub* [line 16]\n _fun_Base_Base(n$0:class Sub*) [line 16]\n " shape="box"] - "Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_3" -> "Sub_Sub{_ZN3SubC1Ev}.d327e31057534de7292231d2c792f599_2" ; + "Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_3" -> "Sub_Sub{_ZN3SubC1Ev|constexpr}.4742995ed9805602d57ae60829cf659c_2" ; "Sub_fun_redefine(_ZN3Sub12fun_redefineEv).cd5594f3acb5f58c8bda7bc3a68fc82a_1" [label="1: Start Sub_fun_redefine\nFormals: this:class Sub*\nLocals: \n DECLARE_LOCALS(&return); [line 18]\n " color=yellow style=filled] 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 7fa6e11b3..cb150c00b 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 @@ -109,28 +109,28 @@ digraph iCFG { "struct_pass_by_value::param_get_copied_div1{d41d8cd98f00b204e9800998ecf8427e_ZN20struct_pass_by_valu.682445e113d05859d6e3646c64b0f21a_5" -> "struct_pass_by_value::param_get_copied_div1{d41d8cd98f00b204e9800998ecf8427e_ZN20struct_pass_by_valu.682445e113d05859d6e3646c64b0f21a_4" ; -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_1" [label="1: Start struct_pass_by_value::X_X\nFormals: this:class struct_pass_by_value::X* __param_0:class struct_pass_by_value::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_1" [label="1: Start struct_pass_by_value::X_X\nFormals: this:class struct_pass_by_value::X* __param_0:class struct_pass_by_value::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_1" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_3" ; -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_2" [label="2: Exit struct_pass_by_value::X_X \n " color=yellow style=filled] + "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_1" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_3" ; +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_2" [label="2: Exit struct_pass_by_value::X_X \n " color=yellow style=filled] -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_3" [label="3: Constructor Init \n n$0=*&this:class struct_pass_by_value::X* [line 12]\n n$1=*&__param_0:class struct_pass_by_value::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_3" [label="3: Constructor Init \n n$0=*&this:class struct_pass_by_value::X* [line 12]\n n$1=*&__param_0:class struct_pass_by_value::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] - "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_3" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_}.e578248f6f436e1fb43a4657a6eb3ad0_2" ; -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_1" [label="1: Start struct_pass_by_value::X_X\nFormals: this:class struct_pass_by_value::X* __param_0:class struct_pass_by_value::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] + "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_3" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1EOS0_|constexpr}.8640dfad2fde0c9e87b3b42bb9cb2778_2" ; +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_1" [label="1: Start struct_pass_by_value::X_X\nFormals: this:class struct_pass_by_value::X* __param_0:class struct_pass_by_value::X&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_1" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_3" ; -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_2" [label="2: Exit struct_pass_by_value::X_X \n " color=yellow style=filled] + "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_1" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_3" ; +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_2" [label="2: Exit struct_pass_by_value::X_X \n " color=yellow style=filled] -"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_3" [label="3: Constructor Init \n n$0=*&this:class struct_pass_by_value::X* [line 12]\n n$1=*&__param_0:class struct_pass_by_value::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] +"struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_3" [label="3: Constructor Init \n n$0=*&this:class struct_pass_by_value::X* [line 12]\n n$1=*&__param_0:class struct_pass_by_value::X& [line 12]\n n$2=*n$1.f:int [line 12]\n *n$0.f:int=n$2 [line 12]\n " shape="box"] - "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_3" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_}.ea46500d07fae3734e7abb6abd24bcd7_2" ; + "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_3" -> "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1ERKS0_|constexpr}.325aa03590f5436b3ee127006517e3d5_2" ; "struct_pass_by_value::X_X{_ZN20struct_pass_by_value1XC1Ei}.1ac726fe4a35133cf30c894f71329f91_1" [label="1: Start struct_pass_by_value::X_X\nFormals: this:class struct_pass_by_value::X* f:int\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot index 87eedf86f..9c3d5785c 100644 --- a/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/shared/types/typeid_expr.cpp.dot @@ -319,17 +319,17 @@ digraph iCFG { "person_ptr_typeid{d41d8cd98f00b204e9800998ecf8427e_Z17person_ptr_typeidP6Person}.6bb28dca3178f0fdd15c7c17fa602118_10" -> "person_ptr_typeid{d41d8cd98f00b204e9800998ecf8427e_Z17person_ptr_typeidP6Person}.6bb28dca3178f0fdd15c7c17fa602118_5" ; -"Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_1" [label="1: Start Employee_Employee\nFormals: this:class Employee*\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] +"Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_1" [label="1: Start Employee_Employee\nFormals: this:class Employee*\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] - "Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_1" -> "Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_3" ; -"Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_2" [label="2: Exit Employee_Employee \n " color=yellow style=filled] + "Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_1" -> "Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_3" ; +"Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_2" [label="2: Exit Employee_Employee \n " color=yellow style=filled] -"Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_3" [label="3: Constructor Init \n n$0=*&this:class Employee* [line 17]\n _fun_Person_Person(n$0:class Employee*) [line 17]\n " shape="box"] +"Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_3" [label="3: Constructor Init \n n$0=*&this:class Employee* [line 17]\n _fun_Person_Person(n$0:class Employee*) [line 17]\n " shape="box"] - "Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_3" -> "Employee_Employee{_ZN8EmployeeC1Ev}.8b47d9020cb20c3e26cb30f5dc973de0_2" ; + "Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_3" -> "Employee_Employee{_ZN8EmployeeC1Ev|constexpr}.32be3d7ef9ed41f8d9517f391d0d5b56_2" ; "Employee_~Employee(_ZN6PersonD0Ev).74f3bba15ec35ceae1c235a49d9fbfbd_1" [label="1: Start Employee_~Employee\nFormals: this:class Employee*\nLocals: \n DECLARE_LOCALS(&return); [line 17]\n " color=yellow style=filled] @@ -337,11 +337,11 @@ digraph iCFG { "Employee_~Employee(_ZN6PersonD0Ev).74f3bba15ec35ceae1c235a49d9fbfbd_2" [label="2: Exit Employee_~Employee \n " color=yellow style=filled] -"Person_Person{_ZN6PersonC1Ev}.eae7ac90d0b106ac1ffce8f205a2d898_1" [label="1: Start Person_Person\nFormals: this:class Person*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"Person_Person{_ZN6PersonC1Ev|constexpr}.b73995bc8887f47f879dbcd9f1c39b58_1" [label="1: Start Person_Person\nFormals: this:class Person*\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "Person_Person{_ZN6PersonC1Ev}.eae7ac90d0b106ac1ffce8f205a2d898_1" -> "Person_Person{_ZN6PersonC1Ev}.eae7ac90d0b106ac1ffce8f205a2d898_2" ; -"Person_Person{_ZN6PersonC1Ev}.eae7ac90d0b106ac1ffce8f205a2d898_2" [label="2: Exit Person_Person \n " color=yellow style=filled] + "Person_Person{_ZN6PersonC1Ev|constexpr}.b73995bc8887f47f879dbcd9f1c39b58_1" -> "Person_Person{_ZN6PersonC1Ev|constexpr}.b73995bc8887f47f879dbcd9f1c39b58_2" ; +"Person_Person{_ZN6PersonC1Ev|constexpr}.b73995bc8887f47f879dbcd9f1c39b58_2" [label="2: Exit Person_Person \n " color=yellow style=filled] "Person_~Person(_ZN6PersonD0Ev).6d1543c4b90e8aa197231efa0fbc62f1_1" [label="1: Start Person_~Person\nFormals: this:class Person*\nLocals: \n DECLARE_LOCALS(&return); [line 14]\n " color=yellow style=filled] @@ -351,11 +351,11 @@ digraph iCFG { "Person_~Person(_ZN6PersonD0Ev).6d1543c4b90e8aa197231efa0fbc62f1_2" [label="2: Exit Person_~Person \n " color=yellow style=filled] -"Person_Person{_ZN6PersonC1ERKS_}.bff7faa25cbdb6a1d25f70cb7912aaca_1" [label="1: Start Person_Person\nFormals: this:class Person* __param_0:class Person&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] +"Person_Person{_ZN6PersonC1ERKS_|constexpr}.73a82c382cd1d29b1382857a8c6a8ba0_1" [label="1: Start Person_Person\nFormals: this:class Person* __param_0:class Person&\nLocals: \n DECLARE_LOCALS(&return); [line 12]\n " color=yellow style=filled] - "Person_Person{_ZN6PersonC1ERKS_}.bff7faa25cbdb6a1d25f70cb7912aaca_1" -> "Person_Person{_ZN6PersonC1ERKS_}.bff7faa25cbdb6a1d25f70cb7912aaca_2" ; -"Person_Person{_ZN6PersonC1ERKS_}.bff7faa25cbdb6a1d25f70cb7912aaca_2" [label="2: Exit Person_Person \n " color=yellow style=filled] + "Person_Person{_ZN6PersonC1ERKS_|constexpr}.73a82c382cd1d29b1382857a8c6a8ba0_1" -> "Person_Person{_ZN6PersonC1ERKS_|constexpr}.73a82c382cd1d29b1382857a8c6a8ba0_2" ; +"Person_Person{_ZN6PersonC1ERKS_|constexpr}.73a82c382cd1d29b1382857a8c6a8ba0_2" [label="2: Exit Person_Person \n " color=yellow style=filled] "std::bad_exception_bad_exception{_ZNSt13bad_exceptionC1Ev}.ab20095a5beb332f6653ec733b7bf7e2_1" [label="1: Start std::bad_exception_bad_exception\nFormals: this:class std::bad_exception*\nLocals: \n DECLARE_LOCALS(&return); [line 103]\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 2c7ebc5e6..9ab012952 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 @@ -22,23 +22,23 @@ digraph iCFG { "fields{d41d8cd98f00b204e9800998ecf8427e_Z6fieldsv}.2204acccca0fb756182b0ea5cda979e8_3" -> "fields{d41d8cd98f00b204e9800998ecf8427e_Z6fieldsv}.2204acccca0fb756182b0ea5cda979e8_2" ; -"Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_1" [label="1: Start Fields_\nFormals: this:class Fields* __param_0:class Fields&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] +"Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_1" [label="1: Start Fields_\nFormals: this:class Fields* __param_0:class Fields&\nLocals: \n DECLARE_LOCALS(&return); [line 10]\n " color=yellow style=filled] - "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_1" -> "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_5" ; -"Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_2" [label="2: Exit Fields_ \n " color=yellow style=filled] + "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_1" -> "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_5" ; +"Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_2" [label="2: Exit Fields_ \n " color=yellow style=filled] -"Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_3" [label="3: Constructor Init \n n$0=*&this:class Fields* [line 10]\n n$1=*&__param_0:class Fields& [line 10]\n n$2=*n$1.field3:float [line 10]\n *n$0.field3:float=n$2 [line 10]\n " shape="box"] +"Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_3" [label="3: Constructor Init \n n$0=*&this:class Fields* [line 10]\n n$1=*&__param_0:class Fields& [line 10]\n n$2=*n$1.field3:float [line 10]\n *n$0.field3:float=n$2 [line 10]\n " shape="box"] - "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_3" -> "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_2" ; -"Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_4" [label="4: Constructor Init \n n$3=*&this:class Fields* [line 10]\n n$4=*&__param_0:class Fields& [line 10]\n n$5=*n$4.field2:float [line 10]\n *n$3.field2:float=n$5 [line 10]\n " shape="box"] + "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_3" -> "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_2" ; +"Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_4" [label="4: Constructor Init \n n$3=*&this:class Fields* [line 10]\n n$4=*&__param_0:class Fields& [line 10]\n n$5=*n$4.field2:float [line 10]\n *n$3.field2:float=n$5 [line 10]\n " shape="box"] - "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_4" -> "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_3" ; -"Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_5" [label="5: Constructor Init \n n$6=*&this:class Fields* [line 10]\n n$7=*&__param_0:class Fields& [line 10]\n n$8=*n$7.field1:float [line 10]\n *n$6.field1:float=n$8 [line 10]\n " shape="box"] + "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_4" -> "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_3" ; +"Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_5" [label="5: Constructor Init \n n$6=*&this:class Fields* [line 10]\n n$7=*&__param_0:class Fields& [line 10]\n n$8=*n$7.field1:float [line 10]\n *n$6.field1:float=n$8 [line 10]\n " shape="box"] - "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_5" -> "Fields_{_ZN6FieldsC1ERKS_}.dbc5d6c7a14141a516a3f66838987745_4" ; + "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_5" -> "Fields_{_ZN6FieldsC1ERKS_|constexpr}.dabe57ed6efc1fa577b9f8be0d52ad15_4" ; }