From 7b58c71475381a56c2d5018966fa5acc3827c607 Mon Sep 17 00:00:00 2001 From: Sam Blackshear Date: Tue, 12 Jul 2016 12:00:28 -0700 Subject: [PATCH] centralize creation and detection of clang tmp vars, fix errdesc/bucketing Reviewed By: akotulski Differential Revision: D3529992 fbshipit-source-id: 939f47a --- infer/src/IR/Pvar.re | 29 +++--- infer/src/IR/Pvar.rei | 4 + infer/src/backend/errdesc.ml | 32 ++++++- infer/src/clang/cFrontend_config.ml | 2 - infer/src/clang/cFrontend_config.mli | 2 - infer/src/clang/cFrontend_utils.ml | 2 +- infer/src/clang/cTrans.ml | 8 +- .../c/frontend/arithmetic/negate.c.dot | 24 ++--- .../binary_operator.c.dot | 46 +++++----- .../frontend/conditional_operator/cond2.c.dot | 44 ++++----- .../conditional_operator.c.dot | 56 ++++++------ .../conditional_operator/function_call.c.dot | 60 ++++++------- .../if_short_circuit.c.dot | 70 +++++++-------- .../conditional_operator/int_negation.c.dot | 16 ++-- .../conditional_operator/member_access.c.dot | 24 ++--- .../conditional_operator/preincrement.c.dot | 24 ++--- .../conditional_operator/unary_operator.c.dot | 20 ++--- .../c/frontend/gotostmt/goto_ex.c.dot | 90 +++++++++---------- .../initialization/compound_literal.c.dot | 4 +- .../c/frontend/switchstmt/switch.c.dot | 24 ++--- .../subtyping/cast_with_enforce.cpp.dot | 16 ++-- .../cpp/errors/vector/empty_access.cpp | 7 ++ .../conditional/binary_conditional.cpp.dot | 22 ++--- .../conditional/lvalue_conditional.cpp.dot | 32 +++---- .../constructors/constructor_array.cpp.dot | 8 +- .../constructors/constructor_new.cpp.dot | 32 +++---- .../constructor_struct_init_list.cpp.dot | 4 +- .../copy_move_constructor.cpp.dot | 20 ++--- .../constructors/std_init_list.cpp.dot | 4 +- .../frontend/constructors/temp_object.cpp.dot | 36 ++++---- .../cpp/frontend/loops/foreach1.cpp.dot | 10 +-- .../methods/conversion_operator.cpp.dot | 12 +-- .../frontend/methods/return_struct.cpp.dot | 4 +- .../var_decl_inside_if.cpp.dot | 8 +- .../var_decl_inside_while.cpp.dot | 8 +- .../reference/temporary_lvalue.cpp.dot | 8 +- .../cpp/frontend/types/return_struct.cpp.dot | 26 +++--- .../types/struct_pass_by_value.cpp.dot | 28 +++--- .../cpp/frontend/types/typeid_expr.cpp.dot | 4 +- .../frontend/assertions/NSAssert_example.dot | 76 ++++++++-------- .../objc/frontend/block/block-it.dot | 74 +++++++-------- .../ConditionalOperation.dot | 8 +- .../endtoend/cpp/VectorEmptyAccessTest.java | 3 +- 43 files changed, 538 insertions(+), 493 deletions(-) diff --git a/infer/src/IR/Pvar.re b/infer/src/IR/Pvar.re index 5f42567f5..aa9560fb5 100644 --- a/infer/src/IR/Pvar.re +++ b/infer/src/IR/Pvar.re @@ -260,23 +260,24 @@ let is_this pvar => Mangled.equal (get_name pvar) (Mangled.from_string "this"); let is_return pv => get_name pv == Ident.name_return; +/** something that can't be part of a legal identifier in any conceivable language */ +let tmp_prefix = "0$?%__sil_tmp"; + + /** return true if [pvar] is a temporary variable generated by the frontend */ let is_frontend_tmp pvar => { - /* Check whether the program variable is a temporary one generated by the Clang frontend */ - let is_clang_tmp name => string_is_prefix "_tmp" name; /* Check whether the program variable is a temporary one generated by sawja */ let is_sawja_tmp name => string_is_prefix "$irvar" name || string_is_prefix "$T" name || string_is_prefix "$bc" name; + /* Check whether the program variable is generated by [mk_tmp] */ + let is_sil_tmp name => string_is_prefix tmp_prefix name; let name = to_string pvar; - switch pvar.pv_kind { - | Local_var pname => - if (Procname.is_java pname) { - is_sawja_tmp name - } else { - is_clang_tmp name + is_sil_tmp name || ( + switch pvar.pv_kind { + | Local_var pname => Procname.is_java pname && is_sawja_tmp name + | _ => false } - | _ => false - } + ) }; @@ -317,6 +318,14 @@ let mk_callee (name: Mangled.t) (proc_name: Procname.t) :t => { let mk_global (name: Mangled.t) :t => {pv_name: name, pv_kind: Global_var}; +/** create a fresh temporary variable local to procedure [pname]. for use in the frontends only! */ +let mk_tmp name pname => { + let id = Ident.create_fresh Ident.knormal; + let pvar_mangled = Mangled.from_string (tmp_prefix ^ name ^ Ident.to_string id); + mk pvar_mangled pname +}; + + /** create an abducted return variable for a call to [proc_name] at [loc] */ let mk_abducted_ret (proc_name: Procname.t) (loc: Location.t) :t => { let name = Mangled.from_string ("$RET_" ^ Procname.to_unique_id proc_name); diff --git a/infer/src/IR/Pvar.rei b/infer/src/IR/Pvar.rei index 26a772b1c..3560df90c 100644 --- a/infer/src/IR/Pvar.rei +++ b/infer/src/IR/Pvar.rei @@ -108,6 +108,10 @@ let mk_callee: Mangled.t => Procname.t => t; let mk_global: Mangled.t => t; +/** create a fresh temporary variable local to procedure [pname]. for use in the frontends only! */ +let mk_tmp: string => Procname.t => t; + + /** Pretty print a program variable. */ let pp: printenv => F.formatter => t => unit; diff --git a/infer/src/backend/errdesc.ml b/infer/src/backend/errdesc.ml index cb34e2562..5ea4be778 100644 --- a/infer/src/backend/errdesc.ml +++ b/infer/src/backend/errdesc.ml @@ -170,6 +170,27 @@ let find_program_variable_assignment node pvar : (Cfg.Node.t * Ident.t) option = None in find_in_node_or_preds node find_instr +(** Special case for C++, where we translate code like + `struct X; X getX() { X x; return X; }` as + `void getX(struct X * frontend_generated_pvar)`. + This lets us recognize that X was returned from getX *) +let find_struct_by_value_assignment node pvar = + if Pvar.is_frontend_tmp pvar + then + let find_instr node = function + | Sil.Call (_, Const (Cfun pname), args, loc, cf) -> + begin + match IList.last args with + | Some (Sil.Lvar last_arg, _) when Pvar.equal pvar last_arg -> + Some (node, pname, loc, cf) + | _ -> + None + end + | _ -> + None in + find_in_node_or_preds node find_instr + else None + (** Find a program variable assignment to id in the current node or predecessors. *) let find_ident_assignment node id : (Cfg.Node.t * Sil.exp) option = let find_instr node = function @@ -273,7 +294,14 @@ and _exp_lv_dexp (_seen : Sil.ExpSet.t) node e : Sil.dexp option = if Pvar.is_frontend_tmp pvar then begin match find_program_variable_assignment node pvar with - | None -> None + | None -> + begin + match find_struct_by_value_assignment node pvar with + | Some (_, pname, loc, call_flags) -> + Some (Sil.Dfcall (Sil.Dconst (Cfun pname), [], loc, call_flags)) + | None -> + None + end | Some (node', id) -> begin match find_normal_variable_funcall node' id with @@ -713,6 +741,8 @@ let explain_dexp_access prop dexp is_nullable = | None -> None | Some Sil.Estruct (fsel, _) -> lookup_fld fsel f + | Some ((Sil.Eexp (Const (Cfun _), _)) as fun_strexp) -> + Some fun_strexp | Some _ -> if verbose then (L.d_str "lookup: case not matched on Ddot "; L.d_ln ()); None) diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index 6c58f6696..bc97939ef 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -77,8 +77,6 @@ let new_str = "new" let init = "init" -let temp_var = "infer" - let invalid_pointer = 0 let void = "void" diff --git a/infer/src/clang/cFrontend_config.mli b/infer/src/clang/cFrontend_config.mli index 7f99a375f..3faf53cb9 100644 --- a/infer/src/clang/cFrontend_config.mli +++ b/infer/src/clang/cFrontend_config.mli @@ -79,8 +79,6 @@ val new_str : string val init : string -val temp_var : string - val invalid_pointer : int val void : string diff --git a/infer/src/clang/cFrontend_utils.ml b/infer/src/clang/cFrontend_utils.ml index b1778fc63..608334594 100644 --- a/infer/src/clang/cFrontend_utils.ml +++ b/infer/src/clang/cFrontend_utils.ml @@ -552,7 +552,7 @@ struct (* It does not update the global block_counter *) let get_next_block_pvar defining_proc = let name = block_procname_with_index defining_proc (!block_counter +1) in - Pvar.mk (Mangled.from_string (CFrontend_config.temp_var^"_"^name)) defining_proc + Pvar.mk_tmp name defining_proc (* Reset block counter *) let reset_block_counter () = diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 32a9e1f34..e42fc74a6 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -262,11 +262,9 @@ struct F.translate_one_declaration context.tenv context.cg context.cfg `Translation decl; Ident.NameGenerator.set_current ident_state - let mk_temp_sil_var procdesc var_name_prefix = + let mk_temp_sil_var procdesc var_name_suffix = let procname = Cfg.Procdesc.get_proc_name procdesc in - let id = Ident.create_fresh Ident.knormal in - let pvar_mangled = Mangled.from_string (var_name_prefix ^ Ident.to_string id) in - Pvar.mk pvar_mangled procname + Pvar.mk_tmp var_name_suffix procname let mk_temp_sil_var_for_expr tenv procdesc var_name_prefix expr_info = let type_ptr = expr_info.Clang_ast_t.ei_type_ptr in @@ -964,7 +962,7 @@ struct | Some exp_typ -> exp_typ | None -> let procdesc = trans_state.context.CContext.procdesc in - let pvar = mk_temp_sil_var procdesc "__temp_construct_" in + let pvar = Pvar.mk_tmp "__temp_construct_" (Cfg.Procdesc.get_proc_name procdesc) in let class_type = CTypes_decl.get_type_from_expr_info ei context.CContext.tenv in Cfg.Procdesc.append_locals procdesc [(Pvar.get_name pvar, class_type)]; Sil.Lvar pvar, class_type in diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/negate.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/negate.c.dot index 7870a2177..8f49c3b87 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/negate.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/negate.c.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -24 [label="24: Return Stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 14]\n *&return:int =n$2 [line 14]\n " shape="box"] +24 [label="24: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 14]\n *&return:int =n$2 [line 14]\n " shape="box"] 24 -> 18 ; -23 [label="23: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 14]\n " shape="box"] +23 [label="23: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 14]\n " shape="box"] 23 -> 19 ; -22 [label="22: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 14]\n " shape="box"] +22 [label="22: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 14]\n " shape="box"] 22 -> 19 ; @@ -27,20 +27,20 @@ digraph iCFG { 18 [label="18: Exit neg_bool \n " color=yellow style=filled] -17 [label="17: Start neg_bool\nFormals: a:_Bool \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 14]\n " color=yellow style=filled] +17 [label="17: Start neg_bool\nFormals: a:_Bool \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 14]\n " color=yellow style=filled] 17 -> 20 ; 17 -> 21 ; -16 [label="16: Return Stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 12]\n *&return:int =n$2 [line 12]\n " shape="box"] +16 [label="16: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 12]\n *&return:int =n$2 [line 12]\n " shape="box"] 16 -> 10 ; -15 [label="15: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 12]\n " shape="box"] +15 [label="15: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 12]\n " shape="box"] 15 -> 11 ; -14 [label="14: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 12]\n " shape="box"] +14 [label="14: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 12]\n " shape="box"] 14 -> 11 ; @@ -59,20 +59,20 @@ digraph iCFG { 10 [label="10: Exit neg_char \n " color=yellow style=filled] -9 [label="9: Start neg_char\nFormals: a:char \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 12]\n " color=yellow style=filled] +9 [label="9: Start neg_char\nFormals: a:char \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 12]\n " color=yellow style=filled] 9 -> 12 ; 9 -> 13 ; -8 [label="8: Return Stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 10]\n *&return:int =n$2 [line 10]\n " shape="box"] +8 [label="8: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 10]\n *&return:int =n$2 [line 10]\n " shape="box"] 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 10]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 10]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 10]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 10]\n " shape="box"] 6 -> 3 ; @@ -91,7 +91,7 @@ digraph iCFG { 2 [label="2: Exit neg_int \n " color=yellow style=filled] -1 [label="1: Start neg_int\nFormals: a:int \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 10]\n " color=yellow style=filled] +1 [label="1: Start neg_int\nFormals: a:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 10]\n " color=yellow style=filled] 1 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/binary_operator.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/binary_operator.c.dot index d7cfe1e36..3c2fafcb7 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/binary_operator.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/binary_operator.c.dot @@ -1,15 +1,15 @@ /* @generated */ digraph iCFG { -48 [label="48: BinaryOperatorStmt: Assign \n n$31=*&SIL_temp_conditional___n$28:int [line 13]\n *&x1:int =(n$31 + 77) [line 13]\n " shape="box"] +48 [label="48: BinaryOperatorStmt: Assign \n n$31=*&0$?%__sil_tmpSIL_temp_conditional___n$28:int [line 13]\n *&x1:int =(n$31 + 77) [line 13]\n " shape="box"] 48 -> 38 ; 48 -> 39 ; -47 [label="47: ConditinalStmt Branch \n n$30=*&z:int [line 13]\n *&SIL_temp_conditional___n$28:int =n$30 [line 13]\n " shape="box"] +47 [label="47: ConditinalStmt Branch \n n$30=*&z:int [line 13]\n *&0$?%__sil_tmpSIL_temp_conditional___n$28:int =n$30 [line 13]\n " shape="box"] 47 -> 43 ; -46 [label="46: ConditinalStmt Branch \n n$29=*&z:int [line 13]\n *&SIL_temp_conditional___n$28:int =n$29 [line 13]\n " shape="box"] +46 [label="46: ConditinalStmt Branch \n n$29=*&z:int [line 13]\n *&0$?%__sil_tmpSIL_temp_conditional___n$28:int =n$29 [line 13]\n " shape="box"] 46 -> 43 ; @@ -25,16 +25,16 @@ digraph iCFG { 43 -> 48 ; -42 [label="42: BinaryOperatorStmt: Assign \n n$27=*&SIL_temp_conditional___n$24:int [line 16]\n *&x2:int =(77 + n$27) [line 16]\n " shape="box"] +42 [label="42: BinaryOperatorStmt: Assign \n n$27=*&0$?%__sil_tmpSIL_temp_conditional___n$24:int [line 16]\n *&x2:int =(77 + n$27) [line 16]\n " shape="box"] 42 -> 27 ; 42 -> 28 ; -41 [label="41: ConditinalStmt Branch \n n$26=*&z:int [line 16]\n *&SIL_temp_conditional___n$24:int =n$26 [line 16]\n " shape="box"] +41 [label="41: ConditinalStmt Branch \n n$26=*&z:int [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$24:int =n$26 [line 16]\n " shape="box"] 41 -> 37 ; -40 [label="40: ConditinalStmt Branch \n n$25=*&z:int [line 16]\n *&SIL_temp_conditional___n$24:int =n$25 [line 16]\n " shape="box"] +40 [label="40: ConditinalStmt Branch \n n$25=*&z:int [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$24:int =n$25 [line 16]\n " shape="box"] 40 -> 37 ; @@ -50,16 +50,16 @@ digraph iCFG { 37 -> 42 ; -36 [label="36: BinaryOperatorStmt: Assign \n n$19=*&SIL_temp_conditional___n$16:int [line 19]\n n$23=*&SIL_temp_conditional___n$20:int [line 19]\n *&x3:int =(n$19 + n$23) [line 19]\n " shape="box"] +36 [label="36: BinaryOperatorStmt: Assign \n n$19=*&0$?%__sil_tmpSIL_temp_conditional___n$16:int [line 19]\n n$23=*&0$?%__sil_tmpSIL_temp_conditional___n$20:int [line 19]\n *&x3:int =(n$19 + n$23) [line 19]\n " shape="box"] 36 -> 21 ; 36 -> 22 ; -35 [label="35: ConditinalStmt Branch \n n$22=*&z:int [line 19]\n *&SIL_temp_conditional___n$20:int =n$22 [line 19]\n " shape="box"] +35 [label="35: ConditinalStmt Branch \n n$22=*&z:int [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$20:int =n$22 [line 19]\n " shape="box"] 35 -> 31 ; -34 [label="34: ConditinalStmt Branch \n n$21=*&z:int [line 19]\n *&SIL_temp_conditional___n$20:int =n$21 [line 19]\n " shape="box"] +34 [label="34: ConditinalStmt Branch \n n$21=*&z:int [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$20:int =n$21 [line 19]\n " shape="box"] 34 -> 31 ; @@ -75,11 +75,11 @@ digraph iCFG { 31 -> 36 ; -30 [label="30: ConditinalStmt Branch \n n$18=*&z:int [line 19]\n *&SIL_temp_conditional___n$16:int =n$18 [line 19]\n " shape="box"] +30 [label="30: ConditinalStmt Branch \n n$18=*&z:int [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$16:int =n$18 [line 19]\n " shape="box"] 30 -> 26 ; -29 [label="29: ConditinalStmt Branch \n n$17=*&z:int [line 19]\n *&SIL_temp_conditional___n$16:int =n$17 [line 19]\n " shape="box"] +29 [label="29: ConditinalStmt Branch \n n$17=*&z:int [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$16:int =n$17 [line 19]\n " shape="box"] 29 -> 26 ; @@ -96,16 +96,16 @@ digraph iCFG { 26 -> 32 ; 26 -> 33 ; -25 [label="25: DeclStmt \n n$15=*&SIL_temp_conditional___n$12:int [line 22]\n *&y1:int =(n$15 + 77) [line 22]\n " shape="box"] +25 [label="25: DeclStmt \n n$15=*&0$?%__sil_tmpSIL_temp_conditional___n$12:int [line 22]\n *&y1:int =(n$15 + 77) [line 22]\n " shape="box"] 25 -> 15 ; 25 -> 16 ; -24 [label="24: ConditinalStmt Branch \n n$14=*&z:int [line 22]\n *&SIL_temp_conditional___n$12:int =n$14 [line 22]\n " shape="box"] +24 [label="24: ConditinalStmt Branch \n n$14=*&z:int [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$12:int =n$14 [line 22]\n " shape="box"] 24 -> 20 ; -23 [label="23: ConditinalStmt Branch \n n$13=*&z:int [line 22]\n *&SIL_temp_conditional___n$12:int =n$13 [line 22]\n " shape="box"] +23 [label="23: ConditinalStmt Branch \n n$13=*&z:int [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$12:int =n$13 [line 22]\n " shape="box"] 23 -> 20 ; @@ -121,16 +121,16 @@ digraph iCFG { 20 -> 25 ; -19 [label="19: DeclStmt \n n$11=*&SIL_temp_conditional___n$8:int [line 24]\n *&y2:int =(77 + n$11) [line 24]\n " shape="box"] +19 [label="19: DeclStmt \n n$11=*&0$?%__sil_tmpSIL_temp_conditional___n$8:int [line 24]\n *&y2:int =(77 + n$11) [line 24]\n " shape="box"] 19 -> 4 ; 19 -> 5 ; -18 [label="18: ConditinalStmt Branch \n n$10=*&z:int [line 24]\n *&SIL_temp_conditional___n$8:int =n$10 [line 24]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$10=*&z:int [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$8:int =n$10 [line 24]\n " shape="box"] 18 -> 14 ; -17 [label="17: ConditinalStmt Branch \n n$9=*&z:int [line 24]\n *&SIL_temp_conditional___n$8:int =n$9 [line 24]\n " shape="box"] +17 [label="17: ConditinalStmt Branch \n n$9=*&z:int [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$8:int =n$9 [line 24]\n " shape="box"] 17 -> 14 ; @@ -146,15 +146,15 @@ digraph iCFG { 14 -> 19 ; -13 [label="13: DeclStmt \n n$3=*&SIL_temp_conditional___n$0:int [line 26]\n n$7=*&SIL_temp_conditional___n$4:int [line 26]\n *&y3:int =(n$3 + n$7) [line 26]\n " shape="box"] +13 [label="13: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 26]\n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 26]\n *&y3:int =(n$3 + n$7) [line 26]\n " shape="box"] 13 -> 2 ; -12 [label="12: ConditinalStmt Branch \n n$6=*&z:int [line 26]\n *&SIL_temp_conditional___n$4:int =n$6 [line 26]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n n$6=*&z:int [line 26]\n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =n$6 [line 26]\n " shape="box"] 12 -> 8 ; -11 [label="11: ConditinalStmt Branch \n n$5=*&z:int [line 26]\n *&SIL_temp_conditional___n$4:int =n$5 [line 26]\n " shape="box"] +11 [label="11: ConditinalStmt Branch \n n$5=*&z:int [line 26]\n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =n$5 [line 26]\n " shape="box"] 11 -> 8 ; @@ -170,11 +170,11 @@ digraph iCFG { 8 -> 13 ; -7 [label="7: ConditinalStmt Branch \n n$2=*&z:int [line 26]\n *&SIL_temp_conditional___n$0:int =n$2 [line 26]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&z:int [line 26]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =n$2 [line 26]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n n$1=*&z:int [line 26]\n *&SIL_temp_conditional___n$0:int =n$1 [line 26]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&z:int [line 26]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =n$1 [line 26]\n " shape="box"] 6 -> 3 ; @@ -194,7 +194,7 @@ digraph iCFG { 2 [label="2: Exit binop_with_side_effects \n " color=yellow style=filled] -1 [label="1: Start binop_with_side_effects\nFormals: z:int \nLocals: y3:int SIL_temp_conditional___n$0:int SIL_temp_conditional___n$4:int y2:int SIL_temp_conditional___n$8:int y1:int SIL_temp_conditional___n$12:int SIL_temp_conditional___n$16:int SIL_temp_conditional___n$20:int x3:int SIL_temp_conditional___n$24:int x2:int SIL_temp_conditional___n$28:int x1:int \n DECLARE_LOCALS(&return,&y3,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$4,&y2,&SIL_temp_conditional___n$8,&y1,&SIL_temp_conditional___n$12,&SIL_temp_conditional___n$16,&SIL_temp_conditional___n$20,&x3,&SIL_temp_conditional___n$24,&x2,&SIL_temp_conditional___n$28,&x1); [line 10]\n " color=yellow style=filled] +1 [label="1: Start binop_with_side_effects\nFormals: z:int \nLocals: y3:int 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int y2:int 0$?%__sil_tmpSIL_temp_conditional___n$8:int y1:int 0$?%__sil_tmpSIL_temp_conditional___n$12:int 0$?%__sil_tmpSIL_temp_conditional___n$16:int 0$?%__sil_tmpSIL_temp_conditional___n$20:int x3:int 0$?%__sil_tmpSIL_temp_conditional___n$24:int x2:int 0$?%__sil_tmpSIL_temp_conditional___n$28:int x1:int \n DECLARE_LOCALS(&return,&y3,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$4,&y2,&0$?%__sil_tmpSIL_temp_conditional___n$8,&y1,&0$?%__sil_tmpSIL_temp_conditional___n$12,&0$?%__sil_tmpSIL_temp_conditional___n$16,&0$?%__sil_tmpSIL_temp_conditional___n$20,&x3,&0$?%__sil_tmpSIL_temp_conditional___n$24,&x2,&0$?%__sil_tmpSIL_temp_conditional___n$28,&x1); [line 10]\n " color=yellow style=filled] 1 -> 44 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot index aca8321bf..aad9d96ec 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot @@ -1,15 +1,15 @@ /* @generated */ digraph iCFG { -58 [label="58: BinaryOperatorStmt: Assign \n n$9=*&SIL_temp_conditional___n$5:int [line 23]\n *&y:int =n$9 [line 23]\n " shape="box"] +58 [label="58: BinaryOperatorStmt: Assign \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$5:int [line 23]\n *&y:int =n$9 [line 23]\n " shape="box"] 58 -> 42 ; 58 -> 43 ; -57 [label="57: ConditinalStmt Branch \n n$8=*&x:int [line 23]\n *&x:int =(n$8 - 1) [line 23]\n *&SIL_temp_conditional___n$5:int =n$8 [line 23]\n " shape="box"] +57 [label="57: ConditinalStmt Branch \n n$8=*&x:int [line 23]\n *&x:int =(n$8 - 1) [line 23]\n *&0$?%__sil_tmpSIL_temp_conditional___n$5:int =n$8 [line 23]\n " shape="box"] 57 -> 52 ; -56 [label="56: ConditinalStmt Branch \n n$7=*&x:int [line 23]\n *&x:int =(n$7 + 1) [line 23]\n *&SIL_temp_conditional___n$5:int =(n$7 + 1) [line 23]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n n$7=*&x:int [line 23]\n *&x:int =(n$7 + 1) [line 23]\n *&0$?%__sil_tmpSIL_temp_conditional___n$5:int =(n$7 + 1) [line 23]\n " shape="box"] 56 -> 52 ; @@ -30,15 +30,15 @@ digraph iCFG { 52 -> 58 ; -51 [label="51: Return Stmt \n n$4=*&SIL_temp_conditional___n$0:int [line 24]\n *&return:int =(0 + n$4) [line 24]\n " shape="box"] +51 [label="51: Return Stmt \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 24]\n *&return:int =(0 + n$4) [line 24]\n " shape="box"] 51 -> 39 ; -50 [label="50: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 24]\n " shape="box"] +50 [label="50: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 24]\n " shape="box"] 50 -> 40 ; -49 [label="49: ConditinalStmt Branch \n *&x:int =1 [line 24]\n n$3=*&x:int [line 24]\n *&SIL_temp_conditional___n$0:int =n$3 [line 24]\n " shape="box"] +49 [label="49: ConditinalStmt Branch \n *&x:int =1 [line 24]\n n$3=*&x:int [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =n$3 [line 24]\n " shape="box"] 49 -> 40 ; @@ -50,16 +50,16 @@ digraph iCFG { 47 -> 49 ; -46 [label="46: BinaryOperatorStmt: GT \n n$2=*&SIL_temp_conditional___n$1:int [line 24]\n " shape="box"] +46 [label="46: BinaryOperatorStmt: GT \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 24]\n " shape="box"] 46 -> 47 ; 46 -> 48 ; -45 [label="45: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =2 [line 24]\n " shape="box"] +45 [label="45: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =2 [line 24]\n " shape="box"] 45 -> 41 ; -44 [label="44: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 24]\n " shape="box"] +44 [label="44: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 24]\n " shape="box"] 44 -> 41 ; @@ -82,7 +82,7 @@ digraph iCFG { 39 [label="39: Exit bar \n " color=yellow style=filled] -38 [label="38: Start bar\nFormals: \nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$1:int SIL_temp_conditional___n$5:int y:int x:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$1,&SIL_temp_conditional___n$5,&y,&x); [line 21]\n " color=yellow style=filled] +38 [label="38: Start bar\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int 0$?%__sil_tmpSIL_temp_conditional___n$5:int y:int x:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmpSIL_temp_conditional___n$5,&y,&x); [line 21]\n " color=yellow style=filled] 38 -> 53 ; @@ -125,16 +125,16 @@ digraph iCFG { 29 -> 21 ; 29 -> 22 ; -28 [label="28: DeclStmt \n n$9=*&SIL_temp_conditional___n$6:int [line 16]\n *&n:int =n$9 [line 16]\n " shape="box"] +28 [label="28: DeclStmt \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 16]\n *&n:int =n$9 [line 16]\n " shape="box"] 28 -> 10 ; 28 -> 11 ; -27 [label="27: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =2 [line 16]\n " shape="box"] +27 [label="27: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =2 [line 16]\n " shape="box"] 27 -> 20 ; -26 [label="26: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =1 [line 16]\n " shape="box"] +26 [label="26: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =1 [line 16]\n " shape="box"] 26 -> 20 ; @@ -163,20 +163,20 @@ digraph iCFG { 20 -> 28 ; -19 [label="19: BinaryOperatorStmt: Assign \n n$5=*&SIL_temp_conditional___n$2:int [line 17]\n *&n:int =n$5 [line 17]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: Assign \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 17]\n *&n:int =n$5 [line 17]\n " shape="box"] 19 -> 4 ; 19 -> 5 ; -18 [label="18: ConditinalStmt Branch \n n$4=*&SIL_temp_conditional___n$3:int [line 17]\n *&SIL_temp_conditional___n$2:int =n$4 [line 17]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 17]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =n$4 [line 17]\n " shape="box"] 18 -> 9 ; -17 [label="17: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =2 [line 17]\n " shape="box"] +17 [label="17: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =2 [line 17]\n " shape="box"] 17 -> 13 ; -16 [label="16: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 17]\n " shape="box"] +16 [label="16: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 17]\n " shape="box"] 16 -> 13 ; @@ -192,7 +192,7 @@ digraph iCFG { 13 -> 18 ; -12 [label="12: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 17]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 17]\n " shape="box"] 12 -> 9 ; @@ -209,15 +209,15 @@ digraph iCFG { 9 -> 19 ; -8 [label="8: Return Stmt \n n$1=*&SIL_temp_conditional___n$0:int [line 18]\n *&return:int =(0 + n$1) [line 18]\n " shape="box"] +8 [label="8: Return Stmt \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 18]\n *&return:int =(0 + n$1) [line 18]\n " shape="box"] 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 18]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 18]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] 6 -> 3 ; @@ -236,7 +236,7 @@ digraph iCFG { 2 [label="2: Exit foo \n " color=yellow style=filled] -1 [label="1: Start foo\nFormals: \nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$2:int SIL_temp_conditional___n$3:int n:int SIL_temp_conditional___n$6:int y:int x:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$3,&n,&SIL_temp_conditional___n$6,&y,&x); [line 10]\n " color=yellow style=filled] +1 [label="1: Start foo\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int n:int 0$?%__sil_tmpSIL_temp_conditional___n$6:int y:int x:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$3,&n,&0$?%__sil_tmpSIL_temp_conditional___n$6,&y,&x); [line 10]\n " color=yellow style=filled] 1 -> 37 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot index eac2506aa..2b69acaa8 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/conditional_operator.c.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -66 [label="66: Return Stmt \n n$3=*&SIL_temp_conditional___n$2:int [line 35]\n *&return:int =n$3 [line 35]\n " shape="box"] +66 [label="66: Return Stmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 35]\n *&return:int =n$3 [line 35]\n " shape="box"] 66 -> 59 ; @@ -9,11 +9,11 @@ digraph iCFG { 65 -> 61 ; 65 -> 62 ; -64 [label="64: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =2 [line 35]\n " shape="box"] +64 [label="64: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =2 [line 35]\n " shape="box"] 64 -> 60 ; -63 [label="63: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =n$1 [line 35]\n " shape="box"] +63 [label="63: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =n$1 [line 35]\n " shape="box"] 63 -> 60 ; @@ -32,19 +32,19 @@ digraph iCFG { 59 [label="59: Exit test7 \n " color=yellow style=filled] -58 [label="58: Start test7\nFormals: b:int \nLocals: SIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2); [line 35]\n " color=yellow style=filled] +58 [label="58: Start test7\nFormals: b:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2); [line 35]\n " color=yellow style=filled] 58 -> 65 ; -57 [label="57: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 31]\n *&z:int =n$4 [line 31]\n " shape="box"] +57 [label="57: DeclStmt \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 31]\n *&z:int =n$4 [line 31]\n " shape="box"] 57 -> 51 ; -56 [label="56: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =0 [line 31]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =0 [line 31]\n " shape="box"] 56 -> 52 ; -55 [label="55: ConditinalStmt Branch \n n$2=*&p:int * [line 31]\n n$3=*n$2:int [line 31]\n *&SIL_temp_conditional___n$1:int =n$3 [line 31]\n " shape="box"] +55 [label="55: ConditinalStmt Branch \n n$2=*&p:int * [line 31]\n n$3=*n$2:int [line 31]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$3 [line 31]\n " shape="box"] 55 -> 52 ; @@ -67,12 +67,12 @@ digraph iCFG { 50 [label="50: Exit test6 \n " color=yellow style=filled] -49 [label="49: Start test6\nFormals: p:int *\nLocals: z:int SIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&z,&SIL_temp_conditional___n$1); [line 30]\n " color=yellow style=filled] +49 [label="49: Start test6\nFormals: p:int *\nLocals: z:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&z,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 30]\n " color=yellow style=filled] 49 -> 53 ; 49 -> 54 ; -48 [label="48: Return Stmt \n n$2=*&SIL_temp_conditional___n$1:int [line 28]\n *&return:int =n$2 [line 28]\n " shape="box"] +48 [label="48: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 28]\n *&return:int =n$2 [line 28]\n " shape="box"] 48 -> 41 ; @@ -81,11 +81,11 @@ digraph iCFG { 47 -> 43 ; 47 -> 44 ; -46 [label="46: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 28]\n " shape="box"] +46 [label="46: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 28]\n " shape="box"] 46 -> 42 ; -45 [label="45: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =n$0 [line 28]\n " shape="box"] +45 [label="45: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$0 [line 28]\n " shape="box"] 45 -> 42 ; @@ -104,11 +104,11 @@ digraph iCFG { 41 [label="41: Exit test5 \n " color=yellow style=filled] -40 [label="40: Start test5\nFormals: b:int \nLocals: SIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$1); [line 28]\n " color=yellow style=filled] +40 [label="40: Start test5\nFormals: b:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 28]\n " color=yellow style=filled] 40 -> 47 ; -39 [label="39: Return Stmt \n n$2=*&SIL_temp_conditional___n$1:int [line 26]\n n$3=_fun_test2(n$2:int ) [line 26]\n *&return:int =n$3 [line 26]\n " shape="box"] +39 [label="39: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 26]\n n$3=_fun_test2(n$2:int ) [line 26]\n *&return:int =n$3 [line 26]\n " shape="box"] 39 -> 32 ; @@ -117,11 +117,11 @@ digraph iCFG { 38 -> 34 ; 38 -> 35 ; -37 [label="37: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 26]\n " shape="box"] +37 [label="37: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 26]\n " shape="box"] 37 -> 33 ; -36 [label="36: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =n$0 [line 26]\n " shape="box"] +36 [label="36: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$0 [line 26]\n " shape="box"] 36 -> 33 ; @@ -140,11 +140,11 @@ digraph iCFG { 32 [label="32: Exit test4 \n " color=yellow style=filled] -31 [label="31: Start test4\nFormals: b:int \nLocals: SIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$1); [line 26]\n " color=yellow style=filled] +31 [label="31: Start test4\nFormals: b:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 26]\n " color=yellow style=filled] 31 -> 38 ; -30 [label="30: DeclStmt \n n$3=*&SIL_temp_conditional___n$2:int [line 22]\n *&x:int =n$3 [line 22]\n " shape="box"] +30 [label="30: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 22]\n *&x:int =n$3 [line 22]\n " shape="box"] 30 -> 23 ; @@ -153,11 +153,11 @@ digraph iCFG { 29 -> 25 ; 29 -> 26 ; -28 [label="28: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 22]\n " shape="box"] +28 [label="28: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 22]\n " shape="box"] 28 -> 24 ; -27 [label="27: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =n$1 [line 22]\n " shape="box"] +27 [label="27: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =n$1 [line 22]\n " shape="box"] 27 -> 24 ; @@ -180,19 +180,19 @@ digraph iCFG { 22 [label="22: Exit test3 \n " color=yellow style=filled] -21 [label="21: Start test3\nFormals: b:int \nLocals: x:int SIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&x,&SIL_temp_conditional___n$2); [line 21]\n " color=yellow style=filled] +21 [label="21: Start test3\nFormals: b:int \nLocals: x:int 0$?%__sil_tmpSIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$2); [line 21]\n " color=yellow style=filled] 21 -> 29 ; -20 [label="20: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 17]\n *&x:int =n$4 [line 17]\n " shape="box"] +20 [label="20: DeclStmt \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 17]\n *&x:int =n$4 [line 17]\n " shape="box"] 20 -> 14 ; -19 [label="19: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 17]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 17]\n " shape="box"] 19 -> 15 ; -18 [label="18: ConditinalStmt Branch \n n$3=*&b:int [line 17]\n *&SIL_temp_conditional___n$1:int =n$3 [line 17]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$3=*&b:int [line 17]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$3 [line 17]\n " shape="box"] 18 -> 15 ; @@ -215,20 +215,20 @@ digraph iCFG { 13 [label="13: Exit test1 \n " color=yellow style=filled] -12 [label="12: Start test1\nFormals: b:int \nLocals: x:int SIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&x,&SIL_temp_conditional___n$1); [line 16]\n " color=yellow style=filled] +12 [label="12: Start test1\nFormals: b:int \nLocals: x:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 16]\n " color=yellow style=filled] 12 -> 16 ; 12 -> 17 ; -11 [label="11: Return Stmt \n n$3=*&SIL_temp_conditional___n$0:int [line 14]\n n$4=_fun_test2(n$3:int ) [line 14]\n *&return:int =n$4 [line 14]\n " shape="box"] +11 [label="11: Return Stmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 14]\n n$4=_fun_test2(n$3:int ) [line 14]\n *&return:int =n$4 [line 14]\n " shape="box"] 11 -> 5 ; -10 [label="10: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 14]\n " shape="box"] +10 [label="10: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 14]\n " shape="box"] 10 -> 6 ; -9 [label="9: ConditinalStmt Branch \n n$2=*&b:int [line 14]\n *&SIL_temp_conditional___n$0:int =n$2 [line 14]\n " shape="box"] +9 [label="9: ConditinalStmt Branch \n n$2=*&b:int [line 14]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =n$2 [line 14]\n " shape="box"] 9 -> 6 ; @@ -247,7 +247,7 @@ digraph iCFG { 5 [label="5: Exit test \n " color=yellow style=filled] -4 [label="4: Start test\nFormals: b:int \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 14]\n " color=yellow style=filled] +4 [label="4: Start test\nFormals: b:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 14]\n " color=yellow style=filled] 4 -> 7 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/function_call.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/function_call.c.dot index 4d6ca0435..280151193 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/function_call.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/function_call.c.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -67 [label="67: Call n$1 \n n$1=*&SIL_temp_conditional___n$0:_fn_ (*) [line 20]\n n$3=*&SIL_temp_conditional___n$2:int [line 20]\n n$5=*&SIL_temp_conditional___n$4:int [line 20]\n n$1(n$3:int ,2:int ,n$5:int ) [line 20]\n " shape="box"] +67 [label="67: Call n$1 \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) [line 20]\n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 20]\n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 20]\n n$1(n$3:int ,2:int ,n$5:int ) [line 20]\n " shape="box"] 67 -> 51 ; -66 [label="66: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =3 [line 20]\n " shape="box"] +66 [label="66: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =3 [line 20]\n " shape="box"] 66 -> 62 ; -65 [label="65: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =3 [line 20]\n " shape="box"] +65 [label="65: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =3 [line 20]\n " shape="box"] 65 -> 62 ; @@ -24,11 +24,11 @@ digraph iCFG { 62 -> 67 ; -61 [label="61: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 20]\n " shape="box"] +61 [label="61: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 20]\n " shape="box"] 61 -> 57 ; -60 [label="60: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 20]\n " shape="box"] +60 [label="60: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 20]\n " shape="box"] 60 -> 57 ; @@ -45,11 +45,11 @@ digraph iCFG { 57 -> 63 ; 57 -> 64 ; -56 [label="56: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 20]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 20]\n " shape="box"] 56 -> 52 ; -55 [label="55: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 20]\n " shape="box"] +55 [label="55: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 20]\n " shape="box"] 55 -> 52 ; @@ -69,20 +69,20 @@ digraph iCFG { 51 [label="51: Exit fun_ifthenelse4 \n " color=yellow style=filled] -50 [label="50: Start fun_ifthenelse4\nFormals: \nLocals: SIL_temp_conditional___n$0:_fn_ (*) SIL_temp_conditional___n$2:int SIL_temp_conditional___n$4:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$4); [line 20]\n " color=yellow style=filled] +50 [label="50: Start fun_ifthenelse4\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$4); [line 20]\n " color=yellow style=filled] 50 -> 53 ; 50 -> 54 ; -49 [label="49: Call _fun_some_f \n n$1=*&SIL_temp_conditional___n$0:int [line 18]\n n$3=*&SIL_temp_conditional___n$2:int [line 18]\n n$5=*&SIL_temp_conditional___n$4:int [line 18]\n _fun_some_f(n$1:int ,n$3:int ,n$5:int ) [line 18]\n " shape="box"] +49 [label="49: Call _fun_some_f \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 18]\n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 18]\n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 18]\n _fun_some_f(n$1:int ,n$3:int ,n$5:int ) [line 18]\n " shape="box"] 49 -> 33 ; -48 [label="48: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] +48 [label="48: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] 48 -> 44 ; -47 [label="47: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] +47 [label="47: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] 47 -> 44 ; @@ -98,11 +98,11 @@ digraph iCFG { 44 -> 49 ; -43 [label="43: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =2 [line 18]\n " shape="box"] +43 [label="43: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =2 [line 18]\n " shape="box"] 43 -> 39 ; -42 [label="42: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =2 [line 18]\n " shape="box"] +42 [label="42: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =2 [line 18]\n " shape="box"] 42 -> 39 ; @@ -119,11 +119,11 @@ digraph iCFG { 39 -> 45 ; 39 -> 46 ; -38 [label="38: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] +38 [label="38: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] 38 -> 34 ; -37 [label="37: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] +37 [label="37: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 18]\n " shape="box"] 37 -> 34 ; @@ -143,20 +143,20 @@ digraph iCFG { 33 [label="33: Exit fun_ifthenelse3 \n " color=yellow style=filled] -32 [label="32: Start fun_ifthenelse3\nFormals: \nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$2:int SIL_temp_conditional___n$4:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$4); [line 18]\n " color=yellow style=filled] +32 [label="32: Start fun_ifthenelse3\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$4); [line 18]\n " color=yellow style=filled] 32 -> 35 ; 32 -> 36 ; -31 [label="31: Call n$1 \n n$1=*&SIL_temp_conditional___n$0:_fn_ (*) [line 15]\n n$3=*&SIL_temp_conditional___n$2:int [line 15]\n n$5=*&SIL_temp_conditional___n$4:int [line 15]\n n$7=*&SIL_temp_conditional___n$6:int [line 15]\n n$1(n$3:int ,n$5:int ,n$7:int ) [line 15]\n " shape="box"] +31 [label="31: Call n$1 \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) [line 15]\n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 15]\n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 15]\n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 15]\n n$1(n$3:int ,n$5:int ,n$7:int ) [line 15]\n " shape="box"] 31 -> 10 ; -30 [label="30: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =3 [line 15]\n " shape="box"] +30 [label="30: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =3 [line 15]\n " shape="box"] 30 -> 26 ; -29 [label="29: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =3 [line 15]\n " shape="box"] +29 [label="29: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =3 [line 15]\n " shape="box"] 29 -> 26 ; @@ -172,11 +172,11 @@ digraph iCFG { 26 -> 31 ; -25 [label="25: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =2 [line 15]\n " shape="box"] +25 [label="25: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =2 [line 15]\n " shape="box"] 25 -> 21 ; -24 [label="24: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =2 [line 15]\n " shape="box"] +24 [label="24: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =2 [line 15]\n " shape="box"] 24 -> 21 ; @@ -193,11 +193,11 @@ digraph iCFG { 21 -> 27 ; 21 -> 28 ; -20 [label="20: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 15]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 15]\n " shape="box"] 20 -> 16 ; -19 [label="19: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 15]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 15]\n " shape="box"] 19 -> 16 ; @@ -214,11 +214,11 @@ digraph iCFG { 16 -> 22 ; 16 -> 23 ; -15 [label="15: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 15]\n " shape="box"] +15 [label="15: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 15]\n " shape="box"] 15 -> 11 ; -14 [label="14: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 15]\n " shape="box"] +14 [label="14: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 15]\n " shape="box"] 14 -> 11 ; @@ -238,20 +238,20 @@ digraph iCFG { 10 [label="10: Exit fun_ifthenelse2 \n " color=yellow style=filled] -9 [label="9: Start fun_ifthenelse2\nFormals: \nLocals: SIL_temp_conditional___n$0:_fn_ (*) SIL_temp_conditional___n$2:int SIL_temp_conditional___n$4:int SIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$4,&SIL_temp_conditional___n$6); [line 14]\n " color=yellow style=filled] +9 [label="9: Start fun_ifthenelse2\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int 0$?%__sil_tmpSIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$4,&0$?%__sil_tmpSIL_temp_conditional___n$6); [line 14]\n " color=yellow style=filled] 9 -> 12 ; 9 -> 13 ; -8 [label="8: Call n$1 \n n$1=*&SIL_temp_conditional___n$0:_fn_ (*) [line 12]\n n$1(1:int ,2:int ,3:int ) [line 12]\n " shape="box"] +8 [label="8: Call n$1 \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) [line 12]\n n$1(1:int ,2:int ,3:int ) [line 12]\n " shape="box"] 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 12]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 12]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 12]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*)=_fun_some_f [line 12]\n " shape="box"] 6 -> 3 ; @@ -270,7 +270,7 @@ digraph iCFG { 2 [label="2: Exit fun_ifthenelse1 \n " color=yellow style=filled] -1 [label="1: Start fun_ifthenelse1\nFormals: \nLocals: SIL_temp_conditional___n$0:_fn_ (*) \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 12]\n " color=yellow style=filled] +1 [label="1: Start fun_ifthenelse1\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:_fn_ (*) \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 12]\n " color=yellow style=filled] 1 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot index 400445516..9177362c1 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/if_short_circuit.c.dot @@ -30,19 +30,19 @@ digraph iCFG { 89 -> 65 ; -88 [label="88: Prune (false branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 == 0), false); [line 49]\n " shape="invhouse"] +88 [label="88: Prune (false branch) \n n$10=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 == 0), false); [line 49]\n " shape="invhouse"] 88 -> 91 ; -87 [label="87: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 != 0), true); [line 49]\n " shape="invhouse"] +87 [label="87: Prune (true branch) \n n$10=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 49]\n PRUNE((n$10 != 0), true); [line 49]\n " shape="invhouse"] 87 -> 89 ; -86 [label="86: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =1 [line 49]\n " shape="box"] +86 [label="86: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =1 [line 49]\n " shape="box"] 86 -> 81 ; -85 [label="85: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =0 [line 49]\n " shape="box"] +85 [label="85: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =0 [line 49]\n " shape="box"] 85 -> 81 ; @@ -64,19 +64,19 @@ digraph iCFG { 81 -> 87 ; 81 -> 88 ; -80 [label="80: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 == 0), false); [line 49]\n " shape="invhouse"] +80 [label="80: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 == 0), false); [line 49]\n " shape="invhouse"] 80 -> 91 ; -79 [label="79: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 != 0), true); [line 49]\n " shape="invhouse"] +79 [label="79: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 49]\n PRUNE((n$6 != 0), true); [line 49]\n " shape="invhouse"] 79 -> 82 ; -78 [label="78: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 49]\n " shape="box"] +78 [label="78: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 49]\n " shape="box"] 78 -> 73 ; -77 [label="77: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =0 [line 49]\n " shape="box"] +77 [label="77: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 49]\n " shape="box"] 77 -> 73 ; @@ -98,19 +98,19 @@ digraph iCFG { 73 -> 79 ; 73 -> 80 ; -72 [label="72: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 == 0), false); [line 49]\n " shape="invhouse"] +72 [label="72: Prune (false branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 == 0), false); [line 49]\n " shape="invhouse"] 72 -> 91 ; -71 [label="71: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 != 0), true); [line 49]\n " shape="invhouse"] +71 [label="71: Prune (true branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 49]\n PRUNE((n$2 != 0), true); [line 49]\n " shape="invhouse"] 71 -> 74 ; -70 [label="70: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 49]\n " shape="box"] +70 [label="70: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 49]\n " shape="box"] 70 -> 66 ; -69 [label="69: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 49]\n " shape="box"] +69 [label="69: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 49]\n " shape="box"] 69 -> 66 ; @@ -138,7 +138,7 @@ digraph iCFG { 63 [label="63: Exit main \n " color=yellow style=filled] -62 [label="62: Start main\nFormals: \nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$3:int SIL_temp_conditional___n$7:int block_size:char * spec:char * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$3,&SIL_temp_conditional___n$7,&block_size,&spec); [line 42]\n " color=yellow style=filled] +62 [label="62: Start main\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_temp_conditional___n$7:int block_size:char * spec:char * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_temp_conditional___n$7,&block_size,&spec); [line 42]\n " color=yellow style=filled] 62 -> 95 ; @@ -150,19 +150,19 @@ digraph iCFG { 60 -> 36 ; -59 [label="59: Prune (false branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 == 0), false); [line 37]\n " shape="invhouse"] +59 [label="59: Prune (false branch) \n n$10=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 == 0), false); [line 37]\n " shape="invhouse"] 59 -> 35 ; -58 [label="58: Prune (true branch) \n n$10=*&SIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 != 0), true); [line 37]\n " shape="invhouse"] +58 [label="58: Prune (true branch) \n n$10=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 37]\n PRUNE((n$10 != 0), true); [line 37]\n " shape="invhouse"] 58 -> 60 ; -57 [label="57: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =1 [line 37]\n " shape="box"] +57 [label="57: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =1 [line 37]\n " shape="box"] 57 -> 52 ; -56 [label="56: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =0 [line 37]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =0 [line 37]\n " shape="box"] 56 -> 52 ; @@ -184,19 +184,19 @@ digraph iCFG { 52 -> 58 ; 52 -> 59 ; -51 [label="51: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 == 0), false); [line 36]\n " shape="invhouse"] +51 [label="51: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 == 0), false); [line 36]\n " shape="invhouse"] 51 -> 35 ; -50 [label="50: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 != 0), true); [line 36]\n " shape="invhouse"] +50 [label="50: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 36]\n PRUNE((n$6 != 0), true); [line 36]\n " shape="invhouse"] 50 -> 53 ; -49 [label="49: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 36]\n " shape="box"] +49 [label="49: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 36]\n " shape="box"] 49 -> 44 ; -48 [label="48: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =0 [line 36]\n " shape="box"] +48 [label="48: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 36]\n " shape="box"] 48 -> 44 ; @@ -218,19 +218,19 @@ digraph iCFG { 44 -> 50 ; 44 -> 51 ; -43 [label="43: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 == 0), false); [line 36]\n " shape="invhouse"] +43 [label="43: Prune (false branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 == 0), false); [line 36]\n " shape="invhouse"] 43 -> 35 ; -42 [label="42: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n " shape="invhouse"] +42 [label="42: Prune (true branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 36]\n PRUNE((n$2 != 0), true); [line 36]\n " shape="invhouse"] 42 -> 45 ; -41 [label="41: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 36]\n " shape="box"] +41 [label="41: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 36]\n " shape="box"] 41 -> 37 ; -40 [label="40: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 36]\n " shape="box"] +40 [label="40: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 36]\n " shape="box"] 40 -> 37 ; @@ -255,7 +255,7 @@ digraph iCFG { 35 [label="35: Exit test_loop \n " color=yellow style=filled] -34 [label="34: Start test_loop\nFormals: \nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$3:int SIL_temp_conditional___n$7:int block_size:char * spec:char * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$3,&SIL_temp_conditional___n$7,&block_size,&spec); [line 29]\n " color=yellow style=filled] +34 [label="34: Start test_loop\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_temp_conditional___n$7:int block_size:char * spec:char * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_temp_conditional___n$7,&block_size,&spec); [line 29]\n " color=yellow style=filled] 34 -> 61 ; @@ -267,19 +267,19 @@ digraph iCFG { 32 -> 15 ; -31 [label="31: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 == 0), false); [line 22]\n " shape="invhouse"] +31 [label="31: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 == 0), false); [line 22]\n " shape="invhouse"] 31 -> 33 ; -30 [label="30: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 != 0), true); [line 22]\n " shape="invhouse"] +30 [label="30: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 22]\n PRUNE((n$6 != 0), true); [line 22]\n " shape="invhouse"] 30 -> 32 ; -29 [label="29: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 22]\n " shape="box"] +29 [label="29: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 22]\n " shape="box"] 29 -> 24 ; -28 [label="28: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =0 [line 22]\n " shape="box"] +28 [label="28: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 22]\n " shape="box"] 28 -> 24 ; @@ -301,19 +301,19 @@ digraph iCFG { 24 -> 30 ; 24 -> 31 ; -23 [label="23: Prune (false branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 == 0), false); [line 22]\n " shape="invhouse"] 23 -> 33 ; -22 [label="22: Prune (true branch) \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 22]\n PRUNE((n$2 != 0), true); [line 22]\n " shape="invhouse"] 22 -> 25 ; -21 [label="21: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 22]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 22]\n " shape="box"] 21 -> 17 ; -20 [label="20: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] 20 -> 17 ; @@ -341,7 +341,7 @@ digraph iCFG { 14 [label="14: Exit shortcircuit_and \n " color=yellow style=filled] -13 [label="13: Start shortcircuit_and\nFormals: x:int *\nLocals: SIL_temp_conditional___n$0:int SIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$3); [line 21]\n " color=yellow style=filled] +13 [label="13: Start shortcircuit_and\nFormals: x:int *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$3); [line 21]\n " color=yellow style=filled] 13 -> 18 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot index 50fd263f1..9adc0a555 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/int_negation.c.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -34 [label="34: Return Stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 29]\n *&return:int =n$2 [line 29]\n " shape="box"] +34 [label="34: Return Stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 29]\n *&return:int =n$2 [line 29]\n " shape="box"] 34 -> 28 ; -33 [label="33: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 29]\n " shape="box"] +33 [label="33: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 29]\n " shape="box"] 33 -> 29 ; -32 [label="32: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 29]\n " shape="box"] +32 [label="32: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 29]\n " shape="box"] 32 -> 29 ; @@ -27,7 +27,7 @@ digraph iCFG { 28 [label="28: Exit neg \n " color=yellow style=filled] -27 [label="27: Start neg\nFormals: x:int \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 29]\n " color=yellow style=filled] +27 [label="27: Start neg\nFormals: x:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 29]\n " color=yellow style=filled] 27 -> 30 ; @@ -48,16 +48,16 @@ digraph iCFG { 23 -> 25 ; -22 [label="22: Call _fun_identity \n n$2=*&SIL_temp_conditional___n$0:int [line 22]\n n$3=_fun_identity(n$2:int ) [line 22]\n " shape="box"] +22 [label="22: Call _fun_identity \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 22]\n n$3=_fun_identity(n$2:int ) [line 22]\n " shape="box"] 22 -> 23 ; 22 -> 24 ; -21 [label="21: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 22]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 22]\n " shape="box"] 21 -> 17 ; -20 [label="20: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] 20 -> 17 ; @@ -84,7 +84,7 @@ digraph iCFG { 14 [label="14: Exit baz \n " color=yellow style=filled] -13 [label="13: Start baz\nFormals: x:int \nLocals: SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0); [line 20]\n " color=yellow style=filled] +13 [label="13: Start baz\nFormals: x:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 20]\n " color=yellow style=filled] 13 -> 18 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot index 88332ca51..2988f3213 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/member_access.c.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -24 [label="24: DeclStmt \n n$3=*&SIL_temp_conditional___n$0:int [line 22]\n *&z:int =n$3 [line 22]\n " shape="box"] +24 [label="24: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 22]\n *&z:int =n$3 [line 22]\n " shape="box"] 24 -> 18 ; -23 [label="23: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] +23 [label="23: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 22]\n " shape="box"] 23 -> 19 ; -22 [label="22: ConditinalStmt Branch \n n$1=_fun_ret_ptr(4:int ) [line 22]\n n$2=*n$1.field:int [line 22]\n *&SIL_temp_conditional___n$0:int =n$2 [line 22]\n " shape="box"] +22 [label="22: ConditinalStmt Branch \n n$1=_fun_ret_ptr(4:int ) [line 22]\n n$2=*n$1.field:int [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =n$2 [line 22]\n " shape="box"] 22 -> 19 ; @@ -27,20 +27,20 @@ digraph iCFG { 18 [label="18: Exit access_field_in_ife_branch \n " color=yellow style=filled] -17 [label="17: Start access_field_in_ife_branch\nFormals: \nLocals: z:int SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&z,&SIL_temp_conditional___n$0); [line 22]\n " color=yellow style=filled] +17 [label="17: Start access_field_in_ife_branch\nFormals: \nLocals: z:int 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&z,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 22]\n " color=yellow style=filled] 17 -> 20 ; 17 -> 21 ; -16 [label="16: DeclStmt \n n$1=*&SIL_temp_conditional___n$0:int [line 20]\n n$2=_fun_ret_ptr(n$1:int ) [line 20]\n n$3=*n$2.field:int [line 20]\n *&z:int =n$3 [line 20]\n " shape="box"] +16 [label="16: DeclStmt \n n$1=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 20]\n n$2=_fun_ret_ptr(n$1:int ) [line 20]\n n$3=*n$2.field:int [line 20]\n *&z:int =n$3 [line 20]\n " shape="box"] 16 -> 10 ; -15 [label="15: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =3 [line 20]\n " shape="box"] +15 [label="15: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =3 [line 20]\n " shape="box"] 15 -> 11 ; -14 [label="14: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =2 [line 20]\n " shape="box"] +14 [label="14: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =2 [line 20]\n " shape="box"] 14 -> 11 ; @@ -59,20 +59,20 @@ digraph iCFG { 10 [label="10: Exit call_ife_then_access_field \n " color=yellow style=filled] -9 [label="9: Start call_ife_then_access_field\nFormals: \nLocals: z:int SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&z,&SIL_temp_conditional___n$0); [line 20]\n " color=yellow style=filled] +9 [label="9: Start call_ife_then_access_field\nFormals: \nLocals: z:int 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&z,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 20]\n " color=yellow style=filled] 9 -> 12 ; 9 -> 13 ; -8 [label="8: DeclStmt \n n$3=*&SIL_temp_conditional___n$0:struct s * [line 17]\n n$4=*n$3.field:int [line 17]\n *&z:int =n$4 [line 17]\n " shape="box"] +8 [label="8: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s * [line 17]\n n$4=*n$3.field:int [line 17]\n *&z:int =n$4 [line 17]\n " shape="box"] 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n n$2=*&q:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$2 [line 17]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&q:struct s * [line 17]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s *=n$2 [line 17]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n n$1=*&p:struct s * [line 17]\n *&SIL_temp_conditional___n$0:struct s *=n$1 [line 17]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&p:struct s * [line 17]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s *=n$1 [line 17]\n " shape="box"] 6 -> 3 ; @@ -91,7 +91,7 @@ digraph iCFG { 2 [label="2: Exit ife_then_access_field \n " color=yellow style=filled] -1 [label="1: Start ife_then_access_field\nFormals: p:struct s * q:struct s *\nLocals: z:int SIL_temp_conditional___n$0:struct s * \n DECLARE_LOCALS(&return,&z,&SIL_temp_conditional___n$0); [line 16]\n " color=yellow style=filled] +1 [label="1: Start ife_then_access_field\nFormals: p:struct s * q:struct s *\nLocals: z:int 0$?%__sil_tmpSIL_temp_conditional___n$0:struct s * \n DECLARE_LOCALS(&return,&z,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 16]\n " color=yellow style=filled] 1 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot index 2e383c903..555f33b84 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot @@ -5,16 +5,16 @@ digraph iCFG { 26 -> 21 ; 26 -> 22 ; -25 [label="25: BinaryOperatorStmt: AddAssign \n n$14=*&SIL_temp_conditional___n$11:struct s * [line 16]\n n$15=*n$14.x:int [line 16]\n *n$14.x:int =(n$15 + 1) [line 16]\n " shape="box"] +25 [label="25: BinaryOperatorStmt: AddAssign \n n$14=*&0$?%__sil_tmpSIL_temp_conditional___n$11:struct s * [line 16]\n n$15=*n$14.x:int [line 16]\n *n$14.x:int =(n$15 + 1) [line 16]\n " shape="box"] 25 -> 15 ; 25 -> 16 ; -24 [label="24: ConditinalStmt Branch \n n$13=*&p:struct s * [line 16]\n *&SIL_temp_conditional___n$11:struct s *=n$13 [line 16]\n " shape="box"] +24 [label="24: ConditinalStmt Branch \n n$13=*&p:struct s * [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$11:struct s *=n$13 [line 16]\n " shape="box"] 24 -> 20 ; -23 [label="23: ConditinalStmt Branch \n n$12=*&p:struct s * [line 16]\n *&SIL_temp_conditional___n$11:struct s *=n$12 [line 16]\n " shape="box"] +23 [label="23: ConditinalStmt Branch \n n$12=*&p:struct s * [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$11:struct s *=n$12 [line 16]\n " shape="box"] 23 -> 20 ; @@ -30,16 +30,16 @@ digraph iCFG { 20 -> 25 ; -19 [label="19: BinaryOperatorStmt: AddAssign \n n$7=*&p:struct s * [line 17]\n n$9=*&SIL_temp_conditional___n$8:int [line 17]\n n$10=*n$7.x:int [line 17]\n *n$7.x:int =(n$10 + n$9) [line 17]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: AddAssign \n n$7=*&p:struct s * [line 17]\n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$8:int [line 17]\n n$10=*n$7.x:int [line 17]\n *n$7.x:int =(n$10 + n$9) [line 17]\n " shape="box"] 19 -> 4 ; 19 -> 5 ; -18 [label="18: ConditinalStmt Branch \n *&SIL_temp_conditional___n$8:int =7 [line 17]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$8:int =7 [line 17]\n " shape="box"] 18 -> 14 ; -17 [label="17: ConditinalStmt Branch \n *&SIL_temp_conditional___n$8:int =3 [line 17]\n " shape="box"] +17 [label="17: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$8:int =3 [line 17]\n " shape="box"] 17 -> 14 ; @@ -55,15 +55,15 @@ digraph iCFG { 14 -> 19 ; -13 [label="13: BinaryOperatorStmt: AddAssign \n n$3=*&SIL_temp_conditional___n$0:struct s * [line 18]\n n$5=*&SIL_temp_conditional___n$4:int [line 18]\n n$6=*n$3.x:int [line 18]\n *n$3.x:int =(n$6 + n$5) [line 18]\n " shape="box"] +13 [label="13: BinaryOperatorStmt: AddAssign \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s * [line 18]\n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 18]\n n$6=*n$3.x:int [line 18]\n *n$3.x:int =(n$6 + n$5) [line 18]\n " shape="box"] 13 -> 2 ; -12 [label="12: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =7 [line 18]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =7 [line 18]\n " shape="box"] 12 -> 8 ; -11 [label="11: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] +11 [label="11: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =3 [line 18]\n " shape="box"] 11 -> 8 ; @@ -79,11 +79,11 @@ digraph iCFG { 8 -> 13 ; -7 [label="7: ConditinalStmt Branch \n n$2=*&p:struct s * [line 18]\n *&SIL_temp_conditional___n$0:struct s *=n$2 [line 18]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&p:struct s * [line 18]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s *=n$2 [line 18]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n n$1=*&p:struct s * [line 18]\n *&SIL_temp_conditional___n$0:struct s *=n$1 [line 18]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&p:struct s * [line 18]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:struct s *=n$1 [line 18]\n " shape="box"] 6 -> 3 ; @@ -103,7 +103,7 @@ digraph iCFG { 2 [label="2: Exit preincrement \n " color=yellow style=filled] -1 [label="1: Start preincrement\nFormals: p:struct s *\nLocals: SIL_temp_conditional___n$0:struct s * SIL_temp_conditional___n$4:int SIL_temp_conditional___n$8:int SIL_temp_conditional___n$11:struct s * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&SIL_temp_conditional___n$4,&SIL_temp_conditional___n$8,&SIL_temp_conditional___n$11); [line 14]\n " color=yellow style=filled] +1 [label="1: Start preincrement\nFormals: p:struct s *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:struct s * 0$?%__sil_tmpSIL_temp_conditional___n$4:int 0$?%__sil_tmpSIL_temp_conditional___n$8:int 0$?%__sil_tmpSIL_temp_conditional___n$11:struct s * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&0$?%__sil_tmpSIL_temp_conditional___n$4,&0$?%__sil_tmpSIL_temp_conditional___n$8,&0$?%__sil_tmpSIL_temp_conditional___n$11); [line 14]\n " color=yellow style=filled] 1 -> 26 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/unary_operator.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/unary_operator.c.dot index 072e72902..0b5e013f8 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/unary_operator.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/unary_operator.c.dot @@ -1,15 +1,15 @@ /* @generated */ digraph iCFG { -20 [label="20: BinaryOperatorStmt: Assign \n n$13=*&SIL_temp_conditional___n$10:int * [line 12]\n n$14=*n$13:int [line 12]\n *&x:int =n$14 [line 12]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n n$13=*&0$?%__sil_tmpSIL_temp_conditional___n$10:int * [line 12]\n n$14=*n$13:int [line 12]\n *&x:int =n$14 [line 12]\n " shape="box"] 20 -> 10 ; 20 -> 11 ; -19 [label="19: ConditinalStmt Branch \n n$12=*&p:int * [line 12]\n *&SIL_temp_conditional___n$10:int *=n$12 [line 12]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n n$12=*&p:int * [line 12]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:int *=n$12 [line 12]\n " shape="box"] 19 -> 15 ; -18 [label="18: ConditinalStmt Branch \n n$11=*&p:int * [line 12]\n *&SIL_temp_conditional___n$10:int *=n$11 [line 12]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$11=*&p:int * [line 12]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:int *=n$11 [line 12]\n " shape="box"] 18 -> 15 ; @@ -25,16 +25,16 @@ digraph iCFG { 15 -> 20 ; -14 [label="14: DeclStmt \n n$8=*&SIL_temp_conditional___n$5:int * [line 14]\n n$9=*n$8:int [line 14]\n *&y:int =n$9 [line 14]\n " shape="box"] +14 [label="14: DeclStmt \n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$5:int * [line 14]\n n$9=*n$8:int [line 14]\n *&y:int =n$9 [line 14]\n " shape="box"] 14 -> 4 ; 14 -> 5 ; -13 [label="13: ConditinalStmt Branch \n n$7=*&p:int * [line 14]\n *&SIL_temp_conditional___n$5:int *=n$7 [line 14]\n " shape="box"] +13 [label="13: ConditinalStmt Branch \n n$7=*&p:int * [line 14]\n *&0$?%__sil_tmpSIL_temp_conditional___n$5:int *=n$7 [line 14]\n " shape="box"] 13 -> 9 ; -12 [label="12: ConditinalStmt Branch \n n$6=*&p:int * [line 14]\n *&SIL_temp_conditional___n$5:int *=n$6 [line 14]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n n$6=*&p:int * [line 14]\n *&0$?%__sil_tmpSIL_temp_conditional___n$5:int *=n$6 [line 14]\n " shape="box"] 12 -> 9 ; @@ -50,15 +50,15 @@ digraph iCFG { 9 -> 14 ; -8 [label="8: UnaryOperator \n n$3=*&SIL_temp_conditional___n$0:int * [line 16]\n " shape="box"] +8 [label="8: UnaryOperator \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int * [line 16]\n " shape="box"] 8 -> 2 ; -7 [label="7: ConditinalStmt Branch \n n$2=*&p:int * [line 16]\n *&SIL_temp_conditional___n$0:int *=n$2 [line 16]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&p:int * [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int *=n$2 [line 16]\n " shape="box"] 7 -> 3 ; -6 [label="6: ConditinalStmt Branch \n n$1=*&p:int * [line 16]\n *&SIL_temp_conditional___n$0:int *=n$1 [line 16]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&p:int * [line 16]\n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int *=n$1 [line 16]\n " shape="box"] 6 -> 3 ; @@ -77,7 +77,7 @@ digraph iCFG { 2 [label="2: Exit dereference_ifthenelse \n " color=yellow style=filled] -1 [label="1: Start dereference_ifthenelse\nFormals: p:int *\nLocals: SIL_temp_conditional___n$0:int * y:int SIL_temp_conditional___n$5:int * SIL_temp_conditional___n$10:int * x:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&y,&SIL_temp_conditional___n$5,&SIL_temp_conditional___n$10,&x); [line 10]\n " color=yellow style=filled] +1 [label="1: Start dereference_ifthenelse\nFormals: p:int *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int * y:int 0$?%__sil_tmpSIL_temp_conditional___n$5:int * 0$?%__sil_tmpSIL_temp_conditional___n$10:int * x:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&y,&0$?%__sil_tmpSIL_temp_conditional___n$5,&0$?%__sil_tmpSIL_temp_conditional___n$10,&x); [line 10]\n " color=yellow style=filled] 1 -> 16 ; diff --git a/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot b/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot index 418a58c9c..ca78c135a 100644 --- a/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot @@ -255,19 +255,19 @@ digraph iCFG { 191 -> 184 ; -190 [label="190: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 == 0), false); [line 128]\n " shape="invhouse"] +190 [label="190: Prune (false branch) \n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 == 0), false); [line 128]\n " shape="invhouse"] 190 -> 182 ; -189 [label="189: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 != 0), true); [line 128]\n " shape="invhouse"] +189 [label="189: Prune (true branch) \n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 128]\n PRUNE((n$8 != 0), true); [line 128]\n " shape="invhouse"] 189 -> 164 ; -188 [label="188: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =1 [line 128]\n " shape="box"] +188 [label="188: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =1 [line 128]\n " shape="box"] 188 -> 183 ; -187 [label="187: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =0 [line 128]\n " shape="box"] +187 [label="187: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =0 [line 128]\n " shape="box"] 187 -> 183 ; @@ -293,19 +293,19 @@ digraph iCFG { 182 -> 175 ; -181 [label="181: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 == 0), false); [line 130]\n " shape="invhouse"] +181 [label="181: Prune (false branch) \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 == 0), false); [line 130]\n " shape="invhouse"] 181 -> 173 ; -180 [label="180: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 != 0), true); [line 130]\n " shape="invhouse"] +180 [label="180: Prune (true branch) \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 130]\n PRUNE((n$5 != 0), true); [line 130]\n " shape="invhouse"] 180 -> 162 ; -179 [label="179: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 130]\n " shape="box"] +179 [label="179: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 130]\n " shape="box"] 179 -> 174 ; -178 [label="178: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =0 [line 130]\n " shape="box"] +178 [label="178: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 130]\n " shape="box"] 178 -> 174 ; @@ -379,7 +379,7 @@ digraph iCFG { 161 [label="161: Exit g6 \n " color=yellow style=filled] -160 [label="160: Start g6\nFormals: \nLocals: a:int SIL_temp_conditional___n$3:int SIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$3,&SIL_temp_conditional___n$6); [line 124]\n " color=yellow style=filled] +160 [label="160: Start g6\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_temp_conditional___n$6); [line 124]\n " color=yellow style=filled] 160 -> 172 ; @@ -387,19 +387,19 @@ digraph iCFG { 159 -> 152 ; -158 [label="158: Prune (false branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 == 0), false); [line 106]\n " shape="invhouse"] +158 [label="158: Prune (false branch) \n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 == 0), false); [line 106]\n " shape="invhouse"] 158 -> 150 ; -157 [label="157: Prune (true branch) \n n$8=*&SIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 != 0), true); [line 106]\n " shape="invhouse"] +157 [label="157: Prune (true branch) \n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 106]\n PRUNE((n$8 != 0), true); [line 106]\n " shape="invhouse"] 157 -> 132 ; -156 [label="156: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =1 [line 106]\n " shape="box"] +156 [label="156: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =1 [line 106]\n " shape="box"] 156 -> 151 ; -155 [label="155: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =0 [line 106]\n " shape="box"] +155 [label="155: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =0 [line 106]\n " shape="box"] 155 -> 151 ; @@ -425,19 +425,19 @@ digraph iCFG { 150 -> 143 ; -149 [label="149: Prune (false branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 == 0), false); [line 108]\n " shape="invhouse"] +149 [label="149: Prune (false branch) \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 == 0), false); [line 108]\n " shape="invhouse"] 149 -> 141 ; -148 [label="148: Prune (true branch) \n n$5=*&SIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 != 0), true); [line 108]\n " shape="invhouse"] +148 [label="148: Prune (true branch) \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 108]\n PRUNE((n$5 != 0), true); [line 108]\n " shape="invhouse"] 148 -> 130 ; -147 [label="147: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 108]\n " shape="box"] +147 [label="147: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 108]\n " shape="box"] 147 -> 142 ; -146 [label="146: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =0 [line 108]\n " shape="box"] +146 [label="146: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =0 [line 108]\n " shape="box"] 146 -> 142 ; @@ -511,7 +511,7 @@ digraph iCFG { 129 [label="129: Exit g5 \n " color=yellow style=filled] -128 [label="128: Start g5\nFormals: \nLocals: a:int SIL_temp_conditional___n$3:int SIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$3,&SIL_temp_conditional___n$6); [line 102]\n " color=yellow style=filled] +128 [label="128: Start g5\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int 0$?%__sil_tmpSIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$3,&0$?%__sil_tmpSIL_temp_conditional___n$6); [line 102]\n " color=yellow style=filled] 128 -> 140 ; @@ -519,19 +519,19 @@ digraph iCFG { 127 -> 120 ; -126 [label="126: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 == 0), false); [line 85]\n " shape="invhouse"] +126 [label="126: Prune (false branch) \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 == 0), false); [line 85]\n " shape="invhouse"] 126 -> 118 ; -125 [label="125: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 != 0), true); [line 85]\n " shape="invhouse"] +125 [label="125: Prune (true branch) \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 85]\n PRUNE((n$9 != 0), true); [line 85]\n " shape="invhouse"] 125 -> 99 ; -124 [label="124: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =1 [line 85]\n " shape="box"] +124 [label="124: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =1 [line 85]\n " shape="box"] 124 -> 119 ; -123 [label="123: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =0 [line 85]\n " shape="box"] +123 [label="123: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =0 [line 85]\n " shape="box"] 123 -> 119 ; @@ -557,19 +557,19 @@ digraph iCFG { 118 -> 111 ; -117 [label="117: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 == 0), false); [line 87]\n " shape="invhouse"] +117 [label="117: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 == 0), false); [line 87]\n " shape="invhouse"] 117 -> 109 ; -116 [label="116: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 != 0), true); [line 87]\n " shape="invhouse"] +116 [label="116: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 87]\n PRUNE((n$6 != 0), true); [line 87]\n " shape="invhouse"] 116 -> 102 ; -115 [label="115: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =1 [line 87]\n " shape="box"] +115 [label="115: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =1 [line 87]\n " shape="box"] 115 -> 110 ; -114 [label="114: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =0 [line 87]\n " shape="box"] +114 [label="114: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =0 [line 87]\n " shape="box"] 114 -> 110 ; @@ -647,7 +647,7 @@ digraph iCFG { 96 [label="96: Exit g4 \n " color=yellow style=filled] -95 [label="95: Start g4\nFormals: \nLocals: a:int SIL_temp_conditional___n$4:int SIL_temp_conditional___n$7:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$4,&SIL_temp_conditional___n$7); [line 81]\n " color=yellow style=filled] +95 [label="95: Start g4\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int 0$?%__sil_tmpSIL_temp_conditional___n$7:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$4,&0$?%__sil_tmpSIL_temp_conditional___n$7); [line 81]\n " color=yellow style=filled] 95 -> 108 ; @@ -655,19 +655,19 @@ digraph iCFG { 94 -> 87 ; -93 [label="93: Prune (false branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 == 0), false); [line 63]\n " shape="invhouse"] +93 [label="93: Prune (false branch) \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 == 0), false); [line 63]\n " shape="invhouse"] 93 -> 85 ; -92 [label="92: Prune (true branch) \n n$9=*&SIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 != 0), true); [line 63]\n " shape="invhouse"] +92 [label="92: Prune (true branch) \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$7:int [line 63]\n PRUNE((n$9 != 0), true); [line 63]\n " shape="invhouse"] 92 -> 65 ; -91 [label="91: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =1 [line 63]\n " shape="box"] +91 [label="91: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =1 [line 63]\n " shape="box"] 91 -> 86 ; -90 [label="90: ConditinalStmt Branch \n *&SIL_temp_conditional___n$7:int =0 [line 63]\n " shape="box"] +90 [label="90: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$7:int =0 [line 63]\n " shape="box"] 90 -> 86 ; @@ -693,19 +693,19 @@ digraph iCFG { 85 -> 78 ; -84 [label="84: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 == 0), false); [line 65]\n " shape="invhouse"] +84 [label="84: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 == 0), false); [line 65]\n " shape="invhouse"] 84 -> 76 ; -83 [label="83: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 != 0), true); [line 65]\n " shape="invhouse"] +83 [label="83: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 65]\n PRUNE((n$6 != 0), true); [line 65]\n " shape="invhouse"] 83 -> 68 ; -82 [label="82: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =1 [line 65]\n " shape="box"] +82 [label="82: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =1 [line 65]\n " shape="box"] 82 -> 77 ; -81 [label="81: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =0 [line 65]\n " shape="box"] +81 [label="81: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =0 [line 65]\n " shape="box"] 81 -> 77 ; @@ -787,7 +787,7 @@ digraph iCFG { 62 [label="62: Exit g3 \n " color=yellow style=filled] -61 [label="61: Start g3\nFormals: \nLocals: a:int SIL_temp_conditional___n$4:int SIL_temp_conditional___n$7:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$4,&SIL_temp_conditional___n$7); [line 59]\n " color=yellow style=filled] +61 [label="61: Start g3\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int 0$?%__sil_tmpSIL_temp_conditional___n$7:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$4,&0$?%__sil_tmpSIL_temp_conditional___n$7); [line 59]\n " color=yellow style=filled] 61 -> 75 ; @@ -799,19 +799,19 @@ digraph iCFG { 59 -> 52 ; -58 [label="58: Prune (false branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 == 0), false); [line 42]\n " shape="invhouse"] +58 [label="58: Prune (false branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 == 0), false); [line 42]\n " shape="invhouse"] 58 -> 50 ; -57 [label="57: Prune (true branch) \n n$6=*&SIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 != 0), true); [line 42]\n " shape="invhouse"] +57 [label="57: Prune (true branch) \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$4:int [line 42]\n PRUNE((n$6 != 0), true); [line 42]\n " shape="invhouse"] 57 -> 31 ; -56 [label="56: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =1 [line 42]\n " shape="box"] +56 [label="56: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =1 [line 42]\n " shape="box"] 56 -> 51 ; -55 [label="55: ConditinalStmt Branch \n *&SIL_temp_conditional___n$4:int =0 [line 42]\n " shape="box"] +55 [label="55: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$4:int =0 [line 42]\n " shape="box"] 55 -> 51 ; @@ -837,19 +837,19 @@ digraph iCFG { 50 -> 43 ; -49 [label="49: Prune (false branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 == 0), false); [line 44]\n " shape="invhouse"] +49 [label="49: Prune (false branch) \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 == 0), false); [line 44]\n " shape="invhouse"] 49 -> 41 ; -48 [label="48: Prune (true branch) \n n$3=*&SIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 != 0), true); [line 44]\n " shape="invhouse"] +48 [label="48: Prune (true branch) \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 44]\n PRUNE((n$3 != 0), true); [line 44]\n " shape="invhouse"] 48 -> 34 ; -47 [label="47: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 44]\n " shape="box"] +47 [label="47: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 44]\n " shape="box"] 47 -> 42 ; -46 [label="46: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =0 [line 44]\n " shape="box"] +46 [label="46: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =0 [line 44]\n " shape="box"] 46 -> 42 ; @@ -927,7 +927,7 @@ digraph iCFG { 28 [label="28: Exit g2 \n " color=yellow style=filled] -27 [label="27: Start g2\nFormals: \nLocals: SIL_temp_conditional___n$1:int SIL_temp_conditional___n$4:int a:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$1,&SIL_temp_conditional___n$4,&a); [line 37]\n " color=yellow style=filled] +27 [label="27: Start g2\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$1:int 0$?%__sil_tmpSIL_temp_conditional___n$4:int a:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmpSIL_temp_conditional___n$4,&a); [line 37]\n " color=yellow style=filled] 27 -> 60 ; diff --git a/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot b/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot index a47a37971..7b5c4670a 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot @@ -15,14 +15,14 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n *&SIL_compound_literal__n$0.x:int =52 [line 15]\n *&SIL_compound_literal__n$0.y:int =32 [line 15]\n n$1=*&SIL_compound_literal__n$0.x:int [line 15]\n *&return:int =n$1 [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n *&0$?%__sil_tmpSIL_compound_literal__n$0.x:int =52 [line 15]\n *&0$?%__sil_tmpSIL_compound_literal__n$0.y:int =32 [line 15]\n n$1=*&0$?%__sil_tmpSIL_compound_literal__n$0.x:int [line 15]\n *&return:int =n$1 [line 15]\n " shape="box"] 3 -> 2 ; 2 [label="2: Exit compound_literal_expr \n " color=yellow style=filled] -1 [label="1: Start compound_literal_expr\nFormals: \nLocals: SIL_compound_literal__n$0:struct point \n DECLARE_LOCALS(&return,&SIL_compound_literal__n$0); [line 15]\n " color=yellow style=filled] +1 [label="1: Start compound_literal_expr\nFormals: \nLocals: 0$?%__sil_tmpSIL_compound_literal__n$0:struct point \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_compound_literal__n$0); [line 15]\n " color=yellow style=filled] 1 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot index 53ab453d0..9b2fa957c 100644 --- a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot @@ -16,16 +16,16 @@ digraph iCFG { 192 -> 184 ; -191 [label="191: Switch_stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 193]\n *&value:int =n$2 [line 193]\n n$3=*&value:int [line 193]\n " shape="box"] +191 [label="191: Switch_stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 193]\n *&value:int =n$2 [line 193]\n n$3=*&value:int [line 193]\n " shape="box"] 191 -> 193 ; 191 -> 194 ; -190 [label="190: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =9 [line 193]\n " shape="box"] +190 [label="190: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =9 [line 193]\n " shape="box"] 190 -> 185 ; -189 [label="189: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =7 [line 193]\n " shape="box"] +189 [label="189: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =7 [line 193]\n " shape="box"] 189 -> 185 ; @@ -53,7 +53,7 @@ digraph iCFG { 183 [label="183: Exit m11 \n " color=yellow style=filled] -182 [label="182: Start m11\nFormals: \nLocals: SIL_temp_conditional___n$0:int value:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&value); [line 191]\n " color=yellow style=filled] +182 [label="182: Start m11\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int value:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&value); [line 191]\n " color=yellow style=filled] 182 -> 195 ; @@ -154,16 +154,16 @@ digraph iCFG { 158 -> 150 ; -157 [label="157: Switch_stmt \n n$3=*&SIL_temp_conditional___n$1:int [line 160]\n " shape="box"] +157 [label="157: Switch_stmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 160]\n " shape="box"] 157 -> 169 ; 157 -> 170 ; -156 [label="156: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =2 [line 160]\n " shape="box"] +156 [label="156: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =2 [line 160]\n " shape="box"] 156 -> 151 ; -155 [label="155: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 160]\n " shape="box"] +155 [label="155: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 160]\n " shape="box"] 155 -> 151 ; @@ -212,7 +212,7 @@ digraph iCFG { 144 [label="144: Exit m8 \n " color=yellow style=filled] -143 [label="143: Start m8\nFormals: \nLocals: a:int SIL_temp_conditional___n$1:int z:int something:int value:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$1,&z,&something,&value); [line 157]\n " color=yellow style=filled] +143 [label="143: Start m8\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int z:int something:int value:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$1,&z,&something,&value); [line 157]\n " color=yellow style=filled] 143 -> 171 ; @@ -353,16 +353,16 @@ digraph iCFG { 110 -> 102 ; -109 [label="109: Switch_stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 121]\n " shape="box"] +109 [label="109: Switch_stmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 121]\n " shape="box"] 109 -> 120 ; 109 -> 121 ; -108 [label="108: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =0 [line 121]\n " shape="box"] +108 [label="108: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =0 [line 121]\n " shape="box"] 108 -> 103 ; -107 [label="107: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =1 [line 121]\n " shape="box"] +107 [label="107: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =1 [line 121]\n " shape="box"] 107 -> 103 ; @@ -390,7 +390,7 @@ digraph iCFG { 101 [label="101: Exit m6 \n " color=yellow style=filled] -100 [label="100: Start m6\nFormals: \nLocals: SIL_temp_conditional___n$0:int z:int something:int value:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$0,&z,&something,&value); [line 119]\n " color=yellow style=filled] +100 [label="100: Start m6\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$0:int z:int something:int value:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$0,&z,&something,&value); [line 119]\n " color=yellow style=filled] 100 -> 122 ; diff --git a/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot b/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot index 3340772d1..3d74efcc5 100644 --- a/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/errors/subtyping/cast_with_enforce.cpp.dot @@ -32,15 +32,15 @@ digraph iCFG { 33 -> 28 ; 33 -> 29 ; -32 [label="32: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:class Derived *&=-1 [line 46]\n " shape="box"] +32 [label="32: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *&=-1 [line 46]\n " shape="box"] 32 -> 27 ; -31 [label="31: Return Stmt \n _fun_WrongParameterException_WrongParameterException(&SIL_materialize_temp__n$6:class WrongParameterException *,\"derived\":_Bool ,\"Base is not Derived\":char *) [line 46]\n _fun_WrongParameterException_WrongParameterException(&return:int *,&SIL_materialize_temp__n$6:class WrongParameterException &) [line 46]\n " shape="box"] +31 [label="31: Return Stmt \n _fun_WrongParameterException_WrongParameterException(&0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException *,\"derived\":_Bool ,\"Base is not Derived\":char *) [line 46]\n _fun_WrongParameterException_WrongParameterException(&return:int *,&0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException &) [line 46]\n " shape="box"] 31 -> 25 ; -30 [label="30: ConditinalStmt Branch \n n$5=*&_tmp:class Derived *& [line 46]\n *&SIL_temp_conditional___n$2:class Derived *&=n$5 [line 46]\n " shape="box"] +30 [label="30: ConditinalStmt Branch \n n$5=*&_tmp:class Derived *& [line 46]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *&=n$5 [line 46]\n " shape="box"] 30 -> 27 ; @@ -63,7 +63,7 @@ digraph iCFG { 25 [label="25: Exit cast_with_npe_avoided_by_enforce \n " color=yellow style=filled] -24 [label="24: Start cast_with_npe_avoided_by_enforce\nFormals: \nLocals: SIL_temp_conditional___n$2:class Derived *& SIL_materialize_temp__n$6:class WrongParameterException _tmp:class Derived *& derived:class Derived * base:class Base \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2,&SIL_materialize_temp__n$6,&_tmp,&derived,&base); [line 43]\n " color=yellow style=filled] +24 [label="24: Start cast_with_npe_avoided_by_enforce\nFormals: \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *& 0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException _tmp:class Derived *& derived:class Derived * base:class Base \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$6,&_tmp,&derived,&base); [line 43]\n " color=yellow style=filled] 24 -> 35 ; @@ -76,15 +76,15 @@ digraph iCFG { 22 -> 17 ; 22 -> 18 ; -21 [label="21: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:class Derived *&=-1 [line 39]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *&=-1 [line 39]\n " shape="box"] 21 -> 16 ; -20 [label="20: Return Stmt \n _fun_WrongParameterException_WrongParameterException(&SIL_materialize_temp__n$6:class WrongParameterException *,\"cert\":_Bool ,\"Base is not Derived\":char *) [line 39]\n _fun_WrongParameterException_WrongParameterException(&return:int *,&SIL_materialize_temp__n$6:class WrongParameterException &) [line 39]\n " shape="box"] +20 [label="20: Return Stmt \n _fun_WrongParameterException_WrongParameterException(&0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException *,\"cert\":_Bool ,\"Base is not Derived\":char *) [line 39]\n _fun_WrongParameterException_WrongParameterException(&return:int *,&0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException &) [line 39]\n " shape="box"] 20 -> 14 ; -19 [label="19: ConditinalStmt Branch \n n$5=*&_tmp:class Derived *& [line 39]\n *&SIL_temp_conditional___n$2:class Derived *&=n$5 [line 39]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n n$5=*&_tmp:class Derived *& [line 39]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *&=n$5 [line 39]\n " shape="box"] 19 -> 16 ; @@ -107,7 +107,7 @@ digraph iCFG { 14 [label="14: Exit cast_with_no_npe \n " color=yellow style=filled] -13 [label="13: Start cast_with_no_npe\nFormals: certificate:class Base &\nLocals: SIL_temp_conditional___n$2:class Derived *& SIL_materialize_temp__n$6:class WrongParameterException _tmp:class Derived *& cert:class Derived * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2,&SIL_materialize_temp__n$6,&_tmp,&cert); [line 37]\n " color=yellow style=filled] +13 [label="13: Start cast_with_no_npe\nFormals: certificate:class Base &\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:class Derived *& 0$?%__sil_tmpSIL_materialize_temp__n$6:class WrongParameterException _tmp:class Derived *& cert:class Derived * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$6,&_tmp,&cert); [line 37]\n " color=yellow style=filled] 13 -> 23 ; diff --git a/infer/tests/codetoanalyze/cpp/errors/vector/empty_access.cpp b/infer/tests/codetoanalyze/cpp/errors/vector/empty_access.cpp index ce855608c..3c3d8ff0e 100644 --- a/infer/tests/codetoanalyze/cpp/errors/vector/empty_access.cpp +++ b/infer/tests/codetoanalyze/cpp/errors/vector/empty_access.cpp @@ -149,3 +149,10 @@ int vector_as_param_clear() { vector_param_clear(v); return v[0]; } + +std::vector get_vector() { + std::vector x; + return x; +} + +int getter_empty() { return get_vector()[0]; } diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot index 743bf7cab..dc61bf3ad 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot @@ -4,15 +4,15 @@ digraph iCFG { 34 -> 28 ; -33 [label="33: DeclStmt \n n$7=*&SIL_temp_conditional___n$1:class X [line 27]\n *&SIL_materialize_temp__n$0:class X =n$7 [line 27]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 27]\n " shape="box"] +33 [label="33: DeclStmt \n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$1:class X [line 27]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class X =n$7 [line 27]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 27]\n " shape="box"] 33 -> 26 ; -32 [label="32: ConditinalStmt Branch \n _fun_X_X(&SIL_materialize_temp__n$0:class X *,&a:class X &) [line 27]\n *&SIL_temp_conditional___n$1:class X =&SIL_materialize_temp__n$0 [line 27]\n " shape="box"] +32 [label="32: ConditinalStmt Branch \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&a:class X &) [line 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 27]\n " shape="box"] 32 -> 27 ; -31 [label="31: ConditinalStmt Branch \n _fun_getX(&SIL_materialize_temp__n$5:class X *) [line 27]\n _fun_X_X(&SIL_materialize_temp__n$0:class X *,&SIL_materialize_temp__n$5:class X &) [line 27]\n *&SIL_temp_conditional___n$1:class X =&SIL_materialize_temp__n$0 [line 27]\n " shape="box"] +31 [label="31: ConditinalStmt Branch \n _fun_getX(&0$?%__sil_tmpSIL_materialize_temp__n$5:class X *) [line 27]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$5:class X &) [line 27]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 27]\n " shape="box"] 31 -> 27 ; @@ -24,7 +24,7 @@ digraph iCFG { 29 -> 31 ; -28 [label="28: Call _fun_X_operator bool \n _fun_getX(&__temp_return_n$3:class X *) [line 27]\n n$4=_fun_X_operator bool(&__temp_return_n$3:class X &) [line 27]\n " shape="box"] +28 [label="28: Call _fun_X_operator bool \n _fun_getX(&0$?%__sil_tmp__temp_return_n$3:class X *) [line 27]\n n$4=_fun_X_operator bool(&0$?%__sil_tmp__temp_return_n$3:class X &) [line 27]\n " shape="box"] 28 -> 29 ; @@ -36,7 +36,7 @@ digraph iCFG { 26 [label="26: Exit conditional \n " color=yellow style=filled] -25 [label="25: Start conditional\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:class X SIL_temp_conditional___n$1:class X __temp_return_n$3:class X SIL_materialize_temp__n$5:class X a:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0,&SIL_temp_conditional___n$1,&__temp_return_n$3,&SIL_materialize_temp__n$5,&a); [line 25]\n " color=yellow style=filled] +25 [label="25: Start conditional\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$0:class X 0$?%__sil_tmpSIL_temp_conditional___n$1:class X 0$?%__sil_tmp__temp_return_n$3:class X 0$?%__sil_tmpSIL_materialize_temp__n$5:class X a:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$1,&0$?%__sil_tmp__temp_return_n$3,&0$?%__sil_tmpSIL_materialize_temp__n$5,&a); [line 25]\n " color=yellow style=filled] 25 -> 34 ; @@ -44,19 +44,19 @@ digraph iCFG { 24 -> 22 ; -23 [label="23: DeclStmt \n n$5=*&SIL_temp_conditional___n$2:class X [line 22]\n *&SIL_materialize_temp__n$0:class X =n$5 [line 22]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] +23 [label="23: DeclStmt \n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:class X [line 22]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0:class X =n$5 [line 22]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] 23 -> 15 ; -22 [label="22: BinaryConditinalStmt Init \n _fun_getX(&SIL_materialize_temp__n$0:class X *) [line 22]\n " shape="box"] +22 [label="22: BinaryConditinalStmt Init \n _fun_getX(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *) [line 22]\n " shape="box"] 22 -> 17 ; -21 [label="21: ConditinalStmt Branch \n _fun_X_X(&SIL_materialize_temp__n$0:class X *,&a:class X &) [line 22]\n *&SIL_temp_conditional___n$2:class X =&SIL_materialize_temp__n$0 [line 22]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&a:class X &) [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n " shape="box"] 21 -> 16 ; -20 [label="20: ConditinalStmt Branch \n *&SIL_materialize_temp__n$4:class X =&SIL_materialize_temp__n$0 [line 22]\n _fun_X_X(&SIL_materialize_temp__n$0:class X *,&SIL_materialize_temp__n$4:class X &) [line 22]\n *&SIL_temp_conditional___n$2:class X =&SIL_materialize_temp__n$0 [line 22]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_materialize_temp__n$4:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$4:class X &) [line 22]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:class X =&0$?%__sil_tmpSIL_materialize_temp__n$0 [line 22]\n " shape="box"] 20 -> 16 ; @@ -68,7 +68,7 @@ digraph iCFG { 18 -> 20 ; -17 [label="17: Call _fun_X_operator bool \n n$3=_fun_X_operator bool(&SIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] +17 [label="17: Call _fun_X_operator bool \n n$3=_fun_X_operator bool(&0$?%__sil_tmpSIL_materialize_temp__n$0:class X &) [line 22]\n " shape="box"] 17 -> 18 ; @@ -80,7 +80,7 @@ digraph iCFG { 15 [label="15: Exit binaryConditional \n " color=yellow style=filled] -14 [label="14: Start binaryConditional\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:class X SIL_temp_conditional___n$2:class X SIL_materialize_temp__n$4:class X a:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0,&SIL_temp_conditional___n$2,&SIL_materialize_temp__n$4,&a); [line 20]\n " color=yellow style=filled] +14 [label="14: Start binaryConditional\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$0:class X 0$?%__sil_tmpSIL_temp_conditional___n$2:class X 0$?%__sil_tmpSIL_materialize_temp__n$4:class X a:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_materialize_temp__n$4,&a); [line 20]\n " color=yellow style=filled] 14 -> 24 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot index 1f38f87d0..3f0bb2957 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot @@ -88,15 +88,15 @@ digraph iCFG { 42 -> 44 ; -41 [label="41: DeclStmt \n n$6=*&SIL_temp_conditional___n$3:int [line 29]\n *&SIL_materialize_temp__n$2:int =n$6 [line 29]\n *&r:int &=&SIL_materialize_temp__n$2 [line 29]\n " shape="box"] +41 [label="41: DeclStmt \n n$6=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 29]\n *&0$?%__sil_tmpSIL_materialize_temp__n$2:int =n$6 [line 29]\n *&r:int &=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 29]\n " shape="box"] 41 -> 35 ; -40 [label="40: ConditinalStmt Branch \n *&SIL_temp_conditional___n$3:int =1 [line 29]\n " shape="box"] +40 [label="40: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =1 [line 29]\n " shape="box"] 40 -> 36 ; -39 [label="39: ConditinalStmt Branch \n n$5=*&b:int [line 29]\n *&SIL_temp_conditional___n$3:int =n$5 [line 29]\n " shape="box"] +39 [label="39: ConditinalStmt Branch \n n$5=*&b:int [line 29]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =n$5 [line 29]\n " shape="box"] 39 -> 36 ; @@ -119,7 +119,7 @@ digraph iCFG { 34 [label="34: Exit div_temp_lvalue \n " color=yellow style=filled] -33 [label="33: Start div_temp_lvalue\nFormals: a:int b:int \nLocals: r:int & SIL_materialize_temp__n$2:int SIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&r,&SIL_materialize_temp__n$2,&SIL_temp_conditional___n$3); [line 28]\n " color=yellow style=filled] +33 [label="33: Start div_temp_lvalue\nFormals: a:int b:int \nLocals: r:int & 0$?%__sil_tmpSIL_materialize_temp__n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$3:int \n DECLARE_LOCALS(&return,&r,&0$?%__sil_tmpSIL_materialize_temp__n$2,&0$?%__sil_tmpSIL_temp_conditional___n$3); [line 28]\n " color=yellow style=filled] 33 -> 37 ; @@ -133,15 +133,15 @@ digraph iCFG { 31 -> 26 ; 31 -> 27 ; -30 [label="30: BinaryOperatorStmt: Assign \n n$3=*&SIL_temp_conditional___n$1:int & [line 24]\n *n$3:int =1 [line 24]\n " shape="box"] +30 [label="30: BinaryOperatorStmt: Assign \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int & [line 24]\n *n$3:int =1 [line 24]\n " shape="box"] 30 -> 24 ; -29 [label="29: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v2 [line 24]\n " shape="box"] +29 [label="29: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int &=&v2 [line 24]\n " shape="box"] 29 -> 25 ; -28 [label="28: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v1 [line 24]\n " shape="box"] +28 [label="28: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int &=&v1 [line 24]\n " shape="box"] 28 -> 25 ; @@ -164,7 +164,7 @@ digraph iCFG { 23 [label="23: Exit assign_conditional \n " color=yellow style=filled] -22 [label="22: Start assign_conditional\nFormals: a:int \nLocals: SIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$1,&v2,&v1); [line 22]\n " color=yellow style=filled] +22 [label="22: Start assign_conditional\nFormals: a:int \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$1,&v2,&v1); [line 22]\n " color=yellow style=filled] 22 -> 32 ; @@ -173,15 +173,15 @@ digraph iCFG { 21 -> 16 ; 21 -> 17 ; -20 [label="20: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 18]\n *&v3:int =n$4 [line 18]\n " shape="box"] +20 [label="20: DeclStmt \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 18]\n *&v3:int =n$4 [line 18]\n " shape="box"] 20 -> 14 ; -19 [label="19: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 18]\n " shape="box"] +19 [label="19: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 18]\n " shape="box"] 19 -> 15 ; -18 [label="18: ConditinalStmt Branch \n n$3=*&v1:int [line 18]\n *&SIL_temp_conditional___n$1:int =n$3 [line 18]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$3=*&v1:int [line 18]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$3 [line 18]\n " shape="box"] 18 -> 15 ; @@ -204,7 +204,7 @@ digraph iCFG { 13 [label="13: Exit choose_rvalue \n " color=yellow style=filled] -12 [label="12: Start choose_rvalue\nFormals: a:int \nLocals: v3:int SIL_temp_conditional___n$1:int v1:int \n DECLARE_LOCALS(&return,&v3,&SIL_temp_conditional___n$1,&v1); [line 16]\n " color=yellow style=filled] +12 [label="12: Start choose_rvalue\nFormals: a:int \nLocals: v3:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int v1:int \n DECLARE_LOCALS(&return,&v3,&0$?%__sil_tmpSIL_temp_conditional___n$1,&v1); [line 16]\n " color=yellow style=filled] 12 -> 21 ; @@ -217,15 +217,15 @@ digraph iCFG { 10 -> 5 ; 10 -> 6 ; -9 [label="9: DeclStmt \n n$3=*&SIL_temp_conditional___n$1:int & [line 12]\n n$4=*n$3:int [line 12]\n *&v3:int =n$4 [line 12]\n " shape="box"] +9 [label="9: DeclStmt \n n$3=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int & [line 12]\n n$4=*n$3:int [line 12]\n *&v3:int =n$4 [line 12]\n " shape="box"] 9 -> 3 ; -8 [label="8: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v2 [line 12]\n " shape="box"] +8 [label="8: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int &=&v2 [line 12]\n " shape="box"] 8 -> 4 ; -7 [label="7: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int &=&v1 [line 12]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int &=&v1 [line 12]\n " shape="box"] 7 -> 4 ; @@ -248,7 +248,7 @@ digraph iCFG { 2 [label="2: Exit choose_lvalue \n " color=yellow style=filled] -1 [label="1: Start choose_lvalue\nFormals: a:int \nLocals: v3:int SIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&v3,&SIL_temp_conditional___n$1,&v2,&v1); [line 10]\n " color=yellow style=filled] +1 [label="1: Start choose_lvalue\nFormals: a:int \nLocals: v3:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int & v2:int v1:int \n DECLARE_LOCALS(&return,&v3,&0$?%__sil_tmpSIL_temp_conditional___n$1,&v2,&v1); [line 10]\n " color=yellow style=filled] 1 -> 11 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot index dddcbf95e..bbdbaf7a4 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot @@ -56,7 +56,7 @@ digraph iCFG { 17 -> 18 ; -16 [label="16: DeclStmt \n _fun_Person_Person(&SIL_materialize_temp__n$4:class Person *) [line 23]\n _fun_Person_Person(&arr[0][0]:class Person *,&SIL_materialize_temp__n$4:class Person &) [line 23]\n _fun_Person_Person(&SIL_materialize_temp__n$3:class Person *) [line 23]\n _fun_Person_Person(&arr[0][1]:class Person *,&SIL_materialize_temp__n$3:class Person &) [line 23]\n _fun_Person_Person(&SIL_materialize_temp__n$2:class Person *) [line 23]\n _fun_Person_Person(&arr[1][0]:class Person *,&SIL_materialize_temp__n$2:class Person &) [line 23]\n _fun_Person_Person(&SIL_materialize_temp__n$1:class Person *) [line 23]\n _fun_Person_Person(&arr[1][1]:class Person *,&SIL_materialize_temp__n$1:class Person &) [line 23]\n " shape="box"] +16 [label="16: DeclStmt \n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$4:class Person *) [line 23]\n _fun_Person_Person(&arr[0][0]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$4:class Person &) [line 23]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *) [line 23]\n _fun_Person_Person(&arr[0][1]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 23]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$2:class Person *) [line 23]\n _fun_Person_Person(&arr[1][0]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class Person &) [line 23]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$1:class Person *) [line 23]\n _fun_Person_Person(&arr[1][1]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class Person &) [line 23]\n " shape="box"] 16 -> 15 ; @@ -67,11 +67,11 @@ digraph iCFG { 14 [label="14: Exit matrix_of_person \n " color=yellow style=filled] -13 [label="13: Start matrix_of_person\nFormals: \nLocals: arr:class Person [2][2] SIL_materialize_temp__n$1:class Person SIL_materialize_temp__n$2:class Person SIL_materialize_temp__n$3:class Person SIL_materialize_temp__n$4:class Person \n DECLARE_LOCALS(&return,&arr,&SIL_materialize_temp__n$1,&SIL_materialize_temp__n$2,&SIL_materialize_temp__n$3,&SIL_materialize_temp__n$4); [line 22]\n " color=yellow style=filled] +13 [label="13: Start matrix_of_person\nFormals: \nLocals: arr:class Person [2][2] 0$?%__sil_tmpSIL_materialize_temp__n$1:class Person 0$?%__sil_tmpSIL_materialize_temp__n$2:class Person 0$?%__sil_tmpSIL_materialize_temp__n$3:class Person 0$?%__sil_tmpSIL_materialize_temp__n$4:class Person \n DECLARE_LOCALS(&return,&arr,&0$?%__sil_tmpSIL_materialize_temp__n$1,&0$?%__sil_tmpSIL_materialize_temp__n$2,&0$?%__sil_tmpSIL_materialize_temp__n$3,&0$?%__sil_tmpSIL_materialize_temp__n$4); [line 22]\n " color=yellow style=filled] 13 -> 16 ; -12 [label="12: DeclStmt \n _fun_Person_Person(&SIL_materialize_temp__n$3:class Person *) [line 18]\n _fun_Person_Person(&arr[0]:class Person *,&SIL_materialize_temp__n$3:class Person &) [line 18]\n _fun_Person_Person(&SIL_materialize_temp__n$2:class Person *) [line 18]\n _fun_Person_Person(&arr[1]:class Person *,&SIL_materialize_temp__n$2:class Person &) [line 18]\n _fun_Person_Person(&SIL_materialize_temp__n$1:class Person *) [line 18]\n _fun_Person_Person(&arr[2]:class Person *,&SIL_materialize_temp__n$1:class Person &) [line 18]\n " shape="box"] +12 [label="12: DeclStmt \n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *) [line 18]\n _fun_Person_Person(&arr[0]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 18]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$2:class Person *) [line 18]\n _fun_Person_Person(&arr[1]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class Person &) [line 18]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$1:class Person *) [line 18]\n _fun_Person_Person(&arr[2]:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class Person &) [line 18]\n " shape="box"] 12 -> 11 ; @@ -82,7 +82,7 @@ digraph iCFG { 10 [label="10: Exit array_of_person \n " color=yellow style=filled] -9 [label="9: Start array_of_person\nFormals: \nLocals: arr:class Person [10] SIL_materialize_temp__n$1:class Person SIL_materialize_temp__n$2:class Person SIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&arr,&SIL_materialize_temp__n$1,&SIL_materialize_temp__n$2,&SIL_materialize_temp__n$3); [line 17]\n " color=yellow style=filled] +9 [label="9: Start array_of_person\nFormals: \nLocals: arr:class Person [10] 0$?%__sil_tmpSIL_materialize_temp__n$1:class Person 0$?%__sil_tmpSIL_materialize_temp__n$2:class Person 0$?%__sil_tmpSIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&arr,&0$?%__sil_tmpSIL_materialize_temp__n$1,&0$?%__sil_tmpSIL_materialize_temp__n$2,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 17]\n " color=yellow style=filled] 9 -> 12 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot index d845b02de..689fa1b0c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot @@ -26,15 +26,15 @@ digraph iCFG { 91 -> 93 ; -90 [label="90: DeclStmt \n n$2=*&SIL_temp_conditional___n$0:int [line 89]\n n$3=_fun___new_array((sizeof(class Person ) * n$2):unsigned long ) [line 89]\n *&tarray:class Person *=n$3 [line 89]\n " shape="box"] +90 [label="90: DeclStmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$0:int [line 89]\n n$3=_fun___new_array((sizeof(class Person ) * n$2):unsigned long ) [line 89]\n *&tarray:class Person *=n$3 [line 89]\n " shape="box"] 90 -> 83 ; -89 [label="89: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =3 [line 89]\n " shape="box"] +89 [label="89: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =3 [line 89]\n " shape="box"] 89 -> 84 ; -88 [label="88: ConditinalStmt Branch \n *&SIL_temp_conditional___n$0:int =5 [line 89]\n " shape="box"] +88 [label="88: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$0:int =5 [line 89]\n " shape="box"] 88 -> 84 ; @@ -58,7 +58,7 @@ digraph iCFG { 83 [label="83: Exit array_of_class_with_not_constant_size \n " color=yellow style=filled] -82 [label="82: Start array_of_class_with_not_constant_size\nFormals: \nLocals: tarray:class Person * SIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&tarray,&SIL_temp_conditional___n$0); [line 88]\n " color=yellow style=filled] +82 [label="82: Start array_of_class_with_not_constant_size\nFormals: \nLocals: tarray:class Person * 0$?%__sil_tmpSIL_temp_conditional___n$0:int \n DECLARE_LOCALS(&return,&tarray,&0$?%__sil_tmpSIL_temp_conditional___n$0); [line 88]\n " color=yellow style=filled] 82 -> 85 ; @@ -77,15 +77,15 @@ digraph iCFG { 78 -> 81 ; -77 [label="77: DeclStmt \n n$9=*&SIL_temp_conditional___n$6:int [line 76]\n n$10=_fun___new_array((sizeof(int ) * n$9):unsigned long ) [line 76]\n *&x2:int *=n$10 [line 76]\n " shape="box"] +77 [label="77: DeclStmt \n n$9=*&0$?%__sil_tmpSIL_temp_conditional___n$6:int [line 76]\n n$10=_fun___new_array((sizeof(int ) * n$9):unsigned long ) [line 76]\n *&x2:int *=n$10 [line 76]\n " shape="box"] 77 -> 70 ; -76 [label="76: ConditinalStmt Branch \n *&SIL_temp_conditional___n$6:int =3 [line 76]\n " shape="box"] +76 [label="76: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =3 [line 76]\n " shape="box"] 76 -> 71 ; -75 [label="75: ConditinalStmt Branch \n n$8=_fun_getValue(5:int ) [line 76]\n *&SIL_temp_conditional___n$6:int =n$8 [line 76]\n " shape="box"] +75 [label="75: ConditinalStmt Branch \n n$8=_fun_getValue(5:int ) [line 76]\n *&0$?%__sil_tmpSIL_temp_conditional___n$6:int =n$8 [line 76]\n " shape="box"] 75 -> 71 ; @@ -121,7 +121,7 @@ digraph iCFG { 67 [label="67: Exit int_array \n " color=yellow style=filled] -66 [label="66: Start int_array\nFormals: \nLocals: x2:int * SIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&x2,&SIL_temp_conditional___n$6); [line 75]\n " color=yellow style=filled] +66 [label="66: Start int_array\nFormals: \nLocals: x2:int * 0$?%__sil_tmpSIL_temp_conditional___n$6:int \n DECLARE_LOCALS(&return,&x2,&0$?%__sil_tmpSIL_temp_conditional___n$6); [line 75]\n " color=yellow style=filled] 66 -> 72 ; @@ -129,15 +129,15 @@ digraph iCFG { 65 -> 59 ; -64 [label="64: DeclStmt \n n$2=_fun___new(sizeof(class Person ):unsigned long ) [line 71]\n n$7=*&SIL_temp_conditional___n$3:int [line 71]\n _fun_Person_Person(n$2:class Person *,n$7:int ) [line 71]\n *&p:class Person *=n$2 [line 71]\n " shape="box"] +64 [label="64: DeclStmt \n n$2=_fun___new(sizeof(class Person ):unsigned long ) [line 71]\n n$7=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 71]\n _fun_Person_Person(n$2:class Person *,n$7:int ) [line 71]\n *&p:class Person *=n$2 [line 71]\n " shape="box"] 64 -> 57 ; -63 [label="63: ConditinalStmt Branch \n n$6=*&z:int [line 71]\n *&SIL_temp_conditional___n$3:int =(1 + n$6) [line 71]\n " shape="box"] +63 [label="63: ConditinalStmt Branch \n n$6=*&z:int [line 71]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =(1 + n$6) [line 71]\n " shape="box"] 63 -> 58 ; -62 [label="62: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 71]\n *&SIL_temp_conditional___n$3:int =n$5 [line 71]\n " shape="box"] +62 [label="62: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 71]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =n$5 [line 71]\n " shape="box"] 62 -> 58 ; @@ -165,7 +165,7 @@ digraph iCFG { 56 [label="56: Exit constructor_nodes \n " color=yellow style=filled] -55 [label="55: Start constructor_nodes\nFormals: \nLocals: p:class Person * SIL_temp_conditional___n$3:int z:int \n DECLARE_LOCALS(&return,&p,&SIL_temp_conditional___n$3,&z); [line 69]\n " color=yellow style=filled] +55 [label="55: Start constructor_nodes\nFormals: \nLocals: p:class Person * 0$?%__sil_tmpSIL_temp_conditional___n$3:int z:int \n DECLARE_LOCALS(&return,&p,&0$?%__sil_tmpSIL_temp_conditional___n$3,&z); [line 69]\n " color=yellow style=filled] 55 -> 65 ; @@ -177,15 +177,15 @@ digraph iCFG { 53 -> 47 ; -52 [label="52: DeclStmt \n n$2=_fun___new(sizeof(int ):unsigned long ) [line 65]\n n$8=*&SIL_temp_conditional___n$3:int [line 65]\n *n$2:int =n$8 [line 65]\n *&x:int *=n$2 [line 65]\n " shape="box"] +52 [label="52: DeclStmt \n n$2=_fun___new(sizeof(int ):unsigned long ) [line 65]\n n$8=*&0$?%__sil_tmpSIL_temp_conditional___n$3:int [line 65]\n *n$2:int =n$8 [line 65]\n *&x:int *=n$2 [line 65]\n " shape="box"] 52 -> 45 ; -51 [label="51: ConditinalStmt Branch \n n$6=*&y:int * [line 65]\n n$7=*n$6:int [line 65]\n *&SIL_temp_conditional___n$3:int =(1 + n$7) [line 65]\n " shape="box"] +51 [label="51: ConditinalStmt Branch \n n$6=*&y:int * [line 65]\n n$7=*n$6:int [line 65]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =(1 + n$7) [line 65]\n " shape="box"] 51 -> 46 ; -50 [label="50: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 65]\n *&SIL_temp_conditional___n$3:int =n$5 [line 65]\n " shape="box"] +50 [label="50: ConditinalStmt Branch \n n$5=_fun_getValue(1:int ) [line 65]\n *&0$?%__sil_tmpSIL_temp_conditional___n$3:int =n$5 [line 65]\n " shape="box"] 50 -> 46 ; @@ -213,7 +213,7 @@ digraph iCFG { 44 [label="44: Exit int_init_nodes \n " color=yellow style=filled] -43 [label="43: Start int_init_nodes\nFormals: \nLocals: x:int * SIL_temp_conditional___n$3:int y:int * z:int \n DECLARE_LOCALS(&return,&x,&SIL_temp_conditional___n$3,&y,&z); [line 62]\n " color=yellow style=filled] +43 [label="43: Start int_init_nodes\nFormals: \nLocals: x:int * 0$?%__sil_tmpSIL_temp_conditional___n$3:int y:int * z:int \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_temp_conditional___n$3,&y,&z); [line 62]\n " color=yellow style=filled] 43 -> 54 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot index 8ee6d4391..c39d91dbe 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_struct_init_list.cpp.dot @@ -1,13 +1,13 @@ /* @generated */ digraph iCFG { -6 [label="6: DeclStmt \n *&SIL_init_list__n$0.top:int =0 [line 17]\n *&SIL_init_list__n$0.left:int =0 [line 17]\n *&SIL_init_list__n$0.bottom:int =0 [line 17]\n *&SIL_init_list__n$0.right:int =0 [line 17]\n _fun_Person_Person(&p:class Person *,&SIL_init_list__n$0:class Insets ) [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n *&0$?%__sil_tmpSIL_init_list__n$0.top:int =0 [line 17]\n *&0$?%__sil_tmpSIL_init_list__n$0.left:int =0 [line 17]\n *&0$?%__sil_tmpSIL_init_list__n$0.bottom:int =0 [line 17]\n *&0$?%__sil_tmpSIL_init_list__n$0.right:int =0 [line 17]\n _fun_Person_Person(&p:class Person *,&0$?%__sil_tmpSIL_init_list__n$0:class Insets ) [line 17]\n " shape="box"] 6 -> 5 ; 5 [label="5: Exit test \n " color=yellow style=filled] -4 [label="4: Start test\nFormals: \nLocals: p:class Person SIL_init_list__n$0:class Insets \n DECLARE_LOCALS(&return,&p,&SIL_init_list__n$0); [line 17]\n " color=yellow style=filled] +4 [label="4: Start test\nFormals: \nLocals: p:class Person 0$?%__sil_tmpSIL_init_list__n$0:class Insets \n DECLARE_LOCALS(&return,&p,&0$?%__sil_tmpSIL_init_list__n$0); [line 17]\n " color=yellow style=filled] 4 -> 6 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot index a1d8eb3e9..3a6ad8b7f 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/copy_move_constructor.cpp.dot @@ -16,7 +16,7 @@ digraph iCFG { 62 -> 61 ; -61 [label="61: DeclStmt \n _fun_getY(2:int ,&__temp_return_n$3:class Y *) [line 77]\n n$4=*&__temp_return_n$3.f:int [line 77]\n *&d2:int =(1 / n$4) [line 77]\n " shape="box"] +61 [label="61: DeclStmt \n _fun_getY(2:int ,&0$?%__sil_tmp__temp_return_n$3:class Y *) [line 77]\n n$4=*&0$?%__sil_tmp__temp_return_n$3.f:int [line 77]\n *&d2:int =(1 / n$4) [line 77]\n " shape="box"] 61 -> 60 ; @@ -27,7 +27,7 @@ digraph iCFG { 59 [label="59: Exit copyY_moveY_div1 \n " color=yellow style=filled] -58 [label="58: Start copyY_moveY_div1\nFormals: \nLocals: d2:int __temp_return_n$3:class Y d1:int y2:class Y y1:class Y \n DECLARE_LOCALS(&return,&d2,&__temp_return_n$3,&d1,&y2,&y1); [line 72]\n " color=yellow style=filled] +58 [label="58: Start copyY_moveY_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmp__temp_return_n$3:class Y d1:int y2:class Y y1:class Y \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmp__temp_return_n$3,&d1,&y2,&y1); [line 72]\n " color=yellow style=filled] 58 -> 65 ; @@ -47,7 +47,7 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: DeclStmt \n _fun_getX(1:int ,&__temp_return_n$3:class X *) [line 68]\n n$4=*&__temp_return_n$3.f:int [line 68]\n *&d2:int =(1 / n$4) [line 68]\n " shape="box"] +53 [label="53: DeclStmt \n _fun_getX(1:int ,&0$?%__sil_tmp__temp_return_n$3:class X *) [line 68]\n n$4=*&0$?%__sil_tmp__temp_return_n$3.f:int [line 68]\n *&d2:int =(1 / n$4) [line 68]\n " shape="box"] 53 -> 52 ; @@ -58,11 +58,11 @@ digraph iCFG { 51 [label="51: Exit copyX_moveX_div1 \n " color=yellow style=filled] -50 [label="50: Start copyX_moveX_div1\nFormals: \nLocals: d2:int __temp_return_n$3:class X d1:int x2:class X x1:class X \n DECLARE_LOCALS(&return,&d2,&__temp_return_n$3,&d1,&x2,&x1); [line 63]\n " color=yellow style=filled] +50 [label="50: Start copyX_moveX_div1\nFormals: \nLocals: d2:int 0$?%__sil_tmp__temp_return_n$3:class X d1:int x2:class X x1:class X \n DECLARE_LOCALS(&return,&d2,&0$?%__sil_tmp__temp_return_n$3,&d1,&x2,&x1); [line 63]\n " color=yellow style=filled] 50 -> 57 ; -49 [label="49: DeclStmt \n _fun_getY(2:int ,&SIL_materialize_temp__n$1:class Y *) [line 58]\n _fun_Y_Y(&y1:class Y *,&SIL_materialize_temp__n$1:class Y &) [line 58]\n " shape="box"] +49 [label="49: DeclStmt \n _fun_getY(2:int ,&0$?%__sil_tmpSIL_materialize_temp__n$1:class Y *) [line 58]\n _fun_Y_Y(&y1:class Y *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class Y &) [line 58]\n " shape="box"] 49 -> 48 ; @@ -77,18 +77,18 @@ digraph iCFG { 46 [label="46: Exit moveY_moveY_copyY_div0 \n " color=yellow style=filled] -45 [label="45: Start moveY_moveY_copyY_div0\nFormals: \nLocals: y2:class Y y1:class Y SIL_materialize_temp__n$1:class Y \n DECLARE_LOCALS(&return,&y2,&y1,&SIL_materialize_temp__n$1); [line 57]\n " color=yellow style=filled] +45 [label="45: Start moveY_moveY_copyY_div0\nFormals: \nLocals: y2:class Y y1:class Y 0$?%__sil_tmpSIL_materialize_temp__n$1:class Y \n DECLARE_LOCALS(&return,&y2,&y1,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 57]\n " color=yellow style=filled] 45 -> 49 ; -44 [label="44: Return Stmt \n _fun_getY(1:int ,&__temp_return_n$1:class Y *) [line 55]\n n$2=*&__temp_return_n$1.f:int [line 55]\n *&return:int =(1 / n$2) [line 55]\n " shape="box"] +44 [label="44: Return Stmt \n _fun_getY(1:int ,&0$?%__sil_tmp__temp_return_n$1:class Y *) [line 55]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 55]\n *&return:int =(1 / n$2) [line 55]\n " shape="box"] 44 -> 43 ; 43 [label="43: Exit moveY_div0 \n " color=yellow style=filled] -42 [label="42: Start moveY_div0\nFormals: \nLocals: __temp_return_n$1:class Y \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 55]\n " color=yellow style=filled] +42 [label="42: Start moveY_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class Y \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 55]\n " color=yellow style=filled] 42 -> 44 ; @@ -115,14 +115,14 @@ digraph iCFG { 36 -> 41 ; -35 [label="35: Return Stmt \n _fun_getX(0:int ,&__temp_return_n$1:class X *) [line 46]\n n$2=*&__temp_return_n$1.f:int [line 46]\n *&return:int =(1 / n$2) [line 46]\n " shape="box"] +35 [label="35: Return Stmt \n _fun_getX(0:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 46]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 46]\n *&return:int =(1 / n$2) [line 46]\n " shape="box"] 35 -> 34 ; 34 [label="34: Exit moveX_div0 \n " color=yellow style=filled] -33 [label="33: Start moveX_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 46]\n " color=yellow style=filled] +33 [label="33: Start moveX_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 46]\n " color=yellow style=filled] 33 -> 35 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot index c3c9cd405..905e21e9e 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/std_init_list.cpp.dot @@ -1,13 +1,13 @@ /* @generated */ digraph iCFG { -11 [label="11: DeclStmt \n *&SIL_materialize_temp__n$0[0]:int =1 [line 24]\n *&SIL_materialize_temp__n$0[1]:int =2 [line 24]\n *&SIL_materialize_temp__n$0[2]:int =3 [line 24]\n *&SIL_materialize_temp__n$0[3]:int =4 [line 24]\n *&SIL_materialize_temp__n$0[4]:int =5 [line 24]\n n$1=_fun___infer_skip_function(&SIL_materialize_temp__n$0:int [5]) [line 24]\n _fun_X_X(&x:class X *,n$1:class std::initializer_list ) [line 24]\n " shape="box"] +11 [label="11: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$0[0]:int =1 [line 24]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0[1]:int =2 [line 24]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0[2]:int =3 [line 24]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0[3]:int =4 [line 24]\n *&0$?%__sil_tmpSIL_materialize_temp__n$0[4]:int =5 [line 24]\n n$1=_fun___infer_skip_function(&0$?%__sil_tmpSIL_materialize_temp__n$0:int [5]) [line 24]\n _fun_X_X(&x:class X *,n$1:class std::initializer_list ) [line 24]\n " shape="box"] 11 -> 10 ; 10 [label="10: Exit main \n " color=yellow style=filled] -9 [label="9: Start main\nFormals: \nLocals: x:class X SIL_materialize_temp__n$0:int [5] \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$0); [line 24]\n " color=yellow style=filled] +9 [label="9: Start main\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$0:int [5] \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 24]\n " color=yellow style=filled] 9 -> 11 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot index a6e6767c3..96a8fd6d5 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot @@ -1,83 +1,83 @@ /* @generated */ digraph iCFG { -43 [label="43: Return Stmt \n _fun_getX(1:int ,0:int ,&__temp_return_n$1:class X *) [line 43]\n n$2=*&__temp_return_n$1.f:int [line 43]\n n$3=_fun_div(n$2:int ) [line 43]\n *&return:int =n$3 [line 43]\n " shape="box"] +43 [label="43: Return Stmt \n _fun_getX(1:int ,0:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 43]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 43]\n n$3=_fun_div(n$2:int ) [line 43]\n *&return:int =n$3 [line 43]\n " shape="box"] 43 -> 42 ; 42 [label="42: Exit getX_field_div1 \n " color=yellow style=filled] -41 [label="41: Start getX_field_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 43]\n " color=yellow style=filled] +41 [label="41: Start getX_field_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 43]\n " color=yellow style=filled] 41 -> 43 ; -40 [label="40: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,1:int ,0:int ) [line 41]\n n$1=*&__temp_construct_n$0.f:int [line 41]\n n$2=_fun_div(n$1:int ) [line 41]\n *&return:int =n$2 [line 41]\n " shape="box"] +40 [label="40: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,1:int ,0:int ) [line 41]\n n$1=*&0$?%__sil_tmp__temp_construct_n$0.f:int [line 41]\n n$2=_fun_div(n$1:int ) [line 41]\n *&return:int =n$2 [line 41]\n " shape="box"] 40 -> 39 ; 39 [label="39: Exit temp_field_div1 \n " color=yellow style=filled] -38 [label="38: Start temp_field_div1\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 41]\n " color=yellow style=filled] +38 [label="38: Start temp_field_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0); [line 41]\n " color=yellow style=filled] 38 -> 40 ; -37 [label="37: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 39]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 39]\n *&return:int =n$2 [line 39]\n " shape="box"] +37 [label="37: Return Stmt \n _fun_getX(0:int ,1:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 39]\n n$2=_fun_X_div(&0$?%__sil_tmp__temp_return_n$1:class X &) [line 39]\n *&return:int =n$2 [line 39]\n " shape="box"] 37 -> 36 ; 36 [label="36: Exit getX_method_div0 \n " color=yellow style=filled] -35 [label="35: Start getX_method_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 39]\n " color=yellow style=filled] +35 [label="35: Start getX_method_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 39]\n " color=yellow style=filled] 35 -> 37 ; -34 [label="34: Return Stmt \n _fun_getX(0:int ,1:int ,&__temp_return_n$1:class X *) [line 37]\n n$2=*&__temp_return_n$1.f:int [line 37]\n n$3=_fun_div(n$2:int ) [line 37]\n *&return:int =n$3 [line 37]\n " shape="box"] +34 [label="34: Return Stmt \n _fun_getX(0:int ,1:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 37]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 37]\n n$3=_fun_div(n$2:int ) [line 37]\n *&return:int =n$3 [line 37]\n " shape="box"] 34 -> 33 ; 33 [label="33: Exit getX_field_div0 \n " color=yellow style=filled] -32 [label="32: Start getX_field_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 37]\n " color=yellow style=filled] +32 [label="32: Start getX_field_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 37]\n " color=yellow style=filled] 32 -> 34 ; -31 [label="31: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 35]\n n$1=_fun_X_div(&__temp_construct_n$0:class X &) [line 35]\n *&return:int =n$1 [line 35]\n " shape="box"] +31 [label="31: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,0:int ,1:int ) [line 35]\n n$1=_fun_X_div(&0$?%__sil_tmp__temp_construct_n$0:class X &) [line 35]\n *&return:int =n$1 [line 35]\n " shape="box"] 31 -> 30 ; 30 [label="30: Exit temp_method_div0 \n " color=yellow style=filled] -29 [label="29: Start temp_method_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 35]\n " color=yellow style=filled] +29 [label="29: Start temp_method_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0); [line 35]\n " color=yellow style=filled] 29 -> 31 ; -28 [label="28: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ) [line 33]\n n$1=*&__temp_construct_n$0.f:int [line 33]\n n$2=_fun_div(n$1:int ) [line 33]\n *&return:int =n$2 [line 33]\n " shape="box"] +28 [label="28: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,0:int ) [line 33]\n n$1=*&0$?%__sil_tmp__temp_construct_n$0.f:int [line 33]\n n$2=_fun_div(n$1:int ) [line 33]\n *&return:int =n$2 [line 33]\n " shape="box"] 28 -> 27 ; 27 [label="27: Exit temp_field2_div0 \n " color=yellow style=filled] -26 [label="26: Start temp_field2_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 33]\n " color=yellow style=filled] +26 [label="26: Start temp_field2_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0); [line 33]\n " color=yellow style=filled] 26 -> 28 ; -25 [label="25: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,0:int ,1:int ) [line 31]\n n$1=*&__temp_construct_n$0.f:int [line 31]\n n$2=_fun_div(n$1:int ) [line 31]\n *&return:int =n$2 [line 31]\n " shape="box"] +25 [label="25: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,0:int ,1:int ) [line 31]\n n$1=*&0$?%__sil_tmp__temp_construct_n$0.f:int [line 31]\n n$2=_fun_div(n$1:int ) [line 31]\n *&return:int =n$2 [line 31]\n " shape="box"] 25 -> 24 ; 24 [label="24: Exit temp_field_div0 \n " color=yellow style=filled] -23 [label="23: Start temp_field_div0\nFormals: \nLocals: __temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0); [line 31]\n " color=yellow style=filled] +23 [label="23: Start temp_field_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0); [line 31]\n " color=yellow style=filled] 23 -> 25 ; -22 [label="22: DeclStmt \n _fun_X_X(&SIL_materialize_temp__n$2:class X *,0:int ,1:int ) [line 27]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$2:class X &) [line 27]\n " shape="box"] +22 [label="22: DeclStmt \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$2:class X *,0:int ,1:int ) [line 27]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$2:class X &) [line 27]\n " shape="box"] 22 -> 21 ; @@ -88,18 +88,18 @@ digraph iCFG { 20 [label="20: Exit assign_temp_div0 \n " color=yellow style=filled] -19 [label="19: Start assign_temp_div0\nFormals: \nLocals: x:class X SIL_materialize_temp__n$2:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$2); [line 26]\n " color=yellow style=filled] +19 [label="19: Start assign_temp_div0\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$2:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 26]\n " color=yellow style=filled] 19 -> 22 ; -18 [label="18: Return Stmt \n n$0=*&__return_param:class X * [line 24]\n n$2=*&a:int [line 24]\n n$3=*&b:int [line 24]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$2:int ,n$3:int ) [line 24]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 24]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&__return_param:class X * [line 24]\n n$2=*&a:int [line 24]\n n$3=*&b:int [line 24]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *,n$2:int ,n$3:int ) [line 24]\n _fun_X_X(n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 24]\n " shape="box"] 18 -> 17 ; 17 [label="17: Exit getX \n " color=yellow style=filled] -16 [label="16: Start getX\nFormals: a:int b:int __return_param:class X *\nLocals: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] +16 [label="16: Start getX\nFormals: a:int b:int __return_param:class X *\nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] 16 -> 18 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot index ab13347fe..19f39e2c1 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot @@ -24,20 +24,20 @@ digraph iCFG { 38 -> 41 ; -37 [label="37: Call _fun_operator!= \n _fun_iterator_iterator(&__temp_construct_n$10:class iterator *,&__begin:class iterator &) [line 37]\n _fun_iterator_iterator(&__temp_construct_n$11:class iterator *,&__end:class iterator &) [line 37]\n n$12=_fun_operator!=(&__temp_construct_n$10:class iterator ,&__temp_construct_n$11:class iterator ) [line 37]\n " shape="box"] +37 [label="37: Call _fun_operator!= \n _fun_iterator_iterator(&0$?%__sil_tmp__temp_construct_n$10:class iterator *,&__begin:class iterator &) [line 37]\n _fun_iterator_iterator(&0$?%__sil_tmp__temp_construct_n$11:class iterator *,&__end:class iterator &) [line 37]\n n$12=_fun_operator!=(&0$?%__sil_tmp__temp_construct_n$10:class iterator ,&0$?%__sil_tmp__temp_construct_n$11:class iterator ) [line 37]\n " shape="box"] 37 -> 38 ; 37 -> 39 ; -36 [label="36: Call _fun_iterator_operator++ \n _fun_iterator_operator++(&__begin:class iterator &,&__temp_return_n$9:class iterator *) [line 37]\n " shape="box"] +36 [label="36: Call _fun_iterator_operator++ \n _fun_iterator_operator++(&__begin:class iterator &,&0$?%__sil_tmp__temp_return_n$9:class iterator *) [line 37]\n " shape="box"] 36 -> 33 ; -35 [label="35: DeclStmt \n n$5=*&__range:class vec & [line 37]\n NONEn$6=*n$5:class vec [line 37]\n _fun_vec_begin(n$5:class vec &,&SIL_materialize_temp__n$4:class iterator *) [line 37]\n _fun_iterator_iterator(&__begin:class iterator *,&SIL_materialize_temp__n$4:class iterator &) [line 37]\n " shape="box"] +35 [label="35: DeclStmt \n n$5=*&__range:class vec & [line 37]\n NONEn$6=*n$5:class vec [line 37]\n _fun_vec_begin(n$5:class vec &,&0$?%__sil_tmpSIL_materialize_temp__n$4:class iterator *) [line 37]\n _fun_iterator_iterator(&__begin:class iterator *,&0$?%__sil_tmpSIL_materialize_temp__n$4:class iterator &) [line 37]\n " shape="box"] 35 -> 34 ; -34 [label="34: DeclStmt \n n$1=*&__range:class vec & [line 37]\n NONEn$2=*n$1:class vec [line 37]\n _fun_vec_end(n$1:class vec &,&SIL_materialize_temp__n$0:class iterator *) [line 37]\n _fun_iterator_iterator(&__end:class iterator *,&SIL_materialize_temp__n$0:class iterator &) [line 37]\n " shape="box"] +34 [label="34: DeclStmt \n n$1=*&__range:class vec & [line 37]\n NONEn$2=*n$1:class vec [line 37]\n _fun_vec_end(n$1:class vec &,&0$?%__sil_tmpSIL_materialize_temp__n$0:class iterator *) [line 37]\n _fun_iterator_iterator(&__end:class iterator *,&0$?%__sil_tmpSIL_materialize_temp__n$0:class iterator &) [line 37]\n " shape="box"] 34 -> 33 ; @@ -48,7 +48,7 @@ digraph iCFG { 32 [label="32: Exit test \n " color=yellow style=filled] -31 [label="31: Start test\nFormals: \nLocals: __end:class iterator SIL_materialize_temp__n$0:class iterator __begin:class iterator SIL_materialize_temp__n$4:class iterator __temp_return_n$9:class iterator __temp_construct_n$10:class iterator __temp_construct_n$11:class iterator temp:int value:int __range:class vec & vector:class vec \n DECLARE_LOCALS(&return,&__end,&SIL_materialize_temp__n$0,&__begin,&SIL_materialize_temp__n$4,&__temp_return_n$9,&__temp_construct_n$10,&__temp_construct_n$11,&temp,&value,&__range,&vector); [line 35]\n " color=yellow style=filled] +31 [label="31: Start test\nFormals: \nLocals: __end:class iterator 0$?%__sil_tmpSIL_materialize_temp__n$0:class iterator __begin:class iterator 0$?%__sil_tmpSIL_materialize_temp__n$4:class iterator 0$?%__sil_tmp__temp_return_n$9:class iterator 0$?%__sil_tmp__temp_construct_n$10:class iterator 0$?%__sil_tmp__temp_construct_n$11:class iterator temp:int value:int __range:class vec & vector:class vec \n DECLARE_LOCALS(&return,&__end,&0$?%__sil_tmpSIL_materialize_temp__n$0,&__begin,&0$?%__sil_tmpSIL_materialize_temp__n$4,&0$?%__sil_tmp__temp_return_n$9,&0$?%__sil_tmp__temp_construct_n$10,&0$?%__sil_tmp__temp_construct_n$11,&temp,&value,&__range,&vector); [line 35]\n " color=yellow style=filled] 31 -> 43 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot index 2a1869764..550ea7587 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot @@ -92,7 +92,7 @@ digraph iCFG { 39 -> 34 ; -38 [label="38: DeclStmt \n NONEn$13=*&y:class Y [line 46]\n _fun_Y_operator X(&y:class Y &,&SIL_materialize_temp__n$12:class X *) [line 46]\n _fun_X_X(&__temp_construct_n$11:class X *,&SIL_materialize_temp__n$12:class X &) [line 46]\n n$15=_fun_X_operator int(&__temp_construct_n$11:class X &) [line 46]\n *&v:int =n$15 [line 46]\n " shape="box"] +38 [label="38: DeclStmt \n NONEn$13=*&y:class Y [line 46]\n _fun_Y_operator X(&y:class Y &,&0$?%__sil_tmpSIL_materialize_temp__n$12:class X *) [line 46]\n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$11:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$12:class X &) [line 46]\n n$15=_fun_X_operator int(&0$?%__sil_tmp__temp_construct_n$11:class X &) [line 46]\n *&v:int =n$15 [line 46]\n " shape="box"] 38 -> 37 ; @@ -108,7 +108,7 @@ digraph iCFG { 35 -> 38 ; -34 [label="34: Call _fun_X_operator bool \n NONEn$7=*&y:class Y [line 45]\n _fun_Y_operator X(&y:class Y &,&SIL_materialize_temp__n$6:class X *) [line 45]\n _fun_X_X(&__temp_construct_n$5:class X *,&SIL_materialize_temp__n$6:class X &) [line 45]\n n$9=_fun_X_operator bool(&__temp_construct_n$5:class X &) [line 45]\n " shape="box"] +34 [label="34: Call _fun_X_operator bool \n NONEn$7=*&y:class Y [line 45]\n _fun_Y_operator X(&y:class Y &,&0$?%__sil_tmpSIL_materialize_temp__n$6:class X *) [line 45]\n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$5:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$6:class X &) [line 45]\n n$9=_fun_X_operator bool(&0$?%__sil_tmp__temp_construct_n$5:class X &) [line 45]\n " shape="box"] 34 -> 35 ; @@ -117,14 +117,14 @@ digraph iCFG { 33 -> 32 ; -32 [label="32: Return Stmt \n NONEn$2=*&y:class Y [line 49]\n _fun_Y_operator X(&y:class Y &,&SIL_materialize_temp__n$1:class X *) [line 49]\n _fun_X_X(&__temp_construct_n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 49]\n n$4=_fun_X_operator int(&__temp_construct_n$0:class X &) [line 49]\n *&return:int =n$4 [line 49]\n " shape="box"] +32 [label="32: Return Stmt \n NONEn$2=*&y:class Y [line 49]\n _fun_Y_operator X(&y:class Y &,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *) [line 49]\n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 49]\n n$4=_fun_X_operator int(&0$?%__sil_tmp__temp_construct_n$0:class X &) [line 49]\n *&return:int =n$4 [line 49]\n " shape="box"] 32 -> 31 ; 31 [label="31: Exit y_branch_div0 \n " color=yellow style=filled] -30 [label="30: Start y_branch_div0\nFormals: \nLocals: __temp_construct_n$0:class X SIL_materialize_temp__n$1:class X __temp_construct_n$5:class X SIL_materialize_temp__n$6:class X v:int __temp_construct_n$11:class X SIL_materialize_temp__n$12:class X y:class Y \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&SIL_materialize_temp__n$1,&__temp_construct_n$5,&SIL_materialize_temp__n$6,&v,&__temp_construct_n$11,&SIL_materialize_temp__n$12,&y); [line 41]\n " color=yellow style=filled] +30 [label="30: Start y_branch_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X 0$?%__sil_tmp__temp_construct_n$5:class X 0$?%__sil_tmpSIL_materialize_temp__n$6:class X v:int 0$?%__sil_tmp__temp_construct_n$11:class X 0$?%__sil_tmpSIL_materialize_temp__n$12:class X y:class Y \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&0$?%__sil_tmpSIL_materialize_temp__n$1,&0$?%__sil_tmp__temp_construct_n$5,&0$?%__sil_tmpSIL_materialize_temp__n$6,&v,&0$?%__sil_tmp__temp_construct_n$11,&0$?%__sil_tmpSIL_materialize_temp__n$12,&y); [line 41]\n " color=yellow style=filled] 30 -> 41 ; @@ -175,14 +175,14 @@ digraph iCFG { 18 -> 19 ; -17 [label="17: Return Stmt \n n$0=*&__return_param:class X * [line 27]\n n$2=*&this:class Y * [line 27]\n n$3=*n$2.f:int [line 27]\n n$4=*&this:class Y * [line 27]\n n$5=*n$4.b:int [line 27]\n _fun_X_X(&SIL_materialize_temp__n$1:class X *,n$3:int ,n$5:_Bool ) [line 27]\n _fun_X_X(n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 27]\n " shape="box"] +17 [label="17: Return Stmt \n n$0=*&__return_param:class X * [line 27]\n n$2=*&this:class Y * [line 27]\n n$3=*n$2.f:int [line 27]\n n$4=*&this:class Y * [line 27]\n n$5=*n$4.b:int [line 27]\n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *,n$3:int ,n$5:_Bool ) [line 27]\n _fun_X_X(n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 27]\n " shape="box"] 17 -> 16 ; 16 [label="16: Exit Y_operator X \n " color=yellow style=filled] -15 [label="15: Start Y_operator X\nFormals: this:class Y * __return_param:class X *\nLocals: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 27]\n " color=yellow style=filled] +15 [label="15: Start Y_operator X\nFormals: this:class Y * __return_param:class X *\nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 27]\n " color=yellow style=filled] 15 -> 17 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot index 4e8a124a9..ce4b5535a 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot @@ -1,6 +1,6 @@ /* @generated */ digraph iCFG { -13 [label="13: DeclStmt \n n$2=*&a:class A * [line 22]\n NONEn$3=*n$2:class A [line 22]\n _fun_A_get(n$2:class A *,1:int ,&SIL_materialize_temp__n$1:class X *) [line 22]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$1:class X &) [line 22]\n " shape="box"] +13 [label="13: DeclStmt \n n$2=*&a:class A * [line 22]\n NONEn$3=*n$2:class A [line 22]\n _fun_A_get(n$2:class A *,1:int ,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *) [line 22]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 22]\n " shape="box"] 13 -> 12 ; @@ -11,7 +11,7 @@ digraph iCFG { 11 [label="11: Exit test \n " color=yellow style=filled] -10 [label="10: Start test\nFormals: a:class A *\nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 21]\n " color=yellow style=filled] +10 [label="10: Start test\nFormals: a:class A *\nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 21]\n " color=yellow style=filled] 10 -> 13 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot index 2ea727a08..f2cde9342 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_if.cpp.dot @@ -76,16 +76,16 @@ digraph iCFG { 55 -> 44 ; -54 [label="54: DeclStmt \n n$2=*&SIL_temp_conditional___n$1:int [line 43]\n *&a:int =n$2 [line 43]\n " shape="box"] +54 [label="54: DeclStmt \n n$2=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 43]\n *&a:int =n$2 [line 43]\n " shape="box"] 54 -> 47 ; 54 -> 48 ; -53 [label="53: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =0 [line 43]\n " shape="box"] +53 [label="53: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =0 [line 43]\n " shape="box"] 53 -> 49 ; -52 [label="52: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =1 [line 43]\n " shape="box"] +52 [label="52: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =1 [line 43]\n " shape="box"] 52 -> 49 ; @@ -120,7 +120,7 @@ digraph iCFG { 44 [label="44: Exit conditional_init_div0 \n " color=yellow style=filled] -43 [label="43: Start conditional_init_div0\nFormals: \nLocals: a:int SIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$1); [line 42]\n " color=yellow style=filled] +43 [label="43: Start conditional_init_div0\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$1); [line 42]\n " color=yellow style=filled] 43 -> 50 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot index 70116bc1b..2c2937c78 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_while.cpp.dot @@ -16,16 +16,16 @@ digraph iCFG { 25 -> 15 ; -24 [label="24: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 23]\n *&a:int =n$4 [line 23]\n " shape="box"] +24 [label="24: DeclStmt \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$1:int [line 23]\n *&a:int =n$4 [line 23]\n " shape="box"] 24 -> 16 ; 24 -> 17 ; -23 [label="23: ConditinalStmt Branch \n *&SIL_temp_conditional___n$1:int =0 [line 23]\n " shape="box"] +23 [label="23: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =0 [line 23]\n " shape="box"] 23 -> 18 ; -22 [label="22: ConditinalStmt Branch \n n$3=*&x:int [line 23]\n *&SIL_temp_conditional___n$1:int =n$3 [line 23]\n " shape="box"] +22 [label="22: ConditinalStmt Branch \n n$3=*&x:int [line 23]\n *&0$?%__sil_tmpSIL_temp_conditional___n$1:int =n$3 [line 23]\n " shape="box"] 22 -> 18 ; @@ -65,7 +65,7 @@ digraph iCFG { 13 [label="13: Exit conditional_assignment \n " color=yellow style=filled] -12 [label="12: Start conditional_assignment\nFormals: \nLocals: a:int SIL_temp_conditional___n$1:int result:int x:int \n DECLARE_LOCALS(&return,&a,&SIL_temp_conditional___n$1,&result,&x); [line 20]\n " color=yellow style=filled] +12 [label="12: Start conditional_assignment\nFormals: \nLocals: a:int 0$?%__sil_tmpSIL_temp_conditional___n$1:int result:int x:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_temp_conditional___n$1,&result,&x); [line 20]\n " color=yellow style=filled] 12 -> 28 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot index 39879a9c5..3148daa44 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot @@ -15,18 +15,18 @@ digraph iCFG { 11 -> 14 ; -10 [label="10: Return Stmt \n *&SIL_materialize_temp__n$0:int =0 [line 17]\n n$1=_fun_div(&SIL_materialize_temp__n$0:int &) [line 17]\n *&return:int =n$1 [line 17]\n " shape="box"] +10 [label="10: Return Stmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$0:int =0 [line 17]\n n$1=_fun_div(&0$?%__sil_tmpSIL_materialize_temp__n$0:int &) [line 17]\n *&return:int =n$1 [line 17]\n " shape="box"] 10 -> 9 ; 9 [label="9: Exit div0_function_param_cast \n " color=yellow style=filled] -8 [label="8: Start div0_function_param_cast\nFormals: \nLocals: SIL_materialize_temp__n$0:int \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$0); [line 17]\n " color=yellow style=filled] +8 [label="8: Start div0_function_param_cast\nFormals: \nLocals: 0$?%__sil_tmpSIL_materialize_temp__n$0:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_materialize_temp__n$0); [line 17]\n " color=yellow style=filled] 8 -> 10 ; -7 [label="7: DeclStmt \n *&SIL_materialize_temp__n$2:int =0 [line 13]\n *&a:int &=&SIL_materialize_temp__n$2 [line 13]\n " shape="box"] +7 [label="7: DeclStmt \n *&0$?%__sil_tmpSIL_materialize_temp__n$2:int =0 [line 13]\n *&a:int &=&0$?%__sil_tmpSIL_materialize_temp__n$2 [line 13]\n " shape="box"] 7 -> 6 ; @@ -37,7 +37,7 @@ digraph iCFG { 5 [label="5: Exit div0_init_expr \n " color=yellow style=filled] -4 [label="4: Start div0_init_expr\nFormals: \nLocals: a:int & SIL_materialize_temp__n$2:int \n DECLARE_LOCALS(&return,&a,&SIL_materialize_temp__n$2); [line 12]\n " color=yellow style=filled] +4 [label="4: Start div0_init_expr\nFormals: \nLocals: a:int & 0$?%__sil_tmpSIL_materialize_temp__n$2:int \n DECLARE_LOCALS(&return,&a,&0$?%__sil_tmpSIL_materialize_temp__n$2); [line 12]\n " color=yellow style=filled] 4 -> 7 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot index feea1846d..2b44b2d25 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot @@ -1,28 +1,28 @@ /* @generated */ digraph iCFG { -35 [label="35: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 44]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 44]\n *&return:int =n$2 [line 44]\n " shape="box"] +35 [label="35: Return Stmt \n _fun_get(1:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 44]\n n$2=_fun_X_div(&0$?%__sil_tmp__temp_return_n$1:class X &) [line 44]\n *&return:int =n$2 [line 44]\n " shape="box"] 35 -> 34 ; 34 [label="34: Exit get_method_div1 \n " color=yellow style=filled] -33 [label="33: Start get_method_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 44]\n " color=yellow style=filled] +33 [label="33: Start get_method_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 44]\n " color=yellow style=filled] 33 -> 35 ; -32 [label="32: Return Stmt \n _fun_get(1:int ,&__temp_return_n$1:class X *) [line 42]\n n$2=*&__temp_return_n$1.f:int [line 42]\n *&return:int =(1 / n$2) [line 42]\n " shape="box"] +32 [label="32: Return Stmt \n _fun_get(1:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 42]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 42]\n *&return:int =(1 / n$2) [line 42]\n " shape="box"] 32 -> 31 ; 31 [label="31: Exit get_field_div1 \n " color=yellow style=filled] -30 [label="30: Start get_field_div1\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 42]\n " color=yellow style=filled] +30 [label="30: Start get_field_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 42]\n " color=yellow style=filled] 30 -> 32 ; -29 [label="29: DeclStmt \n _fun_get(1:int ,&SIL_materialize_temp__n$1:class X *) [line 38]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$1:class X &) [line 38]\n " shape="box"] +29 [label="29: DeclStmt \n _fun_get(1:int ,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *) [line 38]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 38]\n " shape="box"] 29 -> 28 ; @@ -33,37 +33,37 @@ digraph iCFG { 27 [label="27: Exit get_div1 \n " color=yellow style=filled] -26 [label="26: Start get_div1\nFormals: \nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 37]\n " color=yellow style=filled] +26 [label="26: Start get_div1\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 37]\n " color=yellow style=filled] 26 -> 29 ; -25 [label="25: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 35]\n n$2=_fun_X_div(&__temp_return_n$1:class X &) [line 35]\n *&return:int =n$2 [line 35]\n " shape="box"] +25 [label="25: Return Stmt \n _fun_get(0:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 35]\n n$2=_fun_X_div(&0$?%__sil_tmp__temp_return_n$1:class X &) [line 35]\n *&return:int =n$2 [line 35]\n " shape="box"] 25 -> 24 ; 24 [label="24: Exit get_method_div0 \n " color=yellow style=filled] -23 [label="23: Start get_method_div0\nFormals: \nLocals: __temp_return_n$1:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1); [line 35]\n " color=yellow style=filled] +23 [label="23: Start get_method_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1); [line 35]\n " color=yellow style=filled] 23 -> 25 ; -22 [label="22: Call _fun_X_skip \n _fun_get(0:int ,&__temp_return_n$4:class X *) [line 31]\n n$5=_fun_X_skip(&__temp_return_n$4:class X &) [line 31]\n " shape="box"] +22 [label="22: Call _fun_X_skip \n _fun_get(0:int ,&0$?%__sil_tmp__temp_return_n$4:class X *) [line 31]\n n$5=_fun_X_skip(&0$?%__sil_tmp__temp_return_n$4:class X &) [line 31]\n " shape="box"] 22 -> 21 ; -21 [label="21: Return Stmt \n _fun_get(0:int ,&__temp_return_n$1:class X *) [line 32]\n n$2=*&__temp_return_n$1.f:int [line 32]\n *&return:int =(1 / n$2) [line 32]\n " shape="box"] +21 [label="21: Return Stmt \n _fun_get(0:int ,&0$?%__sil_tmp__temp_return_n$1:class X *) [line 32]\n n$2=*&0$?%__sil_tmp__temp_return_n$1.f:int [line 32]\n *&return:int =(1 / n$2) [line 32]\n " shape="box"] 21 -> 20 ; 20 [label="20: Exit get_field_div0 \n " color=yellow style=filled] -19 [label="19: Start get_field_div0\nFormals: \nLocals: __temp_return_n$1:class X __temp_return_n$4:class X \n DECLARE_LOCALS(&return,&__temp_return_n$1,&__temp_return_n$4); [line 30]\n " color=yellow style=filled] +19 [label="19: Start get_field_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_return_n$1:class X 0$?%__sil_tmp__temp_return_n$4:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_return_n$1,&0$?%__sil_tmp__temp_return_n$4); [line 30]\n " color=yellow style=filled] 19 -> 22 ; -18 [label="18: DeclStmt \n _fun_get(0:int ,&SIL_materialize_temp__n$1:class X *) [line 26]\n _fun_X_X(&x:class X *,&SIL_materialize_temp__n$1:class X &) [line 26]\n " shape="box"] +18 [label="18: DeclStmt \n _fun_get(0:int ,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *) [line 26]\n _fun_X_X(&x:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 26]\n " shape="box"] 18 -> 17 ; @@ -74,7 +74,7 @@ digraph iCFG { 16 [label="16: Exit get_div0 \n " color=yellow style=filled] -15 [label="15: Start get_div0\nFormals: \nLocals: x:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&SIL_materialize_temp__n$1); [line 25]\n " color=yellow style=filled] +15 [label="15: Start get_div0\nFormals: \nLocals: x:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&x,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 25]\n " color=yellow style=filled] 15 -> 18 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot index 22afee599..c4ca05ffb 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/struct_pass_by_value.cpp.dot @@ -4,7 +4,7 @@ digraph iCFG { 47 -> 46 ; -46 [label="46: Call _fun_set_f \n _fun_X_X(&__temp_construct_n$1:class X *,&x:class X &) [line 53]\n _fun_set_f(&__temp_construct_n$1:class X ,0:int ) [line 53]\n " shape="box"] +46 [label="46: Call _fun_set_f \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$1:class X *,&x:class X &) [line 53]\n _fun_set_f(&0$?%__sil_tmp__temp_construct_n$1:class X ,0:int ) [line 53]\n " shape="box"] 46 -> 45 ; @@ -15,7 +15,7 @@ digraph iCFG { 44 [label="44: Exit param_get_copied_div1 \n " color=yellow style=filled] -43 [label="43: Start param_get_copied_div1\nFormals: \nLocals: __temp_construct_n$1:class X x:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$1,&x); [line 51]\n " color=yellow style=filled] +43 [label="43: Start param_get_copied_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$1:class X x:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$1,&x); [line 51]\n " color=yellow style=filled] 43 -> 47 ; @@ -23,7 +23,7 @@ digraph iCFG { 42 -> 41 ; -41 [label="41: Call _fun_set_f \n _fun_X_X(&__temp_construct_n$1:class X *,&x:class X &) [line 47]\n _fun_set_f(&__temp_construct_n$1:class X ,1:int ) [line 47]\n " shape="box"] +41 [label="41: Call _fun_set_f \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$1:class X *,&x:class X &) [line 47]\n _fun_set_f(&0$?%__sil_tmp__temp_construct_n$1:class X ,1:int ) [line 47]\n " shape="box"] 41 -> 40 ; @@ -34,7 +34,7 @@ digraph iCFG { 39 [label="39: Exit param_get_copied_div0 \n " color=yellow style=filled] -38 [label="38: Start param_get_copied_div0\nFormals: \nLocals: __temp_construct_n$1:class X x:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$1,&x); [line 45]\n " color=yellow style=filled] +38 [label="38: Start param_get_copied_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$1:class X x:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$1,&x); [line 45]\n " color=yellow style=filled] 38 -> 42 ; @@ -46,36 +46,36 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,&y.x:class X &) [line 42]\n n$1=_fun_get_f(&__temp_construct_n$0:class X ) [line 42]\n *&return:int =(1 / n$1) [line 42]\n " shape="box"] +35 [label="35: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&y.x:class X &) [line 42]\n n$1=_fun_get_f(&0$?%__sil_tmp__temp_construct_n$0:class X ) [line 42]\n *&return:int =(1 / n$1) [line 42]\n " shape="box"] 35 -> 34 ; 34 [label="34: Exit field_div0 \n " color=yellow style=filled] -33 [label="33: Start field_div0\nFormals: \nLocals: __temp_construct_n$0:class X y:class Y x:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&y,&x); [line 39]\n " color=yellow style=filled] +33 [label="33: Start field_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X y:class Y x:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&y,&x); [line 39]\n " color=yellow style=filled] 33 -> 37 ; -32 [label="32: Return Stmt \n _fun_X_X(&SIL_materialize_temp__n$1:class X *,1:int ) [line 37]\n _fun_X_X(&__temp_construct_n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 37]\n n$2=_fun_get_f(&__temp_construct_n$0:class X ) [line 37]\n *&return:int =(1 / n$2) [line 37]\n " shape="box"] +32 [label="32: Return Stmt \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *,1:int ) [line 37]\n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 37]\n n$2=_fun_get_f(&0$?%__sil_tmp__temp_construct_n$0:class X ) [line 37]\n *&return:int =(1 / n$2) [line 37]\n " shape="box"] 32 -> 31 ; 31 [label="31: Exit temp_div1 \n " color=yellow style=filled] -30 [label="30: Start temp_div1\nFormals: \nLocals: __temp_construct_n$0:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&SIL_materialize_temp__n$1); [line 37]\n " color=yellow style=filled] +30 [label="30: Start temp_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 37]\n " color=yellow style=filled] 30 -> 32 ; -29 [label="29: Return Stmt \n _fun_X_X(&SIL_materialize_temp__n$1:class X *,0:int ) [line 35]\n _fun_X_X(&__temp_construct_n$0:class X *,&SIL_materialize_temp__n$1:class X &) [line 35]\n n$2=_fun_get_f(&__temp_construct_n$0:class X ) [line 35]\n *&return:int =(1 / n$2) [line 35]\n " shape="box"] +29 [label="29: Return Stmt \n _fun_X_X(&0$?%__sil_tmpSIL_materialize_temp__n$1:class X *,0:int ) [line 35]\n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&0$?%__sil_tmpSIL_materialize_temp__n$1:class X &) [line 35]\n n$2=_fun_get_f(&0$?%__sil_tmp__temp_construct_n$0:class X ) [line 35]\n *&return:int =(1 / n$2) [line 35]\n " shape="box"] 29 -> 28 ; 28 [label="28: Exit temp_div0 \n " color=yellow style=filled] -27 [label="27: Start temp_div0\nFormals: \nLocals: __temp_construct_n$0:class X SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&SIL_materialize_temp__n$1); [line 35]\n " color=yellow style=filled] +27 [label="27: Start temp_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X 0$?%__sil_tmpSIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&0$?%__sil_tmpSIL_materialize_temp__n$1); [line 35]\n " color=yellow style=filled] 27 -> 29 ; @@ -83,14 +83,14 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,&x:class X &) [line 32]\n n$1=_fun_get_f(&__temp_construct_n$0:class X ) [line 32]\n *&return:int =(1 / n$1) [line 32]\n " shape="box"] +25 [label="25: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&x:class X &) [line 32]\n n$1=_fun_get_f(&0$?%__sil_tmp__temp_construct_n$0:class X ) [line 32]\n *&return:int =(1 / n$1) [line 32]\n " shape="box"] 25 -> 24 ; 24 [label="24: Exit var_div1 \n " color=yellow style=filled] -23 [label="23: Start var_div1\nFormals: \nLocals: __temp_construct_n$0:class X x:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&x); [line 30]\n " color=yellow style=filled] +23 [label="23: Start var_div1\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X x:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&x); [line 30]\n " color=yellow style=filled] 23 -> 26 ; @@ -98,14 +98,14 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n _fun_X_X(&__temp_construct_n$0:class X *,&x:class X &) [line 27]\n n$1=_fun_get_f(&__temp_construct_n$0:class X ) [line 27]\n *&return:int =(1 / n$1) [line 27]\n " shape="box"] +21 [label="21: Return Stmt \n _fun_X_X(&0$?%__sil_tmp__temp_construct_n$0:class X *,&x:class X &) [line 27]\n n$1=_fun_get_f(&0$?%__sil_tmp__temp_construct_n$0:class X ) [line 27]\n *&return:int =(1 / n$1) [line 27]\n " shape="box"] 21 -> 20 ; 20 [label="20: Exit var_div0 \n " color=yellow style=filled] -19 [label="19: Start var_div0\nFormals: \nLocals: __temp_construct_n$0:class X x:class X \n DECLARE_LOCALS(&return,&__temp_construct_n$0,&x); [line 25]\n " color=yellow style=filled] +19 [label="19: Start var_div0\nFormals: \nLocals: 0$?%__sil_tmp__temp_construct_n$0:class X x:class X \n DECLARE_LOCALS(&return,&0$?%__sil_tmp__temp_construct_n$0,&x); [line 25]\n " color=yellow style=filled] 19 -> 22 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot index e06cc2da0..54fc0764f 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot @@ -40,7 +40,7 @@ digraph iCFG { 61 -> 70 ; -60 [label="60: DeclStmt \n n$4=*&value:class Person & [line 58]\n _fun_Person_Person(&SIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n _fun_Person_Person(&result:class Person *,&SIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] +60 [label="60: DeclStmt \n n$4=*&value:class Person & [line 58]\n _fun_Person_Person(&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person *,n$4:class Person &) [line 58]\n _fun_Person_Person(&result:class Person *,&0$?%__sil_tmpSIL_materialize_temp__n$3:class Person &) [line 58]\n " shape="box"] 60 -> 59 ; @@ -51,7 +51,7 @@ digraph iCFG { 58 [label="58: Exit template_typeid \n " color=yellow style=filled] -57 [label="57: Start template_typeid\nFormals: value:class Person &\nLocals: result:class Person SIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&result,&SIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] +57 [label="57: Start template_typeid\nFormals: value:class Person &\nLocals: result:class Person 0$?%__sil_tmpSIL_materialize_temp__n$3:class Person \n DECLARE_LOCALS(&return,&result,&0$?%__sil_tmpSIL_materialize_temp__n$3); [line 57]\n " color=yellow style=filled] 57 -> 60 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot index 6a4aeb417..12be4fadf 100644 --- a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot +++ b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot @@ -5,15 +5,15 @@ digraph iCFG { 105 -> 100 ; 105 -> 101 ; -104 [label="104: BinaryOperatorStmt: Assign \n n$21=*&SIL_temp_conditional___n$17:class NSString * [line 36]\n _fun___objc_retain(n$21:class NSString *) [line 36]\n n$22=*&__assert_fn__:class NSString * [line 36]\n *&__assert_fn__:class NSString *=n$21 [line 36]\n _fun___objc_release(n$22:class NSString *) [line 36]\n " shape="box"] +104 [label="104: BinaryOperatorStmt: Assign \n n$21=*&0$?%__sil_tmpSIL_temp_conditional___n$17:class NSString * [line 36]\n _fun___objc_retain(n$21:class NSString *) [line 36]\n n$22=*&__assert_fn__:class NSString * [line 36]\n *&__assert_fn__:class NSString *=n$21 [line 36]\n _fun___objc_release(n$22:class NSString *) [line 36]\n " shape="box"] 104 -> 98 ; -103 [label="103: ConditinalStmt Branch \n n$20=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n *&SIL_temp_conditional___n$17:class NSString *=n$20 [line 36]\n " shape="box"] +103 [label="103: ConditinalStmt Branch \n n$20=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n *&0$?%__sil_tmpSIL_temp_conditional___n$17:class NSString *=n$20 [line 36]\n " shape="box"] 103 -> 99 ; -102 [label="102: ConditinalStmt Branch \n n$19=*&__assert_fn__:class NSString * [line 36]\n *&SIL_temp_conditional___n$17:class NSString *=n$19 [line 36]\n " shape="box"] +102 [label="102: ConditinalStmt Branch \n n$19=*&__assert_fn__:class NSString * [line 36]\n *&0$?%__sil_tmpSIL_temp_conditional___n$17:class NSString *=n$19 [line 36]\n " shape="box"] 102 -> 99 ; @@ -34,15 +34,15 @@ digraph iCFG { 98 -> 93 ; 98 -> 94 ; -97 [label="97: BinaryOperatorStmt: Assign \n n$14=*&SIL_temp_conditional___n$10:class NSString * [line 36]\n _fun___objc_retain(n$14:class NSString *) [line 36]\n n$15=*&__assert_file__:class NSString * [line 36]\n *&__assert_file__:class NSString *=n$14 [line 36]\n _fun___objc_release(n$15:class NSString *) [line 36]\n " shape="box"] +97 [label="97: BinaryOperatorStmt: Assign \n n$14=*&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString * [line 36]\n _fun___objc_retain(n$14:class NSString *) [line 36]\n n$15=*&__assert_file__:class NSString * [line 36]\n *&__assert_file__:class NSString *=n$14 [line 36]\n _fun___objc_release(n$15:class NSString *) [line 36]\n " shape="box"] 97 -> 91 ; -96 [label="96: ConditinalStmt Branch \n n$13=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n *&SIL_temp_conditional___n$10:class NSString *=n$13 [line 36]\n " shape="box"] +96 [label="96: ConditinalStmt Branch \n n$13=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 36]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString *=n$13 [line 36]\n " shape="box"] 96 -> 92 ; -95 [label="95: ConditinalStmt Branch \n n$12=*&__assert_file__:class NSString * [line 36]\n *&SIL_temp_conditional___n$10:class NSString *=n$12 [line 36]\n " shape="box"] +95 [label="95: ConditinalStmt Branch \n n$12=*&__assert_file__:class NSString * [line 36]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString *=n$12 [line 36]\n " shape="box"] 95 -> 92 ; @@ -62,19 +62,19 @@ digraph iCFG { 91 -> 78 ; -90 [label="90: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 == 0), false); [line 36]\n " shape="invhouse"] +90 [label="90: Prune (false branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 == 0), false); [line 36]\n " shape="invhouse"] 90 -> 83 ; -89 [label="89: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 != 0), true); [line 36]\n " shape="invhouse"] +89 [label="89: Prune (true branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 36]\n PRUNE((n$4 != 0), true); [line 36]\n " shape="invhouse"] 89 -> 105 ; -88 [label="88: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 36]\n " shape="box"] +88 [label="88: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 36]\n " shape="box"] 88 -> 84 ; -87 [label="87: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =0 [line 36]\n " shape="box"] +87 [label="87: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =0 [line 36]\n " shape="box"] 87 -> 84 ; @@ -116,7 +116,7 @@ digraph iCFG { 78 [label="78: Exit test2 \n " color=yellow style=filled] -77 [label="77: Start test2\nFormals: target:class A *\nLocals: SIL_temp_conditional___n$2:int SIL_temp_conditional___n$10:class NSString * __assert_file__:class NSString * SIL_temp_conditional___n$17:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$10,&__assert_file__,&SIL_temp_conditional___n$17,&__assert_fn__); [line 35]\n " color=yellow style=filled] +77 [label="77: Start test2\nFormals: target:class A *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString * __assert_file__:class NSString * 0$?%__sil_tmpSIL_temp_conditional___n$17:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$10,&__assert_file__,&0$?%__sil_tmpSIL_temp_conditional___n$17,&__assert_fn__); [line 35]\n " color=yellow style=filled] 77 -> 80 ; @@ -125,15 +125,15 @@ digraph iCFG { 76 -> 71 ; 76 -> 72 ; -75 [label="75: BinaryOperatorStmt: Assign \n n$20=*&SIL_temp_conditional___n$16:class NSString * [line 31]\n _fun___objc_retain(n$20:class NSString *) [line 31]\n n$21=*&__assert_fn__:class NSString * [line 31]\n *&__assert_fn__:class NSString *=n$20 [line 31]\n _fun___objc_release(n$21:class NSString *) [line 31]\n " shape="box"] +75 [label="75: BinaryOperatorStmt: Assign \n n$20=*&0$?%__sil_tmpSIL_temp_conditional___n$16:class NSString * [line 31]\n _fun___objc_retain(n$20:class NSString *) [line 31]\n n$21=*&__assert_fn__:class NSString * [line 31]\n *&__assert_fn__:class NSString *=n$20 [line 31]\n _fun___objc_release(n$21:class NSString *) [line 31]\n " shape="box"] 75 -> 69 ; -74 [label="74: ConditinalStmt Branch \n n$19=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n *&SIL_temp_conditional___n$16:class NSString *=n$19 [line 31]\n " shape="box"] +74 [label="74: ConditinalStmt Branch \n n$19=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n *&0$?%__sil_tmpSIL_temp_conditional___n$16:class NSString *=n$19 [line 31]\n " shape="box"] 74 -> 70 ; -73 [label="73: ConditinalStmt Branch \n n$18=*&__assert_fn__:class NSString * [line 31]\n *&SIL_temp_conditional___n$16:class NSString *=n$18 [line 31]\n " shape="box"] +73 [label="73: ConditinalStmt Branch \n n$18=*&__assert_fn__:class NSString * [line 31]\n *&0$?%__sil_tmpSIL_temp_conditional___n$16:class NSString *=n$18 [line 31]\n " shape="box"] 73 -> 70 ; @@ -154,15 +154,15 @@ digraph iCFG { 69 -> 64 ; 69 -> 65 ; -68 [label="68: BinaryOperatorStmt: Assign \n n$13=*&SIL_temp_conditional___n$9:class NSString * [line 31]\n _fun___objc_retain(n$13:class NSString *) [line 31]\n n$14=*&__assert_file__:class NSString * [line 31]\n *&__assert_file__:class NSString *=n$13 [line 31]\n _fun___objc_release(n$14:class NSString *) [line 31]\n " shape="box"] +68 [label="68: BinaryOperatorStmt: Assign \n n$13=*&0$?%__sil_tmpSIL_temp_conditional___n$9:class NSString * [line 31]\n _fun___objc_retain(n$13:class NSString *) [line 31]\n n$14=*&__assert_file__:class NSString * [line 31]\n *&__assert_file__:class NSString *=n$13 [line 31]\n _fun___objc_release(n$14:class NSString *) [line 31]\n " shape="box"] 68 -> 62 ; -67 [label="67: ConditinalStmt Branch \n n$12=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n *&SIL_temp_conditional___n$9:class NSString *=n$12 [line 31]\n " shape="box"] +67 [label="67: ConditinalStmt Branch \n n$12=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 31]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:class NSString *=n$12 [line 31]\n " shape="box"] 67 -> 63 ; -66 [label="66: ConditinalStmt Branch \n n$11=*&__assert_file__:class NSString * [line 31]\n *&SIL_temp_conditional___n$9:class NSString *=n$11 [line 31]\n " shape="box"] +66 [label="66: ConditinalStmt Branch \n n$11=*&__assert_file__:class NSString * [line 31]\n *&0$?%__sil_tmpSIL_temp_conditional___n$9:class NSString *=n$11 [line 31]\n " shape="box"] 66 -> 63 ; @@ -182,19 +182,19 @@ digraph iCFG { 62 -> 48 ; -61 [label="61: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 == 0), false); [line 31]\n " shape="invhouse"] +61 [label="61: Prune (false branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 == 0), false); [line 31]\n " shape="invhouse"] 61 -> 53 ; -60 [label="60: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 != 0), true); [line 31]\n " shape="invhouse"] +60 [label="60: Prune (true branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 31]\n PRUNE((n$4 != 0), true); [line 31]\n " shape="invhouse"] 60 -> 76 ; -59 [label="59: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 31]\n " shape="box"] +59 [label="59: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 31]\n " shape="box"] 59 -> 54 ; -58 [label="58: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =0 [line 31]\n " shape="box"] +58 [label="58: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =0 [line 31]\n " shape="box"] 58 -> 54 ; @@ -240,7 +240,7 @@ digraph iCFG { 48 [label="48: Exit test1 \n " color=yellow style=filled] -47 [label="47: Start test1\nFormals: target:class A *\nLocals: SIL_temp_conditional___n$2:int SIL_temp_conditional___n$9:class NSString * __assert_file__:class NSString * SIL_temp_conditional___n$16:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$9,&__assert_file__,&SIL_temp_conditional___n$16,&__assert_fn__); [line 30]\n " color=yellow style=filled] +47 [label="47: Start test1\nFormals: target:class A *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$9:class NSString * __assert_file__:class NSString * 0$?%__sil_tmpSIL_temp_conditional___n$16:class NSString * __assert_fn__:class NSString * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$9,&__assert_file__,&0$?%__sil_tmpSIL_temp_conditional___n$16,&__assert_fn__); [line 30]\n " color=yellow style=filled] 47 -> 50 ; @@ -249,15 +249,15 @@ digraph iCFG { 46 -> 41 ; 46 -> 42 ; -45 [label="45: BinaryOperatorStmt: Assign \n n$31=*&SIL_temp_conditional___n$27:class NSString * [line 24]\n _fun___objc_retain(n$31:class NSString *) [line 24]\n n$32=*&__assert_file__:class NSString * [line 24]\n *&__assert_file__:class NSString *=n$31 [line 24]\n _fun___objc_release(n$32:class NSString *) [line 24]\n " shape="box"] +45 [label="45: BinaryOperatorStmt: Assign \n n$31=*&0$?%__sil_tmpSIL_temp_conditional___n$27:class NSString * [line 24]\n _fun___objc_retain(n$31:class NSString *) [line 24]\n n$32=*&__assert_file__:class NSString * [line 24]\n *&__assert_file__:class NSString *=n$31 [line 24]\n _fun___objc_release(n$32:class NSString *) [line 24]\n " shape="box"] 45 -> 39 ; -44 [label="44: ConditinalStmt Branch \n n$30=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 24]\n *&SIL_temp_conditional___n$27:class NSString *=n$30 [line 24]\n " shape="box"] +44 [label="44: ConditinalStmt Branch \n n$30=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$27:class NSString *=n$30 [line 24]\n " shape="box"] 44 -> 40 ; -43 [label="43: ConditinalStmt Branch \n n$29=*&__assert_file__:class NSString * [line 24]\n *&SIL_temp_conditional___n$27:class NSString *=n$29 [line 24]\n " shape="box"] +43 [label="43: ConditinalStmt Branch \n n$29=*&__assert_file__:class NSString * [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$27:class NSString *=n$29 [line 24]\n " shape="box"] 43 -> 40 ; @@ -277,19 +277,19 @@ digraph iCFG { 39 -> 25 ; -38 [label="38: Prune (false branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 == 0), false); [line 24]\n " shape="invhouse"] +38 [label="38: Prune (false branch) \n n$21=*&0$?%__sil_tmpSIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 == 0), false); [line 24]\n " shape="invhouse"] 38 -> 30 ; -37 [label="37: Prune (true branch) \n n$21=*&SIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 != 0), true); [line 24]\n " shape="invhouse"] +37 [label="37: Prune (true branch) \n n$21=*&0$?%__sil_tmpSIL_temp_conditional___n$19:int [line 24]\n PRUNE((n$21 != 0), true); [line 24]\n " shape="invhouse"] 37 -> 46 ; -36 [label="36: ConditinalStmt Branch \n *&SIL_temp_conditional___n$19:int =1 [line 24]\n " shape="box"] +36 [label="36: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$19:int =1 [line 24]\n " shape="box"] 36 -> 31 ; -35 [label="35: ConditinalStmt Branch \n *&SIL_temp_conditional___n$19:int =0 [line 24]\n " shape="box"] +35 [label="35: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$19:int =0 [line 24]\n " shape="box"] 35 -> 31 ; @@ -335,7 +335,7 @@ digraph iCFG { 25 [label="25: Exit A_initWithRequest: \n " color=yellow style=filled] -24 [label="24: Start A_initWithRequest:\nFormals: self:class A * a:class A *\nLocals: SIL_temp_conditional___n$19:int SIL_temp_conditional___n$27:class NSString * __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$19,&SIL_temp_conditional___n$27,&__assert_file__); [line 23]\n " color=yellow style=filled] +24 [label="24: Start A_initWithRequest:\nFormals: self:class A * a:class A *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$19:int 0$?%__sil_tmpSIL_temp_conditional___n$27:class NSString * __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$19,&0$?%__sil_tmpSIL_temp_conditional___n$27,&__assert_file__); [line 23]\n " color=yellow style=filled] 24 -> 27 ; @@ -344,15 +344,15 @@ digraph iCFG { 23 -> 18 ; 23 -> 19 ; -22 [label="22: BinaryOperatorStmt: Assign \n n$14=*&SIL_temp_conditional___n$10:class NSString * [line 19]\n _fun___objc_retain(n$14:class NSString *) [line 19]\n n$15=*&__assert_file__:class NSString * [line 19]\n *&__assert_file__:class NSString *=n$14 [line 19]\n _fun___objc_release(n$15:class NSString *) [line 19]\n " shape="box"] +22 [label="22: BinaryOperatorStmt: Assign \n n$14=*&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString * [line 19]\n _fun___objc_retain(n$14:class NSString *) [line 19]\n n$15=*&__assert_file__:class NSString * [line 19]\n *&__assert_file__:class NSString *=n$14 [line 19]\n _fun___objc_release(n$15:class NSString *) [line 19]\n " shape="box"] 22 -> 16 ; -21 [label="21: ConditinalStmt Branch \n n$13=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 19]\n *&SIL_temp_conditional___n$10:class NSString *=n$13 [line 19]\n " shape="box"] +21 [label="21: ConditinalStmt Branch \n n$13=_fun_NSString_stringWithUTF8String:(\"\":char *) [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString *=n$13 [line 19]\n " shape="box"] 21 -> 17 ; -20 [label="20: ConditinalStmt Branch \n n$12=*&__assert_file__:class NSString * [line 19]\n *&SIL_temp_conditional___n$10:class NSString *=n$12 [line 19]\n " shape="box"] +20 [label="20: ConditinalStmt Branch \n n$12=*&__assert_file__:class NSString * [line 19]\n *&0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString *=n$12 [line 19]\n " shape="box"] 20 -> 17 ; @@ -372,19 +372,19 @@ digraph iCFG { 16 -> 2 ; -15 [label="15: Prune (false branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 == 0), false); [line 19]\n " shape="invhouse"] +15 [label="15: Prune (false branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 == 0), false); [line 19]\n " shape="invhouse"] 15 -> 7 ; -14 [label="14: Prune (true branch) \n n$4=*&SIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 != 0), true); [line 19]\n " shape="invhouse"] +14 [label="14: Prune (true branch) \n n$4=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 19]\n PRUNE((n$4 != 0), true); [line 19]\n " shape="invhouse"] 14 -> 23 ; -13 [label="13: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 19]\n " shape="box"] +13 [label="13: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 19]\n " shape="box"] 13 -> 8 ; -12 [label="12: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =0 [line 19]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =0 [line 19]\n " shape="box"] 12 -> 8 ; @@ -430,7 +430,7 @@ digraph iCFG { 2 [label="2: Exit A_addTarget: \n " color=yellow style=filled] -1 [label="1: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: SIL_temp_conditional___n$2:int SIL_temp_conditional___n$10:class NSString * __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2,&SIL_temp_conditional___n$10,&__assert_file__); [line 18]\n " color=yellow style=filled] +1 [label="1: Start A_addTarget:\nFormals: self:class A * target:class A *\nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:int 0$?%__sil_tmpSIL_temp_conditional___n$10:class NSString * __assert_file__:class NSString * \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2,&0$?%__sil_tmpSIL_temp_conditional___n$10,&__assert_file__); [line 18]\n " color=yellow style=filled] 1 -> 4 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot index d4cb85d37..4575de9d9 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot @@ -1,26 +1,26 @@ /* @generated */ digraph iCFG { -54 [label="54: DeclStmt \n n$44=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 34]\n n$45=_fun_NSArray_init(n$44:class NSArray *) virtual [line 34]\n *&a:class NSArray *=n$45 [line 34]\n " shape="box"] +54 [label="54: DeclStmt \n n$45=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 34]\n n$46=_fun_NSArray_init(n$45:class NSArray *) virtual [line 34]\n *&a:class NSArray *=n$46 [line 34]\n " shape="box"] 54 -> 53 ; -53 [label="53: DeclStmt \n n$43=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$43 [line 36]\n " shape="box"] +53 [label="53: DeclStmt \n n$44=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$44 [line 36]\n " shape="box"] 53 -> 52 ; -52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$42=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$42 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n " shape="box"] +52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array_trans______2); [line 40]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array_trans______2 ):unsigned long ) [line 40]\n *&__objc_anonymous_block_MyBlock_array_trans______2:class __objc_anonymous_block_MyBlock_array_trans______2 =n$43 [line 40]\n *&enumerateObjectsUsingBlock:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array_trans______2) [line 39]\n " shape="box"] 52 -> 44 ; -51 [label="51: BinaryOperatorStmt: Assign \n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n " shape="box"] +51 [label="51: BinaryOperatorStmt: Assign \n n$42=*&stop:_Bool * [line 45]\n *n$42:_Bool =1 [line 45]\n " shape="box"] 51 -> 47 ; -50 [label="50: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n " shape="invhouse"] +50 [label="50: Prune (false branch) \n n$41=*&ShouldStop:int [line 44]\n PRUNE((n$41 == 0), false); [line 44]\n " shape="invhouse"] 50 -> 47 ; -49 [label="49: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n " shape="invhouse"] +49 [label="49: Prune (true branch) \n n$41=*&ShouldStop:int [line 44]\n PRUNE((n$41 != 0), true); [line 44]\n " shape="invhouse"] 49 -> 51 ; @@ -40,31 +40,31 @@ digraph iCFG { 45 -> 49 ; 45 -> 50 ; -44 [label="44: DeclStmt \n n$39=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 48]\n *&stop:_Bool *=n$39 [line 48]\n " shape="box"] +44 [label="44: DeclStmt \n n$40=_fun_malloc_no_fail(sizeof(_Bool ):_Bool ) [line 48]\n *&stop:_Bool *=n$40 [line 48]\n " shape="box"] 44 -> 43 ; -43 [label="43: BinaryOperatorStmt: Assign \n n$38=*&stop:_Bool * [line 49]\n *n$38:_Bool =0 [line 49]\n " shape="box"] +43 [label="43: BinaryOperatorStmt: Assign \n n$39=*&stop:_Bool * [line 49]\n *n$39:_Bool =0 [line 49]\n " shape="box"] 43 -> 32 ; -42 [label="42: DeclStmt \n n$35=*&objects:class NSArray * [line 53]\n n$36=*&idx:unsigned long [line 53]\n n$37=_fun_NSArray_objectAtIndexedSubscript:(n$35:class NSArray *,n$36:unsigned long ) virtual [line 53]\n *&object:struct objc_object *=n$37 [line 53]\n " shape="box"] +42 [label="42: DeclStmt \n n$36=*&objects:class NSArray * [line 53]\n n$37=*&idx:unsigned long [line 53]\n n$38=_fun_NSArray_objectAtIndexedSubscript:(n$36:class NSArray *,n$37:unsigned long ) virtual [line 53]\n *&object:struct objc_object *=n$38 [line 53]\n " shape="box"] 42 -> 41 ; -41 [label="41: Call n$31 \n n$31=*&enumerateObjectsUsingBlock:_fn_ (*) [line 54]\n n$32=*&object:struct objc_object * [line 54]\n n$33=*&idx:unsigned long [line 54]\n n$34=*&stop:_Bool * [line 54]\n n$31(n$32:struct objc_object *,n$33:unsigned long ,n$34:_Bool *) [line 54]\n " shape="box"] +41 [label="41: Call n$32 \n n$32=*&enumerateObjectsUsingBlock:_fn_ (*) [line 54]\n n$33=*&object:struct objc_object * [line 54]\n n$34=*&idx:unsigned long [line 54]\n n$35=*&stop:_Bool * [line 54]\n n$32(n$33:struct objc_object *,n$34:unsigned long ,n$35:_Bool *) [line 54]\n " shape="box"] 41 -> 38 ; -40 [label="40: Prune (false branch) \n PRUNE(((n$30 == 1) == 0), false); [line 55]\n " shape="invhouse"] +40 [label="40: Prune (false branch) \n PRUNE(((n$31 == 1) == 0), false); [line 55]\n " shape="invhouse"] 40 -> 37 ; -39 [label="39: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n " shape="invhouse"] +39 [label="39: Prune (true branch) \n PRUNE(((n$31 == 1) != 0), true); [line 55]\n " shape="invhouse"] 39 -> 30 ; -38 [label="38: BinaryOperatorStmt: EQ \n n$29=*&stop:_Bool * [line 55]\n n$30=*n$29:_Bool [line 55]\n " shape="box"] +38 [label="38: BinaryOperatorStmt: EQ \n n$30=*&stop:_Bool * [line 55]\n n$31=*n$30:_Bool [line 55]\n " shape="box"] 38 -> 39 ; @@ -73,20 +73,20 @@ digraph iCFG { 37 -> 33 ; -36 [label="36: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n " shape="invhouse"] +36 [label="36: Prune (false branch) \n PRUNE(((n$27 < n$29) == 0), false); [line 51]\n " shape="invhouse"] 36 -> 30 ; -35 [label="35: Prune (true branch) \n PRUNE(((n$26 < n$28) != 0), true); [line 51]\n " shape="invhouse"] +35 [label="35: Prune (true branch) \n PRUNE(((n$27 < n$29) != 0), true); [line 51]\n " shape="invhouse"] 35 -> 42 ; -34 [label="34: BinaryOperatorStmt: LT \n n$26=*&idx:unsigned long [line 51]\n n$27=*&objects:class NSArray * [line 51]\n n$28=_fun_NSArray_count(n$27:class NSArray *) [line 51]\n " shape="box"] +34 [label="34: BinaryOperatorStmt: LT \n n$27=*&idx:unsigned long [line 51]\n n$28=*&objects:class NSArray * [line 51]\n n$29=_fun_NSArray_count(n$28:class NSArray *) [line 51]\n " shape="box"] 34 -> 35 ; 34 -> 36 ; -33 [label="33: UnaryOperator \n n$25=*&idx:unsigned long [line 51]\n *&idx:unsigned long =(n$25 + 1) [line 51]\n " shape="box"] +33 [label="33: UnaryOperator \n n$26=*&idx:unsigned long [line 51]\n *&idx:unsigned long =(n$26 + 1) [line 51]\n " shape="box"] 33 -> 31 ; @@ -98,7 +98,7 @@ digraph iCFG { 31 -> 34 ; -30 [label="30: Call _fun_free \n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n " shape="box"] +30 [label="30: Call _fun_free \n n$25=*&stop:_Bool * [line 58]\n _fun_free(n$25:void *) [line 58]\n " shape="box"] 30 -> 29 ; @@ -109,27 +109,27 @@ digraph iCFG { 28 -> 54 ; -27 [label="27: DeclStmt \n n$22=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 20]\n n$23=_fun_NSArray_init(n$22:class NSArray *) virtual [line 20]\n *&a:class NSArray *=n$23 [line 20]\n " shape="box"] +27 [label="27: DeclStmt \n n$23=_fun___objc_alloc_no_fail(sizeof(class NSArray ):unsigned long ) [line 20]\n n$24=_fun_NSArray_init(n$23:class NSArray *) virtual [line 20]\n *&a:class NSArray *=n$24 [line 20]\n " shape="box"] 27 -> 26 ; -26 [label="26: DeclStmt \n n$21=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$21 [line 21]\n " shape="box"] +26 [label="26: DeclStmt \n n$22=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$22 [line 21]\n " shape="box"] 26 -> 25 ; -25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$20=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$20 [line 21]\n *&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n " shape="box"] +25 [label="25: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MyBlock_array______1); [line 21]\n n$21=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MyBlock_array______1 ):unsigned long ) [line 21]\n *&__objc_anonymous_block_MyBlock_array______1:class __objc_anonymous_block_MyBlock_array______1 =n$21 [line 21]\n *&0$?%__sil_tmp__objc_anonymous_block_MyBlock_array______1n$0:_fn_ (*)=(_fun___objc_anonymous_block_MyBlock_array______1) [line 21]\n " shape="box"] 25 -> 17 ; -24 [label="24: BinaryOperatorStmt: Assign \n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n " shape="box"] +24 [label="24: BinaryOperatorStmt: Assign \n n$20=*&stop:_Bool * [line 27]\n *n$20:_Bool =1 [line 27]\n " shape="box"] 24 -> 20 ; -23 [label="23: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n n$19=*&ShouldStop:int [line 26]\n PRUNE((n$19 == 0), false); [line 26]\n " shape="invhouse"] 23 -> 20 ; -22 [label="22: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$19=*&ShouldStop:int [line 26]\n PRUNE((n$19 != 0), true); [line 26]\n " shape="invhouse"] 22 -> 24 ; @@ -149,31 +149,31 @@ digraph iCFG { 18 -> 22 ; 18 -> 23 ; -17 [label="17: DeclStmt \n n$17=_fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 21]\n *&stop:_Bool *=n$17 [line 21]\n " shape="box"] +17 [label="17: DeclStmt \n n$18=_fun_malloc_no_fail(sizeof(signed char ):signed char ) [line 21]\n *&stop:_Bool *=n$18 [line 21]\n " shape="box"] 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n n$16=*&stop:_Bool * [line 21]\n *n$16:void =0 [line 21]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n n$17=*&stop:_Bool * [line 21]\n *n$17:void =0 [line 21]\n " shape="box"] 16 -> 5 ; -15 [label="15: DeclStmt \n n$13=*&objects:class NSArray * [line 21]\n n$14=*&idx:unsigned long [line 21]\n n$15=_fun_NSArray_objectAtIndexedSubscript:(n$13:class NSArray *,n$14:unsigned long ) virtual [line 21]\n *&object:struct objc_object *=n$15 [line 21]\n " shape="box"] +15 [label="15: DeclStmt \n n$14=*&objects:class NSArray * [line 21]\n n$15=*&idx:unsigned long [line 21]\n n$16=_fun_NSArray_objectAtIndexedSubscript:(n$14:class NSArray *,n$15:unsigned long ) virtual [line 21]\n *&object:struct objc_object *=n$16 [line 21]\n " shape="box"] 15 -> 14 ; -14 [label="14: Call n$8 \n n$8=*&infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) [line 21]\n n$9=*&object:struct objc_object * [line 21]\n n$10=*&idx:unsigned long [line 21]\n n$11=*&stop:_Bool * [line 21]\n n$12=n$8(n$9:struct objc_object *,n$10:unsigned long ,n$11:_Bool *) [line 21]\n " shape="box"] +14 [label="14: Call n$9 \n n$9=*&0$?%__sil_tmp__objc_anonymous_block_MyBlock_array______1n$0:_fn_ (*) [line 21]\n n$10=*&object:struct objc_object * [line 21]\n n$11=*&idx:unsigned long [line 21]\n n$12=*&stop:_Bool * [line 21]\n n$13=n$9(n$10:struct objc_object *,n$11:unsigned long ,n$12:_Bool *) [line 21]\n " shape="box"] 14 -> 11 ; -13 [label="13: Prune (false branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 == 0), false); [line 21]\n " shape="invhouse"] +13 [label="13: Prune (false branch) \n n$8=*n$7:signed char [line 21]\n PRUNE((n$8 == 0), false); [line 21]\n " shape="invhouse"] 13 -> 10 ; -12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n " shape="invhouse"] +12 [label="12: Prune (true branch) \n n$8=*n$7:signed char [line 21]\n PRUNE((n$8 != 0), true); [line 21]\n " shape="invhouse"] 12 -> 3 ; -11 [label="11: UnaryOperator \n n$6=*&stop:_Bool * [line 21]\n " shape="box"] +11 [label="11: UnaryOperator \n n$7=*&stop:_Bool * [line 21]\n " shape="box"] 11 -> 12 ; @@ -182,20 +182,20 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$4 < n$6) == 0), false); [line 21]\n " shape="invhouse"] 9 -> 3 ; -8 [label="8: Prune (true branch) \n PRUNE(((n$3 < n$5) != 0), true); [line 21]\n " shape="invhouse"] +8 [label="8: Prune (true branch) \n PRUNE(((n$4 < n$6) != 0), true); [line 21]\n " shape="invhouse"] 8 -> 15 ; -7 [label="7: BinaryOperatorStmt: LT \n n$3=*&idx:unsigned long [line 21]\n n$4=*&objects:class NSArray * [line 21]\n n$5=_fun_NSArray_count(n$4:class NSArray *) virtual [line 21]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: LT \n n$4=*&idx:unsigned long [line 21]\n n$5=*&objects:class NSArray * [line 21]\n n$6=_fun_NSArray_count(n$5:class NSArray *) virtual [line 21]\n " shape="box"] 7 -> 8 ; 7 -> 9 ; -6 [label="6: UnaryOperator \n n$2=*&idx:unsigned long [line 21]\n *&idx:unsigned long =(n$2 + 1) [line 21]\n " shape="box"] +6 [label="6: UnaryOperator \n n$3=*&idx:unsigned long [line 21]\n *&idx:unsigned long =(n$3 + 1) [line 21]\n " shape="box"] 6 -> 4 ; @@ -207,14 +207,14 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Call _fun_free \n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n " shape="box"] +3 [label="3: Call _fun_free \n n$1=*&stop:_Bool * [line 21]\n n$2=_fun_free(n$1:void *) [line 21]\n " shape="box"] 3 -> 2 ; 2 [label="2: Exit MyBlock_array \n " color=yellow style=filled] -1 [label="1: Start MyBlock_array\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * infer___objc_anonymous_block_MyBlock_array______1:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&infer___objc_anonymous_block_MyBlock_array______1,&objects,&a); [line 18]\n " color=yellow style=filled] +1 [label="1: Start MyBlock_array\nFormals: self:class MyBlock *\nLocals: idx:unsigned long object:struct objc_object * stop:_Bool * 0$?%__sil_tmp__objc_anonymous_block_MyBlock_array______1n$0:_fn_ (*) objects:class NSArray * a:class NSArray * \n DECLARE_LOCALS(&return,&idx,&object,&stop,&0$?%__sil_tmp__objc_anonymous_block_MyBlock_array______1n$0,&objects,&a); [line 18]\n " color=yellow style=filled] 1 -> 27 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot index e47f6b175..010669f9b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot +++ b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot @@ -1,14 +1,14 @@ /* @generated */ digraph iCFG { -11 [label="11: Return Stmt \n n$1=*&self:class A * [line 24]\n n$5=*&SIL_temp_conditional___n$2:int [line 24]\n n$6=_fun_A_test4:(n$1:class A *,n$5:int ) virtual [line 24]\n *&return:int =n$6 [line 24]\n " shape="box"] +11 [label="11: Return Stmt \n n$1=*&self:class A * [line 24]\n n$5=*&0$?%__sil_tmpSIL_temp_conditional___n$2:int [line 24]\n n$6=_fun_A_test4:(n$1:class A *,n$5:int ) virtual [line 24]\n *&return:int =n$6 [line 24]\n " shape="box"] 11 -> 5 ; -10 [label="10: ConditinalStmt Branch \n *&SIL_temp_conditional___n$2:int =1 [line 24]\n " shape="box"] +10 [label="10: ConditinalStmt Branch \n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =1 [line 24]\n " shape="box"] 10 -> 6 ; -9 [label="9: ConditinalStmt Branch \n n$4=*&b:_Bool [line 24]\n *&SIL_temp_conditional___n$2:int =n$4 [line 24]\n " shape="box"] +9 [label="9: ConditinalStmt Branch \n n$4=*&b:_Bool [line 24]\n *&0$?%__sil_tmpSIL_temp_conditional___n$2:int =n$4 [line 24]\n " shape="box"] 9 -> 6 ; @@ -27,7 +27,7 @@ digraph iCFG { 5 [label="5: Exit A_test5: \n " color=yellow style=filled] -4 [label="4: Start A_test5:\nFormals: self:class A * b:_Bool \nLocals: SIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&SIL_temp_conditional___n$2); [line 23]\n " color=yellow style=filled] +4 [label="4: Start A_test5:\nFormals: self:class A * b:_Bool \nLocals: 0$?%__sil_tmpSIL_temp_conditional___n$2:int \n DECLARE_LOCALS(&return,&0$?%__sil_tmpSIL_temp_conditional___n$2); [line 23]\n " color=yellow style=filled] 4 -> 7 ; diff --git a/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java b/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java index 74f1b18db..24d5f4516 100644 --- a/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java +++ b/infer/tests/endtoend/cpp/VectorEmptyAccessTest.java @@ -57,7 +57,8 @@ public class VectorEmptyAccessTest { "size_check0_empty", "vector_as_param_empty", "vector_as_param_clear", - "vector_as_param_by_value_empty" + "vector_as_param_by_value_empty", + "getter_empty", }; InferResults inferResults = InferRunner.runInferCPP(inferCmd); assertThat(