diff --git a/infer/src/IR/cfg.ml b/infer/src/IR/cfg.ml index 92ea869aa..038bb7136 100644 --- a/infer/src/IR/cfg.ml +++ b/infer/src/IR/cfg.ml @@ -735,8 +735,8 @@ module Node = struct call_instr :: instrs | Sil.Prune (origin_exp, loc, is_true_branch, if_kind) -> Sil.Prune (convert_exp origin_exp, loc, is_true_branch, if_kind):: instrs - | Sil.Nullify (origin_pvar, loc, deallocate) -> - Sil.Nullify (convert_pvar origin_pvar, loc, deallocate) :: instrs + | Sil.Nullify (origin_pvar, loc) -> + Sil.Nullify (convert_pvar origin_pvar, loc) :: instrs | Sil.Declare_locals (typed_vars, loc) -> let new_typed_vars = IList.map (fun (pvar, typ) -> (convert_pvar pvar, typ)) typed_vars in (Sil.Declare_locals (new_typed_vars, loc)) :: instrs diff --git a/infer/src/IR/sil.ml b/infer/src/IR/sil.ml index 1556d7b55..2702f2d46 100644 --- a/infer/src/IR/sil.ml +++ b/infer/src/IR/sil.ml @@ -746,8 +746,8 @@ type instr = [ret_id1..ret_idn = e_fun(arg_ts);] where n = 0 for void return and n > 1 for struct return *) | Call of Ident.t list * exp * (exp * typ) list * Location.t * call_flags - (** nullify stack variable, the bool parameter indicates whether to deallocate the variable *) - | Nullify of Pvar.t * Location.t * bool + (** nullify stack variable *) + | Nullify of Pvar.t * Location.t | Abstract of Location.t (** apply abstraction *) | Remove_temps of Ident.t list * Location.t (** remove temporaries *) | Stackop of stackop * Location.t (** operation on the stack of propsets *) @@ -2079,7 +2079,7 @@ let instr_get_loc = function | Set (_, _, _, loc) | Prune (_, loc, _, _) | Call (_, _, _, loc, _) - | Nullify (_, loc, _) + | Nullify (_, loc) | Abstract loc | Remove_temps (_, loc) | Stackop (_, loc) @@ -2096,7 +2096,7 @@ let instr_get_exps = function [cond] | Call (ret_ids, e, _, _, _) -> e :: (IList.map (fun id -> Var id)) ret_ids - | Nullify (pvar, _, _) -> + | Nullify (pvar, _) -> [Lvar pvar] | Abstract _ -> [] @@ -2139,8 +2139,8 @@ let pp_instr pe0 f instr = (pp_comma_seq (pp_exp_typ pe)) (arg_ts) pp_call_flags cf Location.pp loc - | Nullify (pvar, loc, deallocate) -> - F.fprintf f "NULLIFY(%a,%b); %a" (Pvar.pp pe) pvar deallocate Location.pp loc + | Nullify (pvar, loc) -> + F.fprintf f "NULLIFY(%a); %a" (Pvar.pp pe) pvar Location.pp loc | Abstract loc -> F.fprintf f "APPLY_ABSTRACTION; %a" Location.pp loc | Remove_temps (temps, loc) -> @@ -2238,7 +2238,7 @@ let instr_iter_types f instr = match instr with | Call (_, e, arg_ts, _, _) -> exp_iter_types f e; IList.iter (fun (e, t) -> exp_iter_types f e; typ_iter_types f t) arg_ts - | Nullify (_, _, _) -> + | Nullify (_, _) -> () | Abstract _ -> () @@ -3478,10 +3478,9 @@ let instr_compare instr1 instr2 = match instr1, instr2 with if n <> 0 then n else call_flags_compare cf1 cf2 | Call _, _ -> -1 | _, Call _ -> 1 - | Nullify (pvar1, loc1, deallocate1), Nullify (pvar2, loc2, deallocate2) -> + | Nullify (pvar1, loc1), Nullify (pvar2, loc2) -> let n = Pvar.compare pvar1 pvar2 in - if n <> 0 then n else let n = Location.compare loc1 loc2 in - if n <> 0 then n else bool_compare deallocate1 deallocate2 + if n <> 0 then n else Location.compare loc1 loc2 | Nullify _, _ -> -1 | _, Nullify _ -> 1 | Abstract loc1, Abstract loc2 -> @@ -3606,9 +3605,8 @@ let instr_compare_structural instr1 instr2 exp_map = else let n, exp_map = args_compare_structural arg_ts1 arg_ts2 exp_map in (if n <> 0 then n else call_flags_compare cf1 cf2), exp_map - | Nullify (pvar1, _, deallocate1), Nullify (pvar2, _, deallocate2) -> - let n, exp_map = exp_compare_structural (Lvar pvar1) (Lvar pvar2) exp_map in - (if n <> 0 then n else bool_compare deallocate1 deallocate2), exp_map + | Nullify (pvar1, _), Nullify (pvar2, _) -> + exp_compare_structural (Lvar pvar1) (Lvar pvar2) exp_map | Abstract _, Abstract _ -> 0, exp_map | Remove_temps (temps1, _), Remove_temps (temps2, _) -> id_list_compare_structural temps1 temps2 exp_map diff --git a/infer/src/IR/sil.mli b/infer/src/IR/sil.mli index 2de5f2a25..01c7bf4e8 100644 --- a/infer/src/IR/sil.mli +++ b/infer/src/IR/sil.mli @@ -405,8 +405,8 @@ type instr = [ret_id1..ret_idn = e_fun(arg_ts);] where n = 0 for void return and n > 1 for struct return *) | Call of Ident.t list * exp * (exp * typ) list * Location.t * call_flags - (** nullify stack variable, the bool parameter indicates whether to deallocate the variable *) - | Nullify of Pvar.t * Location.t * bool + (** nullify stack variable *) + | Nullify of Pvar.t * Location.t | Abstract of Location.t (** apply abstraction *) | Remove_temps of Ident.t list * Location.t (** remove temporaries *) | Stackop of stackop * Location.t (** operation on the stack of propsets *) diff --git a/infer/src/backend/errdesc.ml b/infer/src/backend/errdesc.ml index 37333ced8..1f34a43cd 100644 --- a/infer/src/backend/errdesc.ml +++ b/infer/src/backend/errdesc.ml @@ -78,7 +78,7 @@ let find_nullify_after_instr node instr pvar : bool = let node_instrs = Cfg.Node.get_instrs node in let found_instr = ref false in let find_nullify = function - | Sil.Nullify (pv, _, _) when !found_instr -> Pvar.equal pv pvar + | Sil.Nullify (pv, _) when !found_instr -> Pvar.equal pv pvar | _instr -> if instr = _instr then found_instr := true; false in @@ -538,7 +538,7 @@ let explain_leak tenv hpred prop alloc_att_opt bucket = | None -> if !verbose then (L.d_str "explain_leak: no current instruction"; L.d_ln ()); value_str_from_pvars_vpath [] vpath - | Some (Sil.Nullify (pvar, _, _)) when check_pvar pvar -> + | Some (Sil.Nullify (pvar, _)) when check_pvar pvar -> if !verbose then (L.d_str "explain_leak: current instruction is Nullify for pvar "; @@ -549,7 +549,7 @@ let explain_leak tenv hpred prop alloc_att_opt bucket = | Some (Sil.Abstract _) -> if !verbose then (L.d_str "explain_leak: current instruction is Abstract"; L.d_ln ()); let get_nullify = function - | Sil.Nullify (pvar, _, _) when check_pvar pvar -> + | Sil.Nullify (pvar, _) when check_pvar pvar -> if !verbose then (L.d_str "explain_leak: found nullify before Abstract for pvar "; diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml index 53a146592..ba5fd6bfc 100644 --- a/infer/src/backend/preanal.ml +++ b/infer/src/backend/preanal.ml @@ -93,7 +93,7 @@ let rec def_instr cfg (instr: Sil.instr) acc = match instr with | Sil.Set (e, _, _, _) -> def_exp cfg e acc | Sil.Call _ | Sil.Letderef _ | Sil.Prune _ -> acc - | Sil.Nullify (x, _, _) -> + | Sil.Nullify (x, _) -> if is_not_function cfg x then Vset.add x acc else acc | Sil.Abstract _ | Sil.Remove_temps _ | Sil.Stackop _ | Sil.Declare_locals _ -> acc @@ -212,7 +212,7 @@ let analyze_proc cfg pdesc cand = (* Instruction i is nullifying a block variable *) let is_block_nullify i = match i with - | Sil.Nullify(pvar, _, true) -> Sil.is_block_pvar pvar + | Sil.Nullify(pvar, _) -> Sil.is_block_pvar pvar | _ -> false (** Add nullify instructions to the node given dead program variables *) @@ -223,11 +223,11 @@ let node_add_nullify_instrs n dead_vars_after dead_vars_before = pvars_tmp @ pvars_notmp in let instrs_after = IList.map - (fun pvar -> Sil.Nullify (pvar, loc, false)) + (fun pvar -> Sil.Nullify (pvar, loc)) (move_tmp_pvars_first dead_vars_after) in let instrs_before = IList.map - (fun pvar -> Sil.Nullify (pvar, loc, false)) + (fun pvar -> Sil.Nullify (pvar, loc)) (move_tmp_pvars_first dead_vars_before) in (* Nullify(bloc_var,_,true) can be placed in the middle of the block because when we add this instruction*) @@ -527,7 +527,7 @@ let add_nullify_instrs tenv _ pdesc = let loc = Cfg.Node.get_last_loc node in let nullify_instrs = IList.filter is_local pvars - |> IList.map (fun pvar -> Sil.Nullify (pvar, loc, false)) in + |> IList.map (fun pvar -> Sil.Nullify (pvar, loc)) in if nullify_instrs <> [] then Cfg.Node.append_instrs_temps node (IList.rev nullify_instrs) [] in diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml index d5df7d5e6..1f079bd8d 100644 --- a/infer/src/backend/symExec.ml +++ b/infer/src/backend/symExec.ml @@ -46,7 +46,7 @@ let rec unroll_type tenv typ off = (** Given a node, returns a list of pvar of blocks that have been nullified in the block. *) let get_blocks_nullified node = let null_blocks = IList.flatten(IList.map (fun i -> match i with - | Sil.Nullify(pvar, _, true) when Sil.is_block_pvar pvar -> [pvar] + | Sil.Nullify(pvar, _) when Sil.is_block_pvar pvar -> [pvar] | _ -> []) (Cfg.Node.get_instrs node)) in null_blocks @@ -1205,7 +1205,7 @@ let rec sym_exec tenv current_pdesc _instr (prop_: Prop.normal Prop.t) path pdesc= current_pdesc; instr; tenv; prop_= prop_r; path; ret_ids; args= n_actual_params; proc_name= callee_pname; loc; } end - | Sil.Nullify (pvar, _, deallocate) -> + | Sil.Nullify (pvar, _) -> begin let eprop = Prop.expose prop_ in match IList.partition @@ -1213,11 +1213,9 @@ let rec sym_exec tenv current_pdesc _instr (prop_: Prop.normal Prop.t) path | Sil.Hpointsto (Sil.Lvar pvar', _, _) -> Pvar.equal pvar pvar' | _ -> false) (Prop.get_sigma eprop) with | [Sil.Hpointsto(e, se, typ)], sigma' -> - let sigma'' = match deallocate with - | false -> - let se' = execute_nullify_se se in - Sil.Hpointsto(e, se', typ):: sigma' - | true -> sigma' in + let sigma'' = + let se' = execute_nullify_se se in + Sil.Hpointsto(e, se', typ):: sigma' in let eprop_res = Prop.replace_sigma sigma'' eprop in ret_old_path [Prop.normalize eprop_res] | [], _ -> diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/compound_assignment.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/compound_assignment.c.dot index 34c454fc8..de0192b56 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/compound_assignment.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/compound_assignment.c.dot @@ -15,7 +15,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: MulAssign \n n$6=*&x:double [line 15]\n *&x:double =(n$6 * 1.000000) [line 15]\n REMOVE_TEMPS(n$6); [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: MulAssign \n n$6=*&x:double [line 15]\n *&x:double =(n$6 * 1.000000) [line 15]\n REMOVE_TEMPS(n$6); [line 15]\n NULLIFY(&x); [line 15]\n " shape="box"] 11 -> 10 ; @@ -43,7 +43,7 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: XorAssign \n n$0=*&b:int [line 22]\n *&b:int =(n$0 ^ 1) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&b,false); [line 22]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: XorAssign \n n$0=*&b:int [line 22]\n *&b:int =(n$0 ^ 1) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&b); [line 22]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot index c748caf46..4e571f89a 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/int_const.c.dot @@ -3,11 +3,11 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: DeclStmt \n *&large_int:int =9223372036854775807 [line 19]\n NULLIFY(&large_int,false); [line 19]\n " shape="box"] +5 [label="5: DeclStmt \n *&large_int:int =9223372036854775807 [line 19]\n NULLIFY(&large_int); [line 19]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n *&overflow_int:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&overflow_int,false); [line 20]\n " shape="box"] +4 [label="4: DeclStmt \n *&overflow_int:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&overflow_int); [line 20]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/plus_expr.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/plus_expr.c.dot index 419ea1961..2a5ef054e 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/plus_expr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/plus_expr.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 13]\n n$1=*&z:int [line 13]\n *&return:int =(n$0 + n$1) [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&x,false); [line 13]\n NULLIFY(&z,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 13]\n n$1=*&z:int [line 13]\n *&return:int =(n$0 + n$1) [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&x); [line 13]\n NULLIFY(&z); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot b/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot index 2a3d20e4a..5ffe96327 100644 --- a/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/arithmetic/unary.c.dot @@ -3,31 +3,31 @@ digraph iCFG { 15 -> 14 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$12=*&x:int [line 14]\n *&y:int =~n$12 [line 14]\n REMOVE_TEMPS(n$12); [line 14]\n NULLIFY(&y,false); [line 14]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n n$12=*&x:int [line 14]\n *&y:int =~n$12 [line 14]\n REMOVE_TEMPS(n$12); [line 14]\n NULLIFY(&y); [line 14]\n " shape="box"] 14 -> 13 ; -13 [label="13: BinaryOperatorStmt: Assign \n n$11=*&x:int [line 15]\n *&y:int =-n$11 [line 15]\n REMOVE_TEMPS(n$11); [line 15]\n NULLIFY(&y,false); [line 15]\n " shape="box"] +13 [label="13: BinaryOperatorStmt: Assign \n n$11=*&x:int [line 15]\n *&y:int =-n$11 [line 15]\n REMOVE_TEMPS(n$11); [line 15]\n NULLIFY(&y); [line 15]\n " shape="box"] 13 -> 12 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$10=*&x:int [line 16]\n *&y:int =n$10 [line 16]\n REMOVE_TEMPS(n$10); [line 16]\n NULLIFY(&y,false); [line 16]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n n$10=*&x:int [line 16]\n *&y:int =n$10 [line 16]\n REMOVE_TEMPS(n$10); [line 16]\n NULLIFY(&y); [line 16]\n " shape="box"] 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$9=*&x:int [line 18]\n *&x:int =(n$9 + 1) [line 18]\n *&y:int =n$9 [line 18]\n REMOVE_TEMPS(n$9); [line 18]\n NULLIFY(&y,false); [line 18]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: Assign \n n$9=*&x:int [line 18]\n *&x:int =(n$9 + 1) [line 18]\n *&y:int =n$9 [line 18]\n REMOVE_TEMPS(n$9); [line 18]\n NULLIFY(&y); [line 18]\n " shape="box"] 11 -> 10 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$8=*&x:int [line 19]\n *&x:int =(n$8 + 1) [line 19]\n *&y:int =(n$8 + 1) [line 19]\n REMOVE_TEMPS(n$8); [line 19]\n NULLIFY(&y,false); [line 19]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$8=*&x:int [line 19]\n *&x:int =(n$8 + 1) [line 19]\n *&y:int =(n$8 + 1) [line 19]\n REMOVE_TEMPS(n$8); [line 19]\n NULLIFY(&y); [line 19]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$7=*&x:int [line 21]\n *&x:int =(n$7 - 1) [line 21]\n *&y:int =(n$7 - 1) [line 21]\n REMOVE_TEMPS(n$7); [line 21]\n NULLIFY(&y,false); [line 21]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$7=*&x:int [line 21]\n *&x:int =(n$7 - 1) [line 21]\n *&y:int =(n$7 - 1) [line 21]\n REMOVE_TEMPS(n$7); [line 21]\n NULLIFY(&y); [line 21]\n " shape="box"] 9 -> 8 ; -8 [label="8: BinaryOperatorStmt: Assign \n n$6=*&x:int [line 22]\n *&x:int =(n$6 - 1) [line 22]\n *&y:int =n$6 [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&x,false); [line 22]\n NULLIFY(&y,false); [line 22]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n n$6=*&x:int [line 22]\n *&x:int =(n$6 - 1) [line 22]\n *&y:int =n$6 [line 22]\n REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&x); [line 22]\n NULLIFY(&y); [line 22]\n " shape="box"] 8 -> 7 ; @@ -39,7 +39,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$1=*&b:int * [line 29]\n n$2=*&b:int * [line 29]\n n$3=*n$2:int [line 29]\n *n$1:int =(n$3 + 1) [line 29]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 29]\n NULLIFY(&b,false); [line 29]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$1=*&b:int * [line 29]\n n$2=*&b:int * [line 29]\n n$3=*n$2:int [line 29]\n *n$1:int =(n$3 + 1) [line 29]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 29]\n NULLIFY(&b); [line 29]\n " shape="box"] 5 -> 4 ; @@ -51,7 +51,7 @@ digraph iCFG { 3 -> 2 ; -2 [label="2: Exit main \n NULLIFY(&a,false); [line 33]\n " color=yellow style=filled] +2 [label="2: Exit main \n NULLIFY(&a); [line 33]\n " color=yellow style=filled] 1 [label="1: Start main\nFormals: \nLocals: b:int * a:int y:int x:int \n DECLARE_LOCALS(&return,&b,&a,&y,&x); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/c/frontend/booleans/bool_example.c.dot b/infer/tests/codetoanalyze/c/frontend/booleans/bool_example.c.dot index 3d14c2f66..76d55e171 100644 --- a/infer/tests/codetoanalyze/c/frontend/booleans/bool_example.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/booleans/bool_example.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: Return Stmt \n n$0=*&e:_Bool [line 12]\n *&return:_Bool =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&e,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&e:_Bool [line 12]\n *&return:_Bool =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&e); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/booleans/condition_as_param.c.dot b/infer/tests/codetoanalyze/c/frontend/booleans/condition_as_param.c.dot index 4cb35e1a7..f89c32d9f 100644 --- a/infer/tests/codetoanalyze/c/frontend/booleans/condition_as_param.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/booleans/condition_as_param.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: Call _fun_check \n n$0=*&x:int [line 14]\n _fun_check((n$0 < 2):int ) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +5 [label="5: Call _fun_check \n n$0=*&x:int [line 14]\n _fun_check((n$0 < 2):int ) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&x); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/c_prototype/prototype.c.dot b/infer/tests/codetoanalyze/c/frontend/c_prototype/prototype.c.dot index 9068d3899..a1979b9f8 100644 --- a/infer/tests/codetoanalyze/c/frontend/c_prototype/prototype.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/c_prototype/prototype.c.dot @@ -1,9 +1,9 @@ digraph iCFG { -7 [label="7: BinaryOperatorStmt: Assign \n n$0=_fun_sum(2:int ,3:int ) [line 20]\n *&total:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&total,false); [line 20]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n n$0=_fun_sum(2:int ,3:int ) [line 20]\n *&total:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&total); [line 20]\n " shape="box"] 7 -> 3 ; -6 [label="6: Return Stmt \n n$0=*&a:int [line 25]\n n$1=*&b:int [line 25]\n *&return:int =(n$0 + n$1) [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&a,false); [line 25]\n NULLIFY(&b,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&a:int [line 25]\n n$1=*&b:int [line 25]\n *&return:int =(n$0 + n$1) [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&a); [line 25]\n NULLIFY(&b); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/c/frontend/comma/comma.c.dot b/infer/tests/codetoanalyze/c/frontend/comma/comma.c.dot index e6d8789e8..d06038e91 100644 --- a/infer/tests/codetoanalyze/c/frontend/comma/comma.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/comma/comma.c.dot @@ -3,19 +3,19 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: DeclStmt \n *&b:int =7 [line 23]\n NULLIFY(&b,false); [line 23]\n " shape="box"] +18 [label="18: DeclStmt \n *&b:int =7 [line 23]\n NULLIFY(&b); [line 23]\n " shape="box"] 18 -> 17 ; -17 [label="17: DeclStmt \n *&c:int =3 [line 23]\n NULLIFY(&c,false); [line 23]\n " shape="box"] +17 [label="17: DeclStmt \n *&c:int =3 [line 23]\n NULLIFY(&c); [line 23]\n " shape="box"] 17 -> 16 ; -16 [label="16: DeclStmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 * 2) [line 24]\n n$2=*&a:int [line 24]\n n$3=*&a:int [line 24]\n *&a:int =(n$3 + 1) [line 24]\n *&b:int =(7 * n$3) [line 24]\n n$4=*&b:int [line 24]\n n$5=*&a:int [line 24]\n n$6=*&b:int [line 24]\n *&c:int =((n$5 + n$6) + 9) [line 24]\n n$7=*&c:int [line 24]\n n$8=*&c:int [line 24]\n *&d:int =n$8 [line 24]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4,n$5,n$6,n$7,n$8); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&b,false); [line 24]\n NULLIFY(&c,false); [line 24]\n " shape="box"] +16 [label="16: DeclStmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 * 2) [line 24]\n n$2=*&a:int [line 24]\n n$3=*&a:int [line 24]\n *&a:int =(n$3 + 1) [line 24]\n *&b:int =(7 * n$3) [line 24]\n n$4=*&b:int [line 24]\n n$5=*&a:int [line 24]\n n$6=*&b:int [line 24]\n *&c:int =((n$5 + n$6) + 9) [line 24]\n n$7=*&c:int [line 24]\n n$8=*&c:int [line 24]\n *&d:int =n$8 [line 24]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4,n$5,n$6,n$7,n$8); [line 24]\n NULLIFY(&a); [line 24]\n NULLIFY(&b); [line 24]\n NULLIFY(&c); [line 24]\n " shape="box"] 16 -> 15 ; -15 [label="15: Return Stmt \n n$0=*&d:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&d,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&d:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&d); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 15 -> 14 ; @@ -30,15 +30,15 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: DeclStmt \n *&b:int =7 [line 17]\n NULLIFY(&b,false); [line 17]\n " shape="box"] +11 [label="11: DeclStmt \n *&b:int =7 [line 17]\n NULLIFY(&b); [line 17]\n " shape="box"] 11 -> 10 ; -10 [label="10: DeclStmt \n n$1=*&a:int [line 18]\n *&a:int =(n$1 * 2) [line 18]\n n$2=*&a:int [line 18]\n n$3=*&a:int [line 18]\n *&a:int =(n$3 + 1) [line 18]\n *&b:int =(7 * n$3) [line 18]\n n$4=*&b:int [line 18]\n n$5=*&a:int [line 18]\n n$6=*&b:int [line 18]\n *&d:int =((n$5 + n$6) + 9) [line 18]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4,n$5,n$6); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&b,false); [line 18]\n " shape="box"] +10 [label="10: DeclStmt \n n$1=*&a:int [line 18]\n *&a:int =(n$1 * 2) [line 18]\n n$2=*&a:int [line 18]\n n$3=*&a:int [line 18]\n *&a:int =(n$3 + 1) [line 18]\n *&b:int =(7 * n$3) [line 18]\n n$4=*&b:int [line 18]\n n$5=*&a:int [line 18]\n n$6=*&b:int [line 18]\n *&d:int =((n$5 + n$6) + 9) [line 18]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4,n$5,n$6); [line 18]\n NULLIFY(&a); [line 18]\n NULLIFY(&b); [line 18]\n " shape="box"] 10 -> 9 ; -9 [label="9: Return Stmt \n n$0=*&d:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&d,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&d:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&d); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 9 -> 8 ; @@ -53,15 +53,15 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: DeclStmt \n *&b:int =7 [line 11]\n NULLIFY(&b,false); [line 11]\n " shape="box"] +5 [label="5: DeclStmt \n *&b:int =7 [line 11]\n NULLIFY(&b); [line 11]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n n$1=*&a:int [line 12]\n *&a:int =(n$1 * 2) [line 12]\n n$2=*&a:int [line 12]\n n$3=*&a:int [line 12]\n *&a:int =(n$3 + 1) [line 12]\n *&b:int =(7 * n$3) [line 12]\n n$4=*&b:int [line 12]\n *&d:int =n$4 [line 12]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4); [line 12]\n NULLIFY(&a,false); [line 12]\n NULLIFY(&b,false); [line 12]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&a:int [line 12]\n *&a:int =(n$1 * 2) [line 12]\n n$2=*&a:int [line 12]\n n$3=*&a:int [line 12]\n *&a:int =(n$3 + 1) [line 12]\n *&b:int =(7 * n$3) [line 12]\n n$4=*&b:int [line 12]\n *&d:int =n$4 [line 12]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4); [line 12]\n NULLIFY(&a); [line 12]\n NULLIFY(&b); [line 12]\n " shape="box"] 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&d:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&d,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&d:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&d); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/conditional_operator/array_access.c.dot b/infer/tests/codetoanalyze/c/frontend/conditional_operator/array_access.c.dot index 60486c62e..facd96700 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/array_access.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/array_access.c.dot @@ -53,7 +53,7 @@ digraph iCFG { 7 -> 3 ; -6 [label="6: UnaryOperator \n n$2=*&p:int ** [line 17]\n n$3=*n$2:int * [line 17]\n NULLIFY(&p,false); [line 17]\n " shape="box"] +6 [label="6: UnaryOperator \n n$2=*&p:int ** [line 17]\n n$3=*n$2:int * [line 17]\n NULLIFY(&p); [line 17]\n " shape="box"] 6 -> 7 ; 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 b40e905ac..713284d9e 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$31); [line 13]\n NULLIFY(&SIL_temp_conditional___n$28,false); [line 13]\n NULLIFY(&x1,false); [line 13]\n " shape="box"] +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 REMOVE_TEMPS(n$31); [line 13]\n NULLIFY(&SIL_temp_conditional___n$28); [line 13]\n NULLIFY(&x1); [line 13]\n " shape="box"] 48 -> 38 ; @@ -24,7 +24,7 @@ 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 REMOVE_TEMPS(n$27); [line 16]\n NULLIFY(&SIL_temp_conditional___n$24,false); [line 16]\n NULLIFY(&x2,false); [line 16]\n " shape="box"] +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 REMOVE_TEMPS(n$27); [line 16]\n NULLIFY(&SIL_temp_conditional___n$24); [line 16]\n NULLIFY(&x2); [line 16]\n " shape="box"] 42 -> 27 ; @@ -49,7 +49,7 @@ 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 REMOVE_TEMPS(n$19,n$23); [line 19]\n NULLIFY(&SIL_temp_conditional___n$16,false); [line 19]\n NULLIFY(&SIL_temp_conditional___n$20,false); [line 19]\n NULLIFY(&x3,false); [line 19]\n " shape="box"] +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 REMOVE_TEMPS(n$19,n$23); [line 19]\n NULLIFY(&SIL_temp_conditional___n$16); [line 19]\n NULLIFY(&SIL_temp_conditional___n$20); [line 19]\n NULLIFY(&x3); [line 19]\n " shape="box"] 36 -> 21 ; @@ -95,7 +95,7 @@ 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 REMOVE_TEMPS(n$15); [line 22]\n NULLIFY(&SIL_temp_conditional___n$12,false); [line 22]\n NULLIFY(&y1,false); [line 22]\n " shape="box"] +25 [label="25: DeclStmt \n n$15=*&SIL_temp_conditional___n$12:int [line 22]\n *&y1:int =(n$15 + 77) [line 22]\n REMOVE_TEMPS(n$15); [line 22]\n NULLIFY(&SIL_temp_conditional___n$12); [line 22]\n NULLIFY(&y1); [line 22]\n " shape="box"] 25 -> 15 ; @@ -120,7 +120,7 @@ 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 REMOVE_TEMPS(n$11); [line 24]\n NULLIFY(&SIL_temp_conditional___n$8,false); [line 24]\n NULLIFY(&y2,false); [line 24]\n " shape="box"] +19 [label="19: DeclStmt \n n$11=*&SIL_temp_conditional___n$8:int [line 24]\n *&y2:int =(77 + n$11) [line 24]\n REMOVE_TEMPS(n$11); [line 24]\n NULLIFY(&SIL_temp_conditional___n$8); [line 24]\n NULLIFY(&y2); [line 24]\n " shape="box"] 19 -> 4 ; @@ -145,15 +145,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 REMOVE_TEMPS(n$3,n$7); [line 26]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 26]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 26]\n NULLIFY(&y3,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +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 REMOVE_TEMPS(n$3,n$7); [line 26]\n NULLIFY(&SIL_temp_conditional___n$0); [line 26]\n NULLIFY(&SIL_temp_conditional___n$4); [line 26]\n NULLIFY(&y3); [line 26]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +12 [label="12: ConditinalStmt Branch \n n$6=*&z:int [line 26]\n *&SIL_temp_conditional___n$4:int =n$6 [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z); [line 26]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$5); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +11 [label="11: ConditinalStmt Branch \n n$5=*&z:int [line 26]\n *&SIL_temp_conditional___n$4:int =n$5 [line 26]\n REMOVE_TEMPS(n$5); [line 26]\n NULLIFY(&z); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 11 -> 8 ; 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 0f117d5cd..b0ce5ae1b 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/cond2.c.dot @@ -1,14 +1,14 @@ 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 REMOVE_TEMPS(n$9); [line 23]\n NULLIFY(&SIL_temp_conditional___n$5,false); [line 23]\n NULLIFY(&y,false); [line 23]\n " shape="box"] +58 [label="58: BinaryOperatorStmt: Assign \n n$9=*&SIL_temp_conditional___n$5:int [line 23]\n *&y:int =n$9 [line 23]\n REMOVE_TEMPS(n$9); [line 23]\n NULLIFY(&SIL_temp_conditional___n$5); [line 23]\n NULLIFY(&y); [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 REMOVE_TEMPS(n$8); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [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 *&SIL_temp_conditional___n$5:int =n$8 [line 23]\n REMOVE_TEMPS(n$8); [line 23]\n NULLIFY(&x); [line 23]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$7); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [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 *&SIL_temp_conditional___n$5:int =(n$7 + 1) [line 23]\n REMOVE_TEMPS(n$7); [line 23]\n NULLIFY(&x); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 56 -> 52 ; @@ -29,7 +29,7 @@ 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 REMOVE_TEMPS(n$4); [line 24]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +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 REMOVE_TEMPS(n$4); [line 24]\n NULLIFY(&SIL_temp_conditional___n$0); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 51 -> 39 ; @@ -37,7 +37,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&x,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +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 REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&x); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 49 -> 40 ; @@ -49,7 +49,7 @@ digraph iCFG { 47 -> 49 ; -46 [label="46: BinaryOperatorStmt: GT \n n$2=*&SIL_temp_conditional___n$1:int [line 24]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 24]\n " shape="box"] +46 [label="46: BinaryOperatorStmt: GT \n n$2=*&SIL_temp_conditional___n$1:int [line 24]\n NULLIFY(&SIL_temp_conditional___n$1); [line 24]\n " shape="box"] 46 -> 47 ; @@ -98,7 +98,7 @@ digraph iCFG { 35 -> 30 ; -34 [label="34: Prune (true branch) \n PRUNE(((7 < n$10) != 0), true); [line 12]\n REMOVE_TEMPS(n$10); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +34 [label="34: Prune (true branch) \n PRUNE(((7 < n$10) != 0), true); [line 12]\n REMOVE_TEMPS(n$10); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 34 -> 36 ; @@ -111,7 +111,7 @@ digraph iCFG { 32 -> 33 ; -31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +31 [label="31: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 31 -> 36 ; @@ -124,7 +124,7 @@ 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 REMOVE_TEMPS(n$9); [line 16]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 16]\n NULLIFY(&n,false); [line 16]\n " shape="box"] +28 [label="28: DeclStmt \n n$9=*&SIL_temp_conditional___n$6:int [line 16]\n *&n:int =n$9 [line 16]\n REMOVE_TEMPS(n$9); [line 16]\n NULLIFY(&SIL_temp_conditional___n$6); [line 16]\n NULLIFY(&n); [line 16]\n " shape="box"] 28 -> 10 ; @@ -145,7 +145,7 @@ digraph iCFG { 24 -> 26 ; -23 [label="23: BinaryOperatorStmt: LT \n n$7=*&x:int [line 16]\n *&x:int =(n$7 + 1) [line 16]\n n$8=*&y:int [line 16]\n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n " shape="box"] +23 [label="23: BinaryOperatorStmt: LT \n n$7=*&x:int [line 16]\n *&x:int =(n$7 + 1) [line 16]\n n$8=*&y:int [line 16]\n NULLIFY(&x); [line 16]\n NULLIFY(&y); [line 16]\n " shape="box"] 23 -> 24 ; @@ -154,7 +154,7 @@ digraph iCFG { 22 -> 23 ; -21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 16]\n NULLIFY(&x,false); [line 16]\n NULLIFY(&y,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"] +21 [label="21: Prune (true branch) \n PRUNE(((3 < 4) != 0), true); [line 16]\n NULLIFY(&x); [line 16]\n NULLIFY(&y); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="invhouse"] 21 -> 26 ; @@ -162,12 +162,12 @@ 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 REMOVE_TEMPS(n$5); [line 17]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 17]\n NULLIFY(&n,false); [line 17]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: Assign \n n$5=*&SIL_temp_conditional___n$2:int [line 17]\n *&n:int =n$5 [line 17]\n REMOVE_TEMPS(n$5); [line 17]\n NULLIFY(&SIL_temp_conditional___n$2); [line 17]\n NULLIFY(&n); [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 REMOVE_TEMPS(n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +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 REMOVE_TEMPS(n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$3); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 18 -> 9 ; @@ -208,7 +208,7 @@ 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 REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 8 -> 2 ; 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 85187fd98..2fc72adc3 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$3,n$0,n$1); [line 35]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +66 [label="66: Return Stmt \n n$3=*&SIL_temp_conditional___n$2:int [line 35]\n *&return:int =n$3 [line 35]\n REMOVE_TEMPS(n$3,n$0,n$1); [line 35]\n NULLIFY(&SIL_temp_conditional___n$2); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 66 -> 59 ; @@ -35,7 +35,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 31]\n " shape="box"] +57 [label="57: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 31]\n *&z:int =n$4 [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$1); [line 31]\n " shape="box"] 57 -> 51 ; @@ -43,7 +43,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$2,n$3); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [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 *&SIL_temp_conditional___n$1:int =n$3 [line 31]\n REMOVE_TEMPS(n$2,n$3); [line 31]\n NULLIFY(&p); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 55 -> 52 ; @@ -59,7 +59,7 @@ digraph iCFG { 52 -> 57 ; -51 [label="51: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +51 [label="51: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 51 -> 50 ; @@ -71,11 +71,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$2,n$0); [line 28]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +48 [label="48: Return Stmt \n n$2=*&SIL_temp_conditional___n$1:int [line 28]\n *&return:int =n$2 [line 28]\n REMOVE_TEMPS(n$2,n$0); [line 28]\n NULLIFY(&SIL_temp_conditional___n$1); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 48 -> 41 ; -47 [label="47: BinaryConditinalStmt Init \n n$0=*&b:int [line 28]\n NULLIFY(&b,false); [line 28]\n " shape="box"] +47 [label="47: BinaryConditinalStmt Init \n n$0=*&b:int [line 28]\n NULLIFY(&b); [line 28]\n " shape="box"] 47 -> 43 ; @@ -107,11 +107,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$2,n$0,n$3); [line 26]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +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 REMOVE_TEMPS(n$2,n$0,n$3); [line 26]\n NULLIFY(&SIL_temp_conditional___n$1); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 39 -> 32 ; -38 [label="38: BinaryConditinalStmt Init \n n$0=*&b:int [line 26]\n NULLIFY(&b,false); [line 26]\n " shape="box"] +38 [label="38: BinaryConditinalStmt Init \n n$0=*&b:int [line 26]\n NULLIFY(&b); [line 26]\n " shape="box"] 38 -> 34 ; @@ -143,11 +143,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3,n$1); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 22]\n " shape="box"] +30 [label="30: DeclStmt \n n$3=*&SIL_temp_conditional___n$2:int [line 22]\n *&x:int =n$3 [line 22]\n REMOVE_TEMPS(n$3,n$1); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2); [line 22]\n " shape="box"] 30 -> 23 ; -29 [label="29: BinaryConditinalStmt Init \n n$1=*&b:int [line 22]\n NULLIFY(&b,false); [line 22]\n " shape="box"] +29 [label="29: BinaryConditinalStmt Init \n n$1=*&b:int [line 22]\n NULLIFY(&b); [line 22]\n " shape="box"] 29 -> 25 ; @@ -172,7 +172,7 @@ digraph iCFG { 24 -> 30 ; -23 [label="23: Return Stmt \n n$0=*&x:int [line 23]\n *&return:int =n$0 [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +23 [label="23: Return Stmt \n n$0=*&x:int [line 23]\n *&return:int =n$0 [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&x); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 23 -> 22 ; @@ -183,7 +183,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 17]\n " shape="box"] +20 [label="20: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 17]\n *&x:int =n$4 [line 17]\n REMOVE_TEMPS(n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$1); [line 17]\n " shape="box"] 20 -> 14 ; @@ -191,11 +191,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3); [line 17]\n NULLIFY(&b,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$3=*&b:int [line 17]\n *&SIL_temp_conditional___n$1:int =n$3 [line 17]\n REMOVE_TEMPS(n$3); [line 17]\n NULLIFY(&b); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 18 -> 15 ; -17 [label="17: Prune (false branch) \n n$2=*&b:int [line 17]\n PRUNE((n$2 == 0), false); [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&b,false); [line 17]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$2=*&b:int [line 17]\n PRUNE((n$2 == 0), false); [line 17]\n REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&b); [line 17]\n " shape="invhouse"] 17 -> 19 ; @@ -207,7 +207,7 @@ digraph iCFG { 15 -> 20 ; -14 [label="14: Return Stmt \n n$0=*&x:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +14 [label="14: Return Stmt \n n$0=*&x:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&x); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 14 -> 13 ; @@ -219,7 +219,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3,n$4); [line 14]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +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 REMOVE_TEMPS(n$3,n$4); [line 14]\n NULLIFY(&SIL_temp_conditional___n$0); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 11 -> 5 ; @@ -227,11 +227,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$2); [line 14]\n NULLIFY(&b,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +9 [label="9: ConditinalStmt Branch \n n$2=*&b:int [line 14]\n *&SIL_temp_conditional___n$0:int =n$2 [line 14]\n REMOVE_TEMPS(n$2); [line 14]\n NULLIFY(&b); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 9 -> 6 ; -8 [label="8: Prune (false branch) \n n$1=*&b:int [line 14]\n PRUNE((n$1 == 0), false); [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&b,false); [line 14]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n n$1=*&b:int [line 14]\n PRUNE((n$1 == 0), false); [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&b); [line 14]\n " shape="invhouse"] 8 -> 10 ; @@ -251,7 +251,7 @@ digraph iCFG { 4 -> 7 ; 4 -> 8 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 12]\n *&return:int =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 12]\n *&return:int =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 083b89ba8..11fe577fe 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$1,n$3,n$5); [line 20]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 20]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 20]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +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 REMOVE_TEMPS(n$1,n$3,n$5); [line 20]\n NULLIFY(&SIL_temp_conditional___n$0); [line 20]\n NULLIFY(&SIL_temp_conditional___n$2); [line 20]\n NULLIFY(&SIL_temp_conditional___n$4); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 67 -> 51 ; @@ -73,7 +73,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$1,n$3,n$5); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 18]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 18]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +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 REMOVE_TEMPS(n$1,n$3,n$5); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0); [line 18]\n NULLIFY(&SIL_temp_conditional___n$2); [line 18]\n NULLIFY(&SIL_temp_conditional___n$4); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 49 -> 33 ; @@ -147,7 +147,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$1,n$3,n$5,n$7); [line 15]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 15]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 15]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 15]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +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 REMOVE_TEMPS(n$1,n$3,n$5,n$7); [line 15]\n NULLIFY(&SIL_temp_conditional___n$0); [line 15]\n NULLIFY(&SIL_temp_conditional___n$2); [line 15]\n NULLIFY(&SIL_temp_conditional___n$4); [line 15]\n NULLIFY(&SIL_temp_conditional___n$6); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 31 -> 10 ; @@ -242,7 +242,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&SIL_temp_conditional___n$0); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 8 -> 2 ; 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 fee314f84..f60a30e65 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 @@ -4,7 +4,7 @@ digraph iCFG { 95 -> 67 ; 95 -> 68 ; -94 [label="94: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 53]\n NULLIFY(&block_size,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +94 [label="94: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 53]\n NULLIFY(&block_size); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 94 -> 90 ; @@ -16,7 +16,7 @@ digraph iCFG { 92 -> 94 ; -91 [label="91: BinaryOperatorStmt: EQ \n n$11=*&spec:char * [line 52]\n n$12=*n$11:char [line 52]\n NULLIFY(&spec,false); [line 52]\n " shape="box"] +91 [label="91: BinaryOperatorStmt: EQ \n n$11=*&spec:char * [line 52]\n n$12=*n$11:char [line 52]\n NULLIFY(&spec); [line 52]\n " shape="box"] 91 -> 92 ; @@ -25,15 +25,15 @@ digraph iCFG { 90 -> 65 ; -89 [label="89: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 50]\n NULLIFY(&block_size,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +89 [label="89: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 50]\n NULLIFY(&block_size); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 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 REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7); [line 49]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$10); [line 49]\n NULLIFY(&SIL_temp_conditional___n$7); [line 49]\n NULLIFY(&spec); [line 49]\n " shape="invhouse"] 87 -> 89 ; @@ -63,11 +63,11 @@ 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 REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3); [line 49]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 49]\n NULLIFY(&SIL_temp_conditional___n$3); [line 49]\n NULLIFY(&spec); [line 49]\n " shape="invhouse"] 79 -> 82 ; @@ -97,11 +97,11 @@ 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 REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0); [line 49]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 49]\n NULLIFY(&spec,false); [line 49]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 49]\n NULLIFY(&SIL_temp_conditional___n$0); [line 49]\n NULLIFY(&spec); [line 49]\n " shape="invhouse"] 71 -> 74 ; @@ -145,15 +145,15 @@ digraph iCFG { 61 -> 36 ; -60 [label="60: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 38]\n NULLIFY(&block_size,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +60 [label="60: BinaryOperatorStmt: Assign \n *&block_size:char *=0 [line 38]\n NULLIFY(&block_size); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 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 REMOVE_TEMPS(n$10); [line 37]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 37]\n NULLIFY(&spec,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$10); [line 37]\n NULLIFY(&SIL_temp_conditional___n$7); [line 37]\n NULLIFY(&spec); [line 37]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$10); [line 37]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 37]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$10); [line 37]\n NULLIFY(&SIL_temp_conditional___n$7); [line 37]\n " shape="invhouse"] 58 -> 60 ; @@ -183,11 +183,11 @@ 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 REMOVE_TEMPS(n$6); [line 36]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 36]\n NULLIFY(&SIL_temp_conditional___n$3); [line 36]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$6); [line 36]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 36]\n NULLIFY(&SIL_temp_conditional___n$3); [line 36]\n " shape="invhouse"] 50 -> 53 ; @@ -207,7 +207,7 @@ digraph iCFG { 46 -> 48 ; -45 [label="45: BinaryOperatorStmt: Assign \n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 36]\n *&spec:char *=n$4 [line 36]\n n$5=*&spec:char * [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="box"] +45 [label="45: BinaryOperatorStmt: Assign \n n$4=_fun_getenv(\"BLOCK_SIZE\":char *) [line 36]\n *&spec:char *=n$4 [line 36]\n n$5=*&spec:char * [line 36]\n NULLIFY(&spec); [line 36]\n " shape="box"] 45 -> 46 ; @@ -217,11 +217,11 @@ 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 REMOVE_TEMPS(n$2); [line 36]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 36]\n NULLIFY(&SIL_temp_conditional___n$0); [line 36]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$2); [line 36]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 36]\n NULLIFY(&SIL_temp_conditional___n$0); [line 36]\n " shape="invhouse"] 42 -> 45 ; @@ -233,11 +233,11 @@ digraph iCFG { 40 -> 37 ; -39 [label="39: Prune (false branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 == 0), false); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="invhouse"] +39 [label="39: Prune (false branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 == 0), false); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec); [line 36]\n " shape="invhouse"] 39 -> 41 ; -38 [label="38: Prune (true branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 != 0), true); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec,false); [line 36]\n " shape="invhouse"] +38 [label="38: Prune (true branch) \n n$1=*&spec:char * [line 36]\n PRUNE((n$1 != 0), true); [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&spec); [line 36]\n " shape="invhouse"] 38 -> 40 ; @@ -258,19 +258,19 @@ digraph iCFG { 34 -> 61 ; -33 [label="33: BinaryOperatorStmt: Assign \n n$7=*&x:int * [line 25]\n *n$7:int =32 [line 25]\n REMOVE_TEMPS(n$7); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +33 [label="33: BinaryOperatorStmt: Assign \n n$7=*&x:int * [line 25]\n *n$7:int =32 [line 25]\n REMOVE_TEMPS(n$7); [line 25]\n NULLIFY(&x); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 33 -> 15 ; -32 [label="32: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +32 [label="32: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 23]\n NULLIFY(&x); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 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 REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3); [line 22]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 22]\n NULLIFY(&SIL_temp_conditional___n$3); [line 22]\n NULLIFY(&x); [line 22]\n " shape="invhouse"] 30 -> 32 ; @@ -300,11 +300,11 @@ 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 REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0); [line 22]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$2); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0); [line 22]\n " shape="invhouse"] 22 -> 25 ; @@ -345,11 +345,11 @@ digraph iCFG { 13 -> 18 ; 13 -> 19 ; -12 [label="12: BinaryOperatorStmt: Assign \n *&x:int *=32 [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n *&x:int *=32 [line 17]\n NULLIFY(&x); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 12 -> 3 ; -11 [label="11: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 15]\n NULLIFY(&x,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: Assign \n *&x:int *=17 [line 15]\n NULLIFY(&x); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 11 -> 3 ; @@ -361,7 +361,7 @@ digraph iCFG { 9 -> 11 ; -8 [label="8: BinaryOperatorStmt: EQ \n n$1=*&x:int * [line 14]\n n$2=*n$1:int [line 14]\n NULLIFY(&x,false); [line 14]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: EQ \n n$1=*&x:int * [line 14]\n n$2=*n$1:int [line 14]\n NULLIFY(&x); [line 14]\n " shape="box"] 8 -> 9 ; 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 36c883845..694b2e083 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$2); [line 29]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +34 [label="34: Return Stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 29]\n *&return:int =n$2 [line 29]\n REMOVE_TEMPS(n$2); [line 29]\n NULLIFY(&SIL_temp_conditional___n$0); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 34 -> 28 ; @@ -11,11 +11,11 @@ digraph iCFG { 32 -> 29 ; -31 [label="31: Prune (false branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 == 0), false); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x,false); [line 29]\n " shape="invhouse"] +31 [label="31: Prune (false branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 == 0), false); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x); [line 29]\n " shape="invhouse"] 31 -> 33 ; -30 [label="30: Prune (true branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 != 0), true); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x,false); [line 29]\n " shape="invhouse"] +30 [label="30: Prune (true branch) \n n$1=*&x:int [line 29]\n PRUNE((n$1 != 0), true); [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&x); [line 29]\n " shape="invhouse"] 30 -> 32 ; @@ -47,7 +47,7 @@ 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 NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n " shape="box"] +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 NULLIFY(&SIL_temp_conditional___n$0); [line 22]\n " shape="box"] 22 -> 23 ; @@ -60,11 +60,11 @@ digraph iCFG { 20 -> 17 ; -19 [label="19: Prune (false branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] +19 [label="19: Prune (false branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 == 0), false); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x); [line 22]\n " shape="invhouse"] 19 -> 21 ; -18 [label="18: Prune (true branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="invhouse"] +18 [label="18: Prune (true branch) \n n$1=*&x:int [line 22]\n PRUNE((n$1 != 0), true); [line 22]\n REMOVE_TEMPS(n$1); [line 22]\n NULLIFY(&x); [line 22]\n " shape="invhouse"] 18 -> 20 ; @@ -104,7 +104,7 @@ digraph iCFG { 9 -> 11 ; -8 [label="8: Call _fun_identity \n n$0=*&x:int [line 13]\n n$1=_fun_identity(n$0:int ) [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="box"] +8 [label="8: Call _fun_identity \n n$0=*&x:int [line 13]\n n$1=_fun_identity(n$0:int ) [line 13]\n NULLIFY(&x); [line 13]\n " shape="box"] 8 -> 9 ; @@ -124,7 +124,7 @@ digraph iCFG { 4 -> 8 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 10]\n *&return:int =n$0 [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&x,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 10]\n *&return:int =n$0 [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&x); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; 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 c86df6854..e2961bbff 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$3); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 22]\n NULLIFY(&z,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +24 [label="24: DeclStmt \n n$3=*&SIL_temp_conditional___n$0:int [line 22]\n *&z:int =n$3 [line 22]\n REMOVE_TEMPS(n$3); [line 22]\n NULLIFY(&SIL_temp_conditional___n$0); [line 22]\n NULLIFY(&z); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 24 -> 18 ; @@ -31,7 +31,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$1,n$2,n$3); [line 20]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 20]\n NULLIFY(&z,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +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 REMOVE_TEMPS(n$1,n$2,n$3); [line 20]\n NULLIFY(&SIL_temp_conditional___n$0); [line 20]\n NULLIFY(&z); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 16 -> 10 ; @@ -63,15 +63,15 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3,n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 17]\n NULLIFY(&z,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +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 REMOVE_TEMPS(n$3,n$4); [line 17]\n NULLIFY(&SIL_temp_conditional___n$0); [line 17]\n NULLIFY(&z); [line 17]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&q,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +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 REMOVE_TEMPS(n$2); [line 17]\n NULLIFY(&q); [line 17]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$1); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 17]\n NULLIFY(&p); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 3 ; 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 4dd689a08..a7719bd30 100644 --- a/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/conditional_operator/preincrement.c.dot @@ -4,7 +4,7 @@ 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 REMOVE_TEMPS(n$14,n$15); [line 16]\n NULLIFY(&SIL_temp_conditional___n$11,false); [line 16]\n " shape="box"] +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 REMOVE_TEMPS(n$14,n$15); [line 16]\n NULLIFY(&SIL_temp_conditional___n$11); [line 16]\n " shape="box"] 25 -> 15 ; @@ -29,7 +29,7 @@ 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 REMOVE_TEMPS(n$7,n$9,n$10); [line 17]\n NULLIFY(&SIL_temp_conditional___n$8,false); [line 17]\n " shape="box"] +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 REMOVE_TEMPS(n$7,n$9,n$10); [line 17]\n NULLIFY(&SIL_temp_conditional___n$8); [line 17]\n " shape="box"] 19 -> 4 ; @@ -54,7 +54,7 @@ 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 REMOVE_TEMPS(n$3,n$5,n$6); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 18]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +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 REMOVE_TEMPS(n$3,n$5,n$6); [line 18]\n NULLIFY(&SIL_temp_conditional___n$0); [line 18]\n NULLIFY(&SIL_temp_conditional___n$4); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 13 -> 2 ; @@ -78,11 +78,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 REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&p,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +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 REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&p); [line 18]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&p,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&p); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 3 ; 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 e76b03628..5ec902157 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,5 +1,5 @@ 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 REMOVE_TEMPS(n$13,n$14); [line 12]\n NULLIFY(&SIL_temp_conditional___n$10,false); [line 12]\n NULLIFY(&x,false); [line 12]\n " shape="box"] +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 REMOVE_TEMPS(n$13,n$14); [line 12]\n NULLIFY(&SIL_temp_conditional___n$10); [line 12]\n NULLIFY(&x); [line 12]\n " shape="box"] 20 -> 10 ; @@ -24,7 +24,7 @@ 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 REMOVE_TEMPS(n$8,n$9); [line 14]\n NULLIFY(&SIL_temp_conditional___n$5,false); [line 14]\n NULLIFY(&y,false); [line 14]\n " shape="box"] +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 REMOVE_TEMPS(n$8,n$9); [line 14]\n NULLIFY(&SIL_temp_conditional___n$5); [line 14]\n NULLIFY(&y); [line 14]\n " shape="box"] 14 -> 4 ; @@ -49,15 +49,15 @@ digraph iCFG { 9 -> 14 ; -8 [label="8: UnaryOperator \n n$3=*&SIL_temp_conditional___n$0:int * [line 16]\n REMOVE_TEMPS(n$3); [line 16]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +8 [label="8: UnaryOperator \n n$3=*&SIL_temp_conditional___n$0:int * [line 16]\n REMOVE_TEMPS(n$3); [line 16]\n NULLIFY(&SIL_temp_conditional___n$0); [line 16]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$2); [line 16]\n NULLIFY(&p,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +7 [label="7: ConditinalStmt Branch \n n$2=*&p:int * [line 16]\n *&SIL_temp_conditional___n$0:int *=n$2 [line 16]\n REMOVE_TEMPS(n$2); [line 16]\n NULLIFY(&p); [line 16]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$1); [line 16]\n NULLIFY(&p,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +6 [label="6: ConditinalStmt Branch \n n$1=*&p:int * [line 16]\n *&SIL_temp_conditional___n$0:int *=n$1 [line 16]\n REMOVE_TEMPS(n$1); [line 16]\n NULLIFY(&p); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/enumeration/enum.c.dot b/infer/tests/codetoanalyze/c/frontend/enumeration/enum.c.dot index f423b3ae7..f10fa3faa 100644 --- a/infer/tests/codetoanalyze/c/frontend/enumeration/enum.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/enumeration/enum.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -8 [label="8: BinaryOperatorStmt: Assign \n *&today:int =0 [line 22]\n NULLIFY(&today,false); [line 22]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n *&today:int =0 [line 22]\n NULLIFY(&today); [line 22]\n " shape="box"] 8 -> 7 ; @@ -7,15 +7,15 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&today:int [line 24]\n *&today:int =(n$0 + 4) [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&today,false); [line 24]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&today:int [line 24]\n *&today:int =(n$0 + 4) [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&today); [line 24]\n " shape="box"] 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n *&today:int =(2 + 1) [line 25]\n NULLIFY(&today,false); [line 25]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n *&today:int =(2 + 1) [line 25]\n NULLIFY(&today); [line 25]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n *&i:int =(2 + (2 - 0)) [line 26]\n NULLIFY(&i,false); [line 26]\n " shape="box"] +4 [label="4: DeclStmt \n *&i:int =(2 + (2 - 0)) [line 26]\n NULLIFY(&i); [line 26]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/enumeration/enum_bitmask.c.dot b/infer/tests/codetoanalyze/c/frontend/enumeration/enum_bitmask.c.dot index b807db275..312d3cb65 100644 --- a/infer/tests/codetoanalyze/c/frontend/enumeration/enum_bitmask.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/enumeration/enum_bitmask.c.dot @@ -1,9 +1,9 @@ digraph iCFG { -4 [label="4: DeclStmt \n *&option1:int =(1 << 0) [line 16]\n NULLIFY(&option1,false); [line 16]\n " shape="box"] +4 [label="4: DeclStmt \n *&option1:int =(1 << 0) [line 16]\n NULLIFY(&option1); [line 16]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n *&option2:int =(1 << 1) [line 17]\n NULLIFY(&option2,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: DeclStmt \n *&option2:int =(1 << 1) [line 17]\n NULLIFY(&option2); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot b/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot index f3c69bf76..fce59e93a 100644 --- a/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/enumeration/other_enum.c.dot @@ -11,11 +11,11 @@ digraph iCFG { 18 -> 11 ; -17 [label="17: Return Stmt \n n$1=*&foo_g:int [line 26]\n n$2=*&foo_a:int [line 26]\n *&return:int =(n$1 / n$2) [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&foo_a,false); [line 26]\n NULLIFY(&foo_g,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +17 [label="17: Return Stmt \n n$1=*&foo_g:int [line 26]\n n$2=*&foo_a:int [line 26]\n *&return:int =(n$1 / n$2) [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&foo_a); [line 26]\n NULLIFY(&foo_g); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 17 -> 11 ; -16 [label="16: Prune (false branch) \n PRUNE(((n$0 == 12) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&foo_a,false); [line 25]\n NULLIFY(&foo_g,false); [line 25]\n " shape="invhouse"] +16 [label="16: Prune (false branch) \n PRUNE(((n$0 == 12) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&foo_a); [line 25]\n NULLIFY(&foo_g); [line 25]\n " shape="invhouse"] 16 -> 18 ; @@ -43,31 +43,31 @@ digraph iCFG { 10 -> 20 ; -9 [label="9: DeclStmt \n *&foo_a:int =0 [line 13]\n NULLIFY(&foo_a,false); [line 13]\n " shape="box"] +9 [label="9: DeclStmt \n *&foo_a:int =0 [line 13]\n NULLIFY(&foo_a); [line 13]\n " shape="box"] 9 -> 8 ; -8 [label="8: DeclStmt \n *&foo_b:int =1 [line 14]\n NULLIFY(&foo_b,false); [line 14]\n " shape="box"] +8 [label="8: DeclStmt \n *&foo_b:int =1 [line 14]\n NULLIFY(&foo_b); [line 14]\n " shape="box"] 8 -> 7 ; -7 [label="7: DeclStmt \n *&foo_c:int =10 [line 15]\n NULLIFY(&foo_c,false); [line 15]\n " shape="box"] +7 [label="7: DeclStmt \n *&foo_c:int =10 [line 15]\n NULLIFY(&foo_c); [line 15]\n " shape="box"] 7 -> 6 ; -6 [label="6: DeclStmt \n *&foo_d:int =11 [line 16]\n NULLIFY(&foo_d,false); [line 16]\n " shape="box"] +6 [label="6: DeclStmt \n *&foo_d:int =11 [line 16]\n NULLIFY(&foo_d); [line 16]\n " shape="box"] 6 -> 5 ; -5 [label="5: DeclStmt \n *&foo_e:int =1 [line 17]\n NULLIFY(&foo_e,false); [line 17]\n " shape="box"] +5 [label="5: DeclStmt \n *&foo_e:int =1 [line 17]\n NULLIFY(&foo_e); [line 17]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n *&foo_f:int =2 [line 18]\n NULLIFY(&foo_f,false); [line 18]\n " shape="box"] +4 [label="4: DeclStmt \n *&foo_f:int =2 [line 18]\n NULLIFY(&foo_f); [line 18]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n *&foo_g:int =(2 + 10) [line 19]\n NULLIFY(&foo_g,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +3 [label="3: DeclStmt \n *&foo_g:int =(2 + 10) [line 19]\n NULLIFY(&foo_g); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 3 -> 2 ; 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 1dafc5783..7ff945aa1 100644 --- a/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/gotostmt/goto_ex.c.dot @@ -12,11 +12,11 @@ digraph iCFG { 250 -> 248 ; 250 -> 249 ; -249 [label="249: Prune (false branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 == 0), false); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q,false); [line 171]\n " shape="invhouse"] +249 [label="249: Prune (false branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 == 0), false); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q); [line 171]\n " shape="invhouse"] 249 -> 247 ; -248 [label="248: Prune (true branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 != 0), true); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q,false); [line 171]\n APPLY_ABSTRACTION; [line 171]\n " shape="invhouse"] +248 [label="248: Prune (true branch) \n n$10=*&q:int [line 171]\n PRUNE((n$10 != 0), true); [line 171]\n REMOVE_TEMPS(n$10); [line 171]\n NULLIFY(&q); [line 171]\n APPLY_ABSTRACTION; [line 171]\n " shape="invhouse"] 248 -> 245 ; @@ -44,7 +44,7 @@ digraph iCFG { 242 -> 245 ; -241 [label="241: BinaryOperatorStmt: GE \n n$5=*&v:int [line 177]\n NULLIFY(&v,false); [line 177]\n " shape="box"] +241 [label="241: BinaryOperatorStmt: GE \n n$5=*&v:int [line 177]\n NULLIFY(&v); [line 177]\n " shape="box"] 241 -> 242 ; @@ -87,7 +87,7 @@ digraph iCFG { 232 -> 233 ; -231 [label="231: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 173]\n REMOVE_TEMPS(n$2); [line 173]\n NULLIFY(&i,false); [line 173]\n NULLIFY(&j,false); [line 173]\n NULLIFY(&k,false); [line 173]\n " shape="invhouse"] +231 [label="231: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 173]\n REMOVE_TEMPS(n$2); [line 173]\n NULLIFY(&i); [line 173]\n NULLIFY(&j); [line 173]\n NULLIFY(&k); [line 173]\n " shape="invhouse"] 231 -> 227 ; @@ -155,11 +155,11 @@ digraph iCFG { 215 -> 212 ; -214 [label="214: Prune (true branch) \n PRUNE(((n$5 >= 15) != 0), true); [line 152]\n REMOVE_TEMPS(n$5); [line 152]\n NULLIFY(&i,false); [line 152]\n NULLIFY(&j,false); [line 152]\n NULLIFY(&k,false); [line 152]\n APPLY_ABSTRACTION; [line 152]\n " shape="invhouse"] +214 [label="214: Prune (true branch) \n PRUNE(((n$5 >= 15) != 0), true); [line 152]\n REMOVE_TEMPS(n$5); [line 152]\n NULLIFY(&i); [line 152]\n NULLIFY(&j); [line 152]\n NULLIFY(&k); [line 152]\n APPLY_ABSTRACTION; [line 152]\n " shape="invhouse"] 214 -> 199 ; -213 [label="213: BinaryOperatorStmt: GE \n n$5=*&v:int [line 152]\n NULLIFY(&v,false); [line 152]\n " shape="box"] +213 [label="213: BinaryOperatorStmt: GE \n n$5=*&v:int [line 152]\n NULLIFY(&v); [line 152]\n " shape="box"] 213 -> 214 ; @@ -202,7 +202,7 @@ digraph iCFG { 204 -> 205 ; -203 [label="203: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 148]\n REMOVE_TEMPS(n$2); [line 148]\n NULLIFY(&i,false); [line 148]\n NULLIFY(&j,false); [line 148]\n NULLIFY(&k,false); [line 148]\n APPLY_ABSTRACTION; [line 148]\n " shape="invhouse"] +203 [label="203: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 148]\n REMOVE_TEMPS(n$2); [line 148]\n NULLIFY(&i); [line 148]\n NULLIFY(&j); [line 148]\n NULLIFY(&k); [line 148]\n APPLY_ABSTRACTION; [line 148]\n " shape="invhouse"] 203 -> 199 ; @@ -254,11 +254,11 @@ 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 REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 128]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6); [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 REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 128]\n APPLY_ABSTRACTION; [line 128]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$8); [line 128]\n NULLIFY(&SIL_temp_conditional___n$6); [line 128]\n APPLY_ABSTRACTION; [line 128]\n " shape="invhouse"] 189 -> 164 ; @@ -292,11 +292,11 @@ 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 REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 130]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3); [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 REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 130]\n APPLY_ABSTRACTION; [line 130]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$5); [line 130]\n NULLIFY(&SIL_temp_conditional___n$3); [line 130]\n APPLY_ABSTRACTION; [line 130]\n " shape="invhouse"] 180 -> 162 ; @@ -351,7 +351,7 @@ digraph iCFG { 168 -> 164 ; -167 [label="167: DeclStmt \n *&a:int =2 [line 137]\n NULLIFY(&a,false); [line 137]\n " shape="box"] +167 [label="167: DeclStmt \n *&a:int =2 [line 137]\n NULLIFY(&a); [line 137]\n " shape="box"] 167 -> 166 ; @@ -386,11 +386,11 @@ 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 REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 106]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6); [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 REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 106]\n APPLY_ABSTRACTION; [line 106]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$8); [line 106]\n NULLIFY(&SIL_temp_conditional___n$6); [line 106]\n APPLY_ABSTRACTION; [line 106]\n " shape="invhouse"] 157 -> 132 ; @@ -424,11 +424,11 @@ 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 REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 108]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3); [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 REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$5); [line 108]\n NULLIFY(&SIL_temp_conditional___n$3); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="invhouse"] 148 -> 130 ; @@ -483,7 +483,7 @@ digraph iCFG { 136 -> 132 ; -135 [label="135: DeclStmt \n *&a:int =2 [line 115]\n NULLIFY(&a,false); [line 115]\n " shape="box"] +135 [label="135: DeclStmt \n *&a:int =2 [line 115]\n NULLIFY(&a); [line 115]\n " shape="box"] 135 -> 134 ; @@ -518,11 +518,11 @@ 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 REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 85]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7); [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 REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 85]\n APPLY_ABSTRACTION; [line 85]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$9); [line 85]\n NULLIFY(&SIL_temp_conditional___n$7); [line 85]\n APPLY_ABSTRACTION; [line 85]\n " shape="invhouse"] 125 -> 99 ; @@ -556,11 +556,11 @@ 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 REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 87]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4); [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 REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 87]\n NULLIFY(&SIL_temp_conditional___n$4); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="invhouse"] 116 -> 102 ; @@ -623,7 +623,7 @@ digraph iCFG { 102 -> 101 ; -101 [label="101: DeclStmt \n *&a:int =2 [line 94]\n NULLIFY(&a,false); [line 94]\n " shape="box"] +101 [label="101: DeclStmt \n *&a:int =2 [line 94]\n NULLIFY(&a); [line 94]\n " shape="box"] 101 -> 100 ; @@ -654,11 +654,11 @@ 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 REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 63]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7); [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 REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$9); [line 63]\n NULLIFY(&SIL_temp_conditional___n$7); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="invhouse"] 92 -> 65 ; @@ -692,11 +692,11 @@ 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 REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 65]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4); [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 REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 65]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 65]\n NULLIFY(&SIL_temp_conditional___n$4); [line 65]\n " shape="invhouse"] 83 -> 68 ; @@ -763,7 +763,7 @@ digraph iCFG { 68 -> 67 ; -67 [label="67: DeclStmt \n *&a:int =2 [line 73]\n NULLIFY(&a,false); [line 73]\n " shape="box"] +67 [label="67: DeclStmt \n *&a:int =2 [line 73]\n NULLIFY(&a); [line 73]\n " shape="box"] 67 -> 66 ; @@ -790,19 +790,19 @@ digraph iCFG { 61 -> 75 ; -60 [label="60: DeclStmt \n *&a:int =0 [line 38]\n NULLIFY(&a,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +60 [label="60: DeclStmt \n *&a:int =0 [line 38]\n NULLIFY(&a); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 60 -> 40 ; -59 [label="59: BinaryOperatorStmt: Assign \n *&a:int =1 [line 40]\n NULLIFY(&a,false); [line 40]\n " shape="box"] +59 [label="59: BinaryOperatorStmt: Assign \n *&a:int =1 [line 40]\n NULLIFY(&a); [line 40]\n " shape="box"] 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 REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 42]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4); [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 REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4,false); [line 42]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$6); [line 42]\n NULLIFY(&SIL_temp_conditional___n$4); [line 42]\n " shape="invhouse"] 57 -> 31 ; @@ -836,11 +836,11 @@ 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 REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 44]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1); [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 REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 44]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&SIL_temp_conditional___n$1); [line 44]\n " shape="invhouse"] 48 -> 34 ; @@ -903,7 +903,7 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: BinaryOperatorStmt: Assign \n *&a:int =2 [line 51]\n NULLIFY(&a,false); [line 51]\n " shape="box"] +33 [label="33: BinaryOperatorStmt: Assign \n *&a:int =2 [line 51]\n NULLIFY(&a); [line 51]\n " shape="box"] 33 -> 32 ; @@ -915,7 +915,7 @@ digraph iCFG { 31 -> 30 ; -30 [label="30: BinaryOperatorStmt: Assign \n *&a:int =3 [line 55]\n NULLIFY(&a,false); [line 55]\n " shape="box"] +30 [label="30: BinaryOperatorStmt: Assign \n *&a:int =3 [line 55]\n NULLIFY(&a); [line 55]\n " shape="box"] 30 -> 29 ; @@ -930,7 +930,7 @@ digraph iCFG { 27 -> 60 ; -26 [label="26: DeclStmt \n *&a:int =0 [line 27]\n NULLIFY(&a,false); [line 27]\n " shape="box"] +26 [label="26: DeclStmt \n *&a:int =0 [line 27]\n NULLIFY(&a); [line 27]\n " shape="box"] 26 -> 23 ; @@ -959,7 +959,7 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: BinaryOperatorStmt: Assign \n *&a:int =1 [line 33]\n NULLIFY(&a,false); [line 33]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: Assign \n *&a:int =1 [line 33]\n NULLIFY(&a); [line 33]\n " shape="box"] 19 -> 18 ; @@ -974,7 +974,7 @@ digraph iCFG { 16 -> 26 ; -15 [label="15: DeclStmt \n *&a:int =0 [line 15]\n NULLIFY(&a,false); [line 15]\n " shape="box"] +15 [label="15: DeclStmt \n *&a:int =0 [line 15]\n NULLIFY(&a); [line 15]\n " shape="box"] 15 -> 12 ; @@ -1007,7 +1007,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: BinaryOperatorStmt: Assign \n *&a:int =1 [line 22]\n NULLIFY(&a,false); [line 22]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n *&a:int =1 [line 22]\n NULLIFY(&a); [line 22]\n " shape="box"] 7 -> 6 ; diff --git a/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot b/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot index 40c0ebb92..08bbef77d 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/array_initlistexpr.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: DeclStmt \n n$0=*&z:int [line 12]\n *&a[0][0]:int =(n$0 + 1) [line 12]\n *&a[0][1]:int =2 [line 12]\n *&a[0][2]:int =3 [line 12]\n *&a[1][0]:int =5 [line 12]\n *&a[1][1]:int =6 [line 12]\n *&a[1][2]:int =7 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&a,false); [line 12]\n NULLIFY(&z,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&z:int [line 12]\n *&a[0][0]:int =(n$0 + 1) [line 12]\n *&a[0][1]:int =2 [line 12]\n *&a[0][2]:int =3 [line 12]\n *&a[1][0]:int =5 [line 12]\n *&a[1][1]:int =6 [line 12]\n *&a[1][2]:int =7 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&a); [line 12]\n NULLIFY(&z); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 f219e9f03..c740c463b 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/compound_literal.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&p.x:int [line 19]\n *&return:int =(1 / (n$0 - 32)) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&p,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&p.x:int [line 19]\n *&return:int =(1 / (n$0 - 32)) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&p); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 6 -> 5 ; @@ -14,7 +14,7 @@ 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 REMOVE_TEMPS(n$1); [line 15]\n NULLIFY(&SIL_compound_literal__n$0,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 15]\n NULLIFY(&SIL_compound_literal__n$0); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot b/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot index f03d48fdd..55d0b3c14 100644 --- a/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/initialization/struct_initlistexpr.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Return Stmt \n n$0=*&imageDrawRect.origin.x.a:int [line 59]\n *&return:int =(1 / n$0) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&imageDrawRect,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +17 [label="17: Return Stmt \n n$0=*&imageDrawRect.origin.x.a:int [line 59]\n *&return:int =(1 / n$0) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&imageDrawRect); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 17 -> 16 ; @@ -18,7 +18,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$0=*&e.ssn:int [line 36]\n *&return:int =(1 / (n$0 - 12)) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&e,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=*&e.ssn:int [line 36]\n *&return:int =(1 / (n$0 - 12)) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&e); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 13 -> 12 ; @@ -33,7 +33,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Return Stmt \n n$0=*&p:struct Point * [line 21]\n n$1=*n$0.x:int [line 21]\n *&return:int =(1 / (n$1 - 4)) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&p,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&p:struct Point * [line 21]\n n$1=*n$0.x:int [line 21]\n *&return:int =(1 / (n$1 - 4)) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&p); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 9 -> 8 ; @@ -44,7 +44,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: DeclStmt \n n$0=_fun_foo() [line 17]\n *&p.x:int =1 [line 17]\n *&p.y:int =(n$0 + 3) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&p,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n n$0=_fun_foo() [line 17]\n *&p.x:int =1 [line 17]\n *&p.y:int =(n$0 + 3) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&p); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot index 839ac99e2..26ce6b77c 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/do_while.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -10 [label="10: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="box"] +10 [label="10: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a); [line 11]\n " shape="box"] 10 -> 9 ; @@ -7,11 +7,11 @@ digraph iCFG { 9 -> 4 ; -8 [label="8: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a,false); [line 14]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a); [line 14]\n " shape="box"] 8 -> 5 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&b,false); [line 15]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&b); [line 15]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/do_while_condition_side_effects.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/do_while_condition_side_effects.c.dot index 43ac0afc0..3f3086ee7 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/do_while_condition_side_effects.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/do_while_condition_side_effects.c.dot @@ -1,13 +1,13 @@ digraph iCFG { -10 [label="10: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="box"] +10 [label="10: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a); [line 11]\n " shape="box"] 10 -> 9 ; -9 [label="9: DeclStmt \n *&b:int =0 [line 12]\n NULLIFY(&b,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +9 [label="9: DeclStmt \n *&b:int =0 [line 12]\n NULLIFY(&b); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 9 -> 4 ; -8 [label="8: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a,false); [line 14]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a); [line 14]\n " shape="box"] 8 -> 5 ; @@ -19,7 +19,7 @@ digraph iCFG { 6 -> 4 ; -5 [label="5: BinaryOperatorStmt: Assign \n *&b:int =40 [line 15]\n n$0=*&b:int [line 15]\n NULLIFY(&b,false); [line 15]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n *&b:int =40 [line 15]\n n$0=*&b:int [line 15]\n NULLIFY(&b); [line 15]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot index 290a322c5..cce8a5d8b 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/do_while_nested.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -15 [label="15: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="box"] +15 [label="15: DeclStmt \n *&a:int =10 [line 11]\n NULLIFY(&a); [line 11]\n " shape="box"] 15 -> 14 ; @@ -7,11 +7,11 @@ digraph iCFG { 14 -> 4 ; -13 [label="13: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +13 [label="13: BinaryOperatorStmt: Assign \n *&a:int =1 [line 14]\n NULLIFY(&a); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 13 -> 8 ; -12 [label="12: BinaryOperatorStmt: Assign \n *&a:int =2 [line 16]\n NULLIFY(&a,false); [line 16]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n *&a:int =2 [line 16]\n NULLIFY(&a); [line 16]\n " shape="box"] 12 -> 9 ; @@ -32,7 +32,7 @@ digraph iCFG { 8 -> 12 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&b,false); [line 18]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 20) == 0), false); [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&b); [line 18]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot index 8b4dddfce..0f95bd694 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_condition_side_effects.c.dot @@ -11,7 +11,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n NULLIFY(&i,false); [line 13]\n NULLIFY(&j,false); [line 13]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE((n$1 == 0), false); [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n NULLIFY(&i); [line 13]\n NULLIFY(&j); [line 13]\n " shape="invhouse"] 9 -> 3 ; @@ -19,7 +19,7 @@ digraph iCFG { 8 -> 10 ; -7 [label="7: BinaryOperatorStmt: Assign \n *&b:int =10 [line 13]\n n$1=*&b:int [line 13]\n NULLIFY(&b,false); [line 13]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n *&b:int =10 [line 13]\n n$1=*&b:int [line 13]\n NULLIFY(&b); [line 13]\n " shape="box"] 7 -> 8 ; @@ -28,7 +28,7 @@ digraph iCFG { 6 -> 4 ; -5 [label="5: DeclStmt \n *&b:int =3 [line 13]\n NULLIFY(&b,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +5 [label="5: DeclStmt \n *&b:int =3 [line 13]\n NULLIFY(&b); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot index 62befcb25..64716c5b4 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_nested.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 16 -> 12 ; -15 [label="15: Prune (false branch) \n PRUNE(((n$4 < 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$4); [line 13]\n NULLIFY(&j,false); [line 13]\n " shape="invhouse"] +15 [label="15: Prune (false branch) \n PRUNE(((n$4 < 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$4); [line 13]\n NULLIFY(&j); [line 13]\n " shape="invhouse"] 15 -> 6 ; @@ -32,7 +32,7 @@ digraph iCFG { 10 -> 13 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i); [line 12]\n " shape="invhouse"] 9 -> 3 ; @@ -57,7 +57,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot index 76c0b2f62..5152d72e1 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 9 -> 6 ; -8 [label="8: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&b,false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&b); [line 12]\n NULLIFY(&j); [line 12]\n " shape="invhouse"] 8 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot index c36529a9b..2a8ff2007 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&j); [line 12]\n " shape="invhouse"] 7 -> 3 ; @@ -15,7 +15,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: DeclStmt \n *&b:int =0 [line 12]\n NULLIFY(&b,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +5 [label="5: DeclStmt \n *&b:int =0 [line 12]\n NULLIFY(&b); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr_body.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr_body.c.dot index cbbf35a0b..c8855ac3b 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr_body.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_no_condition_incr_body.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -8 [label="8: DeclStmt \n *&d:int =0 [line 11]\n NULLIFY(&d,false); [line 11]\n " shape="box"] +8 [label="8: DeclStmt \n *&d:int =0 [line 11]\n NULLIFY(&d); [line 11]\n " shape="box"] 8 -> 5 ; @@ -11,7 +11,7 @@ digraph iCFG { 6 -> 4 ; -5 [label="5: BinaryOperatorStmt: Assign \n *&d:int =0 [line 12]\n NULLIFY(&d,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n *&d:int =0 [line 12]\n NULLIFY(&d); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot index d09753321..09eb7280c 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_only_body.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 14]\n NULLIFY(&i,false); [line 14]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 14]\n NULLIFY(&i); [line 14]\n " shape="invhouse"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot index 39a02b231..3216e8130 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_simple.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$1 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&i,false); [line 12]\n NULLIFY(&j,false); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$1 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&i); [line 12]\n NULLIFY(&j); [line 12]\n " shape="invhouse"] 9 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot index 6372ec1c8..8ea34d6c9 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/for_while_nested.c.dot @@ -24,7 +24,7 @@ digraph iCFG { 10 -> 11 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$2 < 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&i); [line 12]\n " shape="invhouse"] 9 -> 3 ; @@ -49,7 +49,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&k:int [line 17]\n *&return:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&k); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot index bf1271d5f..66ce36c80 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while.c.dot @@ -7,7 +7,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i); [line 12]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot index fe41435b8..227bf014c 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_condition_side_effects.c.dot @@ -1,13 +1,13 @@ digraph iCFG { -9 [label="9: DeclStmt \n *&i:int =0 [line 11]\n NULLIFY(&i,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +9 [label="9: DeclStmt \n *&i:int =0 [line 11]\n NULLIFY(&i); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 9 -> 4 ; -8 [label="8: UnaryOperator \n n$1=*&i:int [line 13]\n *&i:int =(n$1 + 1) [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n NULLIFY(&i,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +8 [label="8: UnaryOperator \n n$1=*&i:int [line 13]\n *&i:int =(n$1 + 1) [line 13]\n REMOVE_TEMPS(n$1); [line 13]\n NULLIFY(&i); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE((n$0 == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i,false); [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE((n$0 == 0), false); [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&i); [line 12]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot index 033839c3d..a20f6fdf3 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_nested.c.dot @@ -32,7 +32,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&i,false); [line 13]\n NULLIFY(&k,false); [line 13]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 <= 10) == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&i); [line 13]\n NULLIFY(&k); [line 13]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot b/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot index 5311bca45..b68a29413 100644 --- a/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/loops/while_with_continue_and_break.c.dot @@ -54,7 +54,7 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&x,false); [line 12]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n PRUNE((1 == 0), false); [line 12]\n NULLIFY(&x); [line 12]\n " shape="invhouse"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.c.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.c.dot index 38050eae4..faf0297f6 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.c.dot @@ -11,7 +11,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 11]\n *n$0:int =0 [line 11]\n n$1=*n$0:int [line 11]\n NULLIFY(&p,false); [line 11]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 11]\n *n$0:int =0 [line 11]\n n$1=*n$0:int [line 11]\n NULLIFY(&p); [line 11]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.cpp.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.cpp.dot index b786067ef..d85409c53 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.cpp.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_in_condition.cpp.dot @@ -11,7 +11,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 11]\n *n$0:int =0 [line 11]\n NULLIFY(&p,false); [line 11]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 11]\n *n$0:int =0 [line 11]\n NULLIFY(&p); [line 11]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.c.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.c.dot index 9ef27bf6f..7e5d0b814 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.c.dot @@ -3,19 +3,19 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: DeclStmt \n n$3=*&a:int [line 12]\n *&a:int =(n$3 + 1) [line 12]\n *&b:int =(n$3 + 1) [line 12]\n REMOVE_TEMPS(n$3); [line 12]\n NULLIFY(&b,false); [line 12]\n " shape="box"] +6 [label="6: DeclStmt \n n$3=*&a:int [line 12]\n *&a:int =(n$3 + 1) [line 12]\n *&b:int =(n$3 + 1) [line 12]\n REMOVE_TEMPS(n$3); [line 12]\n NULLIFY(&b); [line 12]\n " shape="box"] 6 -> 5 ; -5 [label="5: DeclStmt \n n$2=*&a:int [line 13]\n *&a:int =(n$2 + 1) [line 13]\n *&c:int =n$2 [line 13]\n REMOVE_TEMPS(n$2); [line 13]\n NULLIFY(&c,false); [line 13]\n " shape="box"] +5 [label="5: DeclStmt \n n$2=*&a:int [line 13]\n *&a:int =(n$2 + 1) [line 13]\n *&c:int =n$2 [line 13]\n REMOVE_TEMPS(n$2); [line 13]\n NULLIFY(&c); [line 13]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n n$1=*&a:int [line 14]\n *&a:int =(n$1 - 1) [line 14]\n *&d:int =(n$1 - 1) [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&d,false); [line 14]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&a:int [line 14]\n *&a:int =(n$1 - 1) [line 14]\n *&d:int =(n$1 - 1) [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&d); [line 14]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&a:int [line 15]\n *&a:int =(n$0 - 1) [line 15]\n *&e:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a,false); [line 15]\n NULLIFY(&e,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&a:int [line 15]\n *&a:int =(n$0 - 1) [line 15]\n *&e:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a); [line 15]\n NULLIFY(&e); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.cpp.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.cpp.dot index cdd262ad5..d3f98df2a 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.cpp.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/assign_with_increment.cpp.dot @@ -3,19 +3,19 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: DeclStmt \n n$4=*&a:int [line 12]\n *&a:int =(n$4 + 1) [line 12]\n n$5=*&a:int [line 12]\n *&b:int =n$5 [line 12]\n REMOVE_TEMPS(n$4,n$5); [line 12]\n NULLIFY(&b,false); [line 12]\n " shape="box"] +6 [label="6: DeclStmt \n n$4=*&a:int [line 12]\n *&a:int =(n$4 + 1) [line 12]\n n$5=*&a:int [line 12]\n *&b:int =n$5 [line 12]\n REMOVE_TEMPS(n$4,n$5); [line 12]\n NULLIFY(&b); [line 12]\n " shape="box"] 6 -> 5 ; -5 [label="5: DeclStmt \n n$3=*&a:int [line 13]\n *&a:int =(n$3 + 1) [line 13]\n *&c:int =n$3 [line 13]\n REMOVE_TEMPS(n$3); [line 13]\n NULLIFY(&c,false); [line 13]\n " shape="box"] +5 [label="5: DeclStmt \n n$3=*&a:int [line 13]\n *&a:int =(n$3 + 1) [line 13]\n *&c:int =n$3 [line 13]\n REMOVE_TEMPS(n$3); [line 13]\n NULLIFY(&c); [line 13]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n n$1=*&a:int [line 14]\n *&a:int =(n$1 - 1) [line 14]\n n$2=*&a:int [line 14]\n *&d:int =n$2 [line 14]\n REMOVE_TEMPS(n$1,n$2); [line 14]\n NULLIFY(&d,false); [line 14]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&a:int [line 14]\n *&a:int =(n$1 - 1) [line 14]\n n$2=*&a:int [line 14]\n *&d:int =n$2 [line 14]\n REMOVE_TEMPS(n$1,n$2); [line 14]\n NULLIFY(&d); [line 14]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&a:int [line 15]\n *&a:int =(n$0 - 1) [line 15]\n *&e:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a,false); [line 15]\n NULLIFY(&e,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&a:int [line 15]\n *&a:int =(n$0 - 1) [line 15]\n *&e:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a); [line 15]\n NULLIFY(&e); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/gnuexpr.c.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/gnuexpr.c.dot index 72af84e99..51e594d20 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/gnuexpr.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/gnuexpr.c.dot @@ -1,5 +1,5 @@ digraph iCFG { -8 [label="8: Return Stmt \n n$2=*&p:int * [line 22]\n n$3=*n$2:int [line 22]\n *&x:int =n$3 [line 22]\n *&y:int =1 [line 23]\n n$0=*&x:int [line 24]\n n$1=*&y:int [line 24]\n n$4=*(n$0 + n$1):int [line 21]\n *&return:int =n$4 [line 21]\n REMOVE_TEMPS(n$4,n$0,n$1,n$2,n$3); [line 21]\n NULLIFY(&p,false); [line 21]\n NULLIFY(&x,false); [line 21]\n NULLIFY(&y,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +8 [label="8: Return Stmt \n n$2=*&p:int * [line 22]\n n$3=*n$2:int [line 22]\n *&x:int =n$3 [line 22]\n *&y:int =1 [line 23]\n n$0=*&x:int [line 24]\n n$1=*&y:int [line 24]\n n$4=*(n$0 + n$1):int [line 21]\n *&return:int =n$4 [line 21]\n REMOVE_TEMPS(n$4,n$0,n$1,n$2,n$3); [line 21]\n NULLIFY(&p); [line 21]\n NULLIFY(&x); [line 21]\n NULLIFY(&y); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 8 -> 7 ; @@ -10,11 +10,11 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: DeclStmt \n *&y:int =3 [line 11]\n NULLIFY(&y,false); [line 11]\n " shape="box"] +5 [label="5: DeclStmt \n *&y:int =3 [line 11]\n NULLIFY(&y); [line 11]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n *&X:int =4 [line 14]\n n$0=*&X:int [line 15]\n n$1=*n$0:int [line 13]\n *&y:int =n$1 [line 13]\n REMOVE_TEMPS(n$1,n$0); [line 13]\n NULLIFY(&X,false); [line 13]\n NULLIFY(&y,false); [line 13]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n *&X:int =4 [line 14]\n n$0=*&X:int [line 15]\n n$1=*n$0:int [line 13]\n *&y:int =n$1 [line 13]\n REMOVE_TEMPS(n$1,n$0); [line 13]\n NULLIFY(&X); [line 13]\n NULLIFY(&y); [line 13]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/nestedoperators/nestedassignment.c.dot b/infer/tests/codetoanalyze/c/frontend/nestedoperators/nestedassignment.c.dot index c329663e6..c533dd4e1 100644 --- a/infer/tests/codetoanalyze/c/frontend/nestedoperators/nestedassignment.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/nestedoperators/nestedassignment.c.dot @@ -1,13 +1,13 @@ digraph iCFG { -9 [label="9: DeclStmt \n *&x:double =1.000000 [line 11]\n NULLIFY(&x,false); [line 11]\n " shape="box"] +9 [label="9: DeclStmt \n *&x:double =1.000000 [line 11]\n NULLIFY(&x); [line 11]\n " shape="box"] 9 -> 8 ; -8 [label="8: BinaryOperatorStmt: Assign \n n$11=*&s:double [line 13]\n *&x:double =n$11 [line 13]\n REMOVE_TEMPS(n$11); [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n n$11=*&s:double [line 13]\n *&x:double =n$11 [line 13]\n REMOVE_TEMPS(n$11); [line 13]\n NULLIFY(&x); [line 13]\n " shape="box"] 8 -> 7 ; -7 [label="7: BinaryOperatorStmt: Assign \n *&x:double =3 [line 14]\n n$10=*&x:double [line 14]\n *&q:double =n$10 [line 14]\n REMOVE_TEMPS(n$10); [line 14]\n NULLIFY(&q,false); [line 14]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n *&x:double =3 [line 14]\n n$10=*&x:double [line 14]\n *&q:double =n$10 [line 14]\n REMOVE_TEMPS(n$10); [line 14]\n NULLIFY(&q); [line 14]\n " shape="box"] 7 -> 6 ; @@ -15,11 +15,11 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$7=*&x:double [line 16]\n *&x:double =(n$7 + 1.000000) [line 16]\n n$8=*&x:double [line 16]\n *&q:double =n$8 [line 16]\n REMOVE_TEMPS(n$7,n$8); [line 16]\n NULLIFY(&q,false); [line 16]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$7=*&x:double [line 16]\n *&x:double =(n$7 + 1.000000) [line 16]\n n$8=*&x:double [line 16]\n *&q:double =n$8 [line 16]\n REMOVE_TEMPS(n$7,n$8); [line 16]\n NULLIFY(&q); [line 16]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&t:double [line 17]\n n$1=*&s:double [line 17]\n *&s:double =(n$1 + n$0) [line 17]\n n$2=*&s:double [line 17]\n n$3=*&r:double [line 17]\n *&r:double =(n$3 + n$2) [line 17]\n n$4=*&r:double [line 17]\n n$5=*&x:double [line 17]\n *&x:double =(n$5 + n$4) [line 17]\n n$6=*&x:double [line 17]\n *&q:double =n$6 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6); [line 17]\n NULLIFY(&q,false); [line 17]\n NULLIFY(&r,false); [line 17]\n NULLIFY(&s,false); [line 17]\n NULLIFY(&t,false); [line 17]\n NULLIFY(&x,false); [line 17]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&t:double [line 17]\n n$1=*&s:double [line 17]\n *&s:double =(n$1 + n$0) [line 17]\n n$2=*&s:double [line 17]\n n$3=*&r:double [line 17]\n *&r:double =(n$3 + n$2) [line 17]\n n$4=*&r:double [line 17]\n n$5=*&x:double [line 17]\n *&x:double =(n$5 + n$4) [line 17]\n n$6=*&x:double [line 17]\n *&q:double =n$6 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6); [line 17]\n NULLIFY(&q); [line 17]\n NULLIFY(&r); [line 17]\n NULLIFY(&s); [line 17]\n NULLIFY(&t); [line 17]\n NULLIFY(&x); [line 17]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot index 53d5cbda6..7e9c9b524 100644 --- a/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/switchstmt/switch.c.dot @@ -15,7 +15,7 @@ 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 NULLIFY(&SIL_temp_conditional___n$0,false); [line 193]\n NULLIFY(&value,false); [line 193]\n " shape="box"] +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 NULLIFY(&SIL_temp_conditional___n$0); [line 193]\n NULLIFY(&value); [line 193]\n " shape="box"] 191 -> 193 ; @@ -36,7 +36,7 @@ digraph iCFG { 187 -> 189 ; -186 [label="186: BinaryOperatorStmt: EQ \n n$1=*&value:int [line 193]\n NULLIFY(&value,false); [line 193]\n " shape="box"] +186 [label="186: BinaryOperatorStmt: EQ \n n$1=*&value:int [line 193]\n NULLIFY(&value); [line 193]\n " shape="box"] 186 -> 187 ; @@ -56,11 +56,11 @@ digraph iCFG { 182 -> 195 ; -181 [label="181: DeclStmt \n *&value:int =0 [line 186]\n NULLIFY(&value,false); [line 186]\n " shape="box"] +181 [label="181: DeclStmt \n *&value:int =0 [line 186]\n NULLIFY(&value); [line 186]\n " shape="box"] 181 -> 180 ; -180 [label="180: Switch_stmt \n *&value:int =7 [line 187]\n n$0=*&value:int [line 187]\n NULLIFY(&value,false); [line 187]\n " shape="box"] +180 [label="180: Switch_stmt \n *&value:int =7 [line 187]\n n$0=*&value:int [line 187]\n NULLIFY(&value); [line 187]\n " shape="box"] 180 -> 179 ; @@ -79,7 +79,7 @@ digraph iCFG { 176 -> 175 ; -175 [label="175: Switch_stmt \n n$0=*&value:int [line 181]\n NULLIFY(&value,false); [line 181]\n " shape="box"] +175 [label="175: Switch_stmt \n n$0=*&value:int [line 181]\n NULLIFY(&value); [line 181]\n " shape="box"] 175 -> 174 ; @@ -103,7 +103,7 @@ digraph iCFG { 170 -> 165 ; 170 -> 166 ; -169 [label="169: Prune (true branch) \n PRUNE(((n$3 == 0) != 0), true); [line 161]\n NULLIFY(&value,false); [line 161]\n " shape="invhouse"] +169 [label="169: Prune (true branch) \n PRUNE(((n$3 == 0) != 0), true); [line 161]\n NULLIFY(&value); [line 161]\n " shape="invhouse"] 169 -> 168 ; @@ -128,7 +128,7 @@ digraph iCFG { 164 -> 163 ; -163 [label="163: UnaryOperator \n n$4=*&something:int [line 166]\n *&something:int =(n$4 + 1) [line 166]\n REMOVE_TEMPS(n$4); [line 166]\n NULLIFY(&something,false); [line 166]\n APPLY_ABSTRACTION; [line 166]\n " shape="box"] +163 [label="163: UnaryOperator \n n$4=*&something:int [line 166]\n *&something:int =(n$4 + 1) [line 166]\n REMOVE_TEMPS(n$4); [line 166]\n NULLIFY(&something); [line 166]\n APPLY_ABSTRACTION; [line 166]\n " shape="box"] 163 -> 146 ; @@ -153,7 +153,7 @@ digraph iCFG { 158 -> 150 ; -157 [label="157: Switch_stmt \n n$3=*&SIL_temp_conditional___n$1:int [line 160]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 160]\n " shape="box"] +157 [label="157: Switch_stmt \n n$3=*&SIL_temp_conditional___n$1:int [line 160]\n NULLIFY(&SIL_temp_conditional___n$1); [line 160]\n " shape="box"] 157 -> 169 ; @@ -183,11 +183,11 @@ digraph iCFG { 151 -> 157 ; -150 [label="150: DeclStmt \n *&a:int =0 [line 174]\n REMOVE_TEMPS(n$3); [line 174]\n NULLIFY(&a,false); [line 174]\n APPLY_ABSTRACTION; [line 174]\n " shape="box"] +150 [label="150: DeclStmt \n *&a:int =0 [line 174]\n REMOVE_TEMPS(n$3); [line 174]\n NULLIFY(&a); [line 174]\n APPLY_ABSTRACTION; [line 174]\n " shape="box"] 150 -> 146 ; -149 [label="149: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 159]\n REMOVE_TEMPS(n$0); [line 159]\n NULLIFY(&value,false); [line 159]\n " shape="invhouse"] +149 [label="149: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 159]\n REMOVE_TEMPS(n$0); [line 159]\n NULLIFY(&value); [line 159]\n " shape="invhouse"] 149 -> 145 ; @@ -215,7 +215,7 @@ digraph iCFG { 143 -> 171 ; -142 [label="142: DeclStmt \n *&value:int =0 [line 140]\n NULLIFY(&value,false); [line 140]\n " shape="box"] +142 [label="142: DeclStmt \n *&value:int =0 [line 140]\n NULLIFY(&value); [line 140]\n " shape="box"] 142 -> 129 ; @@ -245,7 +245,7 @@ digraph iCFG { 136 -> 135 ; -135 [label="135: UnaryOperator \n n$1=*&something:int [line 147]\n *&something:int =(n$1 + 1) [line 147]\n REMOVE_TEMPS(n$1); [line 147]\n NULLIFY(&something,false); [line 147]\n APPLY_ABSTRACTION; [line 147]\n " shape="box"] +135 [label="135: UnaryOperator \n n$1=*&something:int [line 147]\n *&something:int =(n$1 + 1) [line 147]\n REMOVE_TEMPS(n$1); [line 147]\n NULLIFY(&something); [line 147]\n APPLY_ABSTRACTION; [line 147]\n " shape="box"] 135 -> 128 ; @@ -327,7 +327,7 @@ digraph iCFG { 116 -> 115 ; -115 [label="115: UnaryOperator \n n$3=*&something:int [line 127]\n *&something:int =(n$3 + 1) [line 127]\n REMOVE_TEMPS(n$3); [line 127]\n NULLIFY(&something,false); [line 127]\n APPLY_ABSTRACTION; [line 127]\n " shape="box"] +115 [label="115: UnaryOperator \n n$3=*&something:int [line 127]\n *&something:int =(n$3 + 1) [line 127]\n REMOVE_TEMPS(n$3); [line 127]\n NULLIFY(&something); [line 127]\n APPLY_ABSTRACTION; [line 127]\n " shape="box"] 115 -> 102 ; @@ -352,7 +352,7 @@ digraph iCFG { 110 -> 102 ; -109 [label="109: Switch_stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 121]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 121]\n " shape="box"] +109 [label="109: Switch_stmt \n n$2=*&SIL_temp_conditional___n$0:int [line 121]\n NULLIFY(&SIL_temp_conditional___n$0); [line 121]\n " shape="box"] 109 -> 120 ; @@ -373,7 +373,7 @@ digraph iCFG { 105 -> 107 ; -104 [label="104: BinaryOperatorStmt: GT \n n$1=*&value:int [line 121]\n NULLIFY(&value,false); [line 121]\n " shape="box"] +104 [label="104: BinaryOperatorStmt: GT \n n$1=*&value:int [line 121]\n NULLIFY(&value); [line 121]\n " shape="box"] 104 -> 105 ; @@ -426,7 +426,7 @@ digraph iCFG { 92 -> 94 ; 92 -> 95 ; -91 [label="91: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 105]\n REMOVE_TEMPS(n$0); [line 105]\n NULLIFY(&value,false); [line 105]\n " shape="invhouse"] +91 [label="91: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 105]\n REMOVE_TEMPS(n$0); [line 105]\n NULLIFY(&value); [line 105]\n " shape="invhouse"] 91 -> 87 ; @@ -500,11 +500,11 @@ digraph iCFG { 74 -> 73 ; -73 [label="73: UnaryOperator \n n$1=*&something:int [line 92]\n *&something:int =(n$1 + 1) [line 92]\n REMOVE_TEMPS(n$1); [line 92]\n NULLIFY(&something,false); [line 92]\n " shape="box"] +73 [label="73: UnaryOperator \n n$1=*&something:int [line 92]\n *&something:int =(n$1 + 1) [line 92]\n REMOVE_TEMPS(n$1); [line 92]\n NULLIFY(&something); [line 92]\n " shape="box"] 73 -> 72 ; -72 [label="72: BinaryOperatorStmt: Assign \n *&z:int =42 [line 94]\n NULLIFY(&z,false); [line 94]\n APPLY_ABSTRACTION; [line 94]\n " shape="box"] +72 [label="72: BinaryOperatorStmt: Assign \n *&z:int =42 [line 94]\n NULLIFY(&z); [line 94]\n APPLY_ABSTRACTION; [line 94]\n " shape="box"] 72 -> 65 ; @@ -529,7 +529,7 @@ digraph iCFG { 67 -> 74 ; -66 [label="66: Switch_stmt \n n$0=*&value:int [line 80]\n NULLIFY(&value,false); [line 80]\n " shape="box"] +66 [label="66: Switch_stmt \n n$0=*&value:int [line 80]\n NULLIFY(&value); [line 80]\n " shape="box"] 66 -> 79 ; @@ -575,7 +575,7 @@ digraph iCFG { 56 -> 55 ; -55 [label="55: UnaryOperator \n n$1=*&something:int [line 68]\n *&something:int =(n$1 + 1) [line 68]\n REMOVE_TEMPS(n$1); [line 68]\n NULLIFY(&something,false); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] +55 [label="55: UnaryOperator \n n$1=*&something:int [line 68]\n *&something:int =(n$1 + 1) [line 68]\n REMOVE_TEMPS(n$1); [line 68]\n NULLIFY(&something); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] 55 -> 48 ; @@ -600,7 +600,7 @@ digraph iCFG { 50 -> 48 ; -49 [label="49: Switch_stmt \n n$0=*&value:int [line 62]\n NULLIFY(&value,false); [line 62]\n " shape="box"] +49 [label="49: Switch_stmt \n n$0=*&value:int [line 62]\n NULLIFY(&value); [line 62]\n " shape="box"] 49 -> 60 ; @@ -662,11 +662,11 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: UnaryOperator \n n$1=*&something:int [line 49]\n *&something:int =(n$1 + 1) [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n NULLIFY(&something,false); [line 49]\n " shape="box"] +34 [label="34: UnaryOperator \n n$1=*&something:int [line 49]\n *&something:int =(n$1 + 1) [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n NULLIFY(&something); [line 49]\n " shape="box"] 34 -> 33 ; -33 [label="33: BinaryOperatorStmt: Assign \n *&z:int =42 [line 51]\n NULLIFY(&z,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +33 [label="33: BinaryOperatorStmt: Assign \n *&z:int =42 [line 51]\n NULLIFY(&z); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 33 -> 26 ; @@ -691,7 +691,7 @@ digraph iCFG { 28 -> 35 ; -27 [label="27: Switch_stmt \n n$0=*&value:int [line 37]\n NULLIFY(&value,false); [line 37]\n " shape="box"] +27 [label="27: Switch_stmt \n n$0=*&value:int [line 37]\n NULLIFY(&value); [line 37]\n " shape="box"] 27 -> 40 ; @@ -774,7 +774,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&value,false); [line 14]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 < 10) == 0), false); [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&value); [line 14]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot b/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot index 5155deaa6..2125498eb 100644 --- a/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/types/struct.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: BinaryOperatorStmt: Assign \n *&x.b:int =20 [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n *&x.b:int =20 [line 18]\n NULLIFY(&x); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/unusual_exps/generic_exp.c.dot b/infer/tests/codetoanalyze/c/frontend/unusual_exps/generic_exp.c.dot index 177cd3d73..72a1654fb 100644 --- a/infer/tests/codetoanalyze/c/frontend/unusual_exps/generic_exp.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/unusual_exps/generic_exp.c.dot @@ -1,9 +1,9 @@ digraph iCFG { -4 [label="4: DeclStmt \n *&x:void =_t$1 [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="box"] +4 [label="4: DeclStmt \n *&x:void =_t$1 [line 15]\n NULLIFY(&x); [line 15]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n *&z:void =_t$0 [line 16]\n NULLIFY(&z,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +3 [label="3: DeclStmt \n *&z:void =_t$0 [line 16]\n NULLIFY(&z); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot b/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot index 258fb60c7..71de1b013 100644 --- a/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot +++ b/infer/tests/codetoanalyze/c/frontend/unusual_stmts/asm.c.dot @@ -3,7 +3,7 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: GCCAstStmt \n n$0=*&src:int [line 27]\n _fun___infer_skip_gcc_ast_stmt(&dst:int &,n$0:int ) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&src,false); [line 23]\n " shape="box"] +8 [label="8: GCCAstStmt \n n$0=*&src:int [line 27]\n _fun___infer_skip_gcc_ast_stmt(&dst:int &,n$0:int ) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&src); [line 23]\n " shape="box"] 8 -> 7 ; @@ -11,7 +11,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Exit main \n NULLIFY(&dst,false); [line 29]\n " color=yellow style=filled] +6 [label="6: Exit main \n NULLIFY(&dst); [line 29]\n " color=yellow style=filled] 5 [label="5: Start main\nFormals: \nLocals: dst:int src:int \n DECLARE_LOCALS(&return,&dst,&src); [line 19]\n " color=yellow style=filled] @@ -26,7 +26,7 @@ digraph iCFG { 3 -> 2 ; -2 [label="2: Exit test \n NULLIFY(&z,false); [line 17]\n NULLIFY(&y,false); [line 17]\n NULLIFY(&x,false); [line 17]\n NULLIFY(&h,false); [line 17]\n " color=yellow style=filled] +2 [label="2: Exit test \n NULLIFY(&z); [line 17]\n NULLIFY(&y); [line 17]\n NULLIFY(&x); [line 17]\n NULLIFY(&h); [line 17]\n " color=yellow style=filled] 1 [label="1: Start test\nFormals: \nLocals: h:int z:int y:int x:int \n DECLARE_LOCALS(&return,&h,&z,&y,&x); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot b/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot index 01a1d80c8..2cad3f96a 100644 --- a/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/errors/npe/method_call.cpp.dot @@ -10,7 +10,7 @@ digraph iCFG { 20 -> 22 ; -19 [label="19: Call _fun_XForward_call \n n$0=*&x:class XForward * [line 35]\n n$1=*n$0:class XForward [line 35]\n n$2=_fun_XForward_call(n$0:class XForward *) [line 35]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 35]\n NULLIFY(&x,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +19 [label="19: Call _fun_XForward_call \n n$0=*&x:class XForward * [line 35]\n n$1=*n$0:class XForward [line 35]\n n$2=_fun_XForward_call(n$0:class XForward *) [line 35]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 35]\n NULLIFY(&x); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 19 -> 18 ; @@ -58,7 +58,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&x:class X * [line 17]\n n$1=*n$0:class X [line 17]\n n$2=_fun_X_call(n$0:class X *) [line 17]\n *&return:int =n$2 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&x:class X * [line 17]\n n$1=*n$0:class X [line 17]\n n$2=_fun_X_call(n$0:class X *) [line 17]\n *&return:int =n$2 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 17]\n NULLIFY(&x); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot index 8b82f23d9..a92e44577 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -6 [label="6: DeclStmt \n *&x:int =2 [line 11]\n NULLIFY(&x,false); [line 11]\n " shape="box"] +6 [label="6: DeclStmt \n *&x:int =2 [line 11]\n NULLIFY(&x); [line 11]\n " shape="box"] 6 -> 5 ; @@ -11,7 +11,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Call delete \n n$0=*&i:int * [line 14]\n _fun___delete(n$0:int *) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&i,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: Call delete \n n$0=*&i:int * [line 14]\n _fun___delete(n$0:int *) [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&i); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; 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 27762ec70..026f660c2 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/binary_conditional.cpp.dot @@ -3,7 +3,7 @@ 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 REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +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 REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&SIL_temp_conditional___n$1); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 33 -> 26 ; @@ -32,7 +32,7 @@ digraph iCFG { 27 -> 33 ; -26 [label="26: Exit conditional \n NULLIFY(&x,false); [line 28]\n NULLIFY(&a,false); [line 28]\n NULLIFY(&__temp_return_n$3,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$5,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 28]\n " color=yellow style=filled] +26 [label="26: Exit conditional \n NULLIFY(&x); [line 28]\n NULLIFY(&a); [line 28]\n NULLIFY(&__temp_return_n$3); [line 28]\n NULLIFY(&SIL_materialize_temp__n$5); [line 28]\n NULLIFY(&SIL_materialize_temp__n$0); [line 28]\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] @@ -43,7 +43,7 @@ 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 REMOVE_TEMPS(n$5); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +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 REMOVE_TEMPS(n$5); [line 22]\n NULLIFY(&SIL_temp_conditional___n$2); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 23 -> 15 ; @@ -76,7 +76,7 @@ digraph iCFG { 16 -> 23 ; -15 [label="15: Exit binaryConditional \n NULLIFY(&x,false); [line 23]\n NULLIFY(&a,false); [line 23]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 23]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 23]\n " color=yellow style=filled] +15 [label="15: Exit binaryConditional \n NULLIFY(&x); [line 23]\n NULLIFY(&a); [line 23]\n NULLIFY(&SIL_materialize_temp__n$4); [line 23]\n NULLIFY(&SIL_materialize_temp__n$0); [line 23]\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] @@ -87,11 +87,11 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 16]\n _fun_X_X(n$0:class X *,&x:class X &) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&__return_param,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 16]\n _fun_X_X(n$0:class X *,&x:class X &) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&__return_param); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit getX \n NULLIFY(&x,false); [line 17]\n " color=yellow style=filled] +11 [label="11: Exit getX \n NULLIFY(&x); [line 17]\n " color=yellow style=filled] 10 [label="10: Start getX\nFormals: __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 14]\n " color=yellow style=filled] 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 9a271efc6..2d9328809 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/conditional/lvalue_conditional.cpp.dot @@ -87,7 +87,7 @@ 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 REMOVE_TEMPS(n$6); [line 29]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 29]\n " shape="box"] +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 REMOVE_TEMPS(n$6); [line 29]\n NULLIFY(&SIL_temp_conditional___n$3); [line 29]\n " shape="box"] 41 -> 35 ; @@ -95,15 +95,15 @@ digraph iCFG { 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 REMOVE_TEMPS(n$5); [line 29]\n NULLIFY(&b,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +39 [label="39: ConditinalStmt Branch \n n$5=*&b:int [line 29]\n *&SIL_temp_conditional___n$3:int =n$5 [line 29]\n REMOVE_TEMPS(n$5); [line 29]\n NULLIFY(&b); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 39 -> 36 ; -38 [label="38: Prune (false branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 == 0), false); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a,false); [line 29]\n " shape="invhouse"] +38 [label="38: Prune (false branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 == 0), false); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a); [line 29]\n " shape="invhouse"] 38 -> 40 ; -37 [label="37: Prune (true branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 != 0), true); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a,false); [line 29]\n " shape="invhouse"] +37 [label="37: Prune (true branch) \n n$4=*&a:int [line 29]\n PRUNE((n$4 != 0), true); [line 29]\n REMOVE_TEMPS(n$4); [line 29]\n NULLIFY(&a); [line 29]\n " shape="invhouse"] 37 -> 39 ; @@ -111,11 +111,11 @@ digraph iCFG { 36 -> 41 ; -35 [label="35: Return Stmt \n n$0=*&r:int & [line 30]\n n$1=*n$0:int [line 30]\n *&return:int =(1 / n$1) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&r,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&r:int & [line 30]\n n$1=*n$0:int [line 30]\n *&return:int =(1 / n$1) [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&r); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 35 -> 34 ; -34 [label="34: Exit div_temp_lvalue \n NULLIFY(&SIL_materialize_temp__n$2,false); [line 31]\n " color=yellow style=filled] +34 [label="34: Exit div_temp_lvalue \n NULLIFY(&SIL_materialize_temp__n$2); [line 31]\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] @@ -132,7 +132,7 @@ 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 REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 24]\n " shape="box"] +30 [label="30: BinaryOperatorStmt: Assign \n n$3=*&SIL_temp_conditional___n$1:int & [line 24]\n *n$3:int =1 [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&SIL_temp_conditional___n$1); [line 24]\n " shape="box"] 30 -> 24 ; @@ -144,11 +144,11 @@ digraph iCFG { 28 -> 25 ; -27 [label="27: Prune (false branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] +27 [label="27: Prune (false branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 == 0), false); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a); [line 24]\n " shape="invhouse"] 27 -> 29 ; -26 [label="26: Prune (true branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="invhouse"] +26 [label="26: Prune (true branch) \n n$2=*&a:int [line 24]\n PRUNE((n$2 != 0), true); [line 24]\n REMOVE_TEMPS(n$2); [line 24]\n NULLIFY(&a); [line 24]\n " shape="invhouse"] 26 -> 28 ; @@ -160,7 +160,7 @@ digraph iCFG { 24 -> 23 ; -23 [label="23: Exit assign_conditional \n NULLIFY(&v2,false); [line 26]\n NULLIFY(&v1,false); [line 26]\n " color=yellow style=filled] +23 [label="23: Exit assign_conditional \n NULLIFY(&v2); [line 26]\n NULLIFY(&v1); [line 26]\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] @@ -172,7 +172,7 @@ 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 REMOVE_TEMPS(n$4); [line 18]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 18]\n " shape="box"] +20 [label="20: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 18]\n *&v3:int =n$4 [line 18]\n REMOVE_TEMPS(n$4); [line 18]\n NULLIFY(&SIL_temp_conditional___n$1); [line 18]\n " shape="box"] 20 -> 14 ; @@ -180,15 +180,15 @@ digraph iCFG { 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 REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&v1,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +18 [label="18: ConditinalStmt Branch \n n$3=*&v1:int [line 18]\n *&SIL_temp_conditional___n$1:int =n$3 [line 18]\n REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&v1); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 18 -> 15 ; -17 [label="17: Prune (false branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 == 0), false); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&v1,false); [line 18]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 == 0), false); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a); [line 18]\n NULLIFY(&v1); [line 18]\n " shape="invhouse"] 17 -> 19 ; -16 [label="16: Prune (true branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 != 0), true); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a,false); [line 18]\n " shape="invhouse"] +16 [label="16: Prune (true branch) \n n$2=*&a:int [line 18]\n PRUNE((n$2 != 0), true); [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&a); [line 18]\n " shape="invhouse"] 16 -> 18 ; @@ -196,7 +196,7 @@ digraph iCFG { 15 -> 20 ; -14 [label="14: Return Stmt \n n$0=*&v3:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&v3,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +14 [label="14: Return Stmt \n n$0=*&v3:int [line 19]\n *&return:int =n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&v3); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 14 -> 13 ; @@ -216,7 +216,7 @@ 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 REMOVE_TEMPS(n$3,n$4); [line 12]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 12]\n " shape="box"] +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 REMOVE_TEMPS(n$3,n$4); [line 12]\n NULLIFY(&SIL_temp_conditional___n$1); [line 12]\n " shape="box"] 9 -> 3 ; @@ -228,11 +228,11 @@ digraph iCFG { 7 -> 4 ; -6 [label="6: Prune (false branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a,false); [line 12]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 == 0), false); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a); [line 12]\n " shape="invhouse"] 6 -> 8 ; -5 [label="5: Prune (true branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 != 0), true); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a,false); [line 12]\n " shape="invhouse"] +5 [label="5: Prune (true branch) \n n$2=*&a:int [line 12]\n PRUNE((n$2 != 0), true); [line 12]\n REMOVE_TEMPS(n$2); [line 12]\n NULLIFY(&a); [line 12]\n " shape="invhouse"] 5 -> 7 ; @@ -240,11 +240,11 @@ digraph iCFG { 4 -> 9 ; -3 [label="3: Return Stmt \n n$0=*&v3:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&v3,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&v3:int [line 13]\n *&return:int =n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&v3); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit choose_lvalue \n NULLIFY(&v2,false); [line 14]\n NULLIFY(&v1,false); [line 14]\n " color=yellow style=filled] +2 [label="2: Exit choose_lvalue \n NULLIFY(&v2); [line 14]\n NULLIFY(&v1); [line 14]\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] 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 75ef67201..7e69b3e24 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_array.cpp.dot @@ -11,14 +11,14 @@ digraph iCFG { 29 -> 28 ; -28 [label="28: Exit initialization_mixed_styles_not_handled_correctly \n NULLIFY(&z2,false); [line 43]\n NULLIFY(&z,false); [line 43]\n NULLIFY(&old,false); [line 43]\n " color=yellow style=filled] +28 [label="28: Exit initialization_mixed_styles_not_handled_correctly \n NULLIFY(&z2); [line 43]\n NULLIFY(&z); [line 43]\n NULLIFY(&old); [line 43]\n " color=yellow style=filled] 27 [label="27: Start initialization_mixed_styles_not_handled_correctly\nFormals: \nLocals: z2:class Z z:class Z [2] old:class Z \n DECLARE_LOCALS(&return,&z2,&z,&old); [line 39]\n " color=yellow style=filled] 27 -> 31 ; -26 [label="26: DeclStmt \n *&z[0].a:int =1 [line 33]\n *&z[0].b:int =2 [line 33]\n *&z[1].a:int =2 [line 33]\n *&z[1].b:int =3 [line 33]\n NULLIFY(&z,false); [line 33]\n " shape="box"] +26 [label="26: DeclStmt \n *&z[0].a:int =1 [line 33]\n *&z[0].b:int =2 [line 33]\n *&z[1].a:int =2 [line 33]\n *&z[1].b:int =3 [line 33]\n NULLIFY(&z); [line 33]\n " shape="box"] 26 -> 25 ; @@ -26,7 +26,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit initialization_c_style \n NULLIFY(&z2,false); [line 35]\n " color=yellow style=filled] +24 [label="24: Exit initialization_c_style \n NULLIFY(&z2); [line 35]\n " color=yellow style=filled] 23 [label="23: Start initialization_c_style\nFormals: \nLocals: z2:class Z z:class Z [2] \n DECLARE_LOCALS(&return,&z2,&z); [line 32]\n " color=yellow style=filled] @@ -37,7 +37,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Constructor Init \n n$0=*&this:class Z * [line 27]\n n$1=*&__param_0:class Z & [line 27]\n n$2=*n$1.b:int [line 27]\n *n$0.b:int =n$2 [line 27]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 27]\n NULLIFY(&__param_0,false); [line 27]\n NULLIFY(&this,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +21 [label="21: Constructor Init \n n$0=*&this:class Z * [line 27]\n n$1=*&__param_0:class Z & [line 27]\n n$2=*n$1.b:int [line 27]\n *n$0.b:int =n$2 [line 27]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 27]\n NULLIFY(&__param_0); [line 27]\n NULLIFY(&this); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 21 -> 20 ; @@ -63,7 +63,7 @@ digraph iCFG { 15 -> 14 ; -14 [label="14: Exit matrix_of_person \n NULLIFY(&arr,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 25]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 25]\n " color=yellow style=filled] +14 [label="14: Exit matrix_of_person \n NULLIFY(&arr); [line 25]\n NULLIFY(&SIL_materialize_temp__n$4); [line 25]\n NULLIFY(&SIL_materialize_temp__n$3); [line 25]\n NULLIFY(&SIL_materialize_temp__n$2); [line 25]\n NULLIFY(&SIL_materialize_temp__n$1); [line 25]\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] @@ -78,14 +78,14 @@ digraph iCFG { 11 -> 10 ; -10 [label="10: Exit array_of_person \n NULLIFY(&arr,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 20]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 20]\n " color=yellow style=filled] +10 [label="10: Exit array_of_person \n NULLIFY(&arr); [line 20]\n NULLIFY(&SIL_materialize_temp__n$3); [line 20]\n NULLIFY(&SIL_materialize_temp__n$2); [line 20]\n NULLIFY(&SIL_materialize_temp__n$1); [line 20]\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 -> 12 ; -8 [label="8: Constructor Init \n n$0=*&this:class Person * [line 10]\n n$1=*&__param_0:class Person & [line 10]\n n$2=*n$1.x:int [line 10]\n *n$0.x:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0,false); [line 10]\n NULLIFY(&this,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +8 [label="8: Constructor Init \n n$0=*&this:class Person * [line 10]\n n$1=*&__param_0:class Person & [line 10]\n n$2=*n$1.x:int [line 10]\n *n$0.x:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0); [line 10]\n NULLIFY(&this); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 8 -> 7 ; @@ -103,7 +103,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 12]\n n$1=*&i:int [line 12]\n *n$0.x:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&i,false); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 12]\n n$1=*&i:int [line 12]\n *n$0.x:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&i); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot index d501f18e8..eea24756c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_default_arg.cpp.dot @@ -11,14 +11,14 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: Exit test \n NULLIFY(&x3,false); [line 24]\n NULLIFY(&x2,false); [line 24]\n NULLIFY(&x1,false); [line 24]\n " color=yellow style=filled] +8 [label="8: Exit test \n NULLIFY(&x3); [line 24]\n NULLIFY(&x2); [line 24]\n NULLIFY(&x1); [line 24]\n " color=yellow style=filled] 7 [label="7: Start test\nFormals: \nLocals: x3:class X x2:class X x1:class X \n DECLARE_LOCALS(&return,&x3,&x2,&x1); [line 20]\n " color=yellow style=filled] 7 -> 11 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 18]\n n$1=*&a:int [line 18]\n n$2=*&b:int [line 18]\n *n$0.f:int =(n$1 + n$2) [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&a,false); [line 18]\n NULLIFY(&b,false); [line 18]\n NULLIFY(&this,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 18]\n n$1=*&a:int [line 18]\n n$2=*&b:int [line 18]\n *n$0.f:int =(n$1 + n$2) [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&a); [line 18]\n NULLIFY(&b); [line 18]\n NULLIFY(&this); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 5 ; @@ -29,7 +29,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&this:class X * [line 15]\n n$1=*n$0.f:int [line 15]\n *&return:int =(1 / n$1) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&this:class X * [line 15]\n n$1=*n$0.f:int [line 15]\n *&return:int =(1 / n$1) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot index ecb996faf..edcb15a70 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_init.cpp.dot @@ -11,15 +11,15 @@ digraph iCFG { 42 -> 41 ; -41 [label="41: DeclStmt \n n$2=*&b.t.v:int [line 58]\n *&v3:int =(1 / n$2) [line 58]\n REMOVE_TEMPS(n$2); [line 58]\n NULLIFY(&v3,false); [line 58]\n " shape="box"] +41 [label="41: DeclStmt \n n$2=*&b.t.v:int [line 58]\n *&v3:int =(1 / n$2) [line 58]\n REMOVE_TEMPS(n$2); [line 58]\n NULLIFY(&v3); [line 58]\n " shape="box"] 41 -> 40 ; -40 [label="40: Return Stmt \n n$0=*&v:int [line 59]\n n$1=*&v2:int [line 59]\n *&return:int =(n$0 + n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&v,false); [line 59]\n NULLIFY(&v2,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +40 [label="40: Return Stmt \n n$0=*&v:int [line 59]\n n$1=*&v2:int [line 59]\n *&return:int =(n$0 + n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&v); [line 59]\n NULLIFY(&v2); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 40 -> 39 ; -39 [label="39: Exit f_f2_div1 \n NULLIFY(&b,false); [line 60]\n " color=yellow style=filled] +39 [label="39: Exit f_f2_div1 \n NULLIFY(&b); [line 60]\n " color=yellow style=filled] 38 [label="38: Start f_f2_div1\nFormals: \nLocals: v3:int v2:int v:int b:class B \n DECLARE_LOCALS(&return,&v3,&v2,&v,&b); [line 54]\n " color=yellow style=filled] @@ -30,7 +30,7 @@ digraph iCFG { 37 -> 36 ; -36 [label="36: DeclStmt \n n$1=*&b.f:int [line 50]\n *&v:int =(1 / n$1) [line 50]\n REMOVE_TEMPS(n$1); [line 50]\n NULLIFY(&v,false); [line 50]\n " shape="box"] +36 [label="36: DeclStmt \n n$1=*&b.f:int [line 50]\n *&v:int =(1 / n$1) [line 50]\n REMOVE_TEMPS(n$1); [line 50]\n NULLIFY(&v); [line 50]\n " shape="box"] 36 -> 35 ; @@ -38,7 +38,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: Exit delegate_constr_f2_div0 \n NULLIFY(&b,false); [line 52]\n " color=yellow style=filled] +34 [label="34: Exit delegate_constr_f2_div0 \n NULLIFY(&b); [line 52]\n " color=yellow style=filled] 33 [label="33: Start delegate_constr_f2_div0\nFormals: \nLocals: v:int b:class B \n DECLARE_LOCALS(&return,&v,&b); [line 48]\n " color=yellow style=filled] @@ -49,7 +49,7 @@ digraph iCFG { 32 -> 31 ; -31 [label="31: DeclStmt \n n$1=*&b.f2:int [line 44]\n *&v:int =(1 / n$1) [line 44]\n REMOVE_TEMPS(n$1); [line 44]\n NULLIFY(&v,false); [line 44]\n " shape="box"] +31 [label="31: DeclStmt \n n$1=*&b.f2:int [line 44]\n *&v:int =(1 / n$1) [line 44]\n REMOVE_TEMPS(n$1); [line 44]\n NULLIFY(&v); [line 44]\n " shape="box"] 31 -> 30 ; @@ -57,7 +57,7 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: Exit delegate_constr_f_div0 \n NULLIFY(&b,false); [line 46]\n " color=yellow style=filled] +29 [label="29: Exit delegate_constr_f_div0 \n NULLIFY(&b); [line 46]\n " color=yellow style=filled] 28 [label="28: Start delegate_constr_f_div0\nFormals: \nLocals: v:int b:class B \n DECLARE_LOCALS(&return,&v,&b); [line 42]\n " color=yellow style=filled] @@ -72,7 +72,7 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Exit t_div0 \n NULLIFY(&b,false); [line 40]\n " color=yellow style=filled] +25 [label="25: Exit t_div0 \n NULLIFY(&b); [line 40]\n " color=yellow style=filled] 24 [label="24: Start t_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 37]\n " color=yellow style=filled] @@ -87,7 +87,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Exit f_div0 \n NULLIFY(&b,false); [line 35]\n " color=yellow style=filled] +21 [label="21: Exit f_div0 \n NULLIFY(&b); [line 35]\n " color=yellow style=filled] 20 [label="20: Start f_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 32]\n " color=yellow style=filled] @@ -102,18 +102,18 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Exit f2_div0 \n NULLIFY(&b,false); [line 30]\n " color=yellow style=filled] +17 [label="17: Exit f2_div0 \n NULLIFY(&b); [line 30]\n " color=yellow style=filled] 16 [label="16: Start f2_div0\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 27]\n " color=yellow style=filled] 16 -> 19 ; -15 [label="15: Constructor Init \n n$2=*&this:class B * [line 24]\n n$3=*&a:int [line 24]\n n$4=*&b:int [line 24]\n _fun_B_B(n$2:class B *,(n$3 + n$4):int ) [line 24]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="box"] +15 [label="15: Constructor Init \n n$2=*&this:class B * [line 24]\n n$3=*&a:int [line 24]\n n$4=*&b:int [line 24]\n _fun_B_B(n$2:class B *,(n$3 + n$4):int ) [line 24]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 24]\n NULLIFY(&a); [line 24]\n " shape="box"] 15 -> 14 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$0=*&this:class B * [line 24]\n n$1=*&b:int [line 24]\n *n$0.f2:int =n$1 [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&b,false); [line 24]\n NULLIFY(&this,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n n$0=*&this:class B * [line 24]\n n$1=*&b:int [line 24]\n *n$0.f2:int =n$1 [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&b); [line 24]\n NULLIFY(&this); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 14 -> 13 ; @@ -132,7 +132,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Constructor Init \n n$0=*&this:class B * [line 22]\n n$1=*&a:int [line 22]\n _fun_B::T_T(n$0.t:class B::T *,n$1:int ) [line 22]\n REMOVE_TEMPS(n$0,n$1); [line 22]\n NULLIFY(&a,false); [line 22]\n NULLIFY(&this,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +9 [label="9: Constructor Init \n n$0=*&this:class B * [line 22]\n n$1=*&a:int [line 22]\n _fun_B::T_T(n$0.t:class B::T *,n$1:int ) [line 22]\n REMOVE_TEMPS(n$0,n$1); [line 22]\n NULLIFY(&a); [line 22]\n NULLIFY(&this); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 9 -> 8 ; @@ -143,7 +143,7 @@ digraph iCFG { 7 -> 11 ; -6 [label="6: Constructor Init \n n$0=*&this:class B::T * [line 18]\n n$1=*&v:int [line 18]\n *n$0.v:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&this,false); [line 18]\n NULLIFY(&v,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +6 [label="6: Constructor Init \n n$0=*&this:class B::T * [line 18]\n n$1=*&v:int [line 18]\n *n$0.v:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&this); [line 18]\n NULLIFY(&v); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 5 ; @@ -154,7 +154,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Constructor Init \n n$0=*&this:class A * [line 12]\n n$1=*&f:int [line 12]\n *n$0.f:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&f,false); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Constructor Init \n n$0=*&this:class A * [line 12]\n n$1=*&f:int [line 12]\n *n$0.f:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&f); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 cdbed0fc8..647efedee 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_new.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 97 -> 96 ; -96 [label="96: BinaryOperatorStmt: Assign \n n$0=*&tarray:class Person ** [line 98]\n n$1=_fun___new_array((sizeof(class Person ) * 10):unsigned long ) [line 98]\n _fun_Person_Person(n$1[0]:class Person *) [line 98]\n _fun_Person_Person(n$1[1]:class Person *) [line 98]\n _fun_Person_Person(n$1[2]:class Person *) [line 98]\n _fun_Person_Person(n$1[3]:class Person *) [line 98]\n _fun_Person_Person(n$1[4]:class Person *) [line 98]\n _fun_Person_Person(n$1[5]:class Person *) [line 98]\n _fun_Person_Person(n$1[6]:class Person *) [line 98]\n _fun_Person_Person(n$1[7]:class Person *) [line 98]\n _fun_Person_Person(n$1[8]:class Person *) [line 98]\n _fun_Person_Person(n$1[9]:class Person *) [line 98]\n *n$0[0]:class Person *=n$1 [line 98]\n REMOVE_TEMPS(n$0,n$1); [line 98]\n NULLIFY(&tarray,false); [line 98]\n APPLY_ABSTRACTION; [line 98]\n " shape="box"] +96 [label="96: BinaryOperatorStmt: Assign \n n$0=*&tarray:class Person ** [line 98]\n n$1=_fun___new_array((sizeof(class Person ) * 10):unsigned long ) [line 98]\n _fun_Person_Person(n$1[0]:class Person *) [line 98]\n _fun_Person_Person(n$1[1]:class Person *) [line 98]\n _fun_Person_Person(n$1[2]:class Person *) [line 98]\n _fun_Person_Person(n$1[3]:class Person *) [line 98]\n _fun_Person_Person(n$1[4]:class Person *) [line 98]\n _fun_Person_Person(n$1[5]:class Person *) [line 98]\n _fun_Person_Person(n$1[6]:class Person *) [line 98]\n _fun_Person_Person(n$1[7]:class Person *) [line 98]\n _fun_Person_Person(n$1[8]:class Person *) [line 98]\n _fun_Person_Person(n$1[9]:class Person *) [line 98]\n *n$0[0]:class Person *=n$1 [line 98]\n REMOVE_TEMPS(n$0,n$1); [line 98]\n NULLIFY(&tarray); [line 98]\n APPLY_ABSTRACTION; [line 98]\n " shape="box"] 96 -> 95 ; @@ -14,7 +14,7 @@ digraph iCFG { 94 -> 97 ; -93 [label="93: DeclStmt \n n$0=_fun___new_array((sizeof(class Person ) * 10):unsigned long ) [line 93]\n _fun_Person_Person(n$0[0]:class Person *) [line 93]\n _fun_Person_Person(n$0[1]:class Person *) [line 93]\n _fun_Person_Person(n$0[2]:class Person *) [line 93]\n _fun_Person_Person(n$0[3]:class Person *) [line 93]\n _fun_Person_Person(n$0[4]:class Person *) [line 93]\n _fun_Person_Person(n$0[5]:class Person *) [line 93]\n _fun_Person_Person(n$0[6]:class Person *) [line 93]\n _fun_Person_Person(n$0[7]:class Person *) [line 93]\n _fun_Person_Person(n$0[8]:class Person *) [line 93]\n _fun_Person_Person(n$0[9]:class Person *) [line 93]\n *&tarray:class Person *=n$0 [line 93]\n REMOVE_TEMPS(n$0); [line 93]\n NULLIFY(&tarray,false); [line 93]\n APPLY_ABSTRACTION; [line 93]\n " shape="box"] +93 [label="93: DeclStmt \n n$0=_fun___new_array((sizeof(class Person ) * 10):unsigned long ) [line 93]\n _fun_Person_Person(n$0[0]:class Person *) [line 93]\n _fun_Person_Person(n$0[1]:class Person *) [line 93]\n _fun_Person_Person(n$0[2]:class Person *) [line 93]\n _fun_Person_Person(n$0[3]:class Person *) [line 93]\n _fun_Person_Person(n$0[4]:class Person *) [line 93]\n _fun_Person_Person(n$0[5]:class Person *) [line 93]\n _fun_Person_Person(n$0[6]:class Person *) [line 93]\n _fun_Person_Person(n$0[7]:class Person *) [line 93]\n _fun_Person_Person(n$0[8]:class Person *) [line 93]\n _fun_Person_Person(n$0[9]:class Person *) [line 93]\n *&tarray:class Person *=n$0 [line 93]\n REMOVE_TEMPS(n$0); [line 93]\n NULLIFY(&tarray); [line 93]\n APPLY_ABSTRACTION; [line 93]\n " shape="box"] 93 -> 92 ; @@ -25,7 +25,7 @@ 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 REMOVE_TEMPS(n$2,n$3); [line 89]\n NULLIFY(&SIL_temp_conditional___n$0,false); [line 89]\n NULLIFY(&tarray,false); [line 89]\n APPLY_ABSTRACTION; [line 89]\n " shape="box"] +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 REMOVE_TEMPS(n$2,n$3); [line 89]\n NULLIFY(&SIL_temp_conditional___n$0); [line 89]\n NULLIFY(&tarray); [line 89]\n APPLY_ABSTRACTION; [line 89]\n " shape="box"] 90 -> 83 ; @@ -65,7 +65,7 @@ digraph iCFG { 81 -> 80 ; -80 [label="80: Return Stmt \n n$0=*&arr:int * [line 84]\n n$1=*n$0[0]:int [line 84]\n n$2=*&arr:int * [line 84]\n n$3=*n$2[1]:int [line 84]\n n$4=*&arr:int * [line 84]\n n$5=*n$4[2]:int [line 84]\n n$6=*&arr:int * [line 84]\n n$7=*n$6[3]:int [line 84]\n n$8=*&arr:int * [line 84]\n n$9=*n$8[4]:int [line 84]\n *&return:int =(1 / (((((n$1 + n$3) + n$5) + n$7) + n$9) - 15)) [line 84]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6,n$7,n$8,n$9); [line 84]\n NULLIFY(&arr,false); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] +80 [label="80: Return Stmt \n n$0=*&arr:int * [line 84]\n n$1=*n$0[0]:int [line 84]\n n$2=*&arr:int * [line 84]\n n$3=*n$2[1]:int [line 84]\n n$4=*&arr:int * [line 84]\n n$5=*n$4[2]:int [line 84]\n n$6=*&arr:int * [line 84]\n n$7=*n$6[3]:int [line 84]\n n$8=*&arr:int * [line 84]\n n$9=*n$8[4]:int [line 84]\n *&return:int =(1 / (((((n$1 + n$3) + n$5) + n$7) + n$9) - 15)) [line 84]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5,n$6,n$7,n$8,n$9); [line 84]\n NULLIFY(&arr); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] 80 -> 79 ; @@ -76,7 +76,7 @@ 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 REMOVE_TEMPS(n$9,n$10); [line 76]\n NULLIFY(&SIL_temp_conditional___n$6,false); [line 76]\n " shape="box"] +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 REMOVE_TEMPS(n$9,n$10); [line 76]\n NULLIFY(&SIL_temp_conditional___n$6); [line 76]\n " shape="box"] 77 -> 70 ; @@ -113,7 +113,7 @@ digraph iCFG { 69 -> 68 ; -68 [label="68: Return Stmt \n n$0=*&x2:int * [line 79]\n n$1=*n$0[0]:int [line 79]\n n$2=*&x2:int * [line 79]\n n$3=*n$2[1]:int [line 79]\n *&return:int =(1 / ((n$1 + n$3) - 3)) [line 79]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 79]\n NULLIFY(&x2,false); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] +68 [label="68: Return Stmt \n n$0=*&x2:int * [line 79]\n n$1=*n$0[0]:int [line 79]\n n$2=*&x2:int * [line 79]\n n$3=*n$2[1]:int [line 79]\n *&return:int =(1 / ((n$1 + n$3) - 3)) [line 79]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 79]\n NULLIFY(&x2); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] 68 -> 67 ; @@ -128,11 +128,11 @@ 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 REMOVE_TEMPS(n$2,n$7); [line 71]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 71]\n " shape="box"] +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 REMOVE_TEMPS(n$2,n$7); [line 71]\n NULLIFY(&SIL_temp_conditional___n$3); [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 REMOVE_TEMPS(n$6); [line 71]\n NULLIFY(&z,false); [line 71]\n APPLY_ABSTRACTION; [line 71]\n " shape="box"] +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 REMOVE_TEMPS(n$6); [line 71]\n NULLIFY(&z); [line 71]\n APPLY_ABSTRACTION; [line 71]\n " shape="box"] 63 -> 58 ; @@ -144,7 +144,7 @@ digraph iCFG { 61 -> 63 ; -60 [label="60: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 71]\n REMOVE_TEMPS(n$4); [line 71]\n NULLIFY(&z,false); [line 71]\n " shape="invhouse"] +60 [label="60: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 71]\n REMOVE_TEMPS(n$4); [line 71]\n NULLIFY(&z); [line 71]\n " shape="invhouse"] 60 -> 62 ; @@ -157,7 +157,7 @@ digraph iCFG { 58 -> 64 ; -57 [label="57: Return Stmt \n n$0=*&p:class Person * [line 72]\n n$1=*n$0.x:int [line 72]\n *&return:int =(1 / (n$1 - 7)) [line 72]\n REMOVE_TEMPS(n$0,n$1); [line 72]\n NULLIFY(&p,false); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] +57 [label="57: Return Stmt \n n$0=*&p:class Person * [line 72]\n n$1=*n$0.x:int [line 72]\n *&return:int =(1 / (n$1 - 7)) [line 72]\n REMOVE_TEMPS(n$0,n$1); [line 72]\n NULLIFY(&p); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] 57 -> 56 ; @@ -168,7 +168,7 @@ digraph iCFG { 55 -> 65 ; -54 [label="54: DeclStmt \n *&z:int =6 [line 63]\n NULLIFY(&z,false); [line 63]\n " shape="box"] +54 [label="54: DeclStmt \n *&z:int =6 [line 63]\n NULLIFY(&z); [line 63]\n " shape="box"] 54 -> 53 ; @@ -176,11 +176,11 @@ 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 REMOVE_TEMPS(n$2,n$8); [line 65]\n NULLIFY(&SIL_temp_conditional___n$3,false); [line 65]\n " shape="box"] +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 REMOVE_TEMPS(n$2,n$8); [line 65]\n NULLIFY(&SIL_temp_conditional___n$3); [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 REMOVE_TEMPS(n$6,n$7); [line 65]\n NULLIFY(&y,false); [line 65]\n APPLY_ABSTRACTION; [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 *&SIL_temp_conditional___n$3:int =(1 + n$7) [line 65]\n REMOVE_TEMPS(n$6,n$7); [line 65]\n NULLIFY(&y); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 51 -> 46 ; @@ -192,7 +192,7 @@ digraph iCFG { 49 -> 51 ; -48 [label="48: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&y,false); [line 65]\n " shape="invhouse"] +48 [label="48: Prune (true branch) \n PRUNE((n$4 != 0), true); [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&y); [line 65]\n " shape="invhouse"] 48 -> 50 ; @@ -205,7 +205,7 @@ digraph iCFG { 46 -> 52 ; -45 [label="45: Return Stmt \n n$0=*&x:int * [line 66]\n n$1=*n$0:int [line 66]\n *&return:int =(1 / (n$1 - 5)) [line 66]\n REMOVE_TEMPS(n$0,n$1); [line 66]\n NULLIFY(&x,false); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] +45 [label="45: Return Stmt \n n$0=*&x:int * [line 66]\n n$1=*n$0:int [line 66]\n *&return:int =(1 / (n$1 - 5)) [line 66]\n REMOVE_TEMPS(n$0,n$1); [line 66]\n NULLIFY(&x); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] 45 -> 44 ; @@ -220,7 +220,7 @@ digraph iCFG { 42 -> 41 ; -41 [label="41: Return Stmt \n n$0=*&x1:int * [line 59]\n n$1=*n$0:int [line 59]\n *&return:int =(1 / n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&x1,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +41 [label="41: Return Stmt \n n$0=*&x1:int * [line 59]\n n$1=*n$0:int [line 59]\n *&return:int =(1 / n$1) [line 59]\n REMOVE_TEMPS(n$0,n$1); [line 59]\n NULLIFY(&x1); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 41 -> 40 ; @@ -235,7 +235,7 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Return Stmt \n n$0=*&x1:int [line 54]\n *&return:int =(1 / n$0) [line 54]\n REMOVE_TEMPS(n$0); [line 54]\n NULLIFY(&x1,false); [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"] +37 [label="37: Return Stmt \n n$0=*&x1:int [line 54]\n *&return:int =(1 / n$0) [line 54]\n REMOVE_TEMPS(n$0); [line 54]\n NULLIFY(&x1); [line 54]\n APPLY_ABSTRACTION; [line 54]\n " shape="box"] 37 -> 36 ; @@ -250,7 +250,7 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: Return Stmt \n n$0=*&x1:int * [line 49]\n n$1=*n$0:int [line 49]\n *&return:int =(1 / n$1) [line 49]\n REMOVE_TEMPS(n$0,n$1); [line 49]\n NULLIFY(&x1,false); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"] +33 [label="33: Return Stmt \n n$0=*&x1:int * [line 49]\n n$1=*n$0:int [line 49]\n *&return:int =(1 / n$1) [line 49]\n REMOVE_TEMPS(n$0,n$1); [line 49]\n NULLIFY(&x1); [line 49]\n APPLY_ABSTRACTION; [line 49]\n " shape="box"] 33 -> 32 ; @@ -265,7 +265,7 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: Return Stmt \n n$0=*&x1:float * [line 44]\n n$1=*n$0:float [line 44]\n *&return:float =(1 / (n$1 - 5.400000)) [line 44]\n REMOVE_TEMPS(n$0,n$1); [line 44]\n NULLIFY(&x1,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +29 [label="29: Return Stmt \n n$0=*&x1:float * [line 44]\n n$1=*n$0:float [line 44]\n *&return:float =(1 / (n$1 - 5.400000)) [line 44]\n REMOVE_TEMPS(n$0,n$1); [line 44]\n NULLIFY(&x1); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 29 -> 28 ; @@ -280,7 +280,7 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Return Stmt \n n$0=*&x1:int * [line 39]\n n$1=*n$0:int [line 39]\n *&return:int =(1 / (n$1 - 5)) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&x1,false); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +25 [label="25: Return Stmt \n n$0=*&x1:int * [line 39]\n n$1=*n$0:int [line 39]\n *&return:int =(1 / (n$1 - 5)) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&x1); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 25 -> 24 ; @@ -295,7 +295,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n n$0=*&p:class Person * [line 34]\n n$1=*n$0.z:int [line 34]\n *&return:int =(1 / (n$1 - 7)) [line 34]\n REMOVE_TEMPS(n$0,n$1); [line 34]\n NULLIFY(&p,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&p:class Person * [line 34]\n n$1=*n$0.z:int [line 34]\n *&return:int =(1 / (n$1 - 7)) [line 34]\n REMOVE_TEMPS(n$0,n$1); [line 34]\n NULLIFY(&p); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 21 -> 20 ; @@ -310,7 +310,7 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Return Stmt \n n$0=*&p:class Person * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =(1 / (n$1 - 5)) [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&p,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +17 [label="17: Return Stmt \n n$0=*&p:class Person * [line 29]\n n$1=*n$0.x:int [line 29]\n *&return:int =(1 / (n$1 - 5)) [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&p); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 17 -> 16 ; @@ -321,7 +321,7 @@ digraph iCFG { 15 -> 18 ; -14 [label="14: Return Stmt \n n$0=*&x:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +14 [label="14: Return Stmt \n n$0=*&x:int [line 25]\n *&return:int =n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&x); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 14 -> 13 ; @@ -332,15 +332,15 @@ digraph iCFG { 12 -> 14 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$4=*&this:class Person * [line 16]\n n$5=*&i:int [line 16]\n *n$4.x:int =n$5 [line 16]\n REMOVE_TEMPS(n$4,n$5); [line 16]\n NULLIFY(&i,false); [line 16]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: Assign \n n$4=*&this:class Person * [line 16]\n n$5=*&i:int [line 16]\n *n$4.x:int =n$5 [line 16]\n REMOVE_TEMPS(n$4,n$5); [line 16]\n NULLIFY(&i); [line 16]\n " shape="box"] 11 -> 10 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&this:class Person * [line 17]\n n$3=*&j:int [line 17]\n *n$2.y:int =n$3 [line 17]\n REMOVE_TEMPS(n$2,n$3); [line 17]\n NULLIFY(&j,false); [line 17]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&this:class Person * [line 17]\n n$3=*&j:int [line 17]\n *n$2.y:int =n$3 [line 17]\n REMOVE_TEMPS(n$2,n$3); [line 17]\n NULLIFY(&j); [line 17]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 18]\n n$1=*&k:int [line 18]\n *n$0.z:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&k,false); [line 18]\n NULLIFY(&this,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 18]\n n$1=*&k:int [line 18]\n *n$0.z:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&k); [line 18]\n NULLIFY(&this); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 9 -> 8 ; @@ -351,7 +351,7 @@ digraph iCFG { 7 -> 11 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 13]\n n$1=*&i:int [line 13]\n *n$0.x:int =n$1 [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&i,false); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 13]\n n$1=*&i:int [line 13]\n *n$0.x:int =n$1 [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&i); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 6 -> 5 ; @@ -362,7 +362,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 12]\n *n$0.x:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Person * [line 12]\n *n$0.x:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 f0824b697..e1705bb7f 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,16 +1,16 @@ 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 NULLIFY(&SIL_init_list__n$0,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +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 NULLIFY(&SIL_init_list__n$0); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; -5 [label="5: Exit test \n NULLIFY(&p,false); [line 17]\n " color=yellow style=filled] +5 [label="5: Exit test \n NULLIFY(&p); [line 17]\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 -> 6 ; -3 [label="3: Constructor Init \n n$0=*&this:class Person * [line 14]\n n$1=*&l.top:int [line 14]\n *n$0.age:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&l,false); [line 14]\n NULLIFY(&this,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: Constructor Init \n n$0=*&this:class Person * [line 14]\n n$1=*&l.top:int [line 14]\n *n$0.age:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&l); [line 14]\n NULLIFY(&this); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot index 27b20822e..063a6e3e8 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/constructor_with_body.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit test_div1 \n NULLIFY(&x,false); [line 41]\n " color=yellow style=filled] +24 [label="24: Exit test_div1 \n NULLIFY(&x); [line 41]\n " color=yellow style=filled] 23 [label="23: Start test_div1\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 38]\n " color=yellow style=filled] @@ -22,7 +22,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Exit test_div0_default_constructor \n NULLIFY(&x,false); [line 36]\n " color=yellow style=filled] +20 [label="20: Exit test_div0_default_constructor \n NULLIFY(&x); [line 36]\n " color=yellow style=filled] 19 [label="19: Start test_div0_default_constructor\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 33]\n " color=yellow style=filled] @@ -37,14 +37,14 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: Exit test_div0 \n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] +16 [label="16: Exit test_div0 \n NULLIFY(&x); [line 31]\n " color=yellow style=filled] 15 [label="15: Start test_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 28]\n " color=yellow style=filled] 15 -> 18 ; -14 [label="14: DeclStmt \n n$4=*&a:int [line 23]\n n$5=*&b:int [line 23]\n *&c:int =(n$4 + n$5) [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&a,false); [line 23]\n NULLIFY(&b,false); [line 23]\n " shape="box"] +14 [label="14: DeclStmt \n n$4=*&a:int [line 23]\n n$5=*&b:int [line 23]\n *&c:int =(n$4 + n$5) [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&a); [line 23]\n NULLIFY(&b); [line 23]\n " shape="box"] 14 -> 13 ; @@ -52,7 +52,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 25]\n n$1=*&c:int [line 25]\n *n$0.f:int =n$1 [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&c,false); [line 25]\n NULLIFY(&this,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +12 [label="12: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 25]\n n$1=*&c:int [line 25]\n *n$0.f:int =n$1 [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&c); [line 25]\n NULLIFY(&this); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 12 -> 11 ; @@ -63,7 +63,7 @@ digraph iCFG { 10 -> 14 ; -9 [label="9: Return Stmt \n n$0=*&this:class X * [line 19]\n n$1=*n$0.f:int [line 19]\n *&return:int =(1 / n$1) [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&this,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&this:class X * [line 19]\n n$1=*n$0.f:int [line 19]\n *&return:int =(1 / n$1) [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&this); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 9 -> 8 ; @@ -74,7 +74,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Call _fun_X_init \n n$0=*&this:class X * [line 15]\n n$1=*n$0:class X [line 15]\n _fun_X_init(n$0:class X *) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +6 [label="6: Call _fun_X_init \n n$0=*&this:class X * [line 15]\n n$1=*n$0:class X [line 15]\n _fun_X_init(n$0:class X *) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 6 -> 5 ; @@ -85,7 +85,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n *n$0.f:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n *n$0.f:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 3f8fbef8a..01739edf7 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 @@ -19,11 +19,11 @@ digraph iCFG { 61 -> 60 ; -60 [label="60: Return Stmt \n n$0=*&d1:int [line 78]\n n$1=*&d2:int [line 78]\n *&return:int =(n$0 + n$1) [line 78]\n REMOVE_TEMPS(n$0,n$1); [line 78]\n NULLIFY(&d1,false); [line 78]\n NULLIFY(&d2,false); [line 78]\n APPLY_ABSTRACTION; [line 78]\n " shape="box"] +60 [label="60: Return Stmt \n n$0=*&d1:int [line 78]\n n$1=*&d2:int [line 78]\n *&return:int =(n$0 + n$1) [line 78]\n REMOVE_TEMPS(n$0,n$1); [line 78]\n NULLIFY(&d1); [line 78]\n NULLIFY(&d2); [line 78]\n APPLY_ABSTRACTION; [line 78]\n " shape="box"] 60 -> 59 ; -59 [label="59: Exit copyY_moveY_div1 \n NULLIFY(&y2,false); [line 79]\n NULLIFY(&y1,false); [line 79]\n NULLIFY(&__temp_return_n$3,false); [line 79]\n " color=yellow style=filled] +59 [label="59: Exit copyY_moveY_div1 \n NULLIFY(&y2); [line 79]\n NULLIFY(&y1); [line 79]\n NULLIFY(&__temp_return_n$3); [line 79]\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] @@ -50,11 +50,11 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: Return Stmt \n n$0=*&d1:int [line 69]\n n$1=*&d2:int [line 69]\n *&return:int =(n$0 + n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&d1,false); [line 69]\n NULLIFY(&d2,false); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] +52 [label="52: Return Stmt \n n$0=*&d1:int [line 69]\n n$1=*&d2:int [line 69]\n *&return:int =(n$0 + n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&d1); [line 69]\n NULLIFY(&d2); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] 52 -> 51 ; -51 [label="51: Exit copyX_moveX_div1 \n NULLIFY(&x2,false); [line 70]\n NULLIFY(&x1,false); [line 70]\n NULLIFY(&__temp_return_n$3,false); [line 70]\n " color=yellow style=filled] +51 [label="51: Exit copyX_moveX_div1 \n NULLIFY(&x2); [line 70]\n NULLIFY(&x1); [line 70]\n NULLIFY(&__temp_return_n$3); [line 70]\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] @@ -73,7 +73,7 @@ digraph iCFG { 47 -> 46 ; -46 [label="46: Exit moveY_moveY_copyY_div0 \n NULLIFY(&y2,false); [line 61]\n NULLIFY(&y1,false); [line 61]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 61]\n " color=yellow style=filled] +46 [label="46: Exit moveY_moveY_copyY_div0 \n NULLIFY(&y2); [line 61]\n NULLIFY(&y1); [line 61]\n NULLIFY(&SIL_materialize_temp__n$1); [line 61]\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] @@ -84,7 +84,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Exit moveY_div0 \n NULLIFY(&__temp_return_n$1,false); [line 55]\n " color=yellow style=filled] +43 [label="43: Exit moveY_div0 \n NULLIFY(&__temp_return_n$1); [line 55]\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] @@ -107,7 +107,7 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Exit copyY_div0 \n NULLIFY(&y2,false); [line 53]\n NULLIFY(&y1,false); [line 53]\n " color=yellow style=filled] +37 [label="37: Exit copyY_div0 \n NULLIFY(&y2); [line 53]\n NULLIFY(&y1); [line 53]\n " color=yellow style=filled] 36 [label="36: Start copyY_div0\nFormals: \nLocals: y2:class Y y1:class Y \n DECLARE_LOCALS(&return,&y2,&y1); [line 48]\n " color=yellow style=filled] @@ -118,7 +118,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: Exit moveX_div0 \n NULLIFY(&__temp_return_n$1,false); [line 46]\n " color=yellow style=filled] +34 [label="34: Exit moveX_div0 \n NULLIFY(&__temp_return_n$1); [line 46]\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] @@ -141,7 +141,7 @@ digraph iCFG { 29 -> 28 ; -28 [label="28: Exit copyX_div0 \n NULLIFY(&x2,false); [line 44]\n NULLIFY(&x1,false); [line 44]\n " color=yellow style=filled] +28 [label="28: Exit copyX_div0 \n NULLIFY(&x2); [line 44]\n NULLIFY(&x1); [line 44]\n " color=yellow style=filled] 27 [label="27: Start copyX_div0\nFormals: \nLocals: x2:class X x1:class X \n DECLARE_LOCALS(&return,&x2,&x1); [line 39]\n " color=yellow style=filled] @@ -152,15 +152,15 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 35]\n *&y.f:int =n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n NULLIFY(&f,false); [line 35]\n " shape="box"] +25 [label="25: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 35]\n *&y.f:int =n$1 [line 35]\n REMOVE_TEMPS(n$1); [line 35]\n NULLIFY(&f); [line 35]\n " shape="box"] 25 -> 24 ; -24 [label="24: Return Stmt \n n$0=*&__return_param:class Y * [line 36]\n _fun_Y_Y(n$0:class Y *,&y:class Y &) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&__return_param,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +24 [label="24: Return Stmt \n n$0=*&__return_param:class Y * [line 36]\n _fun_Y_Y(n$0:class Y *,&y:class Y &) [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&__return_param); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 24 -> 23 ; -23 [label="23: Exit getY \n NULLIFY(&y,false); [line 37]\n " color=yellow style=filled] +23 [label="23: Exit getY \n NULLIFY(&y); [line 37]\n " color=yellow style=filled] 22 [label="22: Start getY\nFormals: f:int __return_param:class Y *\nLocals: y:class Y \n DECLARE_LOCALS(&return,&y); [line 33]\n " color=yellow style=filled] @@ -171,22 +171,22 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 29]\n *&x.f:int =n$1 [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&f,false); [line 29]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n n$1=*&f:int [line 29]\n *&x.f:int =n$1 [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&f); [line 29]\n " shape="box"] 20 -> 19 ; -19 [label="19: Return Stmt \n n$0=*&__return_param:class X * [line 30]\n _fun_X_X(n$0:class X *,&x:class X &) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&__return_param,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +19 [label="19: Return Stmt \n n$0=*&__return_param:class X * [line 30]\n _fun_X_X(n$0:class X *,&x:class X &) [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&__return_param); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 19 -> 18 ; -18 [label="18: Exit getX \n NULLIFY(&x,false); [line 31]\n " color=yellow style=filled] +18 [label="18: Exit getX \n NULLIFY(&x); [line 31]\n " color=yellow style=filled] 17 [label="17: Start getX\nFormals: f:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 27]\n " color=yellow style=filled] 17 -> 21 ; -16 [label="16: Constructor Init \n n$0=*&this:class Y * [line 24]\n n$1=*&y:class Y & [line 24]\n n$2=*n$1.f:int [line 24]\n *n$0.f:int =(n$2 - 1) [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&this,false); [line 24]\n NULLIFY(&y,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +16 [label="16: Constructor Init \n n$0=*&this:class Y * [line 24]\n n$1=*&y:class Y & [line 24]\n n$2=*n$1.f:int [line 24]\n *n$0.f:int =(n$2 - 1) [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&this); [line 24]\n NULLIFY(&y); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 16 -> 15 ; @@ -197,7 +197,7 @@ digraph iCFG { 14 -> 16 ; -13 [label="13: Constructor Init \n n$0=*&this:class Y * [line 22]\n n$1=*&y:class Y & [line 22]\n n$2=*n$1.f:int [line 22]\n *n$0.f:int =n$2 [line 22]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 22]\n NULLIFY(&this,false); [line 22]\n NULLIFY(&y,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +13 [label="13: Constructor Init \n n$0=*&this:class Y * [line 22]\n n$1=*&y:class Y & [line 22]\n n$2=*n$1.f:int [line 22]\n *n$0.f:int =n$2 [line 22]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 22]\n NULLIFY(&this); [line 22]\n NULLIFY(&y); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 13 -> 12 ; @@ -215,7 +215,7 @@ digraph iCFG { 9 -> 10 ; -8 [label="8: Constructor Init \n n$0=*&this:class X * [line 13]\n n$1=*&__param_0:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&__param_0,false); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +8 [label="8: Constructor Init \n n$0=*&this:class X * [line 13]\n n$1=*&__param_0:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&__param_0); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 8 -> 7 ; @@ -226,7 +226,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: Constructor Init \n n$0=*&this:class X * [line 13]\n n$1=*&__param_0:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&__param_0,false); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +5 [label="5: Constructor Init \n n$0=*&this:class X * [line 13]\n n$1=*&__param_0:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&__param_0); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot index ea9e96510..daf5b299d 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/default_field_init.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Exit test \n NULLIFY(&y,false); [line 25]\n " color=yellow style=filled] +17 [label="17: Exit test \n NULLIFY(&y); [line 25]\n " color=yellow style=filled] 16 [label="16: Start test\nFormals: \nLocals: y:class Y \n DECLARE_LOCALS(&return,&y); [line 25]\n " color=yellow style=filled] @@ -18,7 +18,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Constructor Init \n n$0=*&this:class Y * [line 19]\n _fun_X_X(n$0.x3:class X *) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&this,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +13 [label="13: Constructor Init \n n$0=*&this:class Y * [line 19]\n _fun_X_X(n$0.x3:class X *) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&this); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 13 -> 12 ; @@ -29,7 +29,7 @@ digraph iCFG { 11 -> 15 ; -10 [label="10: Constructor Init \n n$2=*&this:class X * [line 16]\n n$3=*&a:int [line 16]\n n$4=*&b:int [line 16]\n *n$2.a:int =(n$3 + n$4) [line 16]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 16]\n NULLIFY(&a,false); [line 16]\n NULLIFY(&b,false); [line 16]\n " shape="box"] +10 [label="10: Constructor Init \n n$2=*&this:class X * [line 16]\n n$3=*&a:int [line 16]\n n$4=*&b:int [line 16]\n *n$2.a:int =(n$3 + n$4) [line 16]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 16]\n NULLIFY(&a); [line 16]\n NULLIFY(&b); [line 16]\n " shape="box"] 10 -> 9 ; @@ -37,7 +37,7 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +8 [label="8: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 8 -> 7 ; @@ -56,7 +56,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Constructor Init \n n$0=*&this:class X * [line 13]\n *n$0.c:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; 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 a5ee4c0e5..aa472eba2 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,16 +1,16 @@ 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 REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +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 REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&SIL_materialize_temp__n$0); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 11 -> 10 ; -10 [label="10: Exit main \n NULLIFY(&x,false); [line 24]\n " color=yellow style=filled] +10 [label="10: Exit main \n NULLIFY(&x); [line 24]\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 -> 11 ; -8 [label="8: Prune (false branch) \n PRUNE(((n$3 != n$5) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n NULLIFY(&i,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n PRUNE(((n$3 != n$5) == 0), false); [line 15]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 15]\n NULLIFY(&i); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="invhouse"] 8 -> 2 ; @@ -35,7 +35,7 @@ digraph iCFG { 3 -> 6 ; -2 [label="2: Exit X_X \n NULLIFY(&list,false); [line 18]\n " color=yellow style=filled] +2 [label="2: Exit X_X \n NULLIFY(&list); [line 18]\n " color=yellow style=filled] 1 [label="1: Start X_X\nFormals: this:class X * list:class std::initializer_list \nLocals: i:int * \n DECLARE_LOCALS(&return,&i); [line 14]\n " color=yellow style=filled] 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 6167341f5..f3a4bffb3 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/constructors/temp_object.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 43 -> 42 ; -42 [label="42: Exit getX_field_div1 \n NULLIFY(&__temp_return_n$1,false); [line 43]\n " color=yellow style=filled] +42 [label="42: Exit getX_field_div1 \n NULLIFY(&__temp_return_n$1); [line 43]\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] @@ -14,7 +14,7 @@ digraph iCFG { 40 -> 39 ; -39 [label="39: Exit temp_field_div1 \n NULLIFY(&__temp_construct_n$0,false); [line 41]\n " color=yellow style=filled] +39 [label="39: Exit temp_field_div1 \n NULLIFY(&__temp_construct_n$0); [line 41]\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] @@ -25,7 +25,7 @@ digraph iCFG { 37 -> 36 ; -36 [label="36: Exit getX_method_div0 \n NULLIFY(&__temp_return_n$1,false); [line 39]\n " color=yellow style=filled] +36 [label="36: Exit getX_method_div0 \n NULLIFY(&__temp_return_n$1); [line 39]\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] @@ -36,7 +36,7 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: Exit getX_field_div0 \n NULLIFY(&__temp_return_n$1,false); [line 37]\n " color=yellow style=filled] +33 [label="33: Exit getX_field_div0 \n NULLIFY(&__temp_return_n$1); [line 37]\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] @@ -47,7 +47,7 @@ digraph iCFG { 31 -> 30 ; -30 [label="30: Exit temp_method_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 35]\n " color=yellow style=filled] +30 [label="30: Exit temp_method_div0 \n NULLIFY(&__temp_construct_n$0); [line 35]\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] @@ -58,7 +58,7 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Exit temp_field2_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 33]\n " color=yellow style=filled] +27 [label="27: Exit temp_field2_div0 \n NULLIFY(&__temp_construct_n$0); [line 33]\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] @@ -69,7 +69,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit temp_field_div0 \n NULLIFY(&__temp_construct_n$0,false); [line 31]\n " color=yellow style=filled] +24 [label="24: Exit temp_field_div0 \n NULLIFY(&__temp_construct_n$0); [line 31]\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] @@ -84,25 +84,25 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Exit assign_temp_div0 \n NULLIFY(&x,false); [line 29]\n NULLIFY(&SIL_materialize_temp__n$2,false); [line 29]\n " color=yellow style=filled] +20 [label="20: Exit assign_temp_div0 \n NULLIFY(&x); [line 29]\n NULLIFY(&SIL_materialize_temp__n$2); [line 29]\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 -> 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 REMOVE_TEMPS(n$0,n$2,n$3); [line 24]\n NULLIFY(&__return_param,false); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&b,false); [line 24]\n APPLY_ABSTRACTION; [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(&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 REMOVE_TEMPS(n$0,n$2,n$3); [line 24]\n NULLIFY(&__return_param); [line 24]\n NULLIFY(&a); [line 24]\n NULLIFY(&b); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 18 -> 17 ; -17 [label="17: Exit getX \n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n " color=yellow style=filled] +17 [label="17: Exit getX \n NULLIFY(&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: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 24]\n " color=yellow style=filled] 16 -> 18 ; -15 [label="15: Return Stmt \n n$0=*&f:int [line 19]\n *&return:int =(1 / n$0) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&f,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&f:int [line 19]\n *&return:int =(1 / n$0) [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&f); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 15 -> 14 ; @@ -113,7 +113,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: Return Stmt \n n$0=*&this:class X * [line 16]\n n$1=*n$0.f:int [line 16]\n *&return:int =(1 / n$1) [line 16]\n REMOVE_TEMPS(n$0,n$1); [line 16]\n NULLIFY(&this,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&this:class X * [line 16]\n n$1=*n$0.f:int [line 16]\n *&return:int =(1 / n$1) [line 16]\n REMOVE_TEMPS(n$0,n$1); [line 16]\n NULLIFY(&this); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 12 -> 11 ; @@ -124,7 +124,7 @@ digraph iCFG { 10 -> 12 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 14]\n n$1=*&x:class X & [line 14]\n n$2=*n$1.f:int [line 14]\n *n$0.f:int =n$2 [line 14]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 14]\n NULLIFY(&this,false); [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 14]\n n$1=*&x:class X & [line 14]\n n$2=*n$1.f:int [line 14]\n *n$0.f:int =n$2 [line 14]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 14]\n NULLIFY(&this); [line 14]\n NULLIFY(&x); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 9 -> 8 ; @@ -135,7 +135,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n n$1=*&a:int [line 12]\n *n$0.f:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&a,false); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n n$1=*&a:int [line 12]\n *n$0.f:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&a); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 6 -> 5 ; @@ -146,7 +146,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 11]\n n$1=*&a:int [line 11]\n *n$0.f:int =n$1 [line 11]\n REMOVE_TEMPS(n$0,n$1); [line 11]\n NULLIFY(&a,false); [line 11]\n NULLIFY(&this,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 11]\n n$1=*&a:int [line 11]\n *n$0.f:int =n$1 [line 11]\n REMOVE_TEMPS(n$0,n$1); [line 11]\n NULLIFY(&a); [line 11]\n NULLIFY(&this); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/call_destructor.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/call_destructor.cpp.dot index 33b9a271a..e70130692 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/call_destructor.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/call_destructor.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: Call _fun_Person_~Person \n n$0=*&p:class Person * [line 15]\n n$1=*n$0:class Person [line 15]\n _fun_Person_~Person(n$0:class Person *) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&p,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Call _fun_Person_~Person \n n$0=*&p:class Person * [line 15]\n n$1=*n$0:class Person [line 15]\n _fun_Person_~Person(n$0:class Person *) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&p); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/call_on_delete.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/call_on_delete.cpp.dot index efb654d3e..33fa6199c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/call_on_delete.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/call_on_delete.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -8 [label="8: Call delete \n n$0=*&x:int * [line 16]\n _fun___delete(n$0:int *) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&x,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +8 [label="8: Call delete \n n$0=*&x:int * [line 16]\n _fun___delete(n$0:int *) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&x); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 8 -> 7 ; @@ -10,7 +10,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: Call delete \n n$0=*&x:class X * [line 14]\n n$1=*n$0:class X [line 14]\n _fun_X_~X(n$0:class X *) [line 14]\n _fun___delete(n$0:class X *) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +5 [label="5: Call delete \n n$0=*&x:class X * [line 14]\n n$1=*n$0:class X [line 14]\n _fun_X_~X(n$0:class X *) [line 14]\n _fun___delete(n$0:class X *) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&x); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot index cf8839149..5af2d83a9 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/pseudo_destructor_expr.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: Exit test \n NULLIFY(&t,false); [line 26]\n " color=yellow style=filled] +11 [label="11: Exit test \n NULLIFY(&t); [line 26]\n " color=yellow style=filled] 10 [label="10: Start test\nFormals: \nLocals: t:int * \n DECLARE_LOCALS(&return,&t); [line 23]\n " color=yellow style=filled] @@ -29,7 +29,7 @@ digraph iCFG { 6 -> 9 ; -5 [label="5: DeclStmt \n n$1=*&p:int * [line 12]\n n$2=*n$1:int [line 12]\n *&x:int =n$2 [line 12]\n REMOVE_TEMPS(n$1,n$2); [line 12]\n NULLIFY(&p,false); [line 12]\n " shape="box"] +5 [label="5: DeclStmt \n n$1=*&p:int * [line 12]\n n$2=*n$1:int [line 12]\n *&x:int =n$2 [line 12]\n REMOVE_TEMPS(n$1,n$2); [line 12]\n NULLIFY(&p); [line 12]\n " shape="box"] 5 -> 4 ; @@ -37,7 +37,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 14]\n *&return:int =n$0 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&x,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 14]\n *&return:int =n$0 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&x); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot index 204df8e48..f967563a1 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/destructors/simple_decl.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class B * [line 20]\n *n$0.f:int =1 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&this,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class B * [line 20]\n *n$0.f:int =1 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&this); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 6 -> 5 ; @@ -10,7 +10,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class A * [line 12]\n *n$0.f:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class A * [line 12]\n *n$0.f:int =0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot index e5837352b..ceead733c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/exceptions/Exceptions.cpp.dot @@ -21,7 +21,7 @@ digraph iCFG { 12 -> 14 ; -11 [label="11: Return Stmt \n n$0=*&p:int * [line 19]\n n$1=*n$0:int [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&p,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +11 [label="11: Return Stmt \n n$0=*&p:int * [line 19]\n n$1=*n$0:int [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&p); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 11 -> 10 ; @@ -53,7 +53,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&p:int * [line 14]\n n$1=*n$0:int [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&p,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&p:int * [line 14]\n n$1=*n$0:int [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&p); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot index 850117313..add2a6deb 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/include_header/include_templ.cpp.dot @@ -29,7 +29,7 @@ digraph iCFG { 29 -> 28 ; -28 [label="28: Exit div0_B_A \n NULLIFY(&b,false); [line 21]\n " color=yellow style=filled] +28 [label="28: Exit div0_B_A \n NULLIFY(&b); [line 21]\n " color=yellow style=filled] 27 [label="27: Start div0_B_A\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 18]\n " color=yellow style=filled] @@ -44,7 +44,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit div0_B_int \n NULLIFY(&b,false); [line 16]\n " color=yellow style=filled] +24 [label="24: Exit div0_B_int \n NULLIFY(&b); [line 16]\n " color=yellow style=filled] 23 [label="23: Start div0_B_int\nFormals: \nLocals: b:class B \n DECLARE_LOCALS(&return,&b); [line 13]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/keywords/self_parameter.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/keywords/self_parameter.cpp.dot index 1bc47367d..d9dba684b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/keywords/self_parameter.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/keywords/self_parameter.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -9 [label="9: Return Stmt \n n$0=*&a:class A * [line 17]\n n$1=*n$0:class A [line 17]\n n$2=_fun_A_meth_with_self(n$0:class A *,1:int ,2:int ) [line 17]\n n$3=_fun_fun_with_self(10:int ) [line 17]\n *&return:int =(n$2 + n$3) [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 17]\n NULLIFY(&a,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&a:class A * [line 17]\n n$1=*n$0:class A [line 17]\n n$2=_fun_A_meth_with_self(n$0:class A *,1:int ,2:int ) [line 17]\n n$3=_fun_fun_with_self(10:int ) [line 17]\n *&return:int =(n$2 + n$3) [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 17]\n NULLIFY(&a); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 9 -> 8 ; @@ -10,7 +10,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$0=*&self:int [line 15]\n *&return:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&self:int [line 15]\n *&return:int =n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 6 -> 5 ; @@ -21,7 +21,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&self:int [line 12]\n n$1=*&b:int [line 12]\n *&return:int =(n$0 + n$1) [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&b,false); [line 12]\n NULLIFY(&self,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&self:int [line 12]\n n$1=*&b:int [line 12]\n *&return:int =(n$0 + n$1) [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&b); [line 12]\n NULLIFY(&self); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/literals/scalar_value_init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/literals/scalar_value_init.cpp.dot index 9f727912a..4dba765c1 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/literals/scalar_value_init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/literals/scalar_value_init.cpp.dot @@ -1,13 +1,13 @@ digraph iCFG { -23 [label="23: DeclStmt \n n$3=_fun_get() [line 18]\n *&i:int =n$3 [line 18]\n REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&i,false); [line 18]\n " shape="box"] +23 [label="23: DeclStmt \n n$3=_fun_get() [line 18]\n *&i:int =n$3 [line 18]\n REMOVE_TEMPS(n$3); [line 18]\n NULLIFY(&i); [line 18]\n " shape="box"] 23 -> 22 ; -22 [label="22: DeclStmt \n n$2=_fun_get() [line 19]\n *&f:float =n$2 [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n NULLIFY(&f,false); [line 19]\n " shape="box"] +22 [label="22: DeclStmt \n n$2=_fun_get() [line 19]\n *&f:float =n$2 [line 19]\n REMOVE_TEMPS(n$2); [line 19]\n NULLIFY(&f); [line 19]\n " shape="box"] 22 -> 21 ; -21 [label="21: DeclStmt \n n$1=_fun_get() [line 20]\n *&fp:float *=n$1 [line 20]\n REMOVE_TEMPS(n$1); [line 20]\n NULLIFY(&fp,false); [line 20]\n " shape="box"] +21 [label="21: DeclStmt \n n$1=_fun_get() [line 20]\n *&fp:float *=n$1 [line 20]\n REMOVE_TEMPS(n$1); [line 20]\n NULLIFY(&fp); [line 20]\n " shape="box"] 21 -> 20 ; @@ -15,11 +15,11 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: DeclStmt \n n$0=_fun_get() [line 22]\n *&x:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="box"] +19 [label="19: DeclStmt \n n$0=_fun_get() [line 22]\n *&x:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&x); [line 22]\n " shape="box"] 19 -> 18 ; -18 [label="18: DeclStmt \n *&f2:float =0.000000 [line 23]\n NULLIFY(&f2,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +18 [label="18: DeclStmt \n *&f2:float =0.000000 [line 23]\n NULLIFY(&f2); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 18 -> 17 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot index 787dd5e2b..7272430a9 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/loops/foreach1.cpp.dot @@ -11,7 +11,7 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: DeclStmt \n n$13=*&value:int [line 38]\n n$14=*&value:int [line 38]\n *&temp:int =((n$13 * n$14) + 10) [line 38]\n REMOVE_TEMPS(n$13,n$14); [line 38]\n NULLIFY(&temp,false); [line 38]\n NULLIFY(&value,false); [line 38]\n " shape="box"] +40 [label="40: DeclStmt \n n$13=*&value:int [line 38]\n n$14=*&value:int [line 38]\n *&temp:int =((n$13 * n$14) + 10) [line 38]\n REMOVE_TEMPS(n$13,n$14); [line 38]\n NULLIFY(&temp); [line 38]\n NULLIFY(&value); [line 38]\n " shape="box"] 40 -> 36 ; @@ -36,7 +36,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: DeclStmt \n n$1=*&__range:class vec & [line 37]\n n$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 REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&__range,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +34 [label="34: DeclStmt \n n$1=*&__range:class vec & [line 37]\n n$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 REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&__range); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 34 -> 33 ; @@ -44,14 +44,14 @@ digraph iCFG { 33 -> 37 ; -32 [label="32: Exit test \n NULLIFY(&vector,false); [line 40]\n NULLIFY(&__temp_return_n$9,false); [line 40]\n NULLIFY(&__temp_construct_n$11,false); [line 40]\n NULLIFY(&__temp_construct_n$10,false); [line 40]\n NULLIFY(&__end,false); [line 40]\n NULLIFY(&__begin,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$4,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$0,false); [line 40]\n " color=yellow style=filled] +32 [label="32: Exit test \n NULLIFY(&vector); [line 40]\n NULLIFY(&__temp_return_n$9); [line 40]\n NULLIFY(&__temp_construct_n$11); [line 40]\n NULLIFY(&__temp_construct_n$10); [line 40]\n NULLIFY(&__end); [line 40]\n NULLIFY(&__begin); [line 40]\n NULLIFY(&SIL_materialize_temp__n$4); [line 40]\n NULLIFY(&SIL_materialize_temp__n$0); [line 40]\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 -> 43 ; -30 [label="30: Return Stmt \n n$0=*&__return_param:class iterator * [line 29]\n n$1=*&this:class vec * [line 29]\n _fun_iterator_iterator(n$0:class iterator *,n$1.end_:class iterator &) [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&__return_param,false); [line 29]\n NULLIFY(&this,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +30 [label="30: Return Stmt \n n$0=*&__return_param:class iterator * [line 29]\n n$1=*&this:class vec * [line 29]\n _fun_iterator_iterator(n$0:class iterator *,n$1.end_:class iterator &) [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&__return_param); [line 29]\n NULLIFY(&this); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 30 -> 29 ; @@ -62,7 +62,7 @@ digraph iCFG { 28 -> 30 ; -27 [label="27: Return Stmt \n n$0=*&__return_param:class iterator * [line 28]\n n$1=*&this:class vec * [line 28]\n _fun_iterator_iterator(n$0:class iterator *,n$1.begin_:class iterator &) [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&__return_param,false); [line 28]\n NULLIFY(&this,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +27 [label="27: Return Stmt \n n$0=*&__return_param:class iterator * [line 28]\n n$1=*&this:class vec * [line 28]\n _fun_iterator_iterator(n$0:class iterator *,n$1.begin_:class iterator &) [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&__return_param); [line 28]\n NULLIFY(&this); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 27 -> 26 ; @@ -85,7 +85,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: BinaryOperatorStmt: Assign \n n$0=*&this:class vec * [line 26]\n n$1=*&size:int [line 26]\n *n$0.end_.val:int =n$1 [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&size,false); [line 26]\n NULLIFY(&this,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +21 [label="21: BinaryOperatorStmt: Assign \n n$0=*&this:class vec * [line 26]\n n$1=*&size:int [line 26]\n *n$0.end_.val:int =n$1 [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&size); [line 26]\n NULLIFY(&this); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 21 -> 20 ; @@ -96,7 +96,7 @@ digraph iCFG { 19 -> 24 ; -18 [label="18: Return Stmt \n n$0=*&i1.val:int [line 21]\n n$1=*&i2.val:int [line 21]\n *&return:_Bool =(n$0 != n$1) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&i1,false); [line 21]\n NULLIFY(&i2,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&i1.val:int [line 21]\n n$1=*&i2.val:int [line 21]\n *&return:_Bool =(n$0 != n$1) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&i1); [line 21]\n NULLIFY(&i2); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 18 -> 17 ; @@ -107,7 +107,7 @@ digraph iCFG { 16 -> 18 ; -15 [label="15: Constructor Init \n n$0=*&this:class iterator * [line 11]\n n$1=*&__param_0:class iterator & [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int =n$2 [line 11]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 11]\n NULLIFY(&__param_0,false); [line 11]\n NULLIFY(&this,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +15 [label="15: Constructor Init \n n$0=*&this:class iterator * [line 11]\n n$1=*&__param_0:class iterator & [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int =n$2 [line 11]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 11]\n NULLIFY(&__param_0); [line 11]\n NULLIFY(&this); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 15 -> 14 ; @@ -125,7 +125,7 @@ digraph iCFG { 11 -> 12 ; -10 [label="10: Return Stmt \n n$0=*&this:class iterator * [line 18]\n n$1=*n$0.val:int [line 18]\n *&return:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&this,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +10 [label="10: Return Stmt \n n$0=*&this:class iterator * [line 18]\n n$1=*n$0.val:int [line 18]\n *&return:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&this); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 10 -> 9 ; @@ -140,11 +140,11 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&__return_param:class iterator * [line 15]\n n$1=*&this:class iterator * [line 15]\n _fun_iterator_iterator(n$0:class iterator *,n$1:class iterator &) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&__return_param,false); [line 15]\n NULLIFY(&this,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&__return_param:class iterator * [line 15]\n n$1=*&this:class iterator * [line 15]\n _fun_iterator_iterator(n$0:class iterator *,n$1:class iterator &) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&__return_param); [line 15]\n NULLIFY(&this); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 6 -> 2 ; -5 [label="5: Constructor Init \n n$0=*&this:class iterator * [line 11]\n n$1=*&__param_0:class iterator & [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int =n$2 [line 11]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 11]\n NULLIFY(&__param_0,false); [line 11]\n NULLIFY(&this,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +5 [label="5: Constructor Init \n n$0=*&this:class iterator * [line 11]\n n$1=*&__param_0:class iterator & [line 11]\n n$2=*n$1.val:int [line 11]\n *n$0.val:int =n$2 [line 11]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 11]\n NULLIFY(&__param_0); [line 11]\n NULLIFY(&this); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 5 -> 4 ; 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 b6bfa50a4..f989bbe44 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/conversion_operator.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: Return Stmt \n n$4=*&v:int [line 65]\n *&return:int =(1 / n$4) [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&v,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +59 [label="59: Return Stmt \n n$4=*&v:int [line 65]\n *&return:int =(1 / n$4) [line 65]\n REMOVE_TEMPS(n$4); [line 65]\n NULLIFY(&v); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 59 -> 53 ; @@ -32,7 +32,7 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: Exit branch_div1 \n NULLIFY(&x,false); [line 68]\n " color=yellow style=filled] +53 [label="53: Exit branch_div1 \n NULLIFY(&x); [line 68]\n " color=yellow style=filled] 52 [label="52: Start branch_div1\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 61]\n " color=yellow style=filled] @@ -47,7 +47,7 @@ digraph iCFG { 50 -> 49 ; -49 [label="49: Return Stmt \n n$4=*&v:int [line 56]\n *&return:int =(1 / n$4) [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n NULLIFY(&v,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] +49 [label="49: Return Stmt \n n$4=*&v:int [line 56]\n *&return:int =(1 / n$4) [line 56]\n REMOVE_TEMPS(n$4); [line 56]\n NULLIFY(&v); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] 49 -> 43 ; @@ -72,7 +72,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Exit branch_no_div \n NULLIFY(&x,false); [line 59]\n " color=yellow style=filled] +43 [label="43: Exit branch_no_div \n NULLIFY(&x); [line 59]\n " color=yellow style=filled] 42 [label="42: Start branch_no_div\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 52]\n " color=yellow style=filled] @@ -95,7 +95,7 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Return Stmt \n n$10=*&v:int [line 47]\n *&return:int =(1 / n$10) [line 47]\n REMOVE_TEMPS(n$10); [line 47]\n NULLIFY(&v,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +37 [label="37: Return Stmt \n n$10=*&v:int [line 47]\n *&return:int =(1 / n$10) [line 47]\n REMOVE_TEMPS(n$10); [line 47]\n NULLIFY(&v); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] 37 -> 31 ; @@ -120,7 +120,7 @@ digraph iCFG { 32 -> 31 ; -31 [label="31: Exit y_branch_div0 \n NULLIFY(&y,false); [line 50]\n NULLIFY(&__temp_construct_n$5,false); [line 50]\n NULLIFY(&__temp_construct_n$11,false); [line 50]\n NULLIFY(&__temp_construct_n$0,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$6,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$12,false); [line 50]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 50]\n " color=yellow style=filled] +31 [label="31: Exit y_branch_div0 \n NULLIFY(&y); [line 50]\n NULLIFY(&__temp_construct_n$5); [line 50]\n NULLIFY(&__temp_construct_n$11); [line 50]\n NULLIFY(&__temp_construct_n$0); [line 50]\n NULLIFY(&SIL_materialize_temp__n$6); [line 50]\n NULLIFY(&SIL_materialize_temp__n$12); [line 50]\n NULLIFY(&SIL_materialize_temp__n$1); [line 50]\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] @@ -135,7 +135,7 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Return Stmt \n n$4=*&v:int [line 36]\n *&return:int =(1 / n$4) [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&v,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +27 [label="27: Return Stmt \n n$4=*&v:int [line 36]\n *&return:int =(1 / n$4) [line 36]\n REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&v); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 27 -> 21 ; @@ -160,7 +160,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Exit branch_div0 \n NULLIFY(&x,false); [line 39]\n " color=yellow style=filled] +21 [label="21: Exit branch_div0 \n NULLIFY(&x); [line 39]\n " color=yellow style=filled] 20 [label="20: Start branch_div0\nFormals: \nLocals: v:int x:class X \n DECLARE_LOCALS(&return,&v,&x); [line 32]\n " color=yellow style=filled] @@ -174,11 +174,11 @@ 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 REMOVE_TEMPS(n$0,n$2,n$3,n$4,n$5); [line 27]\n NULLIFY(&__return_param,false); [line 27]\n NULLIFY(&this,false); [line 27]\n APPLY_ABSTRACTION; [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(&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 REMOVE_TEMPS(n$0,n$2,n$3,n$4,n$5); [line 27]\n NULLIFY(&__return_param); [line 27]\n NULLIFY(&this); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 17 -> 16 ; -16 [label="16: Exit Y_operator X \n NULLIFY(&SIL_materialize_temp__n$1,false); [line 27]\n " color=yellow style=filled] +16 [label="16: Exit Y_operator X \n NULLIFY(&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: SIL_materialize_temp__n$1:class X \n DECLARE_LOCALS(&return,&SIL_materialize_temp__n$1); [line 27]\n " color=yellow style=filled] @@ -189,7 +189,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 21]\n n$1=*&x:class X & [line 21]\n n$2=*n$1.b_:_Bool [line 21]\n *n$0.b_:_Bool =n$2 [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n NULLIFY(&this,false); [line 21]\n NULLIFY(&x,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +13 [label="13: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 21]\n n$1=*&x:class X & [line 21]\n n$2=*n$1.b_:_Bool [line 21]\n *n$0.b_:_Bool =n$2 [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n NULLIFY(&this); [line 21]\n NULLIFY(&x); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 13 -> 12 ; @@ -200,11 +200,11 @@ digraph iCFG { 11 -> 14 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&this:class X * [line 16]\n n$3=*&f:int [line 16]\n *n$2.f_:int =n$3 [line 16]\n REMOVE_TEMPS(n$2,n$3); [line 16]\n NULLIFY(&f,false); [line 16]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$2=*&this:class X * [line 16]\n n$3=*&f:int [line 16]\n *n$2.f_:int =n$3 [line 16]\n REMOVE_TEMPS(n$2,n$3); [line 16]\n NULLIFY(&f); [line 16]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 17]\n n$1=*&b:_Bool [line 17]\n *n$0.b_:_Bool =n$1 [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&b,false); [line 17]\n NULLIFY(&this,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 17]\n n$1=*&b:_Bool [line 17]\n *n$0.b_:_Bool =n$1 [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&b); [line 17]\n NULLIFY(&this); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 9 -> 8 ; @@ -215,7 +215,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.b_:_Bool [line 12]\n *&return:_Bool =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.b_:_Bool [line 12]\n *&return:_Bool =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 6 -> 5 ; @@ -226,7 +226,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&this:class X * [line 11]\n n$1=*n$0.f_:int [line 11]\n *&return:int =n$1 [line 11]\n REMOVE_TEMPS(n$0,n$1); [line 11]\n NULLIFY(&this,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&this:class X * [line 11]\n n$1=*n$0.f_:int [line 11]\n *&return:int =n$1 [line 11]\n REMOVE_TEMPS(n$0,n$1); [line 11]\n NULLIFY(&this); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot index a28583c9c..18a20b437 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/default_parameters.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Call _fun_A_fun_default \n n$0=*&a_ptr:class A * [line 20]\n n$1=*n$0:class A [line 20]\n n$2=_fun_A_fun_default(n$0:class A *,1:int ,10:int ,20:int ) [line 20]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 20]\n NULLIFY(&a_ptr,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +6 [label="6: Call _fun_A_fun_default \n n$0=*&a_ptr:class A * [line 20]\n n$1=*n$0:class A [line 20]\n n$2=_fun_A_fun_default(n$0:class A *,1:int ,10:int ,20:int ) [line 20]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 20]\n NULLIFY(&a_ptr); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 6 -> 5 ; @@ -18,7 +18,7 @@ digraph iCFG { 4 -> 8 ; -3 [label="3: Return Stmt \n n$0=*&a:int [line 13]\n n$1=*&b:int [line 13]\n n$2=*&c:int [line 13]\n *&return:int =((n$0 + n$1) + n$2) [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&a,false); [line 13]\n NULLIFY(&b,false); [line 13]\n NULLIFY(&c,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:int [line 13]\n n$1=*&b:int [line 13]\n n$2=*&c:int [line 13]\n *&return:int =((n$0 + n$1) + n$2) [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&a); [line 13]\n NULLIFY(&b); [line 13]\n NULLIFY(&c); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot index 1bbbac217..d40bc99d4 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/dereference_this.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -10 [label="10: Call _fun_A_method \n n$0=*&a_ptr:class A * [line 25]\n n$1=*n$0:class A [line 25]\n n$2=_fun_A_method(n$0:class A *) [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&a_ptr,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +10 [label="10: Call _fun_A_method \n n$0=*&a_ptr:class A * [line 25]\n n$1=*n$0:class A [line 25]\n n$2=_fun_A_method(n$0:class A *) [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&a_ptr); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 10 -> 9 ; @@ -14,7 +14,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&this:class A * [line 20]\n n$1=*n$0.field:int [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&this,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&this:class A * [line 20]\n n$1=*n$0.field:int [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&this); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 6 -> 5 ; @@ -25,7 +25,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class A * [line 14]\n n$1=*&val:int [line 14]\n *n$0.field:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&this,false); [line 14]\n NULLIFY(&val,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class A * [line 14]\n n$1=*&val:int [line 14]\n *n$0.field:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&this); [line 14]\n NULLIFY(&val); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot index 0971fcb05..aaf9d6fd6 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/inline_method.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 11 -> 10 ; -10 [label="10: Call _fun_A::AIn_fun \n n$0=*&a_ptr:class A * [line 25]\n n$1=*n$0.in:class A::AIn * [line 25]\n n$2=*n$1:class A::AIn [line 25]\n n$3=_fun_A::AIn_fun(n$1:class A::AIn *) [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 25]\n NULLIFY(&a_ptr,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +10 [label="10: Call _fun_A::AIn_fun \n n$0=*&a_ptr:class A * [line 25]\n n$1=*n$0.in:class A::AIn * [line 25]\n n$2=*n$1:class A::AIn [line 25]\n n$3=_fun_A::AIn_fun(n$1:class A::AIn *) [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 25]\n NULLIFY(&a_ptr); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 10 -> 9 ; @@ -18,7 +18,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&c:int [line 18]\n *&return:int =(n$0 + 1) [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&c,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&c:int [line 18]\n *&return:int =(n$0 + 1) [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&c); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot index cd7057a24..c64346cef 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/overloading.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Call _fun_A_fun \n n$0=*&a_ptr:class A * [line 23]\n n$1=*n$0:class A [line 23]\n n$2=_fun_A_fun(n$0:class A *,1:int ,2:int ,3:int ) [line 23]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 23]\n NULLIFY(&a_ptr,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +9 [label="9: Call _fun_A_fun \n n$0=*&a_ptr:class A * [line 23]\n n$1=*n$0:class A [line 23]\n n$2=_fun_A_fun(n$0:class A *,1:int ,2:int ,3:int ) [line 23]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 23]\n NULLIFY(&a_ptr); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 9 -> 8 ; @@ -14,7 +14,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: Return Stmt \n n$0=*&a:int [line 17]\n n$1=*&b:int [line 17]\n *&return:int =(n$0 - n$1) [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&a,false); [line 17]\n NULLIFY(&b,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&a:int [line 17]\n n$1=*&b:int [line 17]\n *&return:int =(n$0 - n$1) [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&a); [line 17]\n NULLIFY(&b); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; @@ -25,7 +25,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&a:int [line 15]\n n$1=*&b:int [line 15]\n n$2=*&c:int [line 15]\n *&return:int =((n$0 + n$1) + n$2) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 15]\n NULLIFY(&a,false); [line 15]\n NULLIFY(&b,false); [line 15]\n NULLIFY(&c,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:int [line 15]\n n$1=*&b:int [line 15]\n n$2=*&c:int [line 15]\n *&return:int =((n$0 + n$1) + n$2) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 15]\n NULLIFY(&a); [line 15]\n NULLIFY(&b); [line 15]\n NULLIFY(&c); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; 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 57d5adf8d..108283f00 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/return_struct.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -13 [label="13: DeclStmt \n n$2=*&a:class A * [line 22]\n n$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 REMOVE_TEMPS(n$2,n$3); [line 22]\n NULLIFY(&a,false); [line 22]\n " shape="box"] +13 [label="13: DeclStmt \n n$2=*&a:class A * [line 22]\n n$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 REMOVE_TEMPS(n$2,n$3); [line 22]\n NULLIFY(&a); [line 22]\n " shape="box"] 13 -> 12 ; @@ -7,7 +7,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: Exit test \n NULLIFY(&x,false); [line 24]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 24]\n " color=yellow style=filled] +11 [label="11: Exit test \n NULLIFY(&x); [line 24]\n NULLIFY(&SIL_materialize_temp__n$1); [line 24]\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] @@ -18,18 +18,18 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: Return Stmt \n n$0=*&__return_param:class X * [line 17]\n _fun_X_X(n$0:class X *,&x:class X &) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&__return_param,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +8 [label="8: Return Stmt \n n$0=*&__return_param:class X * [line 17]\n _fun_X_X(n$0:class X *,&x:class X &) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&__return_param); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit A_get \n NULLIFY(&x,false); [line 18]\n " color=yellow style=filled] +7 [label="7: Exit A_get \n NULLIFY(&x); [line 18]\n " color=yellow style=filled] 6 [label="6: Start A_get\nFormals: this:class A * p:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 15]\n " color=yellow style=filled] 6 -> 9 ; -5 [label="5: Constructor Init \n n$0=*&this:class X * [line 10]\n n$1=*&__param_0:class X & [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0,false); [line 10]\n NULLIFY(&this,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +5 [label="5: Constructor Init \n n$0=*&this:class X * [line 10]\n n$1=*&__param_0:class X & [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0); [line 10]\n NULLIFY(&this); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot index 8abe4432e..c3bf6e8a7 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/static.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -9 [label="9: Call _fun_A_fun \n n$0=*&a:class A * [line 21]\n n$1=_fun_A_fun(0:int ) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&a,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +9 [label="9: Call _fun_A_fun \n n$0=*&a:class A * [line 21]\n n$1=_fun_A_fun(0:int ) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&a); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 9 -> 8 ; @@ -21,7 +21,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&a:int [line 15]\n *&return:int =(1 / n$0) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:int [line 15]\n *&return:int =(1 / n$0) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&a); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot index 8bc267187..1321c41e4 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/methods/virtual_methods.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: Call delete \n n$0=*&trgl:class Polygon * [line 72]\n n$1=*n$0:class Polygon [line 72]\n _fun_Polygon_~Polygon(n$0:class Polygon *) virtual [line 72]\n _fun___delete(n$0:class Polygon *) [line 72]\n REMOVE_TEMPS(n$0,n$1); [line 72]\n NULLIFY(&trgl,false); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] +52 [label="52: Call delete \n n$0=*&trgl:class Polygon * [line 72]\n n$1=*n$0:class Polygon [line 72]\n _fun_Polygon_~Polygon(n$0:class Polygon *) virtual [line 72]\n _fun___delete(n$0:class Polygon *) [line 72]\n REMOVE_TEMPS(n$0,n$1); [line 72]\n NULLIFY(&trgl); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] 52 -> 51 ; @@ -30,11 +30,11 @@ digraph iCFG { 46 -> 45 ; -45 [label="45: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 64]\n n$1=*n$0:class Polygon [line 64]\n n$2=_fun_Polygon_area(n$0:class Polygon *) [line 64]\n *&return:int =(1 / n$2) [line 64]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 64]\n NULLIFY(&ppoly2,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +45 [label="45: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 64]\n n$1=*n$0:class Polygon [line 64]\n n$2=_fun_Polygon_area(n$0:class Polygon *) [line 64]\n *&return:int =(1 / n$2) [line 64]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 64]\n NULLIFY(&ppoly2); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 45 -> 44 ; -44 [label="44: Exit tri_not_virtual_area \n NULLIFY(&trgl,false); [line 65]\n NULLIFY(&poly,false); [line 65]\n " color=yellow style=filled] +44 [label="44: Exit tri_not_virtual_area \n NULLIFY(&trgl); [line 65]\n NULLIFY(&poly); [line 65]\n " color=yellow style=filled] 43 [label="43: Start tri_not_virtual_area\nFormals: \nLocals: ppoly2:class Polygon * poly:class Polygon trgl:class Triangle \n DECLARE_LOCALS(&return,&ppoly2,&poly,&trgl); [line 59]\n " color=yellow style=filled] @@ -49,11 +49,11 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: Return Stmt \n n$0=*&ppoly3:class Polygon * [line 56]\n n$1=*n$0:class Polygon [line 56]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 56]\n *&return:int =(1 / n$2) [line 56]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 56]\n NULLIFY(&ppoly3,false); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] +40 [label="40: Return Stmt \n n$0=*&ppoly3:class Polygon * [line 56]\n n$1=*n$0:class Polygon [line 56]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 56]\n *&return:int =(1 / n$2) [line 56]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 56]\n NULLIFY(&ppoly3); [line 56]\n APPLY_ABSTRACTION; [line 56]\n " shape="box"] 40 -> 39 ; -39 [label="39: Exit poly_area \n NULLIFY(&poly,false); [line 57]\n " color=yellow style=filled] +39 [label="39: Exit poly_area \n NULLIFY(&poly); [line 57]\n " color=yellow style=filled] 38 [label="38: Start poly_area\nFormals: \nLocals: ppoly3:class Polygon * poly:class Polygon \n DECLARE_LOCALS(&return,&ppoly3,&poly); [line 53]\n " color=yellow style=filled] @@ -76,11 +76,11 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 50]\n n$1=*n$0:class Polygon [line 50]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 50]\n *&return:int =(1 / (n$2 - 10)) [line 50]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 50]\n NULLIFY(&ppoly2,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +33 [label="33: Return Stmt \n n$0=*&ppoly2:class Polygon * [line 50]\n n$1=*n$0:class Polygon [line 50]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 50]\n *&return:int =(1 / (n$2 - 10)) [line 50]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 50]\n NULLIFY(&ppoly2); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 33 -> 32 ; -32 [label="32: Exit tri_area \n NULLIFY(&trgl,false); [line 51]\n NULLIFY(&poly,false); [line 51]\n " color=yellow style=filled] +32 [label="32: Exit tri_area \n NULLIFY(&trgl); [line 51]\n NULLIFY(&poly); [line 51]\n " color=yellow style=filled] 31 [label="31: Start tri_area\nFormals: \nLocals: ppoly2:class Polygon * poly:class Polygon trgl:class Triangle \n DECLARE_LOCALS(&return,&ppoly2,&poly,&trgl); [line 45]\n " color=yellow style=filled] @@ -99,18 +99,18 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Return Stmt \n n$0=*&ppoly1:class Polygon * [line 42]\n n$1=*n$0:class Polygon [line 42]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 42]\n *&return:int =(1 / (n$2 - 20)) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&ppoly1,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +27 [label="27: Return Stmt \n n$0=*&ppoly1:class Polygon * [line 42]\n n$1=*n$0:class Polygon [line 42]\n n$2=_fun_Polygon_area(n$0:class Polygon *) virtual [line 42]\n *&return:int =(1 / (n$2 - 20)) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&ppoly1); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 27 -> 26 ; -26 [label="26: Exit rect_area \n NULLIFY(&rect,false); [line 43]\n " color=yellow style=filled] +26 [label="26: Exit rect_area \n NULLIFY(&rect); [line 43]\n " color=yellow style=filled] 25 [label="25: Start rect_area\nFormals: \nLocals: ppoly1:class Polygon * rect:class Rectangle \n DECLARE_LOCALS(&return,&ppoly1,&rect); [line 38]\n " color=yellow style=filled] 25 -> 30 ; -24 [label="24: Constructor Init \n n$0=*&this:class Triangle * [line 29]\n _fun_Polygon_Polygon(n$0:class Triangle *) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&this,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +24 [label="24: Constructor Init \n n$0=*&this:class Triangle * [line 29]\n _fun_Polygon_Polygon(n$0:class Triangle *) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&this); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 24 -> 23 ; @@ -121,11 +121,11 @@ digraph iCFG { 22 -> 24 ; -21 [label="21: DeclStmt \n n$1=*&this:class Triangle * [line 33]\n n$2=*n$1.width:int [line 33]\n n$3=*&this:class Triangle * [line 33]\n n$4=*n$3.height:int [line 33]\n *&x:int =(n$2 * n$4) [line 33]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4); [line 33]\n NULLIFY(&this,false); [line 33]\n " shape="box"] +21 [label="21: DeclStmt \n n$1=*&this:class Triangle * [line 33]\n n$2=*n$1.width:int [line 33]\n n$3=*&this:class Triangle * [line 33]\n n$4=*n$3.height:int [line 33]\n *&x:int =(n$2 * n$4) [line 33]\n REMOVE_TEMPS(n$1,n$2,n$3,n$4); [line 33]\n NULLIFY(&this); [line 33]\n " shape="box"] 21 -> 20 ; -20 [label="20: Return Stmt \n n$0=*&x:int [line 34]\n *&return:int =(n$0 - 10) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&x,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +20 [label="20: Return Stmt \n n$0=*&x:int [line 34]\n *&return:int =(n$0 - 10) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&x); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 20 -> 19 ; @@ -143,7 +143,7 @@ digraph iCFG { 16 -> 17 ; -15 [label="15: Constructor Init \n n$0=*&this:class Rectangle * [line 23]\n _fun_Polygon_Polygon(n$0:class Rectangle *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&this,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +15 [label="15: Constructor Init \n n$0=*&this:class Rectangle * [line 23]\n _fun_Polygon_Polygon(n$0:class Rectangle *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&this); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 15 -> 14 ; @@ -154,7 +154,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: Return Stmt \n n$0=*&this:class Rectangle * [line 26]\n n$1=*n$0.width:int [line 26]\n n$2=*&this:class Rectangle * [line 26]\n n$3=*n$2.height:int [line 26]\n *&return:int =(n$1 * n$3) [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&this,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&this:class Rectangle * [line 26]\n n$1=*n$0.width:int [line 26]\n n$2=*&this:class Rectangle * [line 26]\n n$3=*n$2.height:int [line 26]\n *&return:int =(n$1 * n$3) [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&this); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 12 -> 11 ; @@ -183,11 +183,11 @@ digraph iCFG { 5 -> 7 ; -4 [label="4: BinaryOperatorStmt: Assign \n n$2=*&this:class Polygon * [line 17]\n n$3=*&a:int [line 17]\n *n$2.width:int =n$3 [line 17]\n REMOVE_TEMPS(n$2,n$3); [line 17]\n NULLIFY(&a,false); [line 17]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n n$2=*&this:class Polygon * [line 17]\n n$3=*&a:int [line 17]\n *n$2.width:int =n$3 [line 17]\n REMOVE_TEMPS(n$2,n$3); [line 17]\n NULLIFY(&a); [line 17]\n " shape="box"] 4 -> 3 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Polygon * [line 18]\n n$1=*&b:int [line 18]\n *n$0.height:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&b,false); [line 18]\n NULLIFY(&this,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class Polygon * [line 18]\n n$1=*&b:int [line 18]\n *n$0.height:int =n$1 [line 18]\n REMOVE_TEMPS(n$0,n$1); [line 18]\n NULLIFY(&b); [line 18]\n NULLIFY(&this); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot index f0ecc1e7e..0e9b988f1 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/namespace/namespace.cpp.dot @@ -23,15 +23,15 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$2=_fun_foo::value() [line 55]\n *&i:int =n$2 [line 55]\n REMOVE_TEMPS(n$2); [line 55]\n NULLIFY(&i,false); [line 55]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n n$2=_fun_foo::value() [line 55]\n *&i:int =n$2 [line 55]\n REMOVE_TEMPS(n$2); [line 55]\n NULLIFY(&i); [line 55]\n " shape="box"] 18 -> 17 ; -17 [label="17: BinaryOperatorStmt: Assign \n n$1=_fun_bar::value() [line 56]\n *&i:int =n$1 [line 56]\n REMOVE_TEMPS(n$1); [line 56]\n NULLIFY(&i,false); [line 56]\n " shape="box"] +17 [label="17: BinaryOperatorStmt: Assign \n n$1=_fun_bar::value() [line 56]\n *&i:int =n$1 [line 56]\n REMOVE_TEMPS(n$1); [line 56]\n NULLIFY(&i); [line 56]\n " shape="box"] 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n n$0=*&#GB$bar::pi:double [line 57]\n *&j:double =n$0 [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n NULLIFY(&j,false); [line 57]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n n$0=*&#GB$bar::pi:double [line 57]\n *&j:double =n$0 [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n NULLIFY(&j); [line 57]\n " shape="box"] 16 -> 15 ; @@ -39,7 +39,7 @@ digraph iCFG { 15 -> 14 ; -14 [label="14: Exit main \n NULLIFY(&x,false); [line 59]\n NULLIFY(&rect2,false); [line 59]\n NULLIFY(&rect1,false); [line 59]\n " color=yellow style=filled] +14 [label="14: Exit main \n NULLIFY(&x); [line 59]\n NULLIFY(&rect2); [line 59]\n NULLIFY(&rect1); [line 59]\n " color=yellow style=filled] 13 [label="13: Start main\nFormals: \nLocals: rect2:class foo::Rectangle rect1:class bar::Rectangle x:class foo::my_record j:double i:int \n DECLARE_LOCALS(&return,&rect2,&rect1,&x,&j,&i); [line 41]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot index 28e44470e..15ee5053b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_for.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 20 -> 14 ; -19 [label="19: BinaryOperatorStmt: AddAssign \n n$3=*&x:int [line 20]\n n$4=*&result:int [line 20]\n *&result:int =(n$4 + n$3) [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&x,false); [line 20]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: AddAssign \n n$3=*&x:int [line 20]\n n$4=*&result:int [line 20]\n *&result:int =(n$4 + n$3) [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&x); [line 20]\n " shape="box"] 19 -> 15 ; @@ -12,7 +12,7 @@ digraph iCFG { 18 -> 16 ; 18 -> 17 ; -17 [label="17: Prune (false branch) \n n$1=*&x:int [line 19]\n PRUNE((n$1 == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n NULLIFY(&i,false); [line 19]\n NULLIFY(&result,false); [line 19]\n NULLIFY(&x,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$1=*&x:int [line 19]\n PRUNE((n$1 == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n NULLIFY(&i); [line 19]\n NULLIFY(&result); [line 19]\n NULLIFY(&x); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="invhouse"] 17 -> 12 ; @@ -43,7 +43,7 @@ digraph iCFG { 10 -> 4 ; -9 [label="9: BinaryOperatorStmt: AddAssign \n n$2=*&x:int [line 13]\n n$3=*&result:int [line 13]\n *&result:int =(n$3 + n$2) [line 13]\n REMOVE_TEMPS(n$2,n$3); [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: AddAssign \n n$2=*&x:int [line 13]\n n$3=*&result:int [line 13]\n *&result:int =(n$3 + n$2) [line 13]\n REMOVE_TEMPS(n$2,n$3); [line 13]\n NULLIFY(&x); [line 13]\n " shape="box"] 9 -> 5 ; @@ -52,7 +52,7 @@ digraph iCFG { 8 -> 6 ; 8 -> 7 ; -7 [label="7: Prune (false branch) \n n$1=*&x:int [line 12]\n PRUNE((n$1 == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&i,false); [line 12]\n NULLIFY(&result,false); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n n$1=*&x:int [line 12]\n PRUNE((n$1 == 0), false); [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&i); [line 12]\n NULLIFY(&result); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 7 -> 2 ; 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 1490d886b..e553b7f74 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 @@ -1,5 +1,5 @@ digraph iCFG { -73 [label="73: Return Stmt \n n$1=*&p:int * [line 60]\n n$2=*n$1:int [line 60]\n *&return:int =n$2 [line 60]\n REMOVE_TEMPS(n$1,n$2); [line 60]\n NULLIFY(&p,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] +73 [label="73: Return Stmt \n n$1=*&p:int * [line 60]\n n$2=*n$1:int [line 60]\n *&return:int =n$2 [line 60]\n REMOVE_TEMPS(n$1,n$2); [line 60]\n NULLIFY(&p); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] 73 -> 66 ; @@ -16,7 +16,7 @@ digraph iCFG { 70 -> 73 ; -69 [label="69: Prune (true branch) \n n$0=*&p:int * [line 57]\n PRUNE((n$0 != 0), true); [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n NULLIFY(&p,false); [line 57]\n " shape="invhouse"] +69 [label="69: Prune (true branch) \n n$0=*&p:int * [line 57]\n PRUNE((n$0 != 0), true); [line 57]\n REMOVE_TEMPS(n$0); [line 57]\n NULLIFY(&p); [line 57]\n " shape="invhouse"] 69 -> 72 ; @@ -39,7 +39,7 @@ digraph iCFG { 64 -> 62 ; -63 [label="63: BinaryOperatorStmt: Assign \n n$3=*&a:int & [line 51]\n *n$3:int =0 [line 51]\n REMOVE_TEMPS(n$3); [line 51]\n NULLIFY(&a,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +63 [label="63: BinaryOperatorStmt: Assign \n n$3=*&a:int & [line 51]\n *n$3:int =0 [line 51]\n REMOVE_TEMPS(n$3); [line 51]\n NULLIFY(&a); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 63 -> 59 ; @@ -48,7 +48,7 @@ digraph iCFG { 62 -> 60 ; 62 -> 61 ; -61 [label="61: Prune (false branch) \n n$1=*&a:int & [line 50]\n n$2=*n$1:int [line 50]\n PRUNE((n$2 == 0), false); [line 50]\n REMOVE_TEMPS(n$1,n$2); [line 50]\n NULLIFY(&a,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="invhouse"] +61 [label="61: Prune (false branch) \n n$1=*&a:int & [line 50]\n n$2=*n$1:int [line 50]\n PRUNE((n$2 == 0), false); [line 50]\n REMOVE_TEMPS(n$1,n$2); [line 50]\n NULLIFY(&a); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="invhouse"] 61 -> 59 ; @@ -64,18 +64,18 @@ digraph iCFG { 58 -> 57 ; -57 [label="57: Exit reference_init_div0 \n NULLIFY(&r,false); [line 54]\n " color=yellow style=filled] +57 [label="57: Exit reference_init_div0 \n NULLIFY(&r); [line 54]\n " color=yellow style=filled] 56 [label="56: Start reference_init_div0\nFormals: \nLocals: a:int & r:int \n DECLARE_LOCALS(&return,&a,&r); [line 48]\n " color=yellow style=filled] 56 -> 64 ; -55 [label="55: Return Stmt \n n$3=*&a:int [line 44]\n *&return:int =(1 / (n$3 - 1)) [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&a,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] +55 [label="55: Return Stmt \n n$3=*&a:int [line 44]\n *&return:int =(1 / (n$3 - 1)) [line 44]\n REMOVE_TEMPS(n$3); [line 44]\n NULLIFY(&a); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="box"] 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 REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 43]\n " shape="box"] +54 [label="54: DeclStmt \n n$2=*&SIL_temp_conditional___n$1:int [line 43]\n *&a:int =n$2 [line 43]\n REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&SIL_temp_conditional___n$1); [line 43]\n " shape="box"] 54 -> 47 ; @@ -100,7 +100,7 @@ digraph iCFG { 49 -> 54 ; -48 [label="48: Prune (false branch) \n n$0=*&a:int [line 43]\n PRUNE((n$0 == 0), false); [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&a,false); [line 43]\n " shape="invhouse"] +48 [label="48: Prune (false branch) \n n$0=*&a:int [line 43]\n PRUNE((n$0 == 0), false); [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&a); [line 43]\n " shape="invhouse"] 48 -> 45 ; @@ -124,7 +124,7 @@ digraph iCFG { 43 -> 50 ; 43 -> 51 ; -42 [label="42: Return Stmt \n n$2=*&a:int [line 38]\n *&return:int =(1 / (n$2 - 1)) [line 38]\n REMOVE_TEMPS(n$2); [line 38]\n NULLIFY(&a,false); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] +42 [label="42: Return Stmt \n n$2=*&a:int [line 38]\n *&return:int =(1 / (n$2 - 1)) [line 38]\n REMOVE_TEMPS(n$2); [line 38]\n NULLIFY(&a); [line 38]\n APPLY_ABSTRACTION; [line 38]\n " shape="box"] 42 -> 36 ; @@ -133,7 +133,7 @@ digraph iCFG { 41 -> 39 ; 41 -> 40 ; -40 [label="40: Prune (false branch) \n n$0=*&a:int [line 37]\n PRUNE((n$0 == 0), false); [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&a,false); [line 37]\n " shape="invhouse"] +40 [label="40: Prune (false branch) \n n$0=*&a:int [line 37]\n PRUNE((n$0 == 0), false); [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&a); [line 37]\n " shape="invhouse"] 40 -> 37 ; @@ -167,7 +167,7 @@ digraph iCFG { 32 -> 34 ; -31 [label="31: Return Stmt \n n$2=*&a:int [line 30]\n n$3=*&b:int [line 30]\n *&return:int =(1 / (n$2 + n$3)) [line 30]\n REMOVE_TEMPS(n$2,n$3); [line 30]\n NULLIFY(&a,false); [line 30]\n NULLIFY(&b,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +31 [label="31: Return Stmt \n n$2=*&a:int [line 30]\n n$3=*&b:int [line 30]\n *&return:int =(1 / (n$2 + n$3)) [line 30]\n REMOVE_TEMPS(n$2,n$3); [line 30]\n NULLIFY(&a); [line 30]\n NULLIFY(&b); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 31 -> 19 ; @@ -184,7 +184,7 @@ digraph iCFG { 28 -> 31 ; -27 [label="27: Prune (true branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 != 0), true); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n NULLIFY(&a,false); [line 27]\n NULLIFY(&b,false); [line 27]\n " shape="invhouse"] +27 [label="27: Prune (true branch) \n n$1=*&b:int [line 27]\n PRUNE((n$1 != 0), true); [line 27]\n REMOVE_TEMPS(n$1); [line 27]\n NULLIFY(&a); [line 27]\n NULLIFY(&b); [line 27]\n " shape="invhouse"] 27 -> 30 ; @@ -205,7 +205,7 @@ digraph iCFG { 23 -> 29 ; -22 [label="22: Prune (true branch) \n n$0=*&a:int [line 25]\n PRUNE((n$0 != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&a,false); [line 25]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$0=*&a:int [line 25]\n PRUNE((n$0 != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&a); [line 25]\n " shape="invhouse"] 22 -> 25 ; @@ -224,11 +224,11 @@ digraph iCFG { 18 -> 24 ; -17 [label="17: Return Stmt \n n$2=*&a:int [line 20]\n *&return:int =(1 / n$2) [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&a,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +17 [label="17: Return Stmt \n n$2=*&a:int [line 20]\n *&return:int =(1 / n$2) [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&a); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 17 -> 10 ; -16 [label="16: Return Stmt \n n$1=*&a:int [line 18]\n *&return:int =n$1 [line 18]\n REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&a,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +16 [label="16: Return Stmt \n n$1=*&a:int [line 18]\n *&return:int =n$1 [line 18]\n REMOVE_TEMPS(n$1); [line 18]\n NULLIFY(&a); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 16 -> 10 ; @@ -260,7 +260,7 @@ digraph iCFG { 9 -> 15 ; -8 [label="8: Return Stmt \n n$1=*&a:int [line 12]\n *&return:int =(1 / n$1) [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&a,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +8 [label="8: Return Stmt \n n$1=*&a:int [line 12]\n *&return:int =(1 / n$1) [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&a); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 8 -> 2 ; @@ -269,7 +269,7 @@ digraph iCFG { 7 -> 5 ; 7 -> 6 ; -6 [label="6: Prune (false branch) \n n$0=*&a:int [line 11]\n PRUNE((n$0 == 0), false); [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$0=*&a:int [line 11]\n PRUNE((n$0 == 0), false); [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&a); [line 11]\n " shape="invhouse"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot index 133ad28e0..6a9142562 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/nestedoperators/var_decl_inside_switch.cpp.dot @@ -4,7 +4,7 @@ digraph iCFG { 14 -> 11 ; 14 -> 12 ; -13 [label="13: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] +13 [label="13: Prune (true branch) \n PRUNE(((n$0 == 0) != 0), true); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="invhouse"] 13 -> 10 ; @@ -13,7 +13,7 @@ digraph iCFG { 12 -> 8 ; 12 -> 9 ; -11 [label="11: Prune (true branch) \n PRUNE(((n$0 == 1) != 0), true); [line 13]\n NULLIFY(&x,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"] +11 [label="11: Prune (true branch) \n PRUNE(((n$0 == 1) != 0), true); [line 13]\n NULLIFY(&x); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="invhouse"] 11 -> 10 ; @@ -25,7 +25,7 @@ digraph iCFG { 9 -> 5 ; -8 [label="8: Prune (true branch) \n PRUNE(((n$0 == 2) != 0), true); [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="invhouse"] +8 [label="8: Prune (true branch) \n PRUNE(((n$0 == 2) != 0), true); [line 15]\n NULLIFY(&x); [line 15]\n " shape="invhouse"] 8 -> 7 ; @@ -33,7 +33,7 @@ digraph iCFG { 7 -> 2 ; -6 [label="6: Return Stmt \n n$2=*&x:int [line 18]\n *&return:int =n$2 [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&x,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +6 [label="6: Return Stmt \n n$2=*&x:int [line 18]\n *&return:int =n$2 [line 18]\n REMOVE_TEMPS(n$2); [line 18]\n NULLIFY(&x); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 2 ; @@ -41,7 +41,7 @@ digraph iCFG { 5 -> 6 ; -4 [label="4: DeclStmt \n n$1=*&a:int [line 11]\n *&x:int =n$1 [line 11]\n REMOVE_TEMPS(n$1); [line 11]\n NULLIFY(&a,false); [line 11]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&a:int [line 11]\n *&x:int =n$1 [line 11]\n REMOVE_TEMPS(n$1); [line 11]\n NULLIFY(&a); [line 11]\n " shape="box"] 4 -> 3 ; 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 ef7b0f172..fda7a5e6c 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 @@ -7,7 +7,7 @@ digraph iCFG { 27 -> 15 ; -26 [label="26: BinaryOperatorStmt: AddAssign \n n$6=*&a:int [line 24]\n n$7=*&result:int [line 24]\n *&result:int =(n$7 + n$6) [line 24]\n REMOVE_TEMPS(n$6,n$7); [line 24]\n NULLIFY(&a,false); [line 24]\n " shape="box"] +26 [label="26: BinaryOperatorStmt: AddAssign \n n$6=*&a:int [line 24]\n n$7=*&result:int [line 24]\n *&result:int =(n$7 + n$6) [line 24]\n REMOVE_TEMPS(n$6,n$7); [line 24]\n NULLIFY(&a); [line 24]\n " shape="box"] 26 -> 25 ; @@ -15,7 +15,7 @@ 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 REMOVE_TEMPS(n$4); [line 23]\n NULLIFY(&SIL_temp_conditional___n$1,false); [line 23]\n " shape="box"] +24 [label="24: DeclStmt \n n$4=*&SIL_temp_conditional___n$1:int [line 23]\n *&a:int =n$4 [line 23]\n REMOVE_TEMPS(n$4); [line 23]\n NULLIFY(&SIL_temp_conditional___n$1); [line 23]\n " shape="box"] 24 -> 16 ; @@ -45,7 +45,7 @@ digraph iCFG { 18 -> 24 ; -17 [label="17: Prune (false branch) \n n$0=*&a:int [line 23]\n PRUNE((n$0 == 0), false); [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n NULLIFY(&result,false); [line 23]\n NULLIFY(&x,false); [line 23]\n " shape="invhouse"] +17 [label="17: Prune (false branch) \n n$0=*&a:int [line 23]\n PRUNE((n$0 == 0), false); [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a); [line 23]\n NULLIFY(&result); [line 23]\n NULLIFY(&x); [line 23]\n " shape="invhouse"] 17 -> 14 ; @@ -76,7 +76,7 @@ digraph iCFG { 10 -> 4 ; -9 [label="9: BinaryOperatorStmt: AddAssign \n n$3=*&a:int [line 14]\n n$4=*&result:int [line 14]\n *&result:int =(n$4 + n$3) [line 14]\n REMOVE_TEMPS(n$3,n$4); [line 14]\n NULLIFY(&a,false); [line 14]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: AddAssign \n n$3=*&a:int [line 14]\n n$4=*&result:int [line 14]\n *&result:int =(n$4 + n$3) [line 14]\n REMOVE_TEMPS(n$3,n$4); [line 14]\n NULLIFY(&a); [line 14]\n " shape="box"] 9 -> 8 ; @@ -89,7 +89,7 @@ digraph iCFG { 7 -> 5 ; 7 -> 6 ; -6 [label="6: Prune (false branch) \n n$0=*&a:int [line 13]\n PRUNE((n$0 == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&a,false); [line 13]\n NULLIFY(&result,false); [line 13]\n NULLIFY(&x,false); [line 13]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$0=*&a:int [line 13]\n PRUNE((n$0 == 0), false); [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&a); [line 13]\n NULLIFY(&result); [line 13]\n NULLIFY(&x); [line 13]\n " shape="invhouse"] 6 -> 3 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot index dba532297..4c47b2e87 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/box.cpp.dot @@ -3,15 +3,15 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: DeclStmt \n *&r:int &=&v [line 12]\n NULLIFY(&r,false); [line 12]\n " shape="box"] +4 [label="4: DeclStmt \n *&r:int &=&v [line 12]\n NULLIFY(&r); [line 12]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n *&p:int *=&v [line 13]\n NULLIFY(&p,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n *&p:int *=&v [line 13]\n NULLIFY(&p); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit test \n NULLIFY(&v,false); [line 14]\n " color=yellow style=filled] +2 [label="2: Exit test \n NULLIFY(&v); [line 14]\n " color=yellow style=filled] 1 [label="1: Start test\nFormals: \nLocals: p:int * r:int & v:int \n DECLARE_LOCALS(&return,&p,&r,&v); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot index 9c863393a..aaf297253 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/increment.cpp.dot @@ -7,15 +7,15 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: DeclStmt \n n$2=*&vr:int & [line 19]\n n$3=*n$2:int [line 19]\n *n$2:int =(n$3 + 1) [line 19]\n *&r:int &=n$2 [line 19]\n REMOVE_TEMPS(n$2,n$3); [line 19]\n NULLIFY(&r,false); [line 19]\n " shape="box"] +9 [label="9: DeclStmt \n n$2=*&vr:int & [line 19]\n n$3=*n$2:int [line 19]\n *n$2:int =(n$3 + 1) [line 19]\n *&r:int &=n$2 [line 19]\n REMOVE_TEMPS(n$2,n$3); [line 19]\n NULLIFY(&r); [line 19]\n " shape="box"] 9 -> 8 ; -8 [label="8: DeclStmt \n n$0=*&vr:int & [line 20]\n n$1=*n$0:int [line 20]\n *n$0:int =(n$1 - 1) [line 20]\n *&q:int &=n$0 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&q,false); [line 20]\n NULLIFY(&vr,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +8 [label="8: DeclStmt \n n$0=*&vr:int & [line 20]\n n$1=*n$0:int [line 20]\n *n$0:int =(n$1 - 1) [line 20]\n *&q:int &=n$0 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&q); [line 20]\n NULLIFY(&vr); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit using_ref \n NULLIFY(&v,false); [line 21]\n " color=yellow style=filled] +7 [label="7: Exit using_ref \n NULLIFY(&v); [line 21]\n " color=yellow style=filled] 6 [label="6: Start using_ref\nFormals: \nLocals: q:int & r:int & vr:int & v:int \n DECLARE_LOCALS(&return,&q,&r,&vr,&v); [line 16]\n " color=yellow style=filled] @@ -26,15 +26,15 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: DeclStmt \n n$1=*&v:int [line 12]\n *&v:int =(n$1 + 1) [line 12]\n *&r:int &=&v [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&r,false); [line 12]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&v:int [line 12]\n *&v:int =(n$1 + 1) [line 12]\n *&r:int &=&v [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&r); [line 12]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&v:int [line 13]\n *&v:int =(n$0 - 1) [line 13]\n *&q:int &=&v [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&q,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&v:int [line 13]\n *&v:int =(n$0 - 1) [line 13]\n *&q:int &=&v [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&q); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit using_value \n NULLIFY(&v,false); [line 14]\n " color=yellow style=filled] +2 [label="2: Exit using_value \n NULLIFY(&v); [line 14]\n " color=yellow style=filled] 1 [label="1: Start using_value\nFormals: \nLocals: q:int & r:int & v:int \n DECLARE_LOCALS(&return,&q,&r,&v); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot index 438a47736..dcbf606ec 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/init.cpp.dot @@ -1,13 +1,13 @@ digraph iCFG { -15 [label="15: DeclStmt \n n$2=*&par:int * [line 23]\n n$3=*n$2:int [line 23]\n *&v:int =n$3 [line 23]\n REMOVE_TEMPS(n$2,n$3); [line 23]\n NULLIFY(&v,false); [line 23]\n " shape="box"] +15 [label="15: DeclStmt \n n$2=*&par:int * [line 23]\n n$3=*n$2:int [line 23]\n *&v:int =n$3 [line 23]\n REMOVE_TEMPS(n$2,n$3); [line 23]\n NULLIFY(&v); [line 23]\n " shape="box"] 15 -> 14 ; -14 [label="14: DeclStmt \n n$1=*&par:int * [line 24]\n *&d:int &=n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&d,false); [line 24]\n " shape="box"] +14 [label="14: DeclStmt \n n$1=*&par:int * [line 24]\n *&d:int &=n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&d); [line 24]\n " shape="box"] 14 -> 13 ; -13 [label="13: DeclStmt \n n$0=*&par:int * [line 25]\n *&p:int *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&p,false); [line 25]\n NULLIFY(&par,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +13 [label="13: DeclStmt \n n$0=*&par:int * [line 25]\n *&p:int *=n$0 [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&p); [line 25]\n NULLIFY(&par); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 13 -> 12 ; @@ -18,34 +18,34 @@ digraph iCFG { 11 -> 15 ; -10 [label="10: DeclStmt \n n$0=*&par:int [line 17]\n *&v:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&v,false); [line 17]\n " shape="box"] +10 [label="10: DeclStmt \n n$0=*&par:int [line 17]\n *&v:int =n$0 [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&v); [line 17]\n " shape="box"] 10 -> 9 ; -9 [label="9: DeclStmt \n *&d:int &=&par [line 18]\n NULLIFY(&d,false); [line 18]\n " shape="box"] +9 [label="9: DeclStmt \n *&d:int &=&par [line 18]\n NULLIFY(&d); [line 18]\n " shape="box"] 9 -> 8 ; -8 [label="8: DeclStmt \n *&p:int *=&par [line 19]\n NULLIFY(&p,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +8 [label="8: DeclStmt \n *&p:int *=&par [line 19]\n NULLIFY(&p); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit init_from_val \n NULLIFY(&par,false); [line 20]\n " color=yellow style=filled] +7 [label="7: Exit init_from_val \n NULLIFY(&par); [line 20]\n " color=yellow style=filled] 6 [label="6: Start init_from_val\nFormals: par:int \nLocals: p:int * d:int & v:int \n DECLARE_LOCALS(&return,&p,&d,&v); [line 16]\n " color=yellow style=filled] 6 -> 10 ; -5 [label="5: DeclStmt \n n$2=*&par:int & [line 11]\n n$3=*n$2:int [line 11]\n *&v:int =n$3 [line 11]\n REMOVE_TEMPS(n$2,n$3); [line 11]\n NULLIFY(&v,false); [line 11]\n " shape="box"] +5 [label="5: DeclStmt \n n$2=*&par:int & [line 11]\n n$3=*n$2:int [line 11]\n *&v:int =n$3 [line 11]\n REMOVE_TEMPS(n$2,n$3); [line 11]\n NULLIFY(&v); [line 11]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n n$1=*&par:int & [line 12]\n *&d:int &=n$1 [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&d,false); [line 12]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&par:int & [line 12]\n *&d:int &=n$1 [line 12]\n REMOVE_TEMPS(n$1); [line 12]\n NULLIFY(&d); [line 12]\n " shape="box"] 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&par:int & [line 13]\n *&p:int *=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&p,false); [line 13]\n NULLIFY(&par,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&par:int & [line 13]\n *&p:int *=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&p); [line 13]\n NULLIFY(&par); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot index 784399635..17ef00f81 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/member_access.cpp.dot @@ -1,9 +1,9 @@ digraph iCFG { -11 [label="11: DeclStmt \n n$3=*&x:class X * [line 21]\n n$4=*n$3.f:int [line 21]\n *&f:int =n$4 [line 21]\n REMOVE_TEMPS(n$3,n$4); [line 21]\n NULLIFY(&f,false); [line 21]\n " shape="box"] +11 [label="11: DeclStmt \n n$3=*&x:class X * [line 21]\n n$4=*n$3.f:int [line 21]\n *&f:int =n$4 [line 21]\n REMOVE_TEMPS(n$3,n$4); [line 21]\n NULLIFY(&f); [line 21]\n " shape="box"] 11 -> 10 ; -10 [label="10: DeclStmt \n n$0=*&x:class X * [line 22]\n n$1=*n$0:class X [line 22]\n n$2=_fun_X_call(n$0:class X *) [line 22]\n *&c:int =n$2 [line 22]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 22]\n NULLIFY(&c,false); [line 22]\n NULLIFY(&x,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +10 [label="10: DeclStmt \n n$0=*&x:class X * [line 22]\n n$1=*n$0:class X [line 22]\n n$2=_fun_X_call(n$0:class X *) [line 22]\n *&c:int =n$2 [line 22]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 22]\n NULLIFY(&c); [line 22]\n NULLIFY(&x); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 10 -> 9 ; @@ -14,11 +14,11 @@ digraph iCFG { 8 -> 11 ; -7 [label="7: DeclStmt \n n$3=*&x:class X & [line 16]\n n$4=*n$3.f:int [line 16]\n *&f:int =n$4 [line 16]\n REMOVE_TEMPS(n$3,n$4); [line 16]\n NULLIFY(&f,false); [line 16]\n " shape="box"] +7 [label="7: DeclStmt \n n$3=*&x:class X & [line 16]\n n$4=*n$3.f:int [line 16]\n *&f:int =n$4 [line 16]\n REMOVE_TEMPS(n$3,n$4); [line 16]\n NULLIFY(&f); [line 16]\n " shape="box"] 7 -> 6 ; -6 [label="6: DeclStmt \n n$0=*&x:class X & [line 17]\n n$1=*n$0:class X [line 17]\n n$2=_fun_X_call(n$0:class X &) [line 17]\n *&c:int =n$2 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 17]\n NULLIFY(&c,false); [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +6 [label="6: DeclStmt \n n$0=*&x:class X & [line 17]\n n$1=*n$0:class X [line 17]\n n$2=_fun_X_call(n$0:class X &) [line 17]\n *&c:int =n$2 [line 17]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 17]\n NULLIFY(&c); [line 17]\n NULLIFY(&x); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 6 -> 5 ; @@ -29,7 +29,7 @@ digraph iCFG { 4 -> 7 ; -3 [label="3: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.f:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.f:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot index c64e44a56..07518c2d3 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/member_access_from_return.cpp.dot @@ -1,9 +1,9 @@ digraph iCFG { -19 [label="19: DeclStmt \n n$3=_fun_get_ptr() [line 25]\n n$4=*n$3.f:int [line 25]\n *&f:int =n$4 [line 25]\n REMOVE_TEMPS(n$3,n$4); [line 25]\n NULLIFY(&f,false); [line 25]\n " shape="box"] +19 [label="19: DeclStmt \n n$3=_fun_get_ptr() [line 25]\n n$4=*n$3.f:int [line 25]\n *&f:int =n$4 [line 25]\n REMOVE_TEMPS(n$3,n$4); [line 25]\n NULLIFY(&f); [line 25]\n " shape="box"] 19 -> 18 ; -18 [label="18: DeclStmt \n n$0=_fun_get_ptr() [line 26]\n n$1=*n$0:class X [line 26]\n n$2=_fun_X_call(n$0:class X *) [line 26]\n *&c:int =n$2 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n NULLIFY(&c,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +18 [label="18: DeclStmt \n n$0=_fun_get_ptr() [line 26]\n n$1=*n$0:class X [line 26]\n n$2=_fun_X_call(n$0:class X *) [line 26]\n *&c:int =n$2 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n NULLIFY(&c); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 18 -> 17 ; @@ -14,11 +14,11 @@ digraph iCFG { 16 -> 19 ; -15 [label="15: DeclStmt \n n$3=_fun_get_ref() [line 20]\n n$4=*n$3.f:int [line 20]\n *&f:int =n$4 [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&f,false); [line 20]\n " shape="box"] +15 [label="15: DeclStmt \n n$3=_fun_get_ref() [line 20]\n n$4=*n$3.f:int [line 20]\n *&f:int =n$4 [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&f); [line 20]\n " shape="box"] 15 -> 14 ; -14 [label="14: DeclStmt \n n$0=_fun_get_ref() [line 21]\n n$1=*n$0:class X [line 21]\n n$2=_fun_X_call(n$0:class X &) [line 21]\n *&c:int =n$2 [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n NULLIFY(&c,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +14 [label="14: DeclStmt \n n$0=_fun_get_ref() [line 21]\n n$1=*n$0:class X [line 21]\n n$2=_fun_X_call(n$0:class X &) [line 21]\n *&c:int =n$2 [line 21]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 21]\n NULLIFY(&c); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 14 -> 13 ; @@ -58,7 +58,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.f:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&this:class X * [line 12]\n n$1=*n$0.f:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot index c3b1f7aff..e0a16b685 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/nested_assignment.cpp.dot @@ -3,19 +3,19 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: DeclStmt \n n$3=*&a:int [line 24]\n *&b:int =n$3 [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b,false); [line 24]\n " shape="box"] +15 [label="15: DeclStmt \n n$3=*&a:int [line 24]\n *&b:int =n$3 [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b); [line 24]\n " shape="box"] 15 -> 14 ; -14 [label="14: DeclStmt \n *&b:int =4 [line 28]\n n$2=*&b:int [line 28]\n *&a:int =n$2 [line 28]\n *&ref_from_val:int &=&a [line 28]\n REMOVE_TEMPS(n$2); [line 28]\n NULLIFY(&b,false); [line 28]\n " shape="box"] +14 [label="14: DeclStmt \n *&b:int =4 [line 28]\n n$2=*&b:int [line 28]\n *&a:int =n$2 [line 28]\n *&ref_from_val:int &=&a [line 28]\n REMOVE_TEMPS(n$2); [line 28]\n NULLIFY(&b); [line 28]\n " shape="box"] 14 -> 13 ; -13 [label="13: DeclStmt \n n$0=*&ref_from_val:int & [line 29]\n *&b:int =5 [line 29]\n n$1=*&b:int [line 29]\n *n$0:int =n$1 [line 29]\n *&ref_from_ref:int &=n$0 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&b,false); [line 29]\n NULLIFY(&ref_from_ref,false); [line 29]\n NULLIFY(&ref_from_val,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +13 [label="13: DeclStmt \n n$0=*&ref_from_val:int & [line 29]\n *&b:int =5 [line 29]\n n$1=*&b:int [line 29]\n *n$0:int =n$1 [line 29]\n *&ref_from_ref:int &=n$0 [line 29]\n REMOVE_TEMPS(n$0,n$1); [line 29]\n NULLIFY(&b); [line 29]\n NULLIFY(&ref_from_ref); [line 29]\n NULLIFY(&ref_from_val); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 13 -> 12 ; -12 [label="12: Exit crazy_nested \n NULLIFY(&a,false); [line 30]\n " color=yellow style=filled] +12 [label="12: Exit crazy_nested \n NULLIFY(&a); [line 30]\n " color=yellow style=filled] 11 [label="11: Start crazy_nested\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & b:int a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&b,&a); [line 22]\n " color=yellow style=filled] @@ -30,11 +30,11 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: DeclStmt \n n$0=*&ref_from_val:int & [line 19]\n *n$0:int =6 [line 19]\n *&ref_from_ref:int &=n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&ref_from_ref,false); [line 19]\n NULLIFY(&ref_from_val,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +8 [label="8: DeclStmt \n n$0=*&ref_from_val:int & [line 19]\n *n$0:int =6 [line 19]\n *&ref_from_ref:int &=n$0 [line 19]\n REMOVE_TEMPS(n$0); [line 19]\n NULLIFY(&ref_from_ref); [line 19]\n NULLIFY(&ref_from_val); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 8 -> 7 ; -7 [label="7: Exit nested \n NULLIFY(&a,false); [line 20]\n " color=yellow style=filled] +7 [label="7: Exit nested \n NULLIFY(&a); [line 20]\n " color=yellow style=filled] 6 [label="6: Start nested\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&a); [line 16]\n " color=yellow style=filled] @@ -49,11 +49,11 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&ref_from_val:int & [line 13]\n *&ref_from_ref:int &=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&ref_from_ref,false); [line 13]\n NULLIFY(&ref_from_val,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&ref_from_val:int & [line 13]\n *&ref_from_ref:int &=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&ref_from_ref); [line 13]\n NULLIFY(&ref_from_val); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; -2 [label="2: Exit normal \n NULLIFY(&a,false); [line 14]\n " color=yellow style=filled] +2 [label="2: Exit normal \n NULLIFY(&a); [line 14]\n " color=yellow style=filled] 1 [label="1: Start normal\nFormals: \nLocals: ref_from_ref:int & ref_from_val:int & a:int \n DECLARE_LOCALS(&return,&ref_from_ref,&ref_from_val,&a); [line 10]\n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot index d9cc868dc..6e8a730b2 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_field.cpp.dot @@ -19,7 +19,7 @@ digraph iCFG { 115 -> 114 ; -114 [label="114: Exit val_getI_div0 \n NULLIFY(&x,false); [line 142]\n NULLIFY(&r,false); [line 142]\n " color=yellow style=filled] +114 [label="114: Exit val_getI_div0 \n NULLIFY(&x); [line 142]\n NULLIFY(&r); [line 142]\n " color=yellow style=filled] 113 [label="113: Start val_getI_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 136]\n " color=yellow style=filled] @@ -46,7 +46,7 @@ digraph iCFG { 108 -> 107 ; -107 [label="107: Exit val_getF_div0 \n NULLIFY(&x,false); [line 134]\n NULLIFY(&r,false); [line 134]\n " color=yellow style=filled] +107 [label="107: Exit val_getF_div0 \n NULLIFY(&x); [line 134]\n NULLIFY(&r); [line 134]\n " color=yellow style=filled] 106 [label="106: Start val_getF_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 128]\n " color=yellow style=filled] @@ -73,7 +73,7 @@ digraph iCFG { 101 -> 100 ; -100 [label="100: Exit val_I_div0 \n NULLIFY(&x,false); [line 126]\n NULLIFY(&r,false); [line 126]\n " color=yellow style=filled] +100 [label="100: Exit val_I_div0 \n NULLIFY(&x); [line 126]\n NULLIFY(&r); [line 126]\n " color=yellow style=filled] 99 [label="99: Start val_I_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 120]\n " color=yellow style=filled] @@ -100,7 +100,7 @@ digraph iCFG { 94 -> 93 ; -93 [label="93: Exit val_F_div0 \n NULLIFY(&x,false); [line 118]\n NULLIFY(&r,false); [line 118]\n " color=yellow style=filled] +93 [label="93: Exit val_F_div0 \n NULLIFY(&x); [line 118]\n NULLIFY(&r); [line 118]\n " color=yellow style=filled] 92 [label="92: Start val_F_div0\nFormals: \nLocals: r:class Val x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 112]\n " color=yellow style=filled] @@ -127,7 +127,7 @@ digraph iCFG { 87 -> 86 ; -86 [label="86: Exit ptr_getI_div0 \n NULLIFY(&x,false); [line 109]\n NULLIFY(&r,false); [line 109]\n " color=yellow style=filled] +86 [label="86: Exit ptr_getI_div0 \n NULLIFY(&x); [line 109]\n NULLIFY(&r); [line 109]\n " color=yellow style=filled] 85 [label="85: Start ptr_getI_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 103]\n " color=yellow style=filled] @@ -154,7 +154,7 @@ digraph iCFG { 80 -> 79 ; -79 [label="79: Exit ptr_getF_div0 \n NULLIFY(&x,false); [line 101]\n NULLIFY(&r,false); [line 101]\n " color=yellow style=filled] +79 [label="79: Exit ptr_getF_div0 \n NULLIFY(&x); [line 101]\n NULLIFY(&r); [line 101]\n " color=yellow style=filled] 78 [label="78: Start ptr_getF_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 95]\n " color=yellow style=filled] @@ -181,7 +181,7 @@ digraph iCFG { 73 -> 72 ; -72 [label="72: Exit ptr_I_div0 \n NULLIFY(&x,false); [line 93]\n NULLIFY(&r,false); [line 93]\n " color=yellow style=filled] +72 [label="72: Exit ptr_I_div0 \n NULLIFY(&x); [line 93]\n NULLIFY(&r); [line 93]\n " color=yellow style=filled] 71 [label="71: Start ptr_I_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 87]\n " color=yellow style=filled] @@ -208,7 +208,7 @@ digraph iCFG { 66 -> 65 ; -65 [label="65: Exit ptr_F_div0 \n NULLIFY(&x,false); [line 85]\n NULLIFY(&r,false); [line 85]\n " color=yellow style=filled] +65 [label="65: Exit ptr_F_div0 \n NULLIFY(&x); [line 85]\n NULLIFY(&r); [line 85]\n " color=yellow style=filled] 64 [label="64: Start ptr_F_div0\nFormals: \nLocals: r:class Ptr x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 79]\n " color=yellow style=filled] @@ -235,7 +235,7 @@ digraph iCFG { 59 -> 58 ; -58 [label="58: Exit ref_getI_div0 \n NULLIFY(&x,false); [line 76]\n NULLIFY(&r,false); [line 76]\n " color=yellow style=filled] +58 [label="58: Exit ref_getI_div0 \n NULLIFY(&x); [line 76]\n NULLIFY(&r); [line 76]\n " color=yellow style=filled] 57 [label="57: Start ref_getI_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 70]\n " color=yellow style=filled] @@ -262,7 +262,7 @@ digraph iCFG { 52 -> 51 ; -51 [label="51: Exit ref_getF_div0 \n NULLIFY(&x,false); [line 68]\n NULLIFY(&r,false); [line 68]\n " color=yellow style=filled] +51 [label="51: Exit ref_getF_div0 \n NULLIFY(&x); [line 68]\n NULLIFY(&r); [line 68]\n " color=yellow style=filled] 50 [label="50: Start ref_getF_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 62]\n " color=yellow style=filled] @@ -289,7 +289,7 @@ digraph iCFG { 45 -> 44 ; -44 [label="44: Exit ref_I_div0 \n NULLIFY(&x,false); [line 60]\n NULLIFY(&r,false); [line 60]\n " color=yellow style=filled] +44 [label="44: Exit ref_I_div0 \n NULLIFY(&x); [line 60]\n NULLIFY(&r); [line 60]\n " color=yellow style=filled] 43 [label="43: Start ref_I_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 54]\n " color=yellow style=filled] @@ -316,14 +316,14 @@ digraph iCFG { 38 -> 37 ; -37 [label="37: Exit ref_F_div0 \n NULLIFY(&x,false); [line 52]\n NULLIFY(&r,false); [line 52]\n " color=yellow style=filled] +37 [label="37: Exit ref_F_div0 \n NULLIFY(&x); [line 52]\n NULLIFY(&r); [line 52]\n " color=yellow style=filled] 36 [label="36: Start ref_F_div0\nFormals: \nLocals: r:class Ref x:class X \n DECLARE_LOCALS(&return,&r,&x); [line 46]\n " color=yellow style=filled] 36 -> 42 ; -35 [label="35: Return Stmt \n n$0=*&this:class Val * [line 42]\n n$1=*n$0.i:int [line 42]\n *&return:int =n$1 [line 42]\n REMOVE_TEMPS(n$0,n$1); [line 42]\n NULLIFY(&this,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&this:class Val * [line 42]\n n$1=*n$0.i:int [line 42]\n *&return:int =n$1 [line 42]\n REMOVE_TEMPS(n$0,n$1); [line 42]\n NULLIFY(&this); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 35 -> 34 ; @@ -334,7 +334,7 @@ digraph iCFG { 33 -> 35 ; -32 [label="32: Return Stmt \n n$0=*&this:class Val * [line 41]\n n$1=*n$0.x.f:int [line 41]\n *&return:int =n$1 [line 41]\n REMOVE_TEMPS(n$0,n$1); [line 41]\n NULLIFY(&this,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +32 [label="32: Return Stmt \n n$0=*&this:class Val * [line 41]\n n$1=*n$0.x.f:int [line 41]\n *&return:int =n$1 [line 41]\n REMOVE_TEMPS(n$0,n$1); [line 41]\n NULLIFY(&this); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 32 -> 31 ; @@ -345,11 +345,11 @@ digraph iCFG { 30 -> 32 ; -29 [label="29: Constructor Init \n n$3=*&this:class Val * [line 40]\n n$4=*&r_:class X & [line 40]\n _fun_X_X(n$3.x:class X *,n$4:class X &) [line 40]\n REMOVE_TEMPS(n$3,n$4); [line 40]\n NULLIFY(&r_,false); [line 40]\n " shape="box"] +29 [label="29: Constructor Init \n n$3=*&this:class Val * [line 40]\n n$4=*&r_:class X & [line 40]\n _fun_X_X(n$3.x:class X *,n$4:class X &) [line 40]\n REMOVE_TEMPS(n$3,n$4); [line 40]\n NULLIFY(&r_); [line 40]\n " shape="box"] 29 -> 28 ; -28 [label="28: Constructor Init \n n$0=*&this:class Val * [line 40]\n n$1=*&this:class Val * [line 40]\n n$2=*n$1.x.f:int [line 40]\n *n$0.i:int =n$2 [line 40]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 40]\n NULLIFY(&this,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +28 [label="28: Constructor Init \n n$0=*&this:class Val * [line 40]\n n$1=*&this:class Val * [line 40]\n n$2=*n$1.x.f:int [line 40]\n *n$0.i:int =n$2 [line 40]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 40]\n NULLIFY(&this); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 28 -> 27 ; @@ -360,7 +360,7 @@ digraph iCFG { 26 -> 29 ; -25 [label="25: Return Stmt \n n$0=*&this:class Ptr * [line 34]\n n$1=*n$0.i:int * [line 34]\n n$2=*n$1:int [line 34]\n *&return:int =n$2 [line 34]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 34]\n NULLIFY(&this,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +25 [label="25: Return Stmt \n n$0=*&this:class Ptr * [line 34]\n n$1=*n$0.i:int * [line 34]\n n$2=*n$1:int [line 34]\n *&return:int =n$2 [line 34]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 34]\n NULLIFY(&this); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 25 -> 24 ; @@ -371,7 +371,7 @@ digraph iCFG { 23 -> 25 ; -22 [label="22: Return Stmt \n n$0=*&this:class Ptr * [line 33]\n n$1=*n$0.x:class X * [line 33]\n n$2=*n$1.f:int [line 33]\n *&return:int =n$2 [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 33]\n NULLIFY(&this,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +22 [label="22: Return Stmt \n n$0=*&this:class Ptr * [line 33]\n n$1=*n$0.x:class X * [line 33]\n n$2=*n$1.f:int [line 33]\n *&return:int =n$2 [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 33]\n NULLIFY(&this); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 22 -> 21 ; @@ -382,11 +382,11 @@ digraph iCFG { 20 -> 22 ; -19 [label="19: Constructor Init \n n$3=*&this:class Ptr * [line 32]\n n$4=*&r_:class X & [line 32]\n *n$3.x:class X *=n$4 [line 32]\n REMOVE_TEMPS(n$3,n$4); [line 32]\n NULLIFY(&r_,false); [line 32]\n " shape="box"] +19 [label="19: Constructor Init \n n$3=*&this:class Ptr * [line 32]\n n$4=*&r_:class X & [line 32]\n *n$3.x:class X *=n$4 [line 32]\n REMOVE_TEMPS(n$3,n$4); [line 32]\n NULLIFY(&r_); [line 32]\n " shape="box"] 19 -> 18 ; -18 [label="18: Constructor Init \n n$0=*&this:class Ptr * [line 32]\n n$1=*&this:class Ptr * [line 32]\n n$2=*n$1.x:class X * [line 32]\n *n$0.i:int *=n$2.f [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&this,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +18 [label="18: Constructor Init \n n$0=*&this:class Ptr * [line 32]\n n$1=*&this:class Ptr * [line 32]\n n$2=*n$1.x:class X * [line 32]\n *n$0.i:int *=n$2.f [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&this); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 18 -> 17 ; @@ -397,7 +397,7 @@ digraph iCFG { 16 -> 19 ; -15 [label="15: Return Stmt \n n$0=*&this:class Ref * [line 26]\n n$1=*n$0.i:int & [line 26]\n n$2=*n$1:int & [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n NULLIFY(&this,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&this:class Ref * [line 26]\n n$1=*n$0.i:int & [line 26]\n n$2=*n$1:int & [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 26]\n NULLIFY(&this); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 15 -> 14 ; @@ -408,7 +408,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: Return Stmt \n n$0=*&this:class Ref * [line 25]\n n$1=*n$0.x:class X & [line 25]\n n$2=*n$1.f:int [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&this,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&this:class Ref * [line 25]\n n$1=*n$0.x:class X & [line 25]\n n$2=*n$1.f:int [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&this); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 12 -> 11 ; @@ -419,11 +419,11 @@ digraph iCFG { 10 -> 12 ; -9 [label="9: Constructor Init \n n$3=*&this:class Ref * [line 24]\n n$4=*&r_:class X & [line 24]\n *n$3.x:class X &=n$4 [line 24]\n REMOVE_TEMPS(n$3,n$4); [line 24]\n NULLIFY(&r_,false); [line 24]\n " shape="box"] +9 [label="9: Constructor Init \n n$3=*&this:class Ref * [line 24]\n n$4=*&r_:class X & [line 24]\n *n$3.x:class X &=n$4 [line 24]\n REMOVE_TEMPS(n$3,n$4); [line 24]\n NULLIFY(&r_); [line 24]\n " shape="box"] 9 -> 8 ; -8 [label="8: Constructor Init \n n$0=*&this:class Ref * [line 24]\n n$1=*&this:class Ref * [line 24]\n n$2=*n$1.x:class X & [line 24]\n *n$0.i:int &=n$2.f [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&this,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +8 [label="8: Constructor Init \n n$0=*&this:class Ref * [line 24]\n n$1=*&this:class Ref * [line 24]\n n$2=*n$1.x:class X & [line 24]\n *n$0.i:int &=n$2.f [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&this); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 8 -> 7 ; @@ -434,7 +434,7 @@ digraph iCFG { 6 -> 9 ; -5 [label="5: Constructor Init \n n$0=*&this:class X * [line 10]\n n$1=*&__param_0:class X & [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0,false); [line 10]\n NULLIFY(&this,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +5 [label="5: Constructor Init \n n$0=*&this:class X * [line 10]\n n$1=*&__param_0:class X & [line 10]\n n$2=*n$1.f:int [line 10]\n *n$0.f:int =n$2 [line 10]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 10]\n NULLIFY(&__param_0); [line 10]\n NULLIFY(&this); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot index 8cfd7148d..6b7e70b24 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_struct_e2e.cpp.dot @@ -79,7 +79,7 @@ digraph iCFG { 103 -> 102 ; -102 [label="102: Return Stmt \n n$0=*&x:class X & [line 102]\n n$1=*n$0:class X [line 102]\n n$2=_fun_X_div(n$0:class X &) [line 102]\n *&return:int =n$2 [line 102]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 102]\n NULLIFY(&x,false); [line 102]\n APPLY_ABSTRACTION; [line 102]\n " shape="box"] +102 [label="102: Return Stmt \n n$0=*&x:class X & [line 102]\n n$1=*n$0:class X [line 102]\n n$2=_fun_X_div(n$0:class X &) [line 102]\n *&return:int =n$2 [line 102]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 102]\n NULLIFY(&x); [line 102]\n APPLY_ABSTRACTION; [line 102]\n " shape="box"] 102 -> 101 ; @@ -94,7 +94,7 @@ digraph iCFG { 99 -> 98 ; -98 [label="98: Return Stmt \n n$0=*&x:class X & [line 97]\n n$1=*n$0:class X [line 97]\n n$2=_fun_X_div(n$0:class X &) [line 97]\n *&return:int =n$2 [line 97]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 97]\n NULLIFY(&x,false); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] +98 [label="98: Return Stmt \n n$0=*&x:class X & [line 97]\n n$1=*n$0:class X [line 97]\n n$2=_fun_X_div(n$0:class X &) [line 97]\n *&return:int =n$2 [line 97]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 97]\n NULLIFY(&x); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] 98 -> 97 ; @@ -109,7 +109,7 @@ digraph iCFG { 95 -> 94 ; -94 [label="94: Return Stmt \n n$0=*&x:class X & [line 92]\n n$1=*n$0:class X [line 92]\n n$2=_fun_X_div(n$0:class X &) [line 92]\n *&return:int =n$2 [line 92]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 92]\n NULLIFY(&x,false); [line 92]\n APPLY_ABSTRACTION; [line 92]\n " shape="box"] +94 [label="94: Return Stmt \n n$0=*&x:class X & [line 92]\n n$1=*n$0:class X [line 92]\n n$2=_fun_X_div(n$0:class X &) [line 92]\n *&return:int =n$2 [line 92]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 92]\n NULLIFY(&x); [line 92]\n APPLY_ABSTRACTION; [line 92]\n " shape="box"] 94 -> 93 ; @@ -124,7 +124,7 @@ digraph iCFG { 91 -> 90 ; -90 [label="90: Return Stmt \n n$0=*&x:class X & [line 87]\n n$1=*n$0:class X [line 87]\n n$2=_fun_X_div(n$0:class X &) [line 87]\n *&return:int =n$2 [line 87]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 87]\n NULLIFY(&x,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] +90 [label="90: Return Stmt \n n$0=*&x:class X & [line 87]\n n$1=*n$0:class X [line 87]\n n$2=_fun_X_div(n$0:class X &) [line 87]\n *&return:int =n$2 [line 87]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 87]\n NULLIFY(&x); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] 90 -> 89 ; @@ -215,11 +215,11 @@ digraph iCFG { 67 -> 66 ; -66 [label="66: Return Stmt \n n$1=*&x:class X * [line 57]\n n$2=*n$1:class X [line 57]\n n$3=_fun_X_div(n$1:class X *) [line 57]\n *&return:int =n$3 [line 57]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 57]\n NULLIFY(&x,false); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"] +66 [label="66: Return Stmt \n n$1=*&x:class X * [line 57]\n n$2=*n$1:class X [line 57]\n n$3=_fun_X_div(n$1:class X *) [line 57]\n *&return:int =n$3 [line 57]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 57]\n NULLIFY(&x); [line 57]\n APPLY_ABSTRACTION; [line 57]\n " shape="box"] 66 -> 61 ; -65 [label="65: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n NULLIFY(&x,false); [line 55]\n " shape="invhouse"] +65 [label="65: Prune (false branch) \n n$0=*&x:class X * [line 55]\n PRUNE((n$0 == 0), false); [line 55]\n REMOVE_TEMPS(n$0); [line 55]\n NULLIFY(&x); [line 55]\n " shape="invhouse"] 65 -> 62 ; @@ -247,11 +247,11 @@ digraph iCFG { 59 -> 58 ; -58 [label="58: Return Stmt \n n$1=*&x:class X * [line 50]\n n$2=*n$1:class X [line 50]\n n$3=_fun_X_div(n$1:class X *) [line 50]\n *&return:int =n$3 [line 50]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 50]\n NULLIFY(&x,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +58 [label="58: Return Stmt \n n$1=*&x:class X * [line 50]\n n$2=*n$1:class X [line 50]\n n$3=_fun_X_div(n$1:class X *) [line 50]\n *&return:int =n$3 [line 50]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 50]\n NULLIFY(&x); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 58 -> 53 ; -57 [label="57: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n REMOVE_TEMPS(n$0); [line 48]\n NULLIFY(&x,false); [line 48]\n " shape="invhouse"] +57 [label="57: Prune (false branch) \n n$0=*&x:class X * [line 48]\n PRUNE((n$0 == 0), false); [line 48]\n REMOVE_TEMPS(n$0); [line 48]\n NULLIFY(&x); [line 48]\n " shape="invhouse"] 57 -> 54 ; @@ -279,11 +279,11 @@ digraph iCFG { 51 -> 50 ; -50 [label="50: Return Stmt \n n$1=*&x:class X * [line 43]\n n$2=*n$1:class X [line 43]\n n$3=_fun_X_div(n$1:class X *) [line 43]\n *&return:int =n$3 [line 43]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 43]\n NULLIFY(&x,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +50 [label="50: Return Stmt \n n$1=*&x:class X * [line 43]\n n$2=*n$1:class X [line 43]\n n$3=_fun_X_div(n$1:class X *) [line 43]\n *&return:int =n$3 [line 43]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 43]\n NULLIFY(&x); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 50 -> 45 ; -49 [label="49: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&x,false); [line 41]\n " shape="invhouse"] +49 [label="49: Prune (false branch) \n n$0=*&x:class X * [line 41]\n PRUNE((n$0 == 0), false); [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&x); [line 41]\n " shape="invhouse"] 49 -> 46 ; @@ -311,11 +311,11 @@ digraph iCFG { 43 -> 42 ; -42 [label="42: Return Stmt \n n$1=*&x:class X * [line 36]\n n$2=*n$1:class X [line 36]\n n$3=_fun_X_div(n$1:class X *) [line 36]\n *&return:int =n$3 [line 36]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 36]\n NULLIFY(&x,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +42 [label="42: Return Stmt \n n$1=*&x:class X * [line 36]\n n$2=*n$1:class X [line 36]\n n$3=_fun_X_div(n$1:class X *) [line 36]\n *&return:int =n$3 [line 36]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 36]\n NULLIFY(&x); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 42 -> 37 ; -41 [label="41: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&x,false); [line 34]\n " shape="invhouse"] +41 [label="41: Prune (false branch) \n n$0=*&x:class X * [line 34]\n PRUNE((n$0 == 0), false); [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&x); [line 34]\n " shape="invhouse"] 41 -> 38 ; @@ -361,7 +361,7 @@ digraph iCFG { 30 -> 32 ; -29 [label="29: BinaryOperatorStmt: Assign \n n$0=*&x:class X & [line 27]\n n$1=*&val:int [line 27]\n *n$0.f:int =n$1 [line 27]\n REMOVE_TEMPS(n$0,n$1); [line 27]\n NULLIFY(&val,false); [line 27]\n NULLIFY(&x,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +29 [label="29: BinaryOperatorStmt: Assign \n n$0=*&x:class X & [line 27]\n n$1=*&val:int [line 27]\n *n$0.f:int =n$1 [line 27]\n REMOVE_TEMPS(n$0,n$1); [line 27]\n NULLIFY(&val); [line 27]\n NULLIFY(&x); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 29 -> 28 ; @@ -372,7 +372,7 @@ digraph iCFG { 27 -> 29 ; -26 [label="26: Call _fun_X_nonzero \n n$0=*&x:class X & [line 25]\n n$1=*n$0:class X [line 25]\n _fun_X_nonzero(n$0:class X &) [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&x,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +26 [label="26: Call _fun_X_nonzero \n n$0=*&x:class X & [line 25]\n n$1=*n$0:class X [line 25]\n _fun_X_nonzero(n$0:class X &) [line 25]\n REMOVE_TEMPS(n$0,n$1); [line 25]\n NULLIFY(&x); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 26 -> 25 ; @@ -383,7 +383,7 @@ digraph iCFG { 24 -> 26 ; -23 [label="23: Call _fun_X_zero \n n$0=*&x:class X & [line 23]\n n$1=*n$0:class X [line 23]\n _fun_X_zero(n$0:class X &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&x,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +23 [label="23: Call _fun_X_zero \n n$0=*&x:class X & [line 23]\n n$1=*n$0:class X [line 23]\n _fun_X_zero(n$0:class X &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&x); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 23 -> 22 ; @@ -394,7 +394,7 @@ digraph iCFG { 21 -> 23 ; -20 [label="20: BinaryOperatorStmt: Assign \n n$0=*&x:class X * [line 21]\n n$1=*&val:int [line 21]\n *n$0.f:int =n$1 [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&val,false); [line 21]\n NULLIFY(&x,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n n$0=*&x:class X * [line 21]\n n$1=*&val:int [line 21]\n *n$0.f:int =n$1 [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&val); [line 21]\n NULLIFY(&x); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 20 -> 19 ; @@ -405,7 +405,7 @@ digraph iCFG { 18 -> 20 ; -17 [label="17: Call _fun_X_nonzero \n n$0=*&x:class X * [line 19]\n n$1=*n$0:class X [line 19]\n _fun_X_nonzero(n$0:class X *) [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&x,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +17 [label="17: Call _fun_X_nonzero \n n$0=*&x:class X * [line 19]\n n$1=*n$0:class X [line 19]\n _fun_X_nonzero(n$0:class X *) [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&x); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 17 -> 16 ; @@ -416,7 +416,7 @@ digraph iCFG { 15 -> 17 ; -14 [label="14: Call _fun_X_zero \n n$0=*&x:class X * [line 17]\n n$1=*n$0:class X [line 17]\n _fun_X_zero(n$0:class X *) [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&x,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +14 [label="14: Call _fun_X_zero \n n$0=*&x:class X * [line 17]\n n$1=*n$0:class X [line 17]\n _fun_X_zero(n$0:class X *) [line 17]\n REMOVE_TEMPS(n$0,n$1); [line 17]\n NULLIFY(&x); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 14 -> 13 ; @@ -434,7 +434,7 @@ digraph iCFG { 10 -> 11 ; -9 [label="9: Return Stmt \n n$0=*&this:class X * [line 14]\n n$1=*n$0.f:int [line 14]\n *&return:int =(1 / n$1) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&this,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&this:class X * [line 14]\n n$1=*n$0.f:int [line 14]\n *&return:int =(1 / n$1) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&this); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 9 -> 8 ; @@ -445,7 +445,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 13]\n *n$0.f:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 13]\n *n$0.f:int =0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&this); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 6 -> 5 ; @@ -456,7 +456,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n *n$0.f:int =1 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 12]\n *n$0.f:int =1 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&this); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot index d991b4271..9146e73bd 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/reference_type_e2e.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 56 -> 55 ; -55 [label="55: DeclStmt \n *&b:int =3 [line 64]\n NULLIFY(&b,false); [line 64]\n " shape="box"] +55 [label="55: DeclStmt \n *&b:int =3 [line 64]\n NULLIFY(&b); [line 64]\n " shape="box"] 55 -> 54 ; @@ -11,19 +11,19 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: DeclStmt \n n$2=*&r1:int & [line 66]\n *&b:int =1 [line 66]\n n$3=*&b:int [line 66]\n *n$2:int =n$3 [line 66]\n *&r2:int &=n$2 [line 66]\n REMOVE_TEMPS(n$2,n$3); [line 66]\n NULLIFY(&r1,false); [line 66]\n " shape="box"] +53 [label="53: DeclStmt \n n$2=*&r1:int & [line 66]\n *&b:int =1 [line 66]\n n$3=*&b:int [line 66]\n *n$2:int =n$3 [line 66]\n *&r2:int &=n$2 [line 66]\n REMOVE_TEMPS(n$2,n$3); [line 66]\n NULLIFY(&r1); [line 66]\n " shape="box"] 53 -> 52 ; -52 [label="52: BinaryOperatorStmt: Assign \n n$1=*&r2:int & [line 67]\n *n$1:int =0 [line 67]\n REMOVE_TEMPS(n$1); [line 67]\n NULLIFY(&r2,false); [line 67]\n " shape="box"] +52 [label="52: BinaryOperatorStmt: Assign \n n$1=*&r2:int & [line 67]\n *n$1:int =0 [line 67]\n REMOVE_TEMPS(n$1); [line 67]\n NULLIFY(&r2); [line 67]\n " shape="box"] 52 -> 51 ; -51 [label="51: Return Stmt \n n$0=*&b:int [line 68]\n *&return:int =(1 / n$0) [line 68]\n REMOVE_TEMPS(n$0); [line 68]\n NULLIFY(&b,false); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] +51 [label="51: Return Stmt \n n$0=*&b:int [line 68]\n *&return:int =(1 / n$0) [line 68]\n REMOVE_TEMPS(n$0); [line 68]\n NULLIFY(&b); [line 68]\n APPLY_ABSTRACTION; [line 68]\n " shape="box"] 51 -> 50 ; -50 [label="50: Exit ref_div1_nested_assignment \n NULLIFY(&a,false); [line 69]\n " color=yellow style=filled] +50 [label="50: Exit ref_div1_nested_assignment \n NULLIFY(&a); [line 69]\n " color=yellow style=filled] 49 [label="49: Start ref_div1_nested_assignment\nFormals: \nLocals: r2:int & r1:int & b:int a:int \n DECLARE_LOCALS(&return,&r2,&r1,&b,&a); [line 62]\n " color=yellow style=filled] @@ -34,7 +34,7 @@ digraph iCFG { 48 -> 47 ; -47 [label="47: DeclStmt \n *&b:int =3 [line 55]\n NULLIFY(&b,false); [line 55]\n " shape="box"] +47 [label="47: DeclStmt \n *&b:int =3 [line 55]\n NULLIFY(&b); [line 55]\n " shape="box"] 47 -> 46 ; @@ -42,11 +42,11 @@ digraph iCFG { 46 -> 45 ; -45 [label="45: DeclStmt \n n$2=*&r1:int & [line 57]\n *&b:int =1 [line 57]\n n$3=*&b:int [line 57]\n *n$2:int =n$3 [line 57]\n *&r2:int &=n$2 [line 57]\n REMOVE_TEMPS(n$2,n$3); [line 57]\n NULLIFY(&b,false); [line 57]\n NULLIFY(&r1,false); [line 57]\n " shape="box"] +45 [label="45: DeclStmt \n n$2=*&r1:int & [line 57]\n *&b:int =1 [line 57]\n n$3=*&b:int [line 57]\n *n$2:int =n$3 [line 57]\n *&r2:int &=n$2 [line 57]\n REMOVE_TEMPS(n$2,n$3); [line 57]\n NULLIFY(&b); [line 57]\n NULLIFY(&r1); [line 57]\n " shape="box"] 45 -> 44 ; -44 [label="44: BinaryOperatorStmt: Assign \n n$1=*&r2:int & [line 58]\n *n$1:int =0 [line 58]\n REMOVE_TEMPS(n$1); [line 58]\n NULLIFY(&r2,false); [line 58]\n " shape="box"] +44 [label="44: BinaryOperatorStmt: Assign \n n$1=*&r2:int & [line 58]\n *n$1:int =0 [line 58]\n REMOVE_TEMPS(n$1); [line 58]\n NULLIFY(&r2); [line 58]\n " shape="box"] 44 -> 43 ; @@ -54,7 +54,7 @@ digraph iCFG { 43 -> 42 ; -42 [label="42: Exit ref_div0_nested_assignment \n NULLIFY(&a,false); [line 60]\n " color=yellow style=filled] +42 [label="42: Exit ref_div0_nested_assignment \n NULLIFY(&a); [line 60]\n " color=yellow style=filled] 41 [label="41: Start ref_div0_nested_assignment\nFormals: \nLocals: r2:int & r1:int & b:int a:int \n DECLARE_LOCALS(&return,&r2,&r1,&b,&a); [line 53]\n " color=yellow style=filled] @@ -69,7 +69,7 @@ digraph iCFG { 39 -> 38 ; -38 [label="38: Call _fun_zero_ref \n n$1=*&r:int & [line 49]\n _fun_zero_ref(n$1:int &) [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n NULLIFY(&r,false); [line 49]\n " shape="box"] +38 [label="38: Call _fun_zero_ref \n n$1=*&r:int & [line 49]\n _fun_zero_ref(n$1:int &) [line 49]\n REMOVE_TEMPS(n$1); [line 49]\n NULLIFY(&r); [line 49]\n " shape="box"] 38 -> 37 ; @@ -77,7 +77,7 @@ digraph iCFG { 37 -> 36 ; -36 [label="36: Exit ref_div0_function_temp_var \n NULLIFY(&a,false); [line 51]\n " color=yellow style=filled] +36 [label="36: Exit ref_div0_function_temp_var \n NULLIFY(&a); [line 51]\n " color=yellow style=filled] 35 [label="35: Start ref_div0_function_temp_var\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 46]\n " color=yellow style=filled] @@ -96,7 +96,7 @@ digraph iCFG { 32 -> 31 ; -31 [label="31: Exit ref_div0_function \n NULLIFY(&a,false); [line 44]\n " color=yellow style=filled] +31 [label="31: Exit ref_div0_function \n NULLIFY(&a); [line 44]\n " color=yellow style=filled] 30 [label="30: Start ref_div0_function\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 40]\n " color=yellow style=filled] @@ -111,7 +111,7 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: BinaryOperatorStmt: Assign \n n$1=*&r:int & [line 36]\n *n$1:int =0 [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&r,false); [line 36]\n " shape="box"] +27 [label="27: BinaryOperatorStmt: Assign \n n$1=*&r:int & [line 36]\n *n$1:int =0 [line 36]\n REMOVE_TEMPS(n$1); [line 36]\n NULLIFY(&r); [line 36]\n " shape="box"] 27 -> 26 ; @@ -119,7 +119,7 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Exit ref_div0 \n NULLIFY(&a,false); [line 38]\n " color=yellow style=filled] +25 [label="25: Exit ref_div0 \n NULLIFY(&a); [line 38]\n " color=yellow style=filled] 24 [label="24: Start ref_div0\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 33]\n " color=yellow style=filled] @@ -134,7 +134,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Call _fun_zero_ptr \n n$1=*&r:int * [line 29]\n _fun_zero_ptr(n$1:int *) [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&r,false); [line 29]\n " shape="box"] +21 [label="21: Call _fun_zero_ptr \n n$1=*&r:int * [line 29]\n _fun_zero_ptr(n$1:int *) [line 29]\n REMOVE_TEMPS(n$1); [line 29]\n NULLIFY(&r); [line 29]\n " shape="box"] 21 -> 20 ; @@ -142,7 +142,7 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: Exit ptr_div0_function_temp_var \n NULLIFY(&a,false); [line 31]\n " color=yellow style=filled] +19 [label="19: Exit ptr_div0_function_temp_var \n NULLIFY(&a); [line 31]\n " color=yellow style=filled] 18 [label="18: Start ptr_div0_function_temp_var\nFormals: \nLocals: r:int * a:int \n DECLARE_LOCALS(&return,&r,&a); [line 26]\n " color=yellow style=filled] @@ -161,7 +161,7 @@ digraph iCFG { 15 -> 14 ; -14 [label="14: Exit ptr_div0_function \n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] +14 [label="14: Exit ptr_div0_function \n NULLIFY(&a); [line 24]\n " color=yellow style=filled] 13 [label="13: Start ptr_div0_function\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 20]\n " color=yellow style=filled] @@ -176,7 +176,7 @@ digraph iCFG { 11 -> 10 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$1=*&p:int * [line 16]\n *n$1:int =0 [line 16]\n REMOVE_TEMPS(n$1); [line 16]\n NULLIFY(&p,false); [line 16]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$1=*&p:int * [line 16]\n *n$1:int =0 [line 16]\n REMOVE_TEMPS(n$1); [line 16]\n NULLIFY(&p); [line 16]\n " shape="box"] 10 -> 9 ; @@ -184,14 +184,14 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: Exit ptr_div0 \n NULLIFY(&a,false); [line 18]\n " color=yellow style=filled] +8 [label="8: Exit ptr_div0 \n NULLIFY(&a); [line 18]\n " color=yellow style=filled] 7 [label="7: Start ptr_div0\nFormals: \nLocals: p:int * a:int \n DECLARE_LOCALS(&return,&p,&a); [line 13]\n " color=yellow style=filled] 7 -> 12 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&p:int & [line 11]\n *n$0:int =0 [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&p,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&p:int & [line 11]\n *n$0:int =0 [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&p); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 6 -> 5 ; @@ -202,7 +202,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 10]\n *n$0:int =0 [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&p,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&p:int * [line 10]\n *n$0:int =0 [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&p); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; 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 f4b418f9e..7a2162bc6 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/temporary_lvalue.cpp.dot @@ -7,7 +7,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Exit div0_no_const_ref \n NULLIFY(&a,false); [line 23]\n " color=yellow style=filled] +12 [label="12: Exit div0_no_const_ref \n NULLIFY(&a); [line 23]\n " color=yellow style=filled] 11 [label="11: Start div0_no_const_ref\nFormals: \nLocals: a:int \n DECLARE_LOCALS(&return,&a); [line 20]\n " color=yellow style=filled] @@ -18,7 +18,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Exit div0_function_param_cast \n NULLIFY(&SIL_materialize_temp__n$0,false); [line 17]\n " color=yellow style=filled] +9 [label="9: Exit div0_function_param_cast \n NULLIFY(&SIL_materialize_temp__n$0); [line 17]\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] @@ -29,18 +29,18 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&a:int & [line 14]\n n$1=_fun_div(n$0:int &) [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&a:int & [line 14]\n n$1=_fun_div(n$0:int &) [line 14]\n *&return:int =n$1 [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 6 -> 5 ; -5 [label="5: Exit div0_init_expr \n NULLIFY(&SIL_materialize_temp__n$2,false); [line 15]\n " color=yellow style=filled] +5 [label="5: Exit div0_init_expr \n NULLIFY(&SIL_materialize_temp__n$2); [line 15]\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 -> 7 ; -3 [label="3: Return Stmt \n n$0=*&v:int & [line 10]\n n$1=*n$0:int [line 10]\n *&return:int =(1 / n$1) [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&v,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&v:int & [line 10]\n n$1=*n$0:int [line 10]\n *&return:int =(1 / n$1) [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&v); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot index 028c01a62..1d43a5c90 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/reference/unbox.cpp.dot @@ -15,11 +15,11 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: Call _fun_fun_r \n n$0=*&p:int * [line 33]\n n$1=_fun_fun_r(n$0:int &) [line 33]\n REMOVE_TEMPS(n$0,n$1); [line 33]\n NULLIFY(&p,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +19 [label="19: Call _fun_fun_r \n n$0=*&p:int * [line 33]\n n$1=_fun_fun_r(n$0:int &) [line 33]\n REMOVE_TEMPS(n$0,n$1); [line 33]\n NULLIFY(&p); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 19 -> 18 ; -18 [label="18: Exit unbox_ptr \n NULLIFY(&a,false); [line 34]\n " color=yellow style=filled] +18 [label="18: Exit unbox_ptr \n NULLIFY(&a); [line 34]\n " color=yellow style=filled] 17 [label="17: Start unbox_ptr\nFormals: \nLocals: p:int * a:int \n DECLARE_LOCALS(&return,&p,&a); [line 27]\n " color=yellow style=filled] @@ -42,18 +42,18 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Call _fun_fun_r \n n$0=*&r:int & [line 23]\n n$1=_fun_fun_r(n$0:int &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&r,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +12 [label="12: Call _fun_fun_r \n n$0=*&r:int & [line 23]\n n$1=_fun_fun_r(n$0:int &) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&r); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit unbox_ref \n NULLIFY(&a,false); [line 24]\n " color=yellow style=filled] +11 [label="11: Exit unbox_ref \n NULLIFY(&a); [line 24]\n " color=yellow style=filled] 10 [label="10: Start unbox_ref\nFormals: \nLocals: r:int & a:int \n DECLARE_LOCALS(&return,&r,&a); [line 17]\n " color=yellow style=filled] 10 -> 16 ; -9 [label="9: Return Stmt \n n$0=*&p:int & [line 12]\n n$1=*n$0:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&p,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&p:int & [line 12]\n n$1=*n$0:int [line 12]\n *&return:int =n$1 [line 12]\n REMOVE_TEMPS(n$0,n$1); [line 12]\n NULLIFY(&p); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 9 -> 8 ; @@ -64,7 +64,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$0=*&p:int [line 11]\n *&return:int =n$0 [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&p,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&p:int [line 11]\n *&return:int =n$0 [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&p); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 6 -> 5 ; @@ -75,7 +75,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&p:int * [line 10]\n n$1=*n$0:int [line 10]\n *&return:int =n$1 [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&p,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&p:int * [line 10]\n n$1=*n$0:int [line 10]\n *&return:int =n$1 [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&p); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot index 574554a44..1d3f7ecdd 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/class_template_instantiate.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -30 [label="30: Return Stmt \n n$0=*&s:class ExecStore & [line 41]\n n$1=*n$0.f:class Choose2 [line 41]\n n$2=_fun_Choose2_extra(n$0.f:class Choose2 &,1:int ) [line 41]\n *&return:int =n$2 [line 41]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 41]\n NULLIFY(&s,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +30 [label="30: Return Stmt \n n$0=*&s:class ExecStore & [line 41]\n n$1=*n$0.f:class Choose2 [line 41]\n n$2=_fun_Choose2_extra(n$0.f:class Choose2 &,1:int ) [line 41]\n *&return:int =n$2 [line 41]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 41]\n NULLIFY(&s); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 30 -> 29 ; @@ -10,7 +10,7 @@ digraph iCFG { 28 -> 30 ; -27 [label="27: Return Stmt \n n$0=*&s:class ExecStore & [line 39]\n n$1=*n$0.f:class Choose2 [line 39]\n n$2=_fun_Choose2_extra(n$0.f:class Choose2 &,0:int ) [line 39]\n *&return:int =n$2 [line 39]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 39]\n NULLIFY(&s,false); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] +27 [label="27: Return Stmt \n n$0=*&s:class ExecStore & [line 39]\n n$1=*n$0.f:class Choose2 [line 39]\n n$2=_fun_Choose2_extra(n$0.f:class Choose2 &,0:int ) [line 39]\n *&return:int =n$2 [line 39]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 39]\n NULLIFY(&s); [line 39]\n APPLY_ABSTRACTION; [line 39]\n " shape="box"] 27 -> 26 ; @@ -21,7 +21,7 @@ digraph iCFG { 25 -> 27 ; -24 [label="24: Return Stmt \n n$0=*&s:class ExecStore & [line 36]\n n$1=*n$0:class ExecStore [line 36]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,1:int ) [line 36]\n *&return:int =n$2 [line 36]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 36]\n NULLIFY(&s,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +24 [label="24: Return Stmt \n n$0=*&s:class ExecStore & [line 36]\n n$1=*n$0:class ExecStore [line 36]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,1:int ) [line 36]\n *&return:int =n$2 [line 36]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 36]\n NULLIFY(&s); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 24 -> 23 ; @@ -32,7 +32,7 @@ digraph iCFG { 22 -> 24 ; -21 [label="21: Return Stmt \n n$0=*&s:class ExecStore & [line 32]\n n$1=*n$0:class ExecStore [line 32]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,1:int ) [line 32]\n *&return:int =n$2 [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&s,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&s:class ExecStore & [line 32]\n n$1=*n$0:class ExecStore [line 32]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,1:int ) [line 32]\n *&return:int =n$2 [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&s); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 21 -> 20 ; @@ -43,7 +43,7 @@ digraph iCFG { 19 -> 21 ; -18 [label="18: Return Stmt \n n$0=*&s:class ExecStore & [line 30]\n n$1=*n$0:class ExecStore [line 30]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,0:int ) [line 30]\n *&return:int =n$2 [line 30]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 30]\n NULLIFY(&s,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&s:class ExecStore & [line 30]\n n$1=*n$0:class ExecStore [line 30]\n n$2=_fun_ExecStore_call_div(n$0:class ExecStore &,0:int ) [line 30]\n *&return:int =n$2 [line 30]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 30]\n NULLIFY(&s); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 18 -> 17 ; @@ -54,7 +54,7 @@ digraph iCFG { 16 -> 18 ; -15 [label="15: Return Stmt \n n$0=*&this:class ExecStore * [line 26]\n n$1=*n$0.f:class Choose2 [line 26]\n n$2=*&a:int [line 26]\n n$3=_fun_Choose2_div(n$0.f:class Choose2 &,n$2:int ,0:int ) [line 26]\n *&return:int =n$3 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&this,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&this:class ExecStore * [line 26]\n n$1=*n$0.f:class Choose2 [line 26]\n n$2=*&a:int [line 26]\n n$3=_fun_Choose2_div(n$0.f:class Choose2 &,n$2:int ,0:int ) [line 26]\n *&return:int =n$3 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&a); [line 26]\n NULLIFY(&this); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 15 -> 14 ; @@ -65,7 +65,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: Return Stmt \n n$0=*&this:class ExecStore * [line 26]\n n$1=*n$0.f:class Choose1 [line 26]\n n$2=*&a:int [line 26]\n n$3=_fun_Choose1_div(n$0.f:class Choose1 &,n$2:int ,0:int ) [line 26]\n *&return:int =n$3 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&this,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&this:class ExecStore * [line 26]\n n$1=*n$0.f:class Choose1 [line 26]\n n$2=*&a:int [line 26]\n n$3=_fun_Choose1_div(n$0.f:class Choose1 &,n$2:int ,0:int ) [line 26]\n *&return:int =n$3 [line 26]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 26]\n NULLIFY(&a); [line 26]\n NULLIFY(&this); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 12 -> 11 ; @@ -76,7 +76,7 @@ digraph iCFG { 10 -> 12 ; -9 [label="9: Return Stmt \n n$0=*&a:int [line 18]\n *&return:int =(1 / n$0) [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&a,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&a:int [line 18]\n *&return:int =(1 / n$0) [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&a); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 9 -> 8 ; @@ -87,7 +87,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$0=*&b:int [line 15]\n *&return:int =(1 / n$0) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&b,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&b:int [line 15]\n *&return:int =(1 / n$0) [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&b); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 6 -> 5 ; @@ -98,7 +98,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&a:int [line 11]\n *&return:int =(1 / n$0) [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&a,false); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:int [line 11]\n *&return:int =(1 / n$0) [line 11]\n REMOVE_TEMPS(n$0); [line 11]\n NULLIFY(&a); [line 11]\n APPLY_ABSTRACTION; [line 11]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot index af60919cf..cb97d7786 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/function.cpp.dot @@ -33,7 +33,7 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: Exit div1_get_val \n NULLIFY(&x3,false); [line 65]\n NULLIFY(&x1,false); [line 65]\n " color=yellow style=filled] +40 [label="40: Exit div1_get_val \n NULLIFY(&x3); [line 65]\n NULLIFY(&x1); [line 65]\n " color=yellow style=filled] 39 [label="39: Start div1_get_val\nFormals: \nLocals: x3:class X3 x1:class X1 \n DECLARE_LOCALS(&return,&x3,&x1); [line 61]\n " color=yellow style=filled] @@ -52,7 +52,7 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Exit div0_get_val \n NULLIFY(&x3,false); [line 59]\n NULLIFY(&x1,false); [line 59]\n " color=yellow style=filled] +35 [label="35: Exit div0_get_val \n NULLIFY(&x3); [line 59]\n NULLIFY(&x1); [line 59]\n " color=yellow style=filled] 34 [label="34: Start div0_get_val\nFormals: \nLocals: x3:class X3 x1:class X1 \n DECLARE_LOCALS(&return,&x3,&x1); [line 55]\n " color=yellow style=filled] @@ -89,7 +89,7 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Exit createAndGetVal \n NULLIFY(&x,false); [line 37]\n " color=yellow style=filled] +25 [label="25: Exit createAndGetVal \n NULLIFY(&x); [line 37]\n " color=yellow style=filled] 24 [label="24: Start createAndGetVal\nFormals: \nLocals: x:class X1 \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] @@ -104,14 +104,14 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Exit createAndGetVal \n NULLIFY(&x,false); [line 37]\n " color=yellow style=filled] +21 [label="21: Exit createAndGetVal \n NULLIFY(&x); [line 37]\n " color=yellow style=filled] 20 [label="20: Start createAndGetVal\nFormals: \nLocals: x:class X3 \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] 20 -> 23 ; -19 [label="19: Return Stmt \n n$0=*&x:class X3 & [line 30]\n n$1=*n$0:class X3 [line 30]\n n$2=_fun_X3_get(n$0:class X3 &) [line 30]\n *&return:int =n$2 [line 30]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 30]\n NULLIFY(&x,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +19 [label="19: Return Stmt \n n$0=*&x:class X3 & [line 30]\n n$1=*n$0:class X3 [line 30]\n n$2=_fun_X3_get(n$0:class X3 &) [line 30]\n *&return:int =n$2 [line 30]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 30]\n NULLIFY(&x); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 19 -> 18 ; @@ -122,7 +122,7 @@ digraph iCFG { 17 -> 19 ; -16 [label="16: Return Stmt \n n$0=*&x:class X1 & [line 24]\n n$1=*n$0:class X1 [line 24]\n n$2=_fun_X1_getVal(n$0:class X1 &) [line 24]\n *&return:int =n$2 [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&x,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +16 [label="16: Return Stmt \n n$0=*&x:class X1 & [line 24]\n n$1=*n$0:class X1 [line 24]\n n$2=_fun_X1_getVal(n$0:class X1 &) [line 24]\n *&return:int =n$2 [line 24]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 24]\n NULLIFY(&x); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 16 -> 15 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot index 9e100890f..cdccf331c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/method.cpp.dot @@ -15,7 +15,7 @@ digraph iCFG { 72 -> 71 ; -71 [label="71: Exit div1_getter_templ2 \n NULLIFY(&x1_2,false); [line 75]\n NULLIFY(&x1_1,false); [line 75]\n NULLIFY(&g,false); [line 75]\n " color=yellow style=filled] +71 [label="71: Exit div1_getter_templ2 \n NULLIFY(&x1_2); [line 75]\n NULLIFY(&x1_1); [line 75]\n NULLIFY(&g); [line 75]\n " color=yellow style=filled] 70 [label="70: Start div1_getter_templ2\nFormals: \nLocals: g:class GetterTempl x1_2:class X1 x1_1:class X1 \n DECLARE_LOCALS(&return,&g,&x1_2,&x1_1); [line 70]\n " color=yellow style=filled] @@ -38,7 +38,7 @@ digraph iCFG { 66 -> 65 ; -65 [label="65: Exit div1_getter_templ \n NULLIFY(&x2,false); [line 68]\n NULLIFY(&x1,false); [line 68]\n NULLIFY(&g,false); [line 68]\n " color=yellow style=filled] +65 [label="65: Exit div1_getter_templ \n NULLIFY(&x2); [line 68]\n NULLIFY(&x1); [line 68]\n NULLIFY(&g); [line 68]\n " color=yellow style=filled] 64 [label="64: Start div1_getter_templ\nFormals: \nLocals: g:class GetterTempl x2:class X2 x1:class X1 \n DECLARE_LOCALS(&return,&g,&x2,&x1); [line 63]\n " color=yellow style=filled] @@ -61,7 +61,7 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: Exit div0_getter_templ2 \n NULLIFY(&x2_2,false); [line 61]\n NULLIFY(&x2_1,false); [line 61]\n NULLIFY(&g,false); [line 61]\n " color=yellow style=filled] +59 [label="59: Exit div0_getter_templ2 \n NULLIFY(&x2_2); [line 61]\n NULLIFY(&x2_1); [line 61]\n NULLIFY(&g); [line 61]\n " color=yellow style=filled] 58 [label="58: Start div0_getter_templ2\nFormals: \nLocals: g:class GetterTempl x2_2:class X2 x2_1:class X2 \n DECLARE_LOCALS(&return,&g,&x2_2,&x2_1); [line 56]\n " color=yellow style=filled] @@ -84,7 +84,7 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: Exit div0_getter_templ \n NULLIFY(&x3,false); [line 54]\n NULLIFY(&x2,false); [line 54]\n NULLIFY(&g,false); [line 54]\n " color=yellow style=filled] +53 [label="53: Exit div0_getter_templ \n NULLIFY(&x3); [line 54]\n NULLIFY(&x2); [line 54]\n NULLIFY(&g); [line 54]\n " color=yellow style=filled] 52 [label="52: Start div0_getter_templ\nFormals: \nLocals: g:class GetterTempl x3:class X3 x2:class X2 \n DECLARE_LOCALS(&return,&g,&x3,&x2); [line 49]\n " color=yellow style=filled] @@ -103,7 +103,7 @@ digraph iCFG { 49 -> 48 ; -48 [label="48: Exit div1_getter \n NULLIFY(&x1,false); [line 47]\n NULLIFY(&g,false); [line 47]\n " color=yellow style=filled] +48 [label="48: Exit div1_getter \n NULLIFY(&x1); [line 47]\n NULLIFY(&g); [line 47]\n " color=yellow style=filled] 47 [label="47: Start div1_getter\nFormals: \nLocals: g:class Getter x1:class X1 \n DECLARE_LOCALS(&return,&g,&x1); [line 43]\n " color=yellow style=filled] @@ -122,7 +122,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Exit div0_getter \n NULLIFY(&x2,false); [line 41]\n NULLIFY(&g,false); [line 41]\n " color=yellow style=filled] +43 [label="43: Exit div0_getter \n NULLIFY(&x2); [line 41]\n NULLIFY(&g); [line 41]\n " color=yellow style=filled] 42 [label="42: Start div0_getter\nFormals: \nLocals: g:class Getter x2:class X2 \n DECLARE_LOCALS(&return,&g,&x2); [line 37]\n " color=yellow style=filled] @@ -136,7 +136,7 @@ digraph iCFG { 40 -> 41 ; -39 [label="39: Return Stmt \n n$0=*&t:class X1 & [line 33]\n n$1=*n$0:class X1 [line 33]\n n$2=_fun_X1_get(n$0:class X1 &) [line 33]\n n$3=*&s:class X1 & [line 33]\n n$4=*n$3:class X1 [line 33]\n n$5=_fun_X1_get(n$3:class X1 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s,false); [line 33]\n NULLIFY(&t,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +39 [label="39: Return Stmt \n n$0=*&t:class X1 & [line 33]\n n$1=*n$0:class X1 [line 33]\n n$2=_fun_X1_get(n$0:class X1 &) [line 33]\n n$3=*&s:class X1 & [line 33]\n n$4=*n$3:class X1 [line 33]\n n$5=_fun_X1_get(n$3:class X1 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s); [line 33]\n NULLIFY(&t); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 39 -> 38 ; @@ -154,7 +154,7 @@ digraph iCFG { 35 -> 36 ; -34 [label="34: Return Stmt \n n$0=*&t:class X2 & [line 33]\n n$1=*n$0:class X2 [line 33]\n n$2=_fun_X2_get(n$0:class X2 &) [line 33]\n n$3=*&s:class X1 & [line 33]\n n$4=*n$3:class X1 [line 33]\n n$5=_fun_X1_get(n$3:class X1 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s,false); [line 33]\n NULLIFY(&t,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +34 [label="34: Return Stmt \n n$0=*&t:class X2 & [line 33]\n n$1=*n$0:class X2 [line 33]\n n$2=_fun_X2_get(n$0:class X2 &) [line 33]\n n$3=*&s:class X1 & [line 33]\n n$4=*n$3:class X1 [line 33]\n n$5=_fun_X1_get(n$3:class X1 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s); [line 33]\n NULLIFY(&t); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 34 -> 33 ; @@ -165,7 +165,7 @@ digraph iCFG { 32 -> 34 ; -31 [label="31: Return Stmt \n n$0=*&t:class X2 & [line 33]\n n$1=*n$0:class X2 [line 33]\n n$2=_fun_X2_get(n$0:class X2 &) [line 33]\n n$3=*&s:class X2 & [line 33]\n n$4=*n$3:class X2 [line 33]\n n$5=_fun_X2_get(n$3:class X2 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s,false); [line 33]\n NULLIFY(&t,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +31 [label="31: Return Stmt \n n$0=*&t:class X2 & [line 33]\n n$1=*n$0:class X2 [line 33]\n n$2=_fun_X2_get(n$0:class X2 &) [line 33]\n n$3=*&s:class X2 & [line 33]\n n$4=*n$3:class X2 [line 33]\n n$5=_fun_X2_get(n$3:class X2 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s); [line 33]\n NULLIFY(&t); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 31 -> 30 ; @@ -183,7 +183,7 @@ digraph iCFG { 27 -> 28 ; -26 [label="26: Return Stmt \n n$0=*&t:class X3 & [line 33]\n n$1=*n$0:class X3 [line 33]\n n$2=_fun_X3_get(n$0:class X3 &) [line 33]\n n$3=*&s:class X2 & [line 33]\n n$4=*n$3:class X2 [line 33]\n n$5=_fun_X2_get(n$3:class X2 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s,false); [line 33]\n NULLIFY(&t,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +26 [label="26: Return Stmt \n n$0=*&t:class X3 & [line 33]\n n$1=*n$0:class X3 [line 33]\n n$2=_fun_X3_get(n$0:class X3 &) [line 33]\n n$3=*&s:class X2 & [line 33]\n n$4=*n$3:class X2 [line 33]\n n$5=_fun_X2_get(n$3:class X2 &) [line 33]\n *&return:int =(n$2 + n$5) [line 33]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3,n$4,n$5); [line 33]\n NULLIFY(&s); [line 33]\n NULLIFY(&t); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 26 -> 25 ; @@ -201,7 +201,7 @@ digraph iCFG { 22 -> 23 ; -21 [label="21: Return Stmt \n n$0=*&s:class X1 & [line 25]\n n$1=*n$0:class X1 [line 25]\n n$2=_fun_X1_get(n$0:class X1 &) [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&s,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&s:class X1 & [line 25]\n n$1=*n$0:class X1 [line 25]\n n$2=_fun_X1_get(n$0:class X1 &) [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&s); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 21 -> 20 ; @@ -212,7 +212,7 @@ digraph iCFG { 19 -> 21 ; -18 [label="18: Return Stmt \n n$0=*&s:class X2 & [line 25]\n n$1=*n$0:class X2 [line 25]\n n$2=_fun_X2_get(n$0:class X2 &) [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&s,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +18 [label="18: Return Stmt \n n$0=*&s:class X2 & [line 25]\n n$1=*n$0:class X2 [line 25]\n n$2=_fun_X2_get(n$0:class X2 &) [line 25]\n *&return:int =n$2 [line 25]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 25]\n NULLIFY(&s); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 18 -> 17 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot index c05d7d5fc..4c00a932d 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/simple.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: Return Stmt \n n$0=*&v:class X & [line 26]\n n$1=*n$0.field:int [line 26]\n *&return:int =(1 / n$1) [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&v,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +7 [label="7: Return Stmt \n n$0=*&v:class X & [line 26]\n n$1=*n$0.field:int [line 26]\n *&return:int =(1 / n$1) [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&v); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 7 -> 6 ; @@ -18,7 +18,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&v:class Container & [line 21]\n n$1=*n$0.field:int [line 21]\n *&return:int =(1 / n$1) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&v,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&v:class Container & [line 21]\n n$1=*n$0.field:int [line 21]\n *&return:int =(1 / n$1) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&v); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot index d0d2f0a00..3d7c94c08 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/templates/sizeof_pack.cpp.dot @@ -1,14 +1,14 @@ digraph iCFG { -11 [label="11: DeclStmt \n n$1=*&t:int & [line 16]\n n$2=*n$1:int [line 16]\n n$3=_fun_MyHasher_hash(n$2:int ) [line 16]\n *&seed:int =n$3 [line 16]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 16]\n NULLIFY(&t,false); [line 16]\n " shape="box"] +11 [label="11: DeclStmt \n n$1=*&t:int & [line 16]\n n$2=*n$1:int [line 16]\n n$3=_fun_MyHasher_hash(n$2:int ) [line 16]\n *&seed:int =n$3 [line 16]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 16]\n NULLIFY(&t); [line 16]\n " shape="box"] 11 -> 8 ; 11 -> 9 ; -10 [label="10: Return Stmt \n n$0=*&seed:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&seed,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +10 [label="10: Return Stmt \n n$0=*&seed:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&seed); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 10 -> 5 ; -9 [label="9: Prune (false branch) \n PRUNE(((_t$0 == 0) == 0), false); [line 17]\n NULLIFY(&seed,false); [line 17]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((_t$0 == 0) == 0), false); [line 17]\n NULLIFY(&seed); [line 17]\n " shape="invhouse"] 9 -> 7 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot index cf178f1a3..0ada99b61 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/casts.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -6 [label="6: DeclStmt \n *&a:int =(2 + 3.400000) [line 15]\n NULLIFY(&a,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +6 [label="6: DeclStmt \n *&a:int =(2 + 3.400000) [line 15]\n NULLIFY(&a); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 6 -> 5 ; @@ -10,7 +10,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: DeclStmt \n n$0=*&a:int [line 12]\n *&la:long long =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&a,false); [line 12]\n NULLIFY(&la,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&a:int [line 12]\n *&la:long long =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&a); [line 12]\n NULLIFY(&la); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot index 4f93f3211..0ef977a32 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/functions.cpp.dot @@ -37,7 +37,7 @@ digraph iCFG { 10 -> 16 ; -9 [label="9: Return Stmt \n n$0=*&a:int [line 16]\n *&return:int =n$0 [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&a,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&a:int [line 16]\n *&return:int =n$0 [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&a); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 9 -> 8 ; @@ -48,7 +48,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$0=*&a:int [line 14]\n n$1=*&b:int [line 14]\n *&return:int =(n$0 + n$1) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a,false); [line 14]\n NULLIFY(&b,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&a:int [line 14]\n n$1=*&b:int [line 14]\n *&return:int =(n$0 + n$1) [line 14]\n REMOVE_TEMPS(n$0,n$1); [line 14]\n NULLIFY(&a); [line 14]\n NULLIFY(&b); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 6 -> 5 ; @@ -59,7 +59,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&a:int [line 10]\n n$1=*&b:int [line 10]\n *&return:int =(n$0 + n$1) [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&a,false); [line 10]\n NULLIFY(&b,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:int [line 10]\n n$1=*&b:int [line 10]\n *&return:int =(n$0 + n$1) [line 10]\n REMOVE_TEMPS(n$0,n$1); [line 10]\n NULLIFY(&a); [line 10]\n NULLIFY(&b); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot index 52c23f911..1b7553754 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance.cpp.dot @@ -23,15 +23,15 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: Call _fun_Base_fun_redefine \n n$6=*&b:class Base * [line 30]\n n$7=*n$6:class Base [line 30]\n n$8=_fun_Base_fun_redefine(n$6:class Base *) [line 30]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 30]\n NULLIFY(&b,false); [line 30]\n " shape="box"] +19 [label="19: Call _fun_Base_fun_redefine \n n$6=*&b:class Base * [line 30]\n n$7=*n$6:class Base [line 30]\n n$8=_fun_Base_fun_redefine(n$6:class Base *) [line 30]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 30]\n NULLIFY(&b); [line 30]\n " shape="box"] 19 -> 18 ; -18 [label="18: Call _fun_Base_fun_redefine \n n$3=*&s1:class Base * [line 31]\n n$4=*n$3:class Base [line 31]\n n$5=_fun_Base_fun_redefine(n$3:class Base *) [line 31]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 31]\n NULLIFY(&s1,false); [line 31]\n " shape="box"] +18 [label="18: Call _fun_Base_fun_redefine \n n$3=*&s1:class Base * [line 31]\n n$4=*n$3:class Base [line 31]\n n$5=_fun_Base_fun_redefine(n$3:class Base *) [line 31]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 31]\n NULLIFY(&s1); [line 31]\n " shape="box"] 18 -> 17 ; -17 [label="17: Call _fun_Sub_fun_redefine \n n$0=*&s2:class Sub * [line 32]\n n$1=*n$0:class Sub [line 32]\n n$2=_fun_Sub_fun_redefine(n$0:class Sub *) [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&s2,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +17 [label="17: Call _fun_Sub_fun_redefine \n n$0=*&s2:class Sub * [line 32]\n n$1=*n$0:class Sub [line 32]\n n$2=_fun_Sub_fun_redefine(n$0:class Sub *) [line 32]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 32]\n NULLIFY(&s2); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 17 -> 16 ; @@ -42,7 +42,7 @@ digraph iCFG { 15 -> 25 ; -14 [label="14: Constructor Init \n n$0=*&this:class Sub * [line 16]\n _fun_Base_Base(n$0:class Sub *) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&this,false); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] +14 [label="14: Constructor Init \n n$0=*&this:class Sub * [line 16]\n _fun_Base_Base(n$0:class Sub *) [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&this); [line 16]\n APPLY_ABSTRACTION; [line 16]\n " shape="box"] 14 -> 13 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot index 4f85f5280..ace0424f8 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/inheritance_field.cpp.dot @@ -3,11 +3,11 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: DeclStmt \n n$2=*&s:class Sub * [line 68]\n *&b:class Sub *=n$2 [line 68]\n REMOVE_TEMPS(n$2); [line 68]\n NULLIFY(&s,false); [line 68]\n " shape="box"] +40 [label="40: DeclStmt \n n$2=*&s:class Sub * [line 68]\n *&b:class Sub *=n$2 [line 68]\n REMOVE_TEMPS(n$2); [line 68]\n NULLIFY(&s); [line 68]\n " shape="box"] 40 -> 39 ; -39 [label="39: Return Stmt \n n$0=*&b:class Base1 * [line 69]\n n$1=*n$0.b1:int [line 69]\n *&return:int =(1 / n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&b,false); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] +39 [label="39: Return Stmt \n n$0=*&b:class Base1 * [line 69]\n n$1=*n$0.b1:int [line 69]\n *&return:int =(1 / n$1) [line 69]\n REMOVE_TEMPS(n$0,n$1); [line 69]\n NULLIFY(&b); [line 69]\n APPLY_ABSTRACTION; [line 69]\n " shape="box"] 39 -> 38 ; @@ -22,7 +22,7 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Return Stmt \n n$0=*&s.b1:int [line 63]\n *&return:int =(1 / n$0) [line 63]\n REMOVE_TEMPS(n$0); [line 63]\n NULLIFY(&s,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] +35 [label="35: Return Stmt \n n$0=*&s.b1:int [line 63]\n *&return:int =(1 / n$0) [line 63]\n REMOVE_TEMPS(n$0); [line 63]\n NULLIFY(&s); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] 35 -> 34 ; @@ -41,7 +41,7 @@ digraph iCFG { 31 -> 30 ; -30 [label="30: Return Stmt \n n$0=*&s:class Sub * [line 58]\n n$1=*n$0.b1:int [line 58]\n n$2=*&s:class Sub * [line 58]\n n$3=*n$2.s:int [line 58]\n *&return:int =(1 / (n$1 - n$3)) [line 58]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 58]\n NULLIFY(&s,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +30 [label="30: Return Stmt \n n$0=*&s:class Sub * [line 58]\n n$1=*n$0.b1:int [line 58]\n n$2=*&s:class Sub * [line 58]\n n$3=*n$2.s:int [line 58]\n *&return:int =(1 / (n$1 - n$3)) [line 58]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 58]\n NULLIFY(&s); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 30 -> 29 ; @@ -60,7 +60,7 @@ digraph iCFG { 26 -> 25 ; -25 [label="25: Return Stmt \n n$0=*&s:class Sub * [line 52]\n n$1=*n$0.b1:int [line 52]\n n$2=*&s:class Sub * [line 52]\n n$3=*n$2.s:int [line 52]\n *&return:int =(1 / (n$1 - n$3)) [line 52]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 52]\n NULLIFY(&s,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] +25 [label="25: Return Stmt \n n$0=*&s:class Sub * [line 52]\n n$1=*n$0.b1:int [line 52]\n n$2=*&s:class Sub * [line 52]\n n$3=*n$2.s:int [line 52]\n *&return:int =(1 / (n$1 - n$3)) [line 52]\n REMOVE_TEMPS(n$0,n$1,n$2,n$3); [line 52]\n NULLIFY(&s); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] 25 -> 24 ; @@ -79,11 +79,11 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Return Stmt \n n$0=*&b:class Base1 & [line 46]\n n$1=*n$0.b1:int [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n NULLIFY(&b,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +20 [label="20: Return Stmt \n n$0=*&b:class Base1 & [line 46]\n n$1=*n$0.b1:int [line 46]\n *&return:int =(1 / n$1) [line 46]\n REMOVE_TEMPS(n$0,n$1); [line 46]\n NULLIFY(&b); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 20 -> 19 ; -19 [label="19: Exit div0_cast_ref \n NULLIFY(&s,false); [line 47]\n " color=yellow style=filled] +19 [label="19: Exit div0_cast_ref \n NULLIFY(&s); [line 47]\n " color=yellow style=filled] 18 [label="18: Start div0_cast_ref\nFormals: s:class Sub \nLocals: b:class Base1 & \n DECLARE_LOCALS(&return,&b); [line 43]\n " color=yellow style=filled] @@ -94,11 +94,11 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: DeclStmt \n n$2=*&s:class Sub * [line 39]\n *&b:class Sub *=n$2 [line 39]\n REMOVE_TEMPS(n$2); [line 39]\n NULLIFY(&s,false); [line 39]\n " shape="box"] +16 [label="16: DeclStmt \n n$2=*&s:class Sub * [line 39]\n *&b:class Sub *=n$2 [line 39]\n REMOVE_TEMPS(n$2); [line 39]\n NULLIFY(&s); [line 39]\n " shape="box"] 16 -> 15 ; -15 [label="15: Return Stmt \n n$0=*&b:class Base1 * [line 40]\n n$1=*n$0.b1:int [line 40]\n *&return:int =(1 / n$1) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n NULLIFY(&b,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +15 [label="15: Return Stmt \n n$0=*&b:class Base1 * [line 40]\n n$1=*n$0.b1:int [line 40]\n *&return:int =(1 / n$1) [line 40]\n REMOVE_TEMPS(n$0,n$1); [line 40]\n NULLIFY(&b); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 15 -> 14 ; @@ -113,7 +113,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: Return Stmt \n n$0=*&s.s:int [line 34]\n *&return:int =(1 / n$0) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&s,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +11 [label="11: Return Stmt \n n$0=*&s.s:int [line 34]\n *&return:int =(1 / n$0) [line 34]\n REMOVE_TEMPS(n$0); [line 34]\n NULLIFY(&s); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 11 -> 10 ; @@ -128,7 +128,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: Return Stmt \n n$0=*&s.b2:int [line 29]\n *&return:int =(1 / n$0) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&s,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +7 [label="7: Return Stmt \n n$0=*&s.b2:int [line 29]\n *&return:int =(1 / n$0) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&s); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 7 -> 6 ; @@ -143,7 +143,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&s.b1:int [line 24]\n *&return:int =(1 / n$0) [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&s,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&s.b1:int [line 24]\n *&return:int =(1 / n$0) [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&s); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot index 4d1a0a2c9..7d42a0d44 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/operator_overload.cpp.dot @@ -1,5 +1,5 @@ digraph iCFG { -27 [label="27: Return Stmt \n n$0=*&x:class X & [line 45]\n n$1=_fun_X_operator[](n$0:class X &,1:int ) [line 45]\n *&return:int =(1 / n$1) [line 45]\n REMOVE_TEMPS(n$0,n$1); [line 45]\n NULLIFY(&x,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +27 [label="27: Return Stmt \n n$0=*&x:class X & [line 45]\n n$1=_fun_X_operator[](n$0:class X &,1:int ) [line 45]\n *&return:int =(1 / n$1) [line 45]\n REMOVE_TEMPS(n$0,n$1); [line 45]\n NULLIFY(&x); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 27 -> 26 ; @@ -10,7 +10,7 @@ digraph iCFG { 25 -> 27 ; -24 [label="24: Return Stmt \n n$0=*&y:class Y & [line 42]\n n$1=_fun_X_operator[](n$0:class Y &,0:int ) [line 42]\n *&return:int =(1 / n$1) [line 42]\n REMOVE_TEMPS(n$0,n$1); [line 42]\n NULLIFY(&y,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +24 [label="24: Return Stmt \n n$0=*&y:class Y & [line 42]\n n$1=_fun_X_operator[](n$0:class Y &,0:int ) [line 42]\n *&return:int =(1 / n$1) [line 42]\n REMOVE_TEMPS(n$0,n$1); [line 42]\n NULLIFY(&y); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 24 -> 23 ; @@ -21,11 +21,11 @@ digraph iCFG { 22 -> 24 ; -21 [label="21: DeclStmt \n n$1=*&x:class X & [line 36]\n n$2=*n$1:class X [line 36]\n n$3=_fun_X_operator[](n$1:class X &,0:int ) [line 36]\n *&v:int =n$3 [line 36]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 36]\n NULLIFY(&x,false); [line 36]\n " shape="box"] +21 [label="21: DeclStmt \n n$1=*&x:class X & [line 36]\n n$2=*n$1:class X [line 36]\n n$3=_fun_X_operator[](n$1:class X &,0:int ) [line 36]\n *&v:int =n$3 [line 36]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 36]\n NULLIFY(&x); [line 36]\n " shape="box"] 21 -> 20 ; -20 [label="20: Return Stmt \n n$0=*&v:int [line 37]\n *&return:int =(1 / n$0) [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&v,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +20 [label="20: Return Stmt \n n$0=*&v:int [line 37]\n *&return:int =(1 / n$0) [line 37]\n REMOVE_TEMPS(n$0); [line 37]\n NULLIFY(&v); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 20 -> 19 ; @@ -36,11 +36,11 @@ digraph iCFG { 18 -> 21 ; -17 [label="17: DeclStmt \n n$1=*&x:class X & [line 30]\n n$2=_fun_operator*(n$1:class X &,0:int ) [line 30]\n *&v:int =n$2 [line 30]\n REMOVE_TEMPS(n$1,n$2); [line 30]\n NULLIFY(&x,false); [line 30]\n " shape="box"] +17 [label="17: DeclStmt \n n$1=*&x:class X & [line 30]\n n$2=_fun_operator*(n$1:class X &,0:int ) [line 30]\n *&v:int =n$2 [line 30]\n REMOVE_TEMPS(n$1,n$2); [line 30]\n NULLIFY(&x); [line 30]\n " shape="box"] 17 -> 16 ; -16 [label="16: Return Stmt \n n$0=*&v:int [line 31]\n *&return:int =(1 / n$0) [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&v,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +16 [label="16: Return Stmt \n n$0=*&v:int [line 31]\n *&return:int =(1 / n$0) [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&v); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 16 -> 15 ; @@ -51,7 +51,7 @@ digraph iCFG { 14 -> 17 ; -13 [label="13: Return Stmt \n n$0=*&x:class X * [line 26]\n n$1=_fun_X_operator[](n$0:class X &,0:int ) [line 26]\n *&return:int =(1 / n$1) [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&x,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=*&x:class X * [line 26]\n n$1=_fun_X_operator[](n$0:class X &,0:int ) [line 26]\n *&return:int =(1 / n$1) [line 26]\n REMOVE_TEMPS(n$0,n$1); [line 26]\n NULLIFY(&x); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 13 -> 12 ; @@ -62,11 +62,11 @@ digraph iCFG { 11 -> 13 ; -10 [label="10: DeclStmt \n n$1=*&x:class X & [line 22]\n n$2=_fun_X_operator[](n$1:class X &,0:int ) [line 22]\n *&v:int =n$2 [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n NULLIFY(&x,false); [line 22]\n " shape="box"] +10 [label="10: DeclStmt \n n$1=*&x:class X & [line 22]\n n$2=_fun_X_operator[](n$1:class X &,0:int ) [line 22]\n *&v:int =n$2 [line 22]\n REMOVE_TEMPS(n$1,n$2); [line 22]\n NULLIFY(&x); [line 22]\n " shape="box"] 10 -> 9 ; -9 [label="9: Return Stmt \n n$0=*&v:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&v,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&v:int [line 23]\n *&return:int =(1 / n$0) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&v); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 9 -> 8 ; @@ -77,7 +77,7 @@ digraph iCFG { 7 -> 10 ; -6 [label="6: Return Stmt \n n$0=*&v:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&v,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&v:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&v); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 6 -> 5 ; @@ -88,7 +88,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 12]\n *&return:int =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&x,false); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 12]\n *&return:int =n$0 [line 12]\n REMOVE_TEMPS(n$0); [line 12]\n NULLIFY(&x); [line 12]\n APPLY_ABSTRACTION; [line 12]\n " shape="box"] 3 -> 2 ; 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 cb7b2cf57..88eaf7092 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/return_struct.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: Exit get_method_div1 \n NULLIFY(&__temp_return_n$1,false); [line 44]\n " color=yellow style=filled] +34 [label="34: Exit get_method_div1 \n NULLIFY(&__temp_return_n$1); [line 44]\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] @@ -14,7 +14,7 @@ digraph iCFG { 32 -> 31 ; -31 [label="31: Exit get_field_div1 \n NULLIFY(&__temp_return_n$1,false); [line 42]\n " color=yellow style=filled] +31 [label="31: Exit get_field_div1 \n NULLIFY(&__temp_return_n$1); [line 42]\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] @@ -29,7 +29,7 @@ digraph iCFG { 28 -> 27 ; -27 [label="27: Exit get_div1 \n NULLIFY(&x,false); [line 40]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 40]\n " color=yellow style=filled] +27 [label="27: Exit get_div1 \n NULLIFY(&x); [line 40]\n NULLIFY(&SIL_materialize_temp__n$1); [line 40]\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] @@ -40,7 +40,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit get_method_div0 \n NULLIFY(&__temp_return_n$1,false); [line 35]\n " color=yellow style=filled] +24 [label="24: Exit get_method_div0 \n NULLIFY(&__temp_return_n$1); [line 35]\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] @@ -55,7 +55,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Exit get_field_div0 \n NULLIFY(&__temp_return_n$4,false); [line 33]\n NULLIFY(&__temp_return_n$1,false); [line 33]\n " color=yellow style=filled] +20 [label="20: Exit get_field_div0 \n NULLIFY(&__temp_return_n$4); [line 33]\n NULLIFY(&__temp_return_n$1); [line 33]\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] @@ -70,7 +70,7 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: Exit get_div0 \n NULLIFY(&x,false); [line 28]\n NULLIFY(&SIL_materialize_temp__n$1,false); [line 28]\n " color=yellow style=filled] +16 [label="16: Exit get_div0 \n NULLIFY(&x); [line 28]\n NULLIFY(&SIL_materialize_temp__n$1); [line 28]\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] @@ -81,22 +81,22 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: BinaryOperatorStmt: Assign \n n$1=*&a:int [line 21]\n *&x.f:int =n$1 [line 21]\n REMOVE_TEMPS(n$1); [line 21]\n NULLIFY(&a,false); [line 21]\n " shape="box"] +13 [label="13: BinaryOperatorStmt: Assign \n n$1=*&a:int [line 21]\n *&x.f:int =n$1 [line 21]\n REMOVE_TEMPS(n$1); [line 21]\n NULLIFY(&a); [line 21]\n " shape="box"] 13 -> 12 ; -12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 22]\n _fun_X_X(n$0:class X *,&x:class X &) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&__return_param,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&__return_param:class X * [line 22]\n _fun_X_X(n$0:class X *,&x:class X &) [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&__return_param); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 12 -> 11 ; -11 [label="11: Exit get \n NULLIFY(&x,false); [line 23]\n " color=yellow style=filled] +11 [label="11: Exit get \n NULLIFY(&x); [line 23]\n " color=yellow style=filled] 10 [label="10: Start get\nFormals: a:int __return_param:class X *\nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 19]\n " color=yellow style=filled] 10 -> 14 ; -9 [label="9: Return Stmt \n n$0=*&this:class X * [line 15]\n n$1=*n$0.f:int [line 15]\n *&return:int =(1 / n$1) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&this:class X * [line 15]\n n$1=*n$0.f:int [line 15]\n *&return:int =(1 / n$1) [line 15]\n REMOVE_TEMPS(n$0,n$1); [line 15]\n NULLIFY(&this); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 9 -> 8 ; @@ -107,7 +107,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 14]\n *n$0.f:int =1 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&this,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 14]\n *n$0.f:int =1 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&this); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 6 -> 5 ; @@ -118,7 +118,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 13]\n n$1=*&x:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&this,false); [line 13]\n NULLIFY(&x,false); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&this:class X * [line 13]\n n$1=*&x:class X & [line 13]\n n$2=*n$1.f:int [line 13]\n *n$0.f:int =n$2 [line 13]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 13]\n NULLIFY(&this); [line 13]\n NULLIFY(&x); [line 13]\n APPLY_ABSTRACTION; [line 13]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot index e64accf18..d3220989c 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/struct.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&xs:class X_struct * [line 25]\n *n$2.b:int =20 [line 25]\n REMOVE_TEMPS(n$2); [line 25]\n NULLIFY(&xs,false); [line 25]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&xs:class X_struct * [line 25]\n *n$2.b:int =20 [line 25]\n REMOVE_TEMPS(n$2); [line 25]\n NULLIFY(&xs); [line 25]\n " shape="box"] 5 -> 4 ; @@ -11,7 +11,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&xc:class X_class * [line 29]\n *n$0.b:int =20 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&xc,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&xc:class X_class * [line 29]\n *n$0.b:int =20 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&xc); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot b/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot index aee855f20..45dc3483b 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/struct_forward_declare.cpp.dot @@ -3,7 +3,7 @@ digraph iCFG { 41 -> 40 ; -40 [label="40: Return Stmt \n n$0=*&z:class Z * [line 66]\n n$1=*n$0:class Z [line 66]\n n$2=_fun_Z_getF(n$0:class Z *) [line 66]\n *&return:int =(1 / n$2) [line 66]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 66]\n NULLIFY(&z,false); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] +40 [label="40: Return Stmt \n n$0=*&z:class Z * [line 66]\n n$1=*n$0:class Z [line 66]\n n$2=_fun_Z_getF(n$0:class Z *) [line 66]\n *&return:int =(1 / n$2) [line 66]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 66]\n NULLIFY(&z); [line 66]\n APPLY_ABSTRACTION; [line 66]\n " shape="box"] 40 -> 39 ; @@ -26,7 +26,7 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: Exit Z_div0 \n NULLIFY(&z,false); [line 59]\n " color=yellow style=filled] +34 [label="34: Exit Z_div0 \n NULLIFY(&z); [line 59]\n " color=yellow style=filled] 33 [label="33: Start Z_div0\nFormals: \nLocals: z:class Z \n DECLARE_LOCALS(&return,&z); [line 55]\n " color=yellow style=filled] @@ -66,7 +66,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Exit X_Y_div0 \n NULLIFY(&x,false); [line 53]\n " color=yellow style=filled] +24 [label="24: Exit X_Y_div0 \n NULLIFY(&x); [line 53]\n " color=yellow style=filled] 23 [label="23: Start X_Y_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 45]\n " color=yellow style=filled] @@ -77,7 +77,7 @@ digraph iCFG { 22 -> 21 ; -21 [label="21: Return Stmt \n n$0=*&x:class X * [line 42]\n n$1=*n$0:class X [line 42]\n n$2=_fun_X_getF(n$0:class X *) [line 42]\n *&return:int =(1 / n$2) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&x,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] +21 [label="21: Return Stmt \n n$0=*&x:class X * [line 42]\n n$1=*n$0:class X [line 42]\n n$2=_fun_X_getF(n$0:class X *) [line 42]\n *&return:int =(1 / n$2) [line 42]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 42]\n NULLIFY(&x); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="box"] 21 -> 20 ; @@ -100,7 +100,7 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Exit X_div0 \n NULLIFY(&x,false); [line 38]\n " color=yellow style=filled] +15 [label="15: Exit X_div0 \n NULLIFY(&x); [line 38]\n " color=yellow style=filled] 14 [label="14: Start X_div0\nFormals: \nLocals: x:class X \n DECLARE_LOCALS(&return,&x); [line 34]\n " color=yellow style=filled] @@ -114,7 +114,7 @@ digraph iCFG { 12 -> 13 ; -11 [label="11: Return Stmt \n n$0=*&this:class Z * [line 28]\n n$1=*n$0.f:int [line 28]\n *&return:int =n$1 [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&this,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +11 [label="11: Return Stmt \n n$0=*&this:class Z * [line 28]\n n$1=*n$0.f:int [line 28]\n *&return:int =n$1 [line 28]\n REMOVE_TEMPS(n$0,n$1); [line 28]\n NULLIFY(&this); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 11 -> 10 ; @@ -125,7 +125,7 @@ digraph iCFG { 9 -> 11 ; -8 [label="8: DeclStmt \n n$0=*&z1:class Z * [line 24]\n *&z2:class Z *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&z1,false); [line 24]\n NULLIFY(&z2,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +8 [label="8: DeclStmt \n n$0=*&z1:class Z * [line 24]\n *&z2:class Z *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&z1); [line 24]\n NULLIFY(&z2); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 8 -> 7 ; @@ -143,7 +143,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n n$0=*&this:class X * [line 19]\n n$1=*n$0.f:int [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&this,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&this:class X * [line 19]\n n$1=*n$0.f:int [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&this); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 3 -> 2 ; 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 c3222bd79..4eabf042d 100644 --- a/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot +++ b/infer/tests/codetoanalyze/cpp/frontend/types/typeid_expr.cpp.dot @@ -32,14 +32,14 @@ digraph iCFG { 63 -> 64 ; -62 [label="62: Exit template_type_id_person \n NULLIFY(&person,false); [line 68]\n " color=yellow style=filled] +62 [label="62: Exit template_type_id_person \n NULLIFY(&person); [line 68]\n " color=yellow style=filled] 61 [label="61: Start template_type_id_person\nFormals: \nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 62]\n " color=yellow style=filled] 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 REMOVE_TEMPS(n$4); [line 58]\n NULLIFY(&value,false); [line 58]\n " shape="box"] +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 REMOVE_TEMPS(n$4); [line 58]\n NULLIFY(&value); [line 58]\n " shape="box"] 60 -> 59 ; @@ -47,7 +47,7 @@ digraph iCFG { 59 -> 58 ; -58 [label="58: Exit template_typeid \n NULLIFY(&result,false); [line 60]\n NULLIFY(&SIL_materialize_temp__n$3,false); [line 60]\n " color=yellow style=filled] +58 [label="58: Exit template_typeid \n NULLIFY(&result); [line 60]\n NULLIFY(&SIL_materialize_temp__n$3); [line 60]\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] @@ -74,7 +74,7 @@ digraph iCFG { 52 -> 54 ; -51 [label="51: BinaryOperatorStmt: EQ \n n$0=*&ptr:class Person * [line 50]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n n$2=*n$1:class std::type_info [line 50]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n n$5=*n$4:class std::type_info [line 50]\n n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n NULLIFY(&ptr,false); [line 50]\n " shape="box"] +51 [label="51: BinaryOperatorStmt: EQ \n n$0=*&ptr:class Person * [line 50]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,n$0:class Person ) [line 50]\n n$2=*n$1:class std::type_info [line 50]\n n$3=_fun_std::type_info_name(n$1:class std::type_info &) [line 50]\n n$4=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$4.__type_name:void ,&person:class Person ) [line 50]\n n$5=*n$4:class std::type_info [line 50]\n n$6=_fun_std::type_info_name(n$4:class std::type_info &) [line 50]\n NULLIFY(&ptr); [line 50]\n " shape="box"] 51 -> 52 ; @@ -87,7 +87,7 @@ digraph iCFG { 49 -> 50 ; -48 [label="48: Exit person_ptr_typeid \n NULLIFY(&person,false); [line 54]\n " color=yellow style=filled] +48 [label="48: Exit person_ptr_typeid \n NULLIFY(&person); [line 54]\n " color=yellow style=filled] 47 [label="47: Start person_ptr_typeid\nFormals: ptr:class Person *\nLocals: person:class Person \n DECLARE_LOCALS(&return,&person); [line 48]\n " color=yellow style=filled] @@ -118,7 +118,7 @@ digraph iCFG { 41 -> 43 ; -40 [label="40: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n n$1=*&ptr:class Person * [line 42]\n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n NULLIFY(&ptr,false); [line 42]\n " shape="box"] +40 [label="40: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&employee:class Employee ) [line 42]\n n$1=*&ptr:class Person * [line 42]\n n$2=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$2.__type_name:void ,n$1:class Person ) [line 42]\n n$3=_fun_std::type_info_operator==(n$0:class std::type_info &,n$2:class std::type_info &) [line 42]\n NULLIFY(&ptr); [line 42]\n " shape="box"] 40 -> 41 ; @@ -131,7 +131,7 @@ digraph iCFG { 38 -> 39 ; -37 [label="37: Exit employee_typeid \n NULLIFY(&employee,false); [line 46]\n " color=yellow style=filled] +37 [label="37: Exit employee_typeid \n NULLIFY(&employee); [line 46]\n " color=yellow style=filled] 36 [label="36: Start employee_typeid\nFormals: \nLocals: ptr:class Person * employee:class Employee \n DECLARE_LOCALS(&return,&ptr,&employee); [line 39]\n " color=yellow style=filled] @@ -146,7 +146,7 @@ digraph iCFG { 34 -> 33 ; -33 [label="33: DeclStmt \n n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n n$6=*n$5:class std::type_info [line 31]\n n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n *&t_type_info:char *=n$7 [line 31]\n REMOVE_TEMPS(n$5,n$6,n$7); [line 31]\n NULLIFY(&t,false); [line 31]\n " shape="box"] +33 [label="33: DeclStmt \n n$5=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$5.__type_name:void ,&t:int ) [line 31]\n n$6=*n$5:class std::type_info [line 31]\n n$7=_fun_std::type_info_name(n$5:class std::type_info &) [line 31]\n *&t_type_info:char *=n$7 [line 31]\n REMOVE_TEMPS(n$5,n$6,n$7); [line 31]\n NULLIFY(&t); [line 31]\n " shape="box"] 33 -> 32 ; @@ -170,7 +170,7 @@ digraph iCFG { 28 -> 30 ; -27 [label="27: BinaryOperatorStmt: EQ \n n$0=*&t_type_info:char * [line 33]\n n$1=*&person_type_info:char * [line 33]\n NULLIFY(&person_type_info,false); [line 33]\n NULLIFY(&t_type_info,false); [line 33]\n " shape="box"] +27 [label="27: BinaryOperatorStmt: EQ \n n$0=*&t_type_info:char * [line 33]\n n$1=*&person_type_info:char * [line 33]\n NULLIFY(&person_type_info); [line 33]\n NULLIFY(&t_type_info); [line 33]\n " shape="box"] 27 -> 28 ; @@ -183,7 +183,7 @@ digraph iCFG { 25 -> 26 ; -24 [label="24: Exit person_typeid_name \n NULLIFY(&person,false); [line 37]\n " color=yellow style=filled] +24 [label="24: Exit person_typeid_name \n NULLIFY(&person); [line 37]\n " color=yellow style=filled] 23 [label="23: Start person_typeid_name\nFormals: \nLocals: person_type_info:char * t_type_info:char * t:int person:class Person \n DECLARE_LOCALS(&return,&person_type_info,&t_type_info,&t,&person); [line 28]\n " color=yellow style=filled] @@ -214,7 +214,7 @@ digraph iCFG { 17 -> 19 ; -16 [label="16: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n NULLIFY(&t,false); [line 22]\n " shape="box"] +16 [label="16: Call _fun_std::type_info_operator== \n n$0=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$0.__type_name:void ,&t:int ) [line 22]\n n$1=_fun___cxx_typeid(sizeof(class std::type_info ):void ,n$1.__type_name:void ,&person:class Person ) [line 22]\n n$2=_fun_std::type_info_operator==(n$0:class std::type_info &,n$1:class std::type_info &) [line 22]\n NULLIFY(&t); [line 22]\n " shape="box"] 16 -> 17 ; @@ -227,14 +227,14 @@ digraph iCFG { 14 -> 15 ; -13 [label="13: Exit person_typeid \n NULLIFY(&person,false); [line 26]\n " color=yellow style=filled] +13 [label="13: Exit person_typeid \n NULLIFY(&person); [line 26]\n " color=yellow style=filled] 12 [label="12: Start person_typeid\nFormals: \nLocals: t:int person:class Person \n DECLARE_LOCALS(&return,&t,&person); [line 19]\n " color=yellow style=filled] 12 -> 22 ; -11 [label="11: Constructor Init \n n$0=*&this:class Employee * [line 17]\n _fun_Person_Person(n$0:class Employee *) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&this,false); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] +11 [label="11: Constructor Init \n n$0=*&this:class Employee * [line 17]\n _fun_Person_Person(n$0:class Employee *) [line 17]\n REMOVE_TEMPS(n$0); [line 17]\n NULLIFY(&this); [line 17]\n APPLY_ABSTRACTION; [line 17]\n " shape="box"] 11 -> 10 ; diff --git a/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.dot b/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.dot index 2c39d8de8..3d3f1f36e 100644 --- a/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.dot +++ b/infer/tests/codetoanalyze/objc/errors/category_procdesc/main.dot @@ -3,11 +3,11 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: Message Call: performDaysWork \n n$1=*&person:class EOCPerson * [line 14]\n _fun_EOCPerson_performDaysWork(n$1:class EOCPerson *) virtual [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&person,false); [line 14]\n " shape="box"] +5 [label="5: Message Call: performDaysWork \n n$1=*&person:class EOCPerson * [line 14]\n _fun_EOCPerson_performDaysWork(n$1:class EOCPerson *) virtual [line 14]\n REMOVE_TEMPS(n$1); [line 14]\n NULLIFY(&person); [line 14]\n " shape="box"] 5 -> 4 ; -4 [label="4: DeclStmt \n n$0=_fun_malloc_no_fail(sizeof(int ):int ) [line 15]\n *&x:int *=n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&x,false); [line 15]\n " shape="box"] +4 [label="4: DeclStmt \n n$0=_fun_malloc_no_fail(sizeof(int ):int ) [line 15]\n *&x:int *=n$0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&x); [line 15]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot b/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot index b7b77f5e7..38b35873a 100644 --- a/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/field_superclass/SuperExample.dot @@ -1,5 +1,5 @@ digraph iCFG { -12 [label="12: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 42]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 42]\n *&a:struct objc_object *=n$2 [line 42]\n REMOVE_TEMPS(n$1,n$2); [line 42]\n NULLIFY(&a,false); [line 42]\n " shape="box"] +12 [label="12: DeclStmt \n n$1=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 42]\n n$2=_fun_NSObject_init(n$1:class A *) virtual [line 42]\n *&a:struct objc_object *=n$2 [line 42]\n REMOVE_TEMPS(n$1,n$2); [line 42]\n NULLIFY(&a); [line 42]\n " shape="box"] 12 -> 11 ; @@ -22,7 +22,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&self:class A * [line 35]\n *&return:struct objc_object *=n$0 [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n NULLIFY(&self,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&self:class A * [line 35]\n *&return:struct objc_object *=n$0 [line 35]\n REMOVE_TEMPS(n$0); [line 35]\n NULLIFY(&self); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot index 74bbc835a..b6442852a 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/ArcExample.dot @@ -3,7 +3,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: Return Stmt \n n$3=*&s:class NSString * [line 30]\n *&return:class NSString *=n$3 [line 30]\n REMOVE_TEMPS(n$3); [line 30]\n NULLIFY(&s,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +7 [label="7: Return Stmt \n n$3=*&s:class NSString * [line 30]\n *&return:class NSString *=n$3 [line 30]\n REMOVE_TEMPS(n$3); [line 30]\n NULLIFY(&s); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 7 -> 6 ; @@ -18,7 +18,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&s:class NSString * [line 24]\n *&return:class NSString *=n$0 [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&s:class NSString * [line 24]\n *&return:class NSString *=n$0 [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot index d7d7757f7..bf6c098ca 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/AutoreleaseExample.dot @@ -7,11 +7,11 @@ digraph iCFG { 36 -> 35 ; -35 [label="35: Message Call: release \n n$1=*&pool:class NSAutoreleasePool * [line 63]\n _fun___objc_release_autorelease_pool(n$1:class NSAutoreleasePool *) [line 63]\n REMOVE_TEMPS(n$1); [line 63]\n NULLIFY(&pool,false); [line 63]\n " shape="box"] +35 [label="35: Message Call: release \n n$1=*&pool:class NSAutoreleasePool * [line 63]\n _fun___objc_release_autorelease_pool(n$1:class NSAutoreleasePool *) [line 63]\n REMOVE_TEMPS(n$1); [line 63]\n NULLIFY(&pool); [line 63]\n " shape="box"] 35 -> 34 ; -34 [label="34: DeclStmt \n n$0=*&string:class NSString * [line 64]\n *&c:class NSString *=n$0 [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n NULLIFY(&c,false); [line 64]\n NULLIFY(&string,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] +34 [label="34: DeclStmt \n n$0=*&string:class NSString * [line 64]\n *&c:class NSString *=n$0 [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n NULLIFY(&c); [line 64]\n NULLIFY(&string); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="box"] 34 -> 33 ; @@ -54,7 +54,7 @@ digraph iCFG { 24 -> 23 ; -23 [label="23: Exit test2 \n NULLIFY(&s3,false); [line 57]\n NULLIFY(&s2,false); [line 57]\n NULLIFY(&s1,false); [line 57]\n " color=yellow style=filled] +23 [label="23: Exit test2 \n NULLIFY(&s3); [line 57]\n NULLIFY(&s2); [line 57]\n NULLIFY(&s1); [line 57]\n " color=yellow style=filled] 22 [label="22: Start test2\nFormals: \nLocals: s3:class A * s2:class A * s1:class A * \n DECLARE_LOCALS(&return,&s3,&s2,&s1); [line 47]\n " color=yellow style=filled] @@ -97,7 +97,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Exit test1 \n NULLIFY(&s3,false); [line 45]\n NULLIFY(&s2,false); [line 45]\n NULLIFY(&s1,false); [line 45]\n " color=yellow style=filled] +12 [label="12: Exit test1 \n NULLIFY(&s3); [line 45]\n NULLIFY(&s2); [line 45]\n NULLIFY(&s1); [line 45]\n " color=yellow style=filled] 11 [label="11: Start test1\nFormals: \nLocals: s3:class A * s2:class A * s1:class A * \n DECLARE_LOCALS(&return,&s3,&s2,&s1); [line 34]\n " color=yellow style=filled] @@ -108,7 +108,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Return Stmt \n n$0=*&s1:class A * [line 31]\n n$1=_fun___set_autorelease_attribute(n$0:class A *) [line 31]\n *&return:class A *=n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n NULLIFY(&s1,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +9 [label="9: Return Stmt \n n$0=*&s1:class A * [line 31]\n n$1=_fun___set_autorelease_attribute(n$0:class A *) [line 31]\n *&return:class A *=n$1 [line 31]\n REMOVE_TEMPS(n$0,n$1); [line 31]\n NULLIFY(&s1); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 9 -> 8 ; @@ -123,7 +123,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&s:class NSString * [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n *&return:class NSString *=n$1 [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +5 [label="5: Return Stmt \n n$0=*&s:class NSString * [line 24]\n n$1=_fun___set_autorelease_attribute(n$0:class NSString *) [line 24]\n *&return:class NSString *=n$1 [line 24]\n REMOVE_TEMPS(n$0,n$1); [line 24]\n NULLIFY(&s); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot index fb674a5d0..b7460f12e 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/MemoryLeakExample.dot @@ -7,7 +7,7 @@ digraph iCFG { 72 -> 71 ; -71 [label="71: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,false); [line 105]\n NULLIFY(&x,false); [line 105]\n " shape="box"] +71 [label="71: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n n$56=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 ):unsigned long ) [line 105]\n *&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2:class __objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2 =n$56 [line 105]\n n$57=*&x:int * [line 105]\n *n$56.x:int *=n$57 [line 105]\n n$51=*&x:int * [line 105]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2,n$51) [line 105]\n REMOVE_TEMPS(n$56,n$57,n$51); [line 105]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockFreeNoLeakTODO______2); [line 105]\n NULLIFY(&x); [line 105]\n " shape="box"] 71 -> 65 ; @@ -15,11 +15,11 @@ digraph iCFG { 70 -> 69 ; -69 [label="69: Call _fun_free \n n$53=*&x:int * [line 107]\n _fun_free(n$53:void *) [line 107]\n REMOVE_TEMPS(n$53); [line 107]\n NULLIFY(&x,false); [line 107]\n " shape="box"] +69 [label="69: Call _fun_free \n n$53=*&x:int * [line 107]\n _fun_free(n$53:void *) [line 107]\n REMOVE_TEMPS(n$53); [line 107]\n NULLIFY(&x); [line 107]\n " shape="box"] 69 -> 68 ; -68 [label="68: Return Stmt \n n$52=*&i:int [line 108]\n *&return:int =n$52 [line 108]\n REMOVE_TEMPS(n$52); [line 108]\n NULLIFY(&i,false); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] +68 [label="68: Return Stmt \n n$52=*&i:int [line 108]\n *&return:int =n$52 [line 108]\n REMOVE_TEMPS(n$52); [line 108]\n NULLIFY(&i); [line 108]\n APPLY_ABSTRACTION; [line 108]\n " shape="box"] 68 -> 67 ; @@ -30,7 +30,7 @@ digraph iCFG { 66 -> 70 ; -65 [label="65: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&blk,false); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] +65 [label="65: Return Stmt \n n$49=*&blk:_fn_ (*) [line 110]\n n$50=n$49() [line 110]\n *&return:int =n$50 [line 110]\n REMOVE_TEMPS(n$49,n$50); [line 110]\n NULLIFY(&blk); [line 110]\n APPLY_ABSTRACTION; [line 110]\n " shape="box"] 65 -> 64 ; @@ -49,11 +49,11 @@ digraph iCFG { 61 -> 60 ; -60 [label="60: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,false); [line 96]\n NULLIFY(&x,false); [line 96]\n " shape="box"] +60 [label="60: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n n$45=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 ):unsigned long ) [line 96]\n *&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1:class __objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1 =n$45 [line 96]\n n$46=*&x:int * [line 96]\n *n$45.x:int *=n$46 [line 96]\n n$42=*&x:int * [line 96]\n *&blk:_fn_ (*)=(_fun___objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1,n$42) [line 96]\n REMOVE_TEMPS(n$45,n$46,n$42); [line 96]\n NULLIFY(&__objc_anonymous_block_MemoryLeakExample_blockCapturedVarLeak______1); [line 96]\n NULLIFY(&x); [line 96]\n " shape="box"] 60 -> 56 ; -59 [label="59: Return Stmt \n n$43=*&x:int * [line 97]\n n$44=*n$43:int [line 97]\n *&return:int =n$44 [line 97]\n REMOVE_TEMPS(n$43,n$44); [line 97]\n NULLIFY(&x,false); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] +59 [label="59: Return Stmt \n n$43=*&x:int * [line 97]\n n$44=*n$43:int [line 97]\n *&return:int =n$44 [line 97]\n REMOVE_TEMPS(n$43,n$44); [line 97]\n NULLIFY(&x); [line 97]\n APPLY_ABSTRACTION; [line 97]\n " shape="box"] 59 -> 58 ; @@ -64,7 +64,7 @@ digraph iCFG { 57 -> 59 ; -56 [label="56: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&blk,false); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] +56 [label="56: Return Stmt \n n$40=*&blk:_fn_ (*) [line 99]\n n$41=n$40() [line 99]\n *&return:int =n$41 [line 99]\n REMOVE_TEMPS(n$40,n$41); [line 99]\n NULLIFY(&blk); [line 99]\n APPLY_ABSTRACTION; [line 99]\n " shape="box"] 56 -> 55 ; @@ -83,7 +83,7 @@ digraph iCFG { 52 -> 51 ; -51 [label="51: Return Stmt \n n$36=*&x:int * [line 90]\n n$37=*n$36:int [line 90]\n *&return:int =n$37 [line 90]\n REMOVE_TEMPS(n$36,n$37); [line 90]\n NULLIFY(&x,false); [line 90]\n APPLY_ABSTRACTION; [line 90]\n " shape="box"] +51 [label="51: Return Stmt \n n$36=*&x:int * [line 90]\n n$37=*n$36:int [line 90]\n *&return:int =n$37 [line 90]\n REMOVE_TEMPS(n$36,n$37); [line 90]\n NULLIFY(&x); [line 90]\n APPLY_ABSTRACTION; [line 90]\n " shape="box"] 51 -> 50 ; @@ -98,7 +98,7 @@ digraph iCFG { 48 -> 47 ; -47 [label="47: Call _fun_CGColorRelease \n n$34=*&borderColor:struct CGColor * [line 84]\n _fun_CGColorRelease(n$34:struct CGColor *) [line 84]\n REMOVE_TEMPS(n$34); [line 84]\n NULLIFY(&borderColor,false); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] +47 [label="47: Call _fun_CGColorRelease \n n$34=*&borderColor:struct CGColor * [line 84]\n _fun_CGColorRelease(n$34:struct CGColor *) [line 84]\n REMOVE_TEMPS(n$34); [line 84]\n NULLIFY(&borderColor); [line 84]\n APPLY_ABSTRACTION; [line 84]\n " shape="box"] 47 -> 46 ; @@ -113,7 +113,7 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: Call _fun_CGImageRelease \n n$32=*&newImage:struct CGImage * [line 77]\n _fun_CGImageRelease(n$32:struct CGImage *) [line 77]\n REMOVE_TEMPS(n$32); [line 77]\n NULLIFY(&newImage,false); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] +43 [label="43: Call _fun_CGImageRelease \n n$32=*&newImage:struct CGImage * [line 77]\n _fun_CGImageRelease(n$32:struct CGImage *) [line 77]\n REMOVE_TEMPS(n$32); [line 77]\n NULLIFY(&newImage); [line 77]\n APPLY_ABSTRACTION; [line 77]\n " shape="box"] 43 -> 42 ; @@ -128,7 +128,7 @@ digraph iCFG { 40 -> 39 ; -39 [label="39: Call _fun___objc_release_cf \n n$30=*&allowedPublicKey:struct __SecKey * [line 72]\n _fun___objc_release_cf(1:_Bool ,n$30:void *) [line 72]\n REMOVE_TEMPS(n$30); [line 72]\n NULLIFY(&allowedPublicKey,false); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] +39 [label="39: Call _fun___objc_release_cf \n n$30=*&allowedPublicKey:struct __SecKey * [line 72]\n _fun___objc_release_cf(1:_Bool ,n$30:void *) [line 72]\n REMOVE_TEMPS(n$30); [line 72]\n NULLIFY(&allowedPublicKey); [line 72]\n APPLY_ABSTRACTION; [line 72]\n " shape="box"] 39 -> 38 ; @@ -139,7 +139,7 @@ digraph iCFG { 37 -> 40 ; -36 [label="36: Call _fun_SecTrustCopyPublicKey \n n$28=*&trust:struct __SecTrust * [line 67]\n n$29=_fun_SecTrustCopyPublicKey(n$28:struct __SecTrust *) [line 67]\n REMOVE_TEMPS(n$28,n$29); [line 67]\n NULLIFY(&trust,false); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] +36 [label="36: Call _fun_SecTrustCopyPublicKey \n n$28=*&trust:struct __SecTrust * [line 67]\n n$29=_fun_SecTrustCopyPublicKey(n$28:struct __SecTrust *) [line 67]\n REMOVE_TEMPS(n$28,n$29); [line 67]\n NULLIFY(&trust); [line 67]\n APPLY_ABSTRACTION; [line 67]\n " shape="box"] 36 -> 35 ; @@ -150,7 +150,7 @@ digraph iCFG { 34 -> 36 ; -33 [label="33: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&lineThickness,false); [line 59]\n NULLIFY(&rect,false); [line 59]\n " shape="box"] +33 [label="33: DeclStmt \n n$26=*&rect:struct CGRect [line 59]\n n$27=_fun_CGRectGetHeight(n$26:struct CGRect ) [line 59]\n *&lineThickness:double =(0.200000 * n$27) [line 59]\n REMOVE_TEMPS(n$26,n$27); [line 59]\n NULLIFY(&lineThickness); [line 59]\n NULLIFY(&rect); [line 59]\n " shape="box"] 33 -> 32 ; @@ -158,7 +158,7 @@ digraph iCFG { 32 -> 31 ; -31 [label="31: Call _fun___objc_release_cf \n n$24=*&path1:struct CGPath * [line 63]\n _fun___objc_release_cf(1:_Bool ,n$24:void *) [line 63]\n REMOVE_TEMPS(n$24); [line 63]\n NULLIFY(&path1,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] +31 [label="31: Call _fun___objc_release_cf \n n$24=*&path1:struct CGPath * [line 63]\n _fun___objc_release_cf(1:_Bool ,n$24:void *) [line 63]\n REMOVE_TEMPS(n$24); [line 63]\n NULLIFY(&path1); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] 31 -> 30 ; @@ -169,7 +169,7 @@ digraph iCFG { 29 -> 33 ; -28 [label="28: BinaryOperatorStmt: Mul \n n$22=*&rect:struct CGRect [line 54]\n n$23=_fun_CGRectGetHeight(n$22:struct CGRect ) [line 54]\n REMOVE_TEMPS(n$22,n$23); [line 54]\n NULLIFY(&rect,false); [line 54]\n " shape="box"] +28 [label="28: BinaryOperatorStmt: Mul \n n$22=*&rect:struct CGRect [line 54]\n n$23=_fun_CGRectGetHeight(n$22:struct CGRect ) [line 54]\n REMOVE_TEMPS(n$22,n$23); [line 54]\n NULLIFY(&rect); [line 54]\n " shape="box"] 28 -> 27 ; @@ -188,7 +188,7 @@ digraph iCFG { 24 -> 23 ; -23 [label="23: Call _fun___objc_release_cf \n n$19=*&framesetter:struct __CTFramesetter * [line 50]\n _fun___objc_release_cf(1:_Bool ,n$19:void *) [line 50]\n REMOVE_TEMPS(n$19); [line 50]\n NULLIFY(&framesetter,false); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] +23 [label="23: Call _fun___objc_release_cf \n n$19=*&framesetter:struct __CTFramesetter * [line 50]\n _fun___objc_release_cf(1:_Bool ,n$19:void *) [line 50]\n REMOVE_TEMPS(n$19); [line 50]\n NULLIFY(&framesetter); [line 50]\n APPLY_ABSTRACTION; [line 50]\n " shape="box"] 23 -> 22 ; @@ -199,7 +199,7 @@ digraph iCFG { 21 -> 24 ; -20 [label="20: Call _fun_CTFramesetterCreateWithAttributedString \n n$17=*&str:struct __CFAttributedString * [line 45]\n n$18=_fun_CTFramesetterCreateWithAttributedString(n$17:struct __CFAttributedString *) [line 45]\n REMOVE_TEMPS(n$17,n$18); [line 45]\n NULLIFY(&str,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +20 [label="20: Call _fun_CTFramesetterCreateWithAttributedString \n n$17=*&str:struct __CFAttributedString * [line 45]\n n$18=_fun_CTFramesetterCreateWithAttributedString(n$17:struct __CFAttributedString *) [line 45]\n REMOVE_TEMPS(n$17,n$18); [line 45]\n NULLIFY(&str); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 20 -> 19 ; @@ -214,7 +214,7 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: Call _fun___objc_release_cf \n n$15=*&maString:struct __CFAttributedString * [line 41]\n _fun___objc_release_cf(1:_Bool ,n$15:void *) [line 41]\n REMOVE_TEMPS(n$15); [line 41]\n NULLIFY(&maString,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +16 [label="16: Call _fun___objc_release_cf \n n$15=*&maString:struct __CFAttributedString * [line 41]\n _fun___objc_release_cf(1:_Bool ,n$15:void *) [line 41]\n REMOVE_TEMPS(n$15); [line 41]\n NULLIFY(&maString); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 16 -> 15 ; @@ -240,7 +240,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Message Call: setShadowPath: \n n$6=*&self:class MemoryLeakExample * [line 31]\n n$7=_fun_MemoryLeakExample_backgroundCoveringView(n$6:class MemoryLeakExample *) [line 31]\n n$8=_fun_UIView_layer(n$7:class UIView *) [line 31]\n n$9=*&shadowPath:struct CGPath * [line 31]\n _fun_CALayer_setShadowPath:(n$8:class CALayer *,n$9:struct CGPath *) [line 31]\n REMOVE_TEMPS(n$6,n$7,n$8,n$9); [line 31]\n NULLIFY(&self,false); [line 31]\n NULLIFY(&shadowPath,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +9 [label="9: Message Call: setShadowPath: \n n$6=*&self:class MemoryLeakExample * [line 31]\n n$7=_fun_MemoryLeakExample_backgroundCoveringView(n$6:class MemoryLeakExample *) [line 31]\n n$8=_fun_UIView_layer(n$7:class UIView *) [line 31]\n n$9=*&shadowPath:struct CGPath * [line 31]\n _fun_CALayer_setShadowPath:(n$8:class CALayer *,n$9:struct CGPath *) [line 31]\n REMOVE_TEMPS(n$6,n$7,n$8,n$9); [line 31]\n NULLIFY(&self); [line 31]\n NULLIFY(&shadowPath); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 9 -> 8 ; @@ -259,11 +259,11 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: Call _fun_CGPathRelease \n n$1=*&shadowPath:struct CGPath * [line 24]\n _fun_CGPathRelease(n$1:struct CGPath *) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&shadowPath,false); [line 24]\n " shape="box"] +4 [label="4: Call _fun_CGPathRelease \n n$1=*&shadowPath:struct CGPath * [line 24]\n _fun_CGPathRelease(n$1:struct CGPath *) [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&shadowPath); [line 24]\n " shape="box"] 4 -> 3 ; -3 [label="3: Message Call: release \n n$0=*&attachmentContainerView:class UIView * [line 25]\n _fun___objc_release(n$0:class UIView *) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&attachmentContainerView,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +3 [label="3: Message Call: release \n n$0=*&attachmentContainerView:class UIView * [line 25]\n _fun___objc_release(n$0:class UIView *) [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&attachmentContainerView); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot index a51817b8b..70735f6e7 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample.dot @@ -7,7 +7,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Message Call: release \n n$0=*&a:class A * [line 23]\n _fun___objc_release(n$0:class A *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +3 [label="3: Message Call: release \n n$0=*&a:class A * [line 23]\n _fun___objc_release(n$0:class A *) [line 23]\n REMOVE_TEMPS(n$0); [line 23]\n NULLIFY(&a); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot index cb382194f..3348032ae 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/RetainReleaseExample2.dot @@ -1,9 +1,9 @@ digraph iCFG { -33 [label="33: Call _fun___objc_release \n n$1=*&a:class A * [line 65]\n _fun___objc_release(n$1:class A *) [line 65]\n REMOVE_TEMPS(n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] +33 [label="33: Call _fun___objc_release \n n$1=*&a:class A * [line 65]\n _fun___objc_release(n$1:class A *) [line 65]\n REMOVE_TEMPS(n$1); [line 65]\n NULLIFY(&a); [line 65]\n APPLY_ABSTRACTION; [line 65]\n " shape="box"] 33 -> 29 ; -32 [label="32: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n NULLIFY(&a,false); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] +32 [label="32: Prune (false branch) \n n$0=*&a:class A * [line 64]\n PRUNE((n$0 == 0), false); [line 64]\n REMOVE_TEMPS(n$0); [line 64]\n NULLIFY(&a); [line 64]\n APPLY_ABSTRACTION; [line 64]\n " shape="invhouse"] 32 -> 29 ; @@ -35,7 +35,7 @@ digraph iCFG { 25 -> 24 ; -24 [label="24: Message Call: release \n n$0=*&a:class A * [line 59]\n _fun___objc_release(n$0:class A *) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&a,false); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] +24 [label="24: Message Call: release \n n$0=*&a:class A * [line 59]\n _fun___objc_release(n$0:class A *) [line 59]\n REMOVE_TEMPS(n$0); [line 59]\n NULLIFY(&a); [line 59]\n APPLY_ABSTRACTION; [line 59]\n " shape="box"] 24 -> 23 ; @@ -50,7 +50,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Message Call: release \n n$0=*&a:class A * [line 52]\n _fun___objc_release(n$0:class A *) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n NULLIFY(&a,false); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] +20 [label="20: Message Call: release \n n$0=*&a:class A * [line 52]\n _fun___objc_release(n$0:class A *) [line 52]\n REMOVE_TEMPS(n$0); [line 52]\n NULLIFY(&a); [line 52]\n APPLY_ABSTRACTION; [line 52]\n " shape="box"] 20 -> 19 ; @@ -65,7 +65,7 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: Message Call: release \n n$0=*&b:class A * [line 46]\n _fun___objc_release(n$0:class A *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&b,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +16 [label="16: Message Call: release \n n$0=*&b:class A * [line 46]\n _fun___objc_release(n$0:class A *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&b); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 16 -> 15 ; @@ -76,7 +76,7 @@ digraph iCFG { 14 -> 17 ; -13 [label="13: DeclStmt \n n$0=_fun_test() [line 40]\n *&b:class A *=n$0 [line 40]\n REMOVE_TEMPS(n$0); [line 40]\n NULLIFY(&b,false); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] +13 [label="13: DeclStmt \n n$0=_fun_test() [line 40]\n *&b:class A *=n$0 [line 40]\n REMOVE_TEMPS(n$0); [line 40]\n NULLIFY(&b); [line 40]\n APPLY_ABSTRACTION; [line 40]\n " shape="box"] 13 -> 12 ; @@ -91,7 +91,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&b:class A * [line 36]\n *&#GB$g:class A *=n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&b,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$0=*&b:class A * [line 36]\n *&#GB$g:class A *=n$0 [line 36]\n REMOVE_TEMPS(n$0); [line 36]\n NULLIFY(&b); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 9 -> 8 ; @@ -114,7 +114,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&a:class A * [line 29]\n *&return:class A *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:class A * [line 29]\n *&return:class A *=n$0 [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot index c411623ee..6ca92cb49 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/TollBridgeExample.dot @@ -3,7 +3,7 @@ digraph iCFG { 23 -> 22 ; -22 [label="22: DeclStmt \n n$0=*&bufferAttributes:class NSDictionary * [line 46]\n *&dict:struct __CFDictionary *=n$0 [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&bufferAttributes,false); [line 46]\n NULLIFY(&dict,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +22 [label="22: DeclStmt \n n$0=*&bufferAttributes:class NSDictionary * [line 46]\n *&dict:struct __CFDictionary *=n$0 [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&bufferAttributes); [line 46]\n NULLIFY(&dict); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 22 -> 21 ; @@ -29,7 +29,7 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: Call _fun_CFBridgingRelease \n n$6=*&ref:struct __CFDictionary * [line 37]\n n$7=_fun___objc_cast(n$6:void *,sizeof(struct objc_object ):unsigned long ) [line 37]\n REMOVE_TEMPS(n$6,n$7); [line 37]\n NULLIFY(&ref,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +15 [label="15: Call _fun_CFBridgingRelease \n n$6=*&ref:struct __CFDictionary * [line 37]\n n$7=_fun___objc_cast(n$6:void *,sizeof(struct objc_object ):unsigned long ) [line 37]\n REMOVE_TEMPS(n$6,n$7); [line 37]\n NULLIFY(&ref); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 15 -> 14 ; @@ -44,7 +44,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: DeclStmt \n n$4=*&observer:struct objc_object * [line 31]\n *&a:struct __CFLocale *=n$4 [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&a,false); [line 31]\n NULLIFY(&observer,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +11 [label="11: DeclStmt \n n$4=*&observer:struct objc_object * [line 31]\n *&a:struct __CFLocale *=n$4 [line 31]\n REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&a); [line 31]\n NULLIFY(&observer); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 11 -> 10 ; @@ -59,7 +59,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: DeclStmt \n n$2=*&nameRef:struct __CFLocale * [line 26]\n *&a:class NSLocale *=n$2 [line 26]\n REMOVE_TEMPS(n$2); [line 26]\n NULLIFY(&a,false); [line 26]\n NULLIFY(&nameRef,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +7 [label="7: DeclStmt \n n$2=*&nameRef:struct __CFLocale * [line 26]\n *&a:class NSLocale *=n$2 [line 26]\n REMOVE_TEMPS(n$2); [line 26]\n NULLIFY(&a); [line 26]\n NULLIFY(&nameRef); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 7 -> 6 ; @@ -74,7 +74,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&nameRef:struct __CFLocale * [line 21]\n *&a:class NSLocale *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&nameRef,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&nameRef:struct __CFLocale * [line 21]\n *&a:class NSLocale *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a); [line 21]\n NULLIFY(&nameRef); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot index 7c7fc2222..7be906005 100644 --- a/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot +++ b/infer/tests/codetoanalyze/objc/errors/memory_leaks_benchmark/arc_methods.dot @@ -3,7 +3,7 @@ digraph iCFG { 15 -> 14 ; -14 [label="14: DeclStmt \n n$2=*&a1:class A * [line 43]\n _fun___objc_retain(n$2:class A *) [line 43]\n *&aa:class A *=n$2 [line 43]\n REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&a1,false); [line 43]\n NULLIFY(&aa,false); [line 43]\n " shape="box"] +14 [label="14: DeclStmt \n n$2=*&a1:class A * [line 43]\n _fun___objc_retain(n$2:class A *) [line 43]\n *&aa:class A *=n$2 [line 43]\n REMOVE_TEMPS(n$2); [line 43]\n NULLIFY(&a1); [line 43]\n NULLIFY(&aa); [line 43]\n " shape="box"] 14 -> 13 ; @@ -11,7 +11,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: DeclStmt \n n$0=*&a2:class A * [line 45]\n _fun___objc_retain(n$0:class A *) [line 45]\n *&ab:class A *=n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&a2,false); [line 45]\n NULLIFY(&ab,false); [line 45]\n " shape="box"] +12 [label="12: DeclStmt \n n$0=*&a2:class A * [line 45]\n _fun___objc_retain(n$0:class A *) [line 45]\n *&ab:class A *=n$0 [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&a2); [line 45]\n NULLIFY(&ab); [line 45]\n " shape="box"] 12 -> 11 ; @@ -30,7 +30,7 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: Return Stmt \n n$3=*&a:class A * [line 30]\n *&return:class A *=n$3 [line 30]\n n$4=_fun___set_autorelease_attribute(n$3:class A *) [line 30]\n REMOVE_TEMPS(n$3,n$4); [line 30]\n NULLIFY(&a,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +7 [label="7: Return Stmt \n n$3=*&a:class A * [line 30]\n *&return:class A *=n$3 [line 30]\n n$4=_fun___set_autorelease_attribute(n$3:class A *) [line 30]\n REMOVE_TEMPS(n$3,n$4); [line 30]\n NULLIFY(&a); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 7 -> 6 ; @@ -45,7 +45,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&a:class A * [line 24]\n *&return:class A *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&a:class A * [line 24]\n *&return:class A *=n$0 [line 24]\n REMOVE_TEMPS(n$0); [line 24]\n NULLIFY(&a); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot b/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot index 482da3be1..39231236f 100644 --- a/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot +++ b/infer/tests/codetoanalyze/objc/errors/npe/Nonnull_attribute_example.dot @@ -3,7 +3,7 @@ digraph iCFG { 13 -> 12 ; -12 [label="12: Call n$0 \n n$0=*&callback:_fn_ (*) [line 46]\n n$0(0:class NSError *,0:struct objc_object *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&callback,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +12 [label="12: Call n$0 \n n$0=*&callback:_fn_ (*) [line 46]\n n$0(0:class NSError *,0:struct objc_object *) [line 46]\n REMOVE_TEMPS(n$0); [line 46]\n NULLIFY(&callback); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 12 -> 11 ; @@ -18,15 +18,15 @@ digraph iCFG { 9 -> 8 ; -8 [label="8: DeclStmt \n n$3=*&a:class A * [line 39]\n n$4=_fun_A_getA(n$3:class A *) virtual [line 39]\n _fun___objc_retain(n$4:class A *) [line 39]\n *&a1:class A *=n$4 [line 39]\n REMOVE_TEMPS(n$3,n$4); [line 39]\n NULLIFY(&a,false); [line 39]\n " shape="box"] +8 [label="8: DeclStmt \n n$3=*&a:class A * [line 39]\n n$4=_fun_A_getA(n$3:class A *) virtual [line 39]\n _fun___objc_retain(n$4:class A *) [line 39]\n *&a1:class A *=n$4 [line 39]\n REMOVE_TEMPS(n$3,n$4); [line 39]\n NULLIFY(&a); [line 39]\n " shape="box"] 8 -> 7 ; -7 [label="7: DeclStmt \n n$1=*&a1:class A * [line 40]\n n$2=*n$1.x:int [line 40]\n *&y:int =n$2 [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a1,false); [line 40]\n NULLIFY(&y,false); [line 40]\n " shape="box"] +7 [label="7: DeclStmt \n n$1=*&a1:class A * [line 40]\n n$2=*n$1.x:int [line 40]\n *&y:int =n$2 [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a1); [line 40]\n NULLIFY(&y); [line 40]\n " shape="box"] 7 -> 6 ; -6 [label="6: Return Stmt \n n$0=*&self:class C * [line 41]\n *&return:struct objc_object *=n$0 [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&self,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&self:class C * [line 41]\n *&return:struct objc_object *=n$0 [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&self); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 6 -> 5 ; diff --git a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot b/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot index 247ef9841..715f2608a 100644 --- a/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot +++ b/infer/tests/codetoanalyze/objc/errors/npe/npe_malloc.dot @@ -7,7 +7,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&person:struct Person * [line 27]\n *&return:struct Person *=n$0 [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n NULLIFY(&person,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&person:struct Person * [line 27]\n *&return:struct Person *=n$0 [line 27]\n REMOVE_TEMPS(n$0); [line 27]\n NULLIFY(&person); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.dot b/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.dot index 88de26089..14c27e84c 100644 --- a/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.dot +++ b/infer/tests/codetoanalyze/objc/errors/protocol_procdesc/main.dot @@ -3,7 +3,7 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: Message Call: signalStop \n n$0=*&bike:class Bicycle * [line 16]\n _fun_Bicycle_signalStop(n$0:class Bicycle *) virtual [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&bike,false); [line 16]\n " shape="box"] +4 [label="4: Message Call: signalStop \n n$0=*&bike:class Bicycle * [line 16]\n _fun_Bicycle_signalStop(n$0:class Bicycle *) virtual [line 16]\n REMOVE_TEMPS(n$0); [line 16]\n NULLIFY(&bike); [line 16]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot index 9820e94eb..ed958993a 100644 --- a/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot +++ b/infer/tests/codetoanalyze/objc/frontend/assertions/NSAssert_example.dot @@ -4,7 +4,7 @@ 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 REMOVE_TEMPS(n$21,n$22); [line 36]\n NULLIFY(&SIL_temp_conditional___n$17,false); [line 36]\n NULLIFY(&__assert_fn__,false); [line 36]\n " shape="box"] +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 REMOVE_TEMPS(n$21,n$22); [line 36]\n NULLIFY(&SIL_temp_conditional___n$17); [line 36]\n NULLIFY(&__assert_fn__); [line 36]\n " shape="box"] 104 -> 98 ; @@ -33,7 +33,7 @@ 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 REMOVE_TEMPS(n$14,n$15); [line 36]\n NULLIFY(&SIL_temp_conditional___n$10,false); [line 36]\n NULLIFY(&__assert_file__,false); [line 36]\n " shape="box"] +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 REMOVE_TEMPS(n$14,n$15); [line 36]\n NULLIFY(&SIL_temp_conditional___n$10); [line 36]\n NULLIFY(&__assert_file__); [line 36]\n " shape="box"] 97 -> 91 ; @@ -61,11 +61,11 @@ 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 REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2); [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 REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 36]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 36]\n NULLIFY(&SIL_temp_conditional___n$2); [line 36]\n " shape="invhouse"] 89 -> 105 ; @@ -108,7 +108,7 @@ digraph iCFG { 80 -> 85 ; 80 -> 86 ; -79 [label="79: Return Stmt \n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +79 [label="79: Return Stmt \n n$0=*&target:class A * [line 37]\n n$1=_fun_A_x(n$0:class A *) [line 37]\n *&return:int =n$1 [line 37]\n REMOVE_TEMPS(n$0,n$1); [line 37]\n NULLIFY(&target); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 79 -> 78 ; @@ -124,7 +124,7 @@ 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 REMOVE_TEMPS(n$20,n$21); [line 31]\n NULLIFY(&SIL_temp_conditional___n$16,false); [line 31]\n NULLIFY(&__assert_fn__,false); [line 31]\n " shape="box"] +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 REMOVE_TEMPS(n$20,n$21); [line 31]\n NULLIFY(&SIL_temp_conditional___n$16); [line 31]\n NULLIFY(&__assert_fn__); [line 31]\n " shape="box"] 75 -> 69 ; @@ -153,7 +153,7 @@ 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 REMOVE_TEMPS(n$13,n$14); [line 31]\n NULLIFY(&SIL_temp_conditional___n$9,false); [line 31]\n NULLIFY(&__assert_file__,false); [line 31]\n " shape="box"] +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 REMOVE_TEMPS(n$13,n$14); [line 31]\n NULLIFY(&SIL_temp_conditional___n$9); [line 31]\n NULLIFY(&__assert_file__); [line 31]\n " shape="box"] 68 -> 62 ; @@ -181,11 +181,11 @@ 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 REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2); [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 REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 31]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 31]\n NULLIFY(&SIL_temp_conditional___n$2); [line 31]\n " shape="invhouse"] 60 -> 76 ; @@ -232,7 +232,7 @@ digraph iCFG { 50 -> 55 ; -49 [label="49: Return Stmt \n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +49 [label="49: Return Stmt \n n$0=*&target:class A * [line 32]\n n$1=_fun_A_x(n$0:class A *) [line 32]\n *&return:int =n$1 [line 32]\n REMOVE_TEMPS(n$0,n$1); [line 32]\n NULLIFY(&target); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 49 -> 48 ; @@ -248,7 +248,7 @@ 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 REMOVE_TEMPS(n$31,n$32); [line 24]\n NULLIFY(&SIL_temp_conditional___n$27,false); [line 24]\n NULLIFY(&__assert_file__,false); [line 24]\n " shape="box"] +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 REMOVE_TEMPS(n$31,n$32); [line 24]\n NULLIFY(&SIL_temp_conditional___n$27); [line 24]\n NULLIFY(&__assert_file__); [line 24]\n " shape="box"] 45 -> 39 ; @@ -276,11 +276,11 @@ 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 REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19); [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 REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19,false); [line 24]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$21); [line 24]\n NULLIFY(&SIL_temp_conditional___n$19); [line 24]\n " shape="invhouse"] 37 -> 46 ; @@ -327,7 +327,7 @@ digraph iCFG { 27 -> 32 ; -26 [label="26: Return Stmt \n n$17=*&a:class A * [line 25]\n n$18=_fun_A_x(n$17:class A *) [line 25]\n *&return:int =n$18 [line 25]\n REMOVE_TEMPS(n$17,n$18); [line 25]\n NULLIFY(&a,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +26 [label="26: Return Stmt \n n$17=*&a:class A * [line 25]\n n$18=_fun_A_x(n$17:class A *) [line 25]\n *&return:int =n$18 [line 25]\n REMOVE_TEMPS(n$17,n$18); [line 25]\n NULLIFY(&a); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 26 -> 25 ; @@ -343,7 +343,7 @@ 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 REMOVE_TEMPS(n$14,n$15); [line 19]\n NULLIFY(&SIL_temp_conditional___n$10,false); [line 19]\n NULLIFY(&__assert_file__,false); [line 19]\n " shape="box"] +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 REMOVE_TEMPS(n$14,n$15); [line 19]\n NULLIFY(&SIL_temp_conditional___n$10); [line 19]\n NULLIFY(&__assert_file__); [line 19]\n " shape="box"] 22 -> 16 ; @@ -371,11 +371,11 @@ 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 REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2); [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 REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 19]\n " shape="invhouse"] +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 REMOVE_TEMPS(n$4); [line 19]\n NULLIFY(&SIL_temp_conditional___n$2); [line 19]\n " shape="invhouse"] 14 -> 23 ; @@ -422,7 +422,7 @@ digraph iCFG { 4 -> 9 ; -3 [label="3: Return Stmt \n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&target:class A * [line 20]\n n$1=_fun_A_x(n$0:class A *) [line 20]\n *&return:int =n$1 [line 20]\n REMOVE_TEMPS(n$0,n$1); [line 20]\n NULLIFY(&target); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot index 2cdbd41af..cd5654350 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/BlockVar.dot @@ -7,11 +7,11 @@ digraph iCFG { 53 -> 52 ; -52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5,false); [line 59]\n NULLIFY(&x,false); [line 59]\n " shape="box"] +52 [label="52: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n n$37=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 ):unsigned long ) [line 59]\n *&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5:class __objc_anonymous_block_BlockVar_capturedNoNullDeref______5 =n$37 [line 59]\n n$38=*&x:int * [line 59]\n *n$37.x:int *=n$38 [line 59]\n n$34=*&x:int * [line 59]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNoNullDeref______5,n$34) [line 59]\n REMOVE_TEMPS(n$37,n$38,n$34); [line 59]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNoNullDeref______5); [line 59]\n NULLIFY(&x); [line 59]\n " shape="box"] 52 -> 48 ; -51 [label="51: Return Stmt \n n$35=*&x:int * [line 60]\n n$36=*n$35:int [line 60]\n *&return:int =n$36 [line 60]\n REMOVE_TEMPS(n$35,n$36); [line 60]\n NULLIFY(&x,false); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] +51 [label="51: Return Stmt \n n$35=*&x:int * [line 60]\n n$36=*n$35:int [line 60]\n *&return:int =n$36 [line 60]\n REMOVE_TEMPS(n$35,n$36); [line 60]\n NULLIFY(&x); [line 60]\n APPLY_ABSTRACTION; [line 60]\n " shape="box"] 51 -> 50 ; @@ -22,15 +22,15 @@ digraph iCFG { 49 -> 51 ; -48 [label="48: BinaryOperatorStmt: Assign \n *&x:int *=0 [line 62]\n NULLIFY(&x,false); [line 62]\n " shape="box"] +48 [label="48: BinaryOperatorStmt: Assign \n *&x:int *=0 [line 62]\n NULLIFY(&x); [line 62]\n " shape="box"] 48 -> 47 ; -47 [label="47: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&my_block,false); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] +47 [label="47: Return Stmt \n n$32=*&my_block:_fn_ (*) [line 63]\n n$33=n$32() [line 63]\n *&return:int =n$33 [line 63]\n REMOVE_TEMPS(n$32,n$33); [line 63]\n NULLIFY(&my_block); [line 63]\n APPLY_ABSTRACTION; [line 63]\n " shape="box"] 47 -> 46 ; -46 [label="46: Exit BlockVar_capturedNoNullDeref \n NULLIFY(&i,false); [line 64]\n " color=yellow style=filled] +46 [label="46: Exit BlockVar_capturedNoNullDeref \n NULLIFY(&i); [line 64]\n " color=yellow style=filled] 45 [label="45: Start BlockVar_capturedNoNullDeref\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 56]\n " color=yellow style=filled] @@ -41,11 +41,11 @@ digraph iCFG { 44 -> 43 ; -43 [label="43: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4,false); [line 50]\n NULLIFY(&x,false); [line 50]\n " shape="box"] +43 [label="43: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n n$30=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_capturedNullDeref______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_BlockVar_capturedNullDeref______4:class __objc_anonymous_block_BlockVar_capturedNullDeref______4 =n$30 [line 50]\n n$31=*&x:int * [line 50]\n *n$30.x:int *=n$31 [line 50]\n n$27=*&x:int * [line 50]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_capturedNullDeref______4,n$27) [line 50]\n REMOVE_TEMPS(n$30,n$31,n$27); [line 50]\n NULLIFY(&__objc_anonymous_block_BlockVar_capturedNullDeref______4); [line 50]\n NULLIFY(&x); [line 50]\n " shape="box"] 43 -> 39 ; -42 [label="42: Return Stmt \n n$28=*&x:int * [line 51]\n n$29=*n$28:int [line 51]\n *&return:int =n$29 [line 51]\n REMOVE_TEMPS(n$28,n$29); [line 51]\n NULLIFY(&x,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] +42 [label="42: Return Stmt \n n$28=*&x:int * [line 51]\n n$29=*n$28:int [line 51]\n *&return:int =n$29 [line 51]\n REMOVE_TEMPS(n$28,n$29); [line 51]\n NULLIFY(&x); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="box"] 42 -> 41 ; @@ -56,7 +56,7 @@ digraph iCFG { 40 -> 42 ; -39 [label="39: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&my_block,false); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] +39 [label="39: Return Stmt \n n$25=*&my_block:_fn_ (*) [line 53]\n n$26=n$25() [line 53]\n *&return:int =n$26 [line 53]\n REMOVE_TEMPS(n$25,n$26); [line 53]\n NULLIFY(&my_block); [line 53]\n APPLY_ABSTRACTION; [line 53]\n " shape="box"] 39 -> 38 ; @@ -75,11 +75,11 @@ digraph iCFG { 35 -> 34 ; -34 [label="34: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3,false); [line 42]\n NULLIFY(&x,false); [line 42]\n " shape="box"] +34 [label="34: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostOk______3 ):unsigned long ) [line 42]\n *&__objc_anonymous_block_BlockVar_blockPostOk______3:class __objc_anonymous_block_BlockVar_blockPostOk______3 =n$23 [line 42]\n n$24=*&x:int * [line 42]\n *n$23.x:int *=n$24 [line 42]\n n$21=*&x:int * [line 42]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostOk______3,n$21) [line 42]\n REMOVE_TEMPS(n$23,n$24,n$21); [line 42]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostOk______3); [line 42]\n NULLIFY(&x); [line 42]\n " shape="box"] 34 -> 30 ; -33 [label="33: Return Stmt \n n$22=*&x:int * [line 43]\n *&return:int *=n$22 [line 43]\n REMOVE_TEMPS(n$22); [line 43]\n NULLIFY(&x,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +33 [label="33: Return Stmt \n n$22=*&x:int * [line 43]\n *&return:int *=n$22 [line 43]\n REMOVE_TEMPS(n$22); [line 43]\n NULLIFY(&x); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 33 -> 32 ; @@ -90,11 +90,11 @@ digraph iCFG { 31 -> 33 ; -30 [label="30: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&my_block,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +30 [label="30: Return Stmt \n n$18=*&my_block:_fn_ (*) [line 45]\n n$19=n$18() [line 45]\n n$20=*n$19:int [line 45]\n *&return:int =n$20 [line 45]\n REMOVE_TEMPS(n$18,n$19,n$20); [line 45]\n NULLIFY(&my_block); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 30 -> 29 ; -29 [label="29: Exit BlockVar_blockPostOk \n NULLIFY(&i,false); [line 46]\n " color=yellow style=filled] +29 [label="29: Exit BlockVar_blockPostOk \n NULLIFY(&i); [line 46]\n " color=yellow style=filled] 28 [label="28: Start BlockVar_blockPostOk\nFormals: self:class BlockVar *\nLocals: my_block:_fn_ (*) x:int * i:int \n DECLARE_LOCALS(&return,&my_block,&x,&i); [line 39]\n " color=yellow style=filled] @@ -105,11 +105,11 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2,false); [line 33]\n NULLIFY(&x,false); [line 33]\n " shape="box"] +26 [label="26: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_blockPostBad______2 ):unsigned long ) [line 33]\n *&__objc_anonymous_block_BlockVar_blockPostBad______2:class __objc_anonymous_block_BlockVar_blockPostBad______2 =n$16 [line 33]\n n$17=*&x:int * [line 33]\n *n$16.x:int *=n$17 [line 33]\n n$14=*&x:int * [line 33]\n *&my_block:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_blockPostBad______2,n$14) [line 33]\n REMOVE_TEMPS(n$16,n$17,n$14); [line 33]\n NULLIFY(&__objc_anonymous_block_BlockVar_blockPostBad______2); [line 33]\n NULLIFY(&x); [line 33]\n " shape="box"] 26 -> 22 ; -25 [label="25: Return Stmt \n n$15=*&x:int * [line 34]\n *&return:int *=n$15 [line 34]\n REMOVE_TEMPS(n$15); [line 34]\n NULLIFY(&x,false); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] +25 [label="25: Return Stmt \n n$15=*&x:int * [line 34]\n *&return:int *=n$15 [line 34]\n REMOVE_TEMPS(n$15); [line 34]\n NULLIFY(&x); [line 34]\n APPLY_ABSTRACTION; [line 34]\n " shape="box"] 25 -> 24 ; @@ -120,7 +120,7 @@ digraph iCFG { 23 -> 25 ; -22 [label="22: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&my_block,false); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] +22 [label="22: Return Stmt \n n$11=*&my_block:_fn_ (*) [line 36]\n n$12=n$11() [line 36]\n n$13=*n$12:int [line 36]\n *&return:int =n$13 [line 36]\n REMOVE_TEMPS(n$11,n$12,n$13); [line 36]\n NULLIFY(&my_block); [line 36]\n APPLY_ABSTRACTION; [line 36]\n " shape="box"] 22 -> 21 ; @@ -131,7 +131,7 @@ digraph iCFG { 20 -> 27 ; -19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1,false); [line 19]\n " shape="box"] +19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n n$10=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 ):unsigned long ) [line 19]\n *&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1:class __objc_anonymous_block_BlockVar_navigateToURLInBackground______1 =n$10 [line 19]\n *&addBlock:_fn_ (*)=(_fun___objc_anonymous_block_BlockVar_navigateToURLInBackground______1) [line 19]\n REMOVE_TEMPS(n$10); [line 19]\n NULLIFY(&__objc_anonymous_block_BlockVar_navigateToURLInBackground______1); [line 19]\n " shape="box"] 19 -> 14 ; @@ -139,7 +139,7 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Return Stmt \n n$6=*&a:int [line 21]\n n$7=*&b:int [line 21]\n n$8=*&res:int [line 21]\n *&return:int =((n$6 + n$7) + n$8) [line 21]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 21]\n NULLIFY(&a,false); [line 21]\n NULLIFY(&b,false); [line 21]\n NULLIFY(&res,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +17 [label="17: Return Stmt \n n$6=*&a:int [line 21]\n n$7=*&b:int [line 21]\n n$8=*&res:int [line 21]\n *&return:int =((n$6 + n$7) + n$8) [line 21]\n REMOVE_TEMPS(n$6,n$7,n$8); [line 21]\n NULLIFY(&a); [line 21]\n NULLIFY(&b); [line 21]\n NULLIFY(&res); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 17 -> 16 ; @@ -150,7 +150,7 @@ digraph iCFG { 15 -> 18 ; -14 [label="14: DeclStmt \n n$4=*&addBlock:_fn_ (*) [line 23]\n n$5=n$4(1:int ,2:int ) [line 23]\n *&x:int =n$5 [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&addBlock,false); [line 23]\n " shape="box"] +14 [label="14: DeclStmt \n n$4=*&addBlock:_fn_ (*) [line 23]\n n$5=n$4(1:int ,2:int ) [line 23]\n *&x:int =n$5 [line 23]\n REMOVE_TEMPS(n$4,n$5); [line 23]\n NULLIFY(&addBlock); [line 23]\n " shape="box"] 14 -> 13 ; @@ -158,19 +158,19 @@ digraph iCFG { 13 -> 8 ; -12 [label="12: Return Stmt \n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&x,false); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] +12 [label="12: Return Stmt \n n$3=*&x:int [line 28]\n *&return:int =n$3 [line 28]\n REMOVE_TEMPS(n$3); [line 28]\n NULLIFY(&x); [line 28]\n APPLY_ABSTRACTION; [line 28]\n " shape="box"] 12 -> 5 ; -11 [label="11: Return Stmt \n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&p,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +11 [label="11: Return Stmt \n n$1=*&p:int * [line 26]\n n$2=*n$1:int [line 26]\n *&return:int =n$2 [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&p); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 11 -> 5 ; -10 [label="10: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&p,false); [line 25]\n " shape="invhouse"] +10 [label="10: Prune (false branch) \n PRUNE(((n$0 == 8) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&p); [line 25]\n " shape="invhouse"] 10 -> 12 ; -9 [label="9: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&x,false); [line 25]\n " shape="invhouse"] +9 [label="9: Prune (true branch) \n PRUNE(((n$0 == 8) != 0), true); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&x); [line 25]\n " shape="invhouse"] 9 -> 11 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot index 8bb4cf285..bb4278244 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block-it.dot @@ -3,23 +3,23 @@ digraph iCFG { 54 -> 53 ; -53 [label="53: DeclStmt \n n$43=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$43 [line 36]\n REMOVE_TEMPS(n$43); [line 36]\n NULLIFY(&a,false); [line 36]\n " shape="box"] +53 [label="53: DeclStmt \n n$43=*&a:class NSArray * [line 36]\n *&objects:class NSArray *=n$43 [line 36]\n REMOVE_TEMPS(n$43); [line 36]\n NULLIFY(&a); [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 REMOVE_TEMPS(n$42); [line 39]\n NULLIFY(&__objc_anonymous_block_MyBlock_array_trans______2,false); [line 39]\n " shape="box"] +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 REMOVE_TEMPS(n$42); [line 39]\n NULLIFY(&__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 REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +51 [label="51: BinaryOperatorStmt: Assign \n n$41=*&stop:_Bool * [line 45]\n *n$41:_Bool =1 [line 45]\n REMOVE_TEMPS(n$41); [line 45]\n NULLIFY(&stop); [line 45]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop,false); [line 44]\n APPLY_ABSTRACTION; [line 44]\n " shape="invhouse"] +50 [label="50: Prune (false branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 == 0), false); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop); [line 44]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop,false); [line 44]\n " shape="invhouse"] +49 [label="49: Prune (true branch) \n n$40=*&ShouldStop:int [line 44]\n PRUNE((n$40 != 0), true); [line 44]\n REMOVE_TEMPS(n$40); [line 44]\n NULLIFY(&ShouldStop); [line 44]\n " shape="invhouse"] 49 -> 51 ; @@ -51,7 +51,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$31,n$32,n$33,n$34); [line 54]\n NULLIFY(&object,false); [line 54]\n " shape="box"] +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 REMOVE_TEMPS(n$31,n$32,n$33,n$34); [line 54]\n NULLIFY(&object); [line 54]\n " shape="box"] 41 -> 38 ; @@ -59,7 +59,7 @@ digraph iCFG { 40 -> 37 ; -39 [label="39: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 55]\n NULLIFY(&idx,false); [line 55]\n NULLIFY(&objects,false); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] +39 [label="39: Prune (true branch) \n PRUNE(((n$30 == 1) != 0), true); [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&enumerateObjectsUsingBlock); [line 55]\n NULLIFY(&idx); [line 55]\n NULLIFY(&objects); [line 55]\n APPLY_ABSTRACTION; [line 55]\n " shape="invhouse"] 39 -> 30 ; @@ -72,7 +72,7 @@ digraph iCFG { 37 -> 33 ; -36 [label="36: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n NULLIFY(&enumerateObjectsUsingBlock,false); [line 51]\n NULLIFY(&idx,false); [line 51]\n NULLIFY(&objects,false); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] +36 [label="36: Prune (false branch) \n PRUNE(((n$26 < n$28) == 0), false); [line 51]\n REMOVE_TEMPS(n$26,n$27,n$28); [line 51]\n NULLIFY(&enumerateObjectsUsingBlock); [line 51]\n NULLIFY(&idx); [line 51]\n NULLIFY(&objects); [line 51]\n APPLY_ABSTRACTION; [line 51]\n " shape="invhouse"] 36 -> 30 ; @@ -97,7 +97,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 REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&stop,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +30 [label="30: Call _fun_free \n n$24=*&stop:_Bool * [line 58]\n _fun_free(n$24:void *) [line 58]\n REMOVE_TEMPS(n$24); [line 58]\n NULLIFY(&stop); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 30 -> 29 ; @@ -112,23 +112,23 @@ digraph iCFG { 27 -> 26 ; -26 [label="26: DeclStmt \n n$21=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$21 [line 21]\n REMOVE_TEMPS(n$21); [line 21]\n NULLIFY(&a,false); [line 21]\n " shape="box"] +26 [label="26: DeclStmt \n n$21=*&a:class NSArray * [line 21]\n *&objects:class NSArray *=n$21 [line 21]\n REMOVE_TEMPS(n$21); [line 21]\n NULLIFY(&a); [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 REMOVE_TEMPS(n$20); [line 21]\n NULLIFY(&__objc_anonymous_block_MyBlock_array______1,false); [line 21]\n " shape="box"] +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 REMOVE_TEMPS(n$20); [line 21]\n NULLIFY(&__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 REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +24 [label="24: BinaryOperatorStmt: Assign \n n$19=*&stop:_Bool * [line 27]\n *n$19:_Bool =1 [line 27]\n REMOVE_TEMPS(n$19); [line 27]\n NULLIFY(&stop); [line 27]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 == 0), false); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop); [line 26]\n APPLY_ABSTRACTION; [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 REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop,false); [line 26]\n " shape="invhouse"] +22 [label="22: Prune (true branch) \n n$18=*&ShouldStop:int [line 26]\n PRUNE((n$18 != 0), true); [line 26]\n REMOVE_TEMPS(n$18); [line 26]\n NULLIFY(&ShouldStop); [line 26]\n " shape="invhouse"] 22 -> 24 ; @@ -156,7 +156,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$13,n$14,n$15); [line 21]\n NULLIFY(&object,false); [line 21]\n " shape="box"] +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 REMOVE_TEMPS(n$13,n$14,n$15); [line 21]\n NULLIFY(&object); [line 21]\n " shape="box"] 15 -> 14 ; @@ -168,7 +168,7 @@ digraph iCFG { 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 REMOVE_TEMPS(n$6,n$7); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] +12 [label="12: Prune (true branch) \n n$7=*n$6:signed char [line 21]\n PRUNE((n$7 != 0), true); [line 21]\n REMOVE_TEMPS(n$6,n$7); [line 21]\n NULLIFY(&idx); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1); [line 21]\n NULLIFY(&objects); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] 12 -> 3 ; @@ -181,7 +181,7 @@ digraph iCFG { 10 -> 6 ; -9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n NULLIFY(&idx,false); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1,false); [line 21]\n NULLIFY(&objects,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] +9 [label="9: Prune (false branch) \n PRUNE(((n$3 < n$5) == 0), false); [line 21]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 21]\n NULLIFY(&idx); [line 21]\n NULLIFY(&infer___objc_anonymous_block_MyBlock_array______1); [line 21]\n NULLIFY(&objects); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="invhouse"] 9 -> 3 ; @@ -206,7 +206,7 @@ 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 REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&stop,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: Call _fun_free \n n$0=*&stop:_Bool * [line 21]\n n$1=_fun_free(n$0:void *) [line 21]\n REMOVE_TEMPS(n$0,n$1); [line 21]\n NULLIFY(&stop); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block.dot b/infer/tests/codetoanalyze/objc/frontend/block/block.dot index adf987e32..b1e606ef5 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block.dot @@ -18,7 +18,7 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______2); [line 18]\n n$27=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______2 ):unsigned long ) [line 18]\n *&__objc_anonymous_block_main1______2:class __objc_anonymous_block_main1______2 =n$27 [line 18]\n n$28=*&x:int [line 18]\n *n$27.x:int =n$28 [line 18]\n n$11=*&x:int [line 18]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______2,n$11) [line 18]\n REMOVE_TEMPS(n$27,n$28,n$11); [line 18]\n NULLIFY(&__objc_anonymous_block_main1______2,false); [line 18]\n NULLIFY(&x,false); [line 18]\n " shape="box"] +20 [label="20: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______2); [line 18]\n n$27=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______2 ):unsigned long ) [line 18]\n *&__objc_anonymous_block_main1______2:class __objc_anonymous_block_main1______2 =n$27 [line 18]\n n$28=*&x:int [line 18]\n *n$27.x:int =n$28 [line 18]\n n$11=*&x:int [line 18]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______2,n$11) [line 18]\n REMOVE_TEMPS(n$27,n$28,n$11); [line 18]\n NULLIFY(&__objc_anonymous_block_main1______2); [line 18]\n NULLIFY(&x); [line 18]\n " shape="box"] 20 -> 10 ; @@ -26,11 +26,11 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n REMOVE_TEMPS(n$23,n$24,n$25,n$26,n$17,n$18); [line 24]\n NULLIFY(&__objc_anonymous_block___objc_anonymous_block_main1______2______3,false); [line 24]\n NULLIFY(&x,false); [line 24]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n n$23=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block___objc_anonymous_block_main1______2______3 ):unsigned long ) [line 24]\n *&__objc_anonymous_block___objc_anonymous_block_main1______2______3:class __objc_anonymous_block___objc_anonymous_block_main1______2______3 =n$23 [line 24]\n n$24=*&x:int [line 24]\n n$25=*&bla:int [line 24]\n n$26=*&#GB$main1_s:int [line 24]\n *n$23.x:int =n$24 [line 24]\n *n$23.bla:int =n$25 [line 24]\n *n$23.main1_s:int =n$26 [line 24]\n n$17=*&x:int [line 24]\n n$18=*&bla:int [line 24]\n *&addblock2:_fn_ (*)=(_fun___objc_anonymous_block___objc_anonymous_block_main1______2______3,n$17,n$18) [line 24]\n REMOVE_TEMPS(n$23,n$24,n$25,n$26,n$17,n$18); [line 24]\n NULLIFY(&__objc_anonymous_block___objc_anonymous_block_main1______2______3); [line 24]\n NULLIFY(&x); [line 24]\n " shape="box"] 18 -> 14 ; -17 [label="17: Return Stmt \n n$19=*&z:int [line 25]\n n$20=*&#GB$main1_s:int [line 25]\n n$21=*&x:int [line 25]\n n$22=*&bla:int [line 25]\n *&return:int =(((n$19 + n$20) + n$21) + n$22) [line 25]\n REMOVE_TEMPS(n$19,n$20,n$21,n$22); [line 25]\n NULLIFY(&bla,false); [line 25]\n NULLIFY(&x,false); [line 25]\n NULLIFY(&z,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] +17 [label="17: Return Stmt \n n$19=*&z:int [line 25]\n n$20=*&#GB$main1_s:int [line 25]\n n$21=*&x:int [line 25]\n n$22=*&bla:int [line 25]\n *&return:int =(((n$19 + n$20) + n$21) + n$22) [line 25]\n REMOVE_TEMPS(n$19,n$20,n$21,n$22); [line 25]\n NULLIFY(&bla); [line 25]\n NULLIFY(&x); [line 25]\n NULLIFY(&z); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="box"] 17 -> 16 ; @@ -41,11 +41,11 @@ digraph iCFG { 15 -> 17 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$15=*&addblock2:_fn_ (*) [line 28]\n n$16=n$15(1:int ) [line 28]\n *&add2:int =n$16 [line 28]\n REMOVE_TEMPS(n$15,n$16); [line 28]\n NULLIFY(&addblock2,false); [line 28]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n n$15=*&addblock2:_fn_ (*) [line 28]\n n$16=n$15(1:int ) [line 28]\n *&add2:int =n$16 [line 28]\n REMOVE_TEMPS(n$15,n$16); [line 28]\n NULLIFY(&addblock2); [line 28]\n " shape="box"] 14 -> 13 ; -13 [label="13: Return Stmt \n n$12=*&c:int [line 29]\n n$13=*&add2:int [line 29]\n n$14=*&bla:int [line 29]\n *&return:int =((n$12 + n$13) + n$14) [line 29]\n REMOVE_TEMPS(n$12,n$13,n$14); [line 29]\n NULLIFY(&add2,false); [line 29]\n NULLIFY(&bla,false); [line 29]\n NULLIFY(&c,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +13 [label="13: Return Stmt \n n$12=*&c:int [line 29]\n n$13=*&add2:int [line 29]\n n$14=*&bla:int [line 29]\n *&return:int =((n$12 + n$13) + n$14) [line 29]\n REMOVE_TEMPS(n$12,n$13,n$14); [line 29]\n NULLIFY(&add2); [line 29]\n NULLIFY(&bla); [line 29]\n NULLIFY(&c); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 13 -> 12 ; @@ -56,15 +56,15 @@ digraph iCFG { 11 -> 19 ; -10 [label="10: BinaryOperatorStmt: Assign \n n$9=*&addblock:_fn_ (*) [line 32]\n n$10=n$9(1:int ,2:int ) [line 32]\n *&add1:int =n$10 [line 32]\n REMOVE_TEMPS(n$9,n$10); [line 32]\n NULLIFY(&addblock,false); [line 32]\n " shape="box"] +10 [label="10: BinaryOperatorStmt: Assign \n n$9=*&addblock:_fn_ (*) [line 32]\n n$10=n$9(1:int ,2:int ) [line 32]\n *&add1:int =n$10 [line 32]\n REMOVE_TEMPS(n$9,n$10); [line 32]\n NULLIFY(&addblock); [line 32]\n " shape="box"] 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n REMOVE_TEMPS(n$7,n$8); [line 34]\n NULLIFY(&__objc_anonymous_block_main1______1,false); [line 34]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_main1______1); [line 34]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_main1______1 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_main1______1:class __objc_anonymous_block_main1______1 =n$7 [line 34]\n n$8=*&#GB$main1_s:int [line 34]\n *n$7.main1_s:int =n$8 [line 34]\n *&addblock:_fn_ (*)=(_fun___objc_anonymous_block_main1______1) [line 34]\n REMOVE_TEMPS(n$7,n$8); [line 34]\n NULLIFY(&__objc_anonymous_block_main1______1); [line 34]\n " shape="box"] 9 -> 5 ; -8 [label="8: Return Stmt \n n$5=*&e:int [line 35]\n n$6=*&#GB$main1_s:int [line 35]\n *&return:int =(n$5 - n$6) [line 35]\n REMOVE_TEMPS(n$5,n$6); [line 35]\n NULLIFY(&e,false); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] +8 [label="8: Return Stmt \n n$5=*&e:int [line 35]\n n$6=*&#GB$main1_s:int [line 35]\n *&return:int =(n$5 - n$6) [line 35]\n REMOVE_TEMPS(n$5,n$6); [line 35]\n NULLIFY(&e); [line 35]\n APPLY_ABSTRACTION; [line 35]\n " shape="box"] 8 -> 7 ; @@ -75,15 +75,15 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$3=*&addblock:_fn_ (*) [line 38]\n n$4=n$3(3:int ,2:int ) [line 38]\n *&add2:int =n$4 [line 38]\n REMOVE_TEMPS(n$3,n$4); [line 38]\n NULLIFY(&addblock,false); [line 38]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$3=*&addblock:_fn_ (*) [line 38]\n n$4=n$3(3:int ,2:int ) [line 38]\n *&add2:int =n$4 [line 38]\n REMOVE_TEMPS(n$3,n$4); [line 38]\n NULLIFY(&addblock); [line 38]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n n$1=*&add1:int [line 41]\n n$2=*&add2:int [line 41]\n *&y:int =(n$1 / n$2) [line 41]\n REMOVE_TEMPS(n$1,n$2); [line 41]\n NULLIFY(&add1,false); [line 41]\n NULLIFY(&add2,false); [line 41]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n n$1=*&add1:int [line 41]\n n$2=*&add2:int [line 41]\n *&y:int =(n$1 / n$2) [line 41]\n REMOVE_TEMPS(n$1,n$2); [line 41]\n NULLIFY(&add1); [line 41]\n NULLIFY(&add2); [line 41]\n " shape="box"] 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&y:int [line 43]\n *&return:int =n$0 [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&y,false); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&y:int [line 43]\n *&return:int =n$0 [line 43]\n REMOVE_TEMPS(n$0); [line 43]\n NULLIFY(&y); [line 43]\n APPLY_ABSTRACTION; [line 43]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot index f6bc37220..706869953 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_no_args.dot @@ -7,11 +7,11 @@ digraph iCFG { 16 -> 15 ; -15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1,false); [line 25]\n " shape="box"] +15 [label="15: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_m______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_m______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_m______1:class __objc_anonymous_block_My_manager_m______1 =n$7 [line 25]\n n$8=*&z:int [line 25]\n n$9=*&#GB$g:int [line 25]\n *n$7.z:int =n$8 [line 25]\n *n$7.g:int =n$9 [line 25]\n n$5=*&z:int [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_m______1,n$5) [line 25]\n REMOVE_TEMPS(n$7,n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_m______1); [line 25]\n " shape="box"] 15 -> 11 ; -14 [label="14: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +14 [label="14: BinaryOperatorStmt: Assign \n n$6=*&z:int [line 26]\n *&#GB$g:int =(n$6 + 3) [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&z); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 14 -> 13 ; @@ -22,7 +22,7 @@ digraph iCFG { 12 -> 14 ; -11 [label="11: Call n$4 \n n$4=*&b:_fn_ (*) [line 28]\n n$4() [line 28]\n REMOVE_TEMPS(n$4); [line 28]\n NULLIFY(&b,false); [line 28]\n " shape="box"] +11 [label="11: Call n$4 \n n$4=*&b:_fn_ (*) [line 28]\n n$4() [line 28]\n REMOVE_TEMPS(n$4); [line 28]\n NULLIFY(&b); [line 28]\n " shape="box"] 11 -> 10 ; @@ -30,19 +30,19 @@ digraph iCFG { 10 -> 5 ; -9 [label="9: Return Stmt \n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&z,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +9 [label="9: Return Stmt \n n$3=*&z:int [line 33]\n *&return:int =n$3 [line 33]\n REMOVE_TEMPS(n$3); [line 33]\n NULLIFY(&z); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 9 -> 2 ; -8 [label="8: Return Stmt \n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&p,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +8 [label="8: Return Stmt \n n$1=*&p:int * [line 31]\n n$2=*n$1:int [line 31]\n *&return:int =n$2 [line 31]\n REMOVE_TEMPS(n$1,n$2); [line 31]\n NULLIFY(&p); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 8 -> 2 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&p,false); [line 30]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 6) == 0), false); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&p); [line 30]\n " shape="invhouse"] 7 -> 9 ; -6 [label="6: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&z,false); [line 30]\n " shape="invhouse"] +6 [label="6: Prune (true branch) \n PRUNE(((n$0 == 6) != 0), true); [line 30]\n REMOVE_TEMPS(n$0); [line 30]\n NULLIFY(&z); [line 30]\n " shape="invhouse"] 6 -> 8 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot index afeed8803..04279a75d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/block_release.dot @@ -11,15 +11,15 @@ digraph iCFG { 17 -> 16 ; -16 [label="16: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1,false); [line 25]\n NULLIFY(&newImage,false); [line 25]\n " shape="box"] +16 [label="16: BinaryOperatorStmt: Assign \n DECLARE_LOCALS(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n n$8=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_My_manager_blockReleaseTODO______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_My_manager_blockReleaseTODO______1:class __objc_anonymous_block_My_manager_blockReleaseTODO______1 =n$8 [line 25]\n n$9=*&newImage:struct CGImage * [line 25]\n *n$8.newImage:struct CGImage *=n$9 [line 25]\n n$5=*&newImage:struct CGImage * [line 25]\n *&b:_fn_ (*)=(_fun___objc_anonymous_block_My_manager_blockReleaseTODO______1,n$5) [line 25]\n REMOVE_TEMPS(n$8,n$9,n$5); [line 25]\n NULLIFY(&__objc_anonymous_block_My_manager_blockReleaseTODO______1); [line 25]\n NULLIFY(&newImage); [line 25]\n " shape="box"] 16 -> 8 ; -15 [label="15: Call _fun_CGImageRelease \n n$7=*&newImage:struct CGImage * [line 27]\n _fun_CGImageRelease(n$7:struct CGImage *) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&newImage,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +15 [label="15: Call _fun_CGImageRelease \n n$7=*&newImage:struct CGImage * [line 27]\n _fun_CGImageRelease(n$7:struct CGImage *) [line 27]\n REMOVE_TEMPS(n$7); [line 27]\n NULLIFY(&newImage); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 15 -> 11 ; -14 [label="14: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&newImage,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] +14 [label="14: Prune (false branch) \n n$6=*&newImage:struct CGImage * [line 26]\n PRUNE((n$6 == 0), false); [line 26]\n REMOVE_TEMPS(n$6); [line 26]\n NULLIFY(&newImage); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="invhouse"] 14 -> 11 ; @@ -43,16 +43,16 @@ digraph iCFG { 9 -> 13 ; 9 -> 14 ; -8 [label="8: Call n$3 \n n$3=*&b:_fn_ (*) [line 29]\n n$4=*&z:int [line 29]\n n$3(n$4:int ) [line 29]\n REMOVE_TEMPS(n$3,n$4); [line 29]\n NULLIFY(&b,false); [line 29]\n " shape="box"] +8 [label="8: Call n$3 \n n$3=*&b:_fn_ (*) [line 29]\n n$4=*&z:int [line 29]\n n$3(n$4:int ) [line 29]\n REMOVE_TEMPS(n$3,n$4); [line 29]\n NULLIFY(&b); [line 29]\n " shape="box"] 8 -> 5 ; 8 -> 6 ; -7 [label="7: Call _fun_CGContextRelease \n n$2=*&context:struct CGContext * [line 31]\n _fun_CGContextRelease(n$2:struct CGContext *) [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n NULLIFY(&context,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +7 [label="7: Call _fun_CGContextRelease \n n$2=*&context:struct CGContext * [line 31]\n _fun_CGContextRelease(n$2:struct CGContext *) [line 31]\n REMOVE_TEMPS(n$2); [line 31]\n NULLIFY(&context); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 7 -> 4 ; -6 [label="6: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n NULLIFY(&context,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] +6 [label="6: Prune (false branch) \n n$1=*&context:struct CGContext * [line 30]\n PRUNE((n$1 == 0), false); [line 30]\n REMOVE_TEMPS(n$1); [line 30]\n NULLIFY(&context); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="invhouse"] 6 -> 4 ; @@ -64,7 +64,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z,false); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&z:int [line 32]\n *&return:int =n$0 [line 32]\n REMOVE_TEMPS(n$0); [line 32]\n NULLIFY(&z); [line 32]\n APPLY_ABSTRACTION; [line 32]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot index 0c82eee11..b11e072cc 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch.dot @@ -11,11 +11,11 @@ digraph iCFG { 25 -> 18 ; -24 [label="24: Return Stmt \n n$1=*&p:int * [line 46]\n n$2=*n$1:int [line 46]\n *&return:int =n$2 [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n NULLIFY(&p,false); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] +24 [label="24: Return Stmt \n n$1=*&p:int * [line 46]\n n$2=*n$1:int [line 46]\n *&return:int =n$2 [line 46]\n REMOVE_TEMPS(n$1,n$2); [line 46]\n NULLIFY(&p); [line 46]\n APPLY_ABSTRACTION; [line 46]\n " shape="box"] 24 -> 18 ; -23 [label="23: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&p,false); [line 45]\n " shape="invhouse"] +23 [label="23: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 45]\n REMOVE_TEMPS(n$0); [line 45]\n NULLIFY(&p); [line 45]\n " shape="invhouse"] 23 -> 25 ; @@ -23,7 +23,7 @@ digraph iCFG { 22 -> 24 ; -21 [label="21: BinaryOperatorStmt: EQ \n n$0=*&b:class A * [line 45]\n NULLIFY(&b,false); [line 45]\n " shape="box"] +21 [label="21: BinaryOperatorStmt: EQ \n n$0=*&b:class A * [line 45]\n NULLIFY(&b); [line 45]\n " shape="box"] 21 -> 22 ; @@ -43,7 +43,7 @@ digraph iCFG { 17 -> 27 ; -16 [label="16: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&__objc_anonymous_block_A_trans______2,false); [line 34]\n " shape="box"] +16 [label="16: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_trans______2); [line 34]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_trans______2 ):unsigned long ) [line 34]\n *&__objc_anonymous_block_A_trans______2:class __objc_anonymous_block_A_trans______2 =n$11 [line 34]\n n$12=*&#GB$A_trans_sharedInstance:struct objc_object * [line 34]\n *n$11.A_trans_sharedInstance:struct objc_object *=n$12 [line 34]\n *&dummy_block:_fn_ (*)=(_fun___objc_anonymous_block_A_trans______2) [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&__objc_anonymous_block_A_trans______2); [line 34]\n " shape="box"] 16 -> 12 ; @@ -58,7 +58,7 @@ digraph iCFG { 13 -> 15 ; -12 [label="12: Call n$8 \n n$8=*&dummy_block:_fn_ (*) [line 37]\n n$8() [line 37]\n REMOVE_TEMPS(n$8); [line 37]\n NULLIFY(&dummy_block,false); [line 37]\n " shape="box"] +12 [label="12: Call n$8 \n n$8=*&dummy_block:_fn_ (*) [line 37]\n n$8() [line 37]\n REMOVE_TEMPS(n$8); [line 37]\n NULLIFY(&dummy_block); [line 37]\n " shape="box"] 12 -> 11 ; @@ -73,7 +73,7 @@ digraph iCFG { 9 -> 16 ; -8 [label="8: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1,false); [line 26]\n " shape="box"] +8 [label="8: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_sharedInstance______1 ):unsigned long ) [line 26]\n *&__objc_anonymous_block_A_sharedInstance______1:class __objc_anonymous_block_A_sharedInstance______1 =n$5 [line 26]\n n$6=*&#GB$A_sharedInstance_sharedInstance:struct objc_object * [line 26]\n *n$5.A_sharedInstance_sharedInstance:struct objc_object *=n$6 [line 26]\n *&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*)=(_fun___objc_anonymous_block_A_sharedInstance______1) [line 26]\n REMOVE_TEMPS(n$5,n$6); [line 26]\n NULLIFY(&__objc_anonymous_block_A_sharedInstance______1); [line 26]\n " shape="box"] 8 -> 4 ; @@ -88,7 +88,7 @@ digraph iCFG { 5 -> 7 ; -4 [label="4: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 26]\n n$2=n$1() [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1,false); [line 26]\n " shape="box"] +4 [label="4: Call n$1 \n n$1=*&infer___objc_anonymous_block_A_sharedInstance______1:_fn_ (*) [line 26]\n n$2=n$1() [line 26]\n REMOVE_TEMPS(n$1,n$2); [line 26]\n NULLIFY(&infer___objc_anonymous_block_A_sharedInstance______1); [line 26]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot index d4ba574ef..f12b579cb 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/dispatch_examples.dot @@ -3,7 +3,7 @@ digraph iCFG { 60 -> 59 ; -59 [label="59: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 73]\n " shape="box"] +59 [label="59: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n n$52=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_barrier_example______6 ):unsigned long ) [line 73]\n *&__objc_anonymous_block_A_dispatch_barrier_example______6:class __objc_anonymous_block_A_dispatch_barrier_example______6 =n$52 [line 73]\n n$53=*&#GB$A_dispatch_barrier_example_a:class A * [line 73]\n *n$52.A_dispatch_barrier_example_a:class A *=n$53 [line 73]\n *&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_barrier_example______6) [line 73]\n REMOVE_TEMPS(n$52,n$53); [line 73]\n NULLIFY(&__objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n " shape="box"] 59 -> 54 ; @@ -22,7 +22,7 @@ digraph iCFG { 55 -> 58 ; -54 [label="54: Call n$47 \n n$47=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 73]\n n$48=n$47() [line 73]\n REMOVE_TEMPS(n$47,n$48); [line 73]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6,false); [line 73]\n " shape="box"] +54 [label="54: Call n$47 \n n$47=*&infer___objc_anonymous_block_A_dispatch_barrier_example______6:_fn_ (*) [line 73]\n n$48=n$47() [line 73]\n REMOVE_TEMPS(n$47,n$48); [line 73]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_barrier_example______6); [line 73]\n " shape="box"] 54 -> 53 ; @@ -41,7 +41,7 @@ digraph iCFG { 50 -> 49 ; -49 [label="49: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 64]\n " shape="box"] +49 [label="49: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n n$43=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_notify_example______5 ):unsigned long ) [line 64]\n *&__objc_anonymous_block_A_dispatch_group_notify_example______5:class __objc_anonymous_block_A_dispatch_group_notify_example______5 =n$43 [line 64]\n n$44=*&#GB$A_dispatch_group_notify_example_a:class A * [line 64]\n *n$43.A_dispatch_group_notify_example_a:class A *=n$44 [line 64]\n *&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_notify_example______5) [line 64]\n REMOVE_TEMPS(n$43,n$44); [line 64]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n " shape="box"] 49 -> 44 ; @@ -60,7 +60,7 @@ digraph iCFG { 45 -> 48 ; -44 [label="44: Call n$38 \n n$38=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 64]\n n$39=n$38() [line 64]\n REMOVE_TEMPS(n$38,n$39); [line 64]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5,false); [line 64]\n " shape="box"] +44 [label="44: Call n$38 \n n$38=*&infer___objc_anonymous_block_A_dispatch_group_notify_example______5:_fn_ (*) [line 64]\n n$39=n$38() [line 64]\n REMOVE_TEMPS(n$38,n$39); [line 64]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_notify_example______5); [line 64]\n " shape="box"] 44 -> 43 ; @@ -79,7 +79,7 @@ digraph iCFG { 40 -> 39 ; -39 [label="39: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4,false); [line 55]\n " shape="box"] +39 [label="39: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n n$34=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_group_example______4 ):unsigned long ) [line 55]\n *&__objc_anonymous_block_A_dispatch_group_example______4:class __objc_anonymous_block_A_dispatch_group_example______4 =n$34 [line 55]\n n$35=*&#GB$A_dispatch_group_example_a:class A * [line 55]\n *n$34.A_dispatch_group_example_a:class A *=n$35 [line 55]\n *&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_group_example______4) [line 55]\n REMOVE_TEMPS(n$34,n$35); [line 55]\n NULLIFY(&__objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n " shape="box"] 39 -> 34 ; @@ -98,7 +98,7 @@ digraph iCFG { 35 -> 38 ; -34 [label="34: Call n$29 \n n$29=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 55]\n n$30=n$29() [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4,false); [line 55]\n " shape="box"] +34 [label="34: Call n$29 \n n$29=*&infer___objc_anonymous_block_A_dispatch_group_example______4:_fn_ (*) [line 55]\n n$30=n$29() [line 55]\n REMOVE_TEMPS(n$29,n$30); [line 55]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_group_example______4); [line 55]\n " shape="box"] 34 -> 33 ; @@ -117,7 +117,7 @@ digraph iCFG { 30 -> 29 ; -29 [label="29: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3,false); [line 44]\n " shape="box"] +29 [label="29: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_after_example______3); [line 46]\n n$25=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_after_example______3 ):unsigned long ) [line 46]\n *&__objc_anonymous_block_A_dispatch_after_example______3:class __objc_anonymous_block_A_dispatch_after_example______3 =n$25 [line 46]\n n$26=*&#GB$A_dispatch_after_example_a:class A * [line 46]\n *n$25.A_dispatch_after_example_a:class A *=n$26 [line 46]\n *&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_after_example______3) [line 44]\n REMOVE_TEMPS(n$25,n$26); [line 44]\n NULLIFY(&__objc_anonymous_block_A_dispatch_after_example______3); [line 44]\n " shape="box"] 29 -> 24 ; @@ -136,7 +136,7 @@ digraph iCFG { 25 -> 28 ; -24 [label="24: Call n$20 \n n$20=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 44]\n n$21=n$20() [line 44]\n REMOVE_TEMPS(n$20,n$21); [line 44]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3,false); [line 44]\n " shape="box"] +24 [label="24: Call n$20 \n n$20=*&infer___objc_anonymous_block_A_dispatch_after_example______3:_fn_ (*) [line 44]\n n$21=n$20() [line 44]\n REMOVE_TEMPS(n$20,n$21); [line 44]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_after_example______3); [line 44]\n " shape="box"] 24 -> 23 ; @@ -155,7 +155,7 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2,false); [line 34]\n " shape="box"] +19 [label="19: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_async_example______2); [line 35]\n n$16=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_async_example______2 ):unsigned long ) [line 35]\n *&__objc_anonymous_block_A_dispatch_async_example______2:class __objc_anonymous_block_A_dispatch_async_example______2 =n$16 [line 35]\n n$17=*&#GB$A_dispatch_async_example_a:class A * [line 35]\n *n$16.A_dispatch_async_example_a:class A *=n$17 [line 35]\n *&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_async_example______2) [line 34]\n REMOVE_TEMPS(n$16,n$17); [line 34]\n NULLIFY(&__objc_anonymous_block_A_dispatch_async_example______2); [line 34]\n " shape="box"] 19 -> 14 ; @@ -174,7 +174,7 @@ digraph iCFG { 15 -> 18 ; -14 [label="14: Call n$11 \n n$11=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 34]\n n$12=n$11() [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2,false); [line 34]\n " shape="box"] +14 [label="14: Call n$11 \n n$11=*&infer___objc_anonymous_block_A_dispatch_async_example______2:_fn_ (*) [line 34]\n n$12=n$11() [line 34]\n REMOVE_TEMPS(n$11,n$12); [line 34]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_async_example______2); [line 34]\n " shape="box"] 14 -> 13 ; @@ -193,7 +193,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1,false); [line 25]\n " shape="box"] +9 [label="9: DeclStmt \n DECLARE_LOCALS(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_dispatch_once_example______1 ):unsigned long ) [line 25]\n *&__objc_anonymous_block_A_dispatch_once_example______1:class __objc_anonymous_block_A_dispatch_once_example______1 =n$7 [line 25]\n n$8=*&#GB$A_dispatch_once_example_a:class A * [line 25]\n *n$7.A_dispatch_once_example_a:class A *=n$8 [line 25]\n *&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*)=(_fun___objc_anonymous_block_A_dispatch_once_example______1) [line 25]\n REMOVE_TEMPS(n$7,n$8); [line 25]\n NULLIFY(&__objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n " shape="box"] 9 -> 4 ; @@ -212,7 +212,7 @@ digraph iCFG { 5 -> 8 ; -4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 25]\n n$3=n$2() [line 25]\n REMOVE_TEMPS(n$2,n$3); [line 25]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1,false); [line 25]\n " shape="box"] +4 [label="4: Call n$2 \n n$2=*&infer___objc_anonymous_block_A_dispatch_once_example______1:_fn_ (*) [line 25]\n n$3=n$2() [line 25]\n REMOVE_TEMPS(n$2,n$3); [line 25]\n NULLIFY(&infer___objc_anonymous_block_A_dispatch_once_example______1); [line 25]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot index 6b015b0de..94e207abe 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/retain_cycle.dot @@ -3,7 +3,7 @@ digraph iCFG { 19 -> 18 ; -18 [label="18: BinaryOperatorStmt: Assign \n n$0=*&a:class A * [line 65]\n n$1=_fun_foo(n$0:class A *) [line 65]\n *&a:class A *=n$1 [line 65]\n REMOVE_TEMPS(n$0,n$1); [line 65]\n NULLIFY(&a,false); [line 65]\n " shape="box"] +18 [label="18: BinaryOperatorStmt: Assign \n n$0=*&a:class A * [line 65]\n n$1=_fun_foo(n$0:class A *) [line 65]\n *&a:class A *=n$1 [line 65]\n REMOVE_TEMPS(n$0,n$1); [line 65]\n NULLIFY(&a); [line 65]\n " shape="box"] 18 -> 17 ; @@ -22,7 +22,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: Return Stmt \n n$0=*&a:class A * [line 58]\n *&return:class A *=n$0 [line 58]\n REMOVE_TEMPS(n$0); [line 58]\n NULLIFY(&a,false); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] +13 [label="13: Return Stmt \n n$0=*&a:class A * [line 58]\n *&return:class A *=n$0 [line 58]\n REMOVE_TEMPS(n$0); [line 58]\n NULLIFY(&a); [line 58]\n APPLY_ABSTRACTION; [line 58]\n " shape="box"] 13 -> 12 ; @@ -37,11 +37,11 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1,false); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +9 [label="9: Message Call: sHandler: \n n$0=*&self:class A * [line 47]\n n$1=*n$0._b:class B * [line 47]\n DECLARE_LOCALS(&__objc_anonymous_block_A_capture______1); [line 47]\n n$5=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_capture______1 ):unsigned long ) [line 47]\n *&__objc_anonymous_block_A_capture______1:class __objc_anonymous_block_A_capture______1 =n$5 [line 47]\n n$6=*&self:class A * [line 47]\n *n$5.self:class A *=n$6 [line 47]\n n$2=*&self:class A * [line 47]\n n$7=*&__objc_anonymous_block_A_capture______1:_fn_ (*) [line 47]\n _fun_B_sHandler:(n$1:class B *,n$7:_fn_ (*),n$2:_fn_ (*)) virtual [line 47]\n REMOVE_TEMPS(n$0,n$1,n$5,n$6,n$2,n$7); [line 47]\n NULLIFY(&__objc_anonymous_block_A_capture______1); [line 47]\n NULLIFY(&self); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] 9 -> 5 ; -8 [label="8: BinaryOperatorStmt: Assign \n n$3=*&self:class A * [line 48]\n n$4=*&d:class D * [line 48]\n *n$3._data:class D *=n$4 [line 48]\n REMOVE_TEMPS(n$3,n$4); [line 48]\n NULLIFY(&d,false); [line 48]\n NULLIFY(&self,false); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] +8 [label="8: BinaryOperatorStmt: Assign \n n$3=*&self:class A * [line 48]\n n$4=*&d:class D * [line 48]\n *n$3._data:class D *=n$4 [line 48]\n REMOVE_TEMPS(n$3,n$4); [line 48]\n NULLIFY(&d); [line 48]\n NULLIFY(&self); [line 48]\n APPLY_ABSTRACTION; [line 48]\n " shape="box"] 8 -> 7 ; @@ -59,7 +59,7 @@ digraph iCFG { 4 -> 10 ; -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class B * [line 30]\n n$1=*&h:_fn_ (*) [line 30]\n *n$0._h:_fn_ (*)=n$1 [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&h,false); [line 30]\n NULLIFY(&self,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class B * [line 30]\n n$1=*&h:_fn_ (*) [line 30]\n *n$0._h:_fn_ (*)=n$1 [line 30]\n REMOVE_TEMPS(n$0,n$1); [line 30]\n NULLIFY(&h); [line 30]\n NULLIFY(&self); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/block/static.dot b/infer/tests/codetoanalyze/objc/frontend/block/static.dot index 4e630d35a..58ac55937 100644 --- a/infer/tests/codetoanalyze/objc/frontend/block/static.dot +++ b/infer/tests/codetoanalyze/objc/frontend/block/static.dot @@ -10,7 +10,7 @@ digraph iCFG { 29 -> 31 ; -28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n NULLIFY(&__objc_anonymous_block_A_test3______4,false); [line 50]\n " shape="box"] +28 [label="28: Call (_fun___objc_anonymous_block_A_test3______4) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test3______4); [line 50]\n n$17=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test3______4 ):unsigned long ) [line 50]\n *&__objc_anonymous_block_A_test3______4:class __objc_anonymous_block_A_test3______4 =n$17 [line 50]\n n$18=*&#GB$A_test3_i:int [line 50]\n *n$17.A_test3_i:int =n$18 [line 50]\n (_fun___objc_anonymous_block_A_test3______4)() [line 50]\n REMOVE_TEMPS(n$17,n$18); [line 50]\n NULLIFY(&__objc_anonymous_block_A_test3______4); [line 50]\n " shape="box"] 28 -> 24 ; @@ -40,11 +40,11 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n NULLIFY(&__objc_anonymous_block_A_test2______3,false); [line 39]\n " shape="box"] +20 [label="20: Call (_fun___objc_anonymous_block_A_test2______3) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test2______3); [line 39]\n n$11=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test2______3 ):unsigned long ) [line 39]\n *&__objc_anonymous_block_A_test2______3:class __objc_anonymous_block_A_test2______3 =n$11 [line 39]\n n$12=*&#GB$A_test2_sharedInstance:struct objc_object * [line 39]\n *n$11.A_test2_sharedInstance:struct objc_object *=n$12 [line 39]\n (_fun___objc_anonymous_block_A_test2______3)() [line 39]\n REMOVE_TEMPS(n$11,n$12); [line 39]\n NULLIFY(&__objc_anonymous_block_A_test2______3); [line 39]\n " shape="box"] 20 -> 16 ; -19 [label="19: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n REMOVE_TEMPS(n$10); [line 41]\n NULLIFY(&p,false); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] +19 [label="19: DeclStmt \n n$10=*&#GB$A_test2_sharedInstance:struct objc_object * [line 41]\n *&p:struct objc_object *=n$10 [line 41]\n REMOVE_TEMPS(n$10); [line 41]\n NULLIFY(&p); [line 41]\n APPLY_ABSTRACTION; [line 41]\n " shape="box"] 19 -> 18 ; @@ -66,7 +66,7 @@ digraph iCFG { 14 -> 21 ; -13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2,false); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] +13 [label="13: Call (_fun___objc_anonymous_block_A_test_leak______2) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test_leak______2); [line 30]\n n$7=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test_leak______2 ):unsigned long ) [line 30]\n *&__objc_anonymous_block_A_test_leak______2:class __objc_anonymous_block_A_test_leak______2 =n$7 [line 30]\n n$8=*&#GB$A_test_leak_sharedInstance:struct objc_object * [line 30]\n *n$7.A_test_leak_sharedInstance:struct objc_object *=n$8 [line 30]\n (_fun___objc_anonymous_block_A_test_leak______2)() [line 30]\n REMOVE_TEMPS(n$7,n$8); [line 30]\n NULLIFY(&__objc_anonymous_block_A_test_leak______2); [line 30]\n APPLY_ABSTRACTION; [line 30]\n " shape="box"] 13 -> 9 ; @@ -88,7 +88,7 @@ digraph iCFG { 8 -> 13 ; -7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&__objc_anonymous_block_A_test______1,false); [line 20]\n " shape="box"] +7 [label="7: Call (_fun___objc_anonymous_block_A_test______1) \n DECLARE_LOCALS(&__objc_anonymous_block_A_test______1); [line 20]\n n$3=_fun___objc_alloc_no_fail(sizeof(class __objc_anonymous_block_A_test______1 ):unsigned long ) [line 20]\n *&__objc_anonymous_block_A_test______1:class __objc_anonymous_block_A_test______1 =n$3 [line 20]\n n$4=*&#GB$A_test_sharedInstance:struct objc_object * [line 20]\n *n$3.A_test_sharedInstance:struct objc_object *=n$4 [line 20]\n (_fun___objc_anonymous_block_A_test______1)() [line 20]\n REMOVE_TEMPS(n$3,n$4); [line 20]\n NULLIFY(&__objc_anonymous_block_A_test______1); [line 20]\n " shape="box"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot index f2d327021..541ddaf7f 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/Boxing.dot @@ -1,5 +1,5 @@ digraph iCFG { -26 [label="26: DeclStmt \n n$15=_fun_strdup(\"hello world\":char *) [line 42]\n n$16=_fun_NSString_stringWithUTF8String:(n$15:char *) [line 42]\n *&s:class NSString *=n$16 [line 42]\n REMOVE_TEMPS(n$15,n$16); [line 42]\n NULLIFY(&s,false); [line 42]\n " shape="box"] +26 [label="26: DeclStmt \n n$15=_fun_strdup(\"hello world\":char *) [line 42]\n n$16=_fun_NSString_stringWithUTF8String:(n$15:char *) [line 42]\n *&s:class NSString *=n$16 [line 42]\n REMOVE_TEMPS(n$15,n$16); [line 42]\n NULLIFY(&s); [line 42]\n " shape="box"] 26 -> 25 ; @@ -14,7 +14,7 @@ digraph iCFG { 23 -> 26 ; -22 [label="22: DeclStmt \n n$13=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 37]\n *&n:class NSNumber *=n$13 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n NULLIFY(&n,false); [line 37]\n " shape="box"] +22 [label="22: DeclStmt \n n$13=_fun_NSNumber_numberWithBool:(1:_Bool ) [line 37]\n *&n:class NSNumber *=n$13 [line 37]\n REMOVE_TEMPS(n$13); [line 37]\n NULLIFY(&n); [line 37]\n " shape="box"] 22 -> 21 ; @@ -29,7 +29,7 @@ digraph iCFG { 19 -> 22 ; -18 [label="18: DeclStmt \n n$11=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 32]\n *&n:class NSNumber *=n$11 [line 32]\n REMOVE_TEMPS(n$11); [line 32]\n NULLIFY(&n,false); [line 32]\n " shape="box"] +18 [label="18: DeclStmt \n n$11=_fun_NSNumber_numberWithDouble:(1.500000:double ) [line 32]\n *&n:class NSNumber *=n$11 [line 32]\n REMOVE_TEMPS(n$11); [line 32]\n NULLIFY(&n); [line 32]\n " shape="box"] 18 -> 17 ; @@ -44,7 +44,7 @@ digraph iCFG { 15 -> 18 ; -14 [label="14: DeclStmt \n n$9=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 27]\n *&n:class NSNumber *=n$9 [line 27]\n REMOVE_TEMPS(n$9); [line 27]\n NULLIFY(&n,false); [line 27]\n " shape="box"] +14 [label="14: DeclStmt \n n$9=_fun_NSNumber_numberWithFloat:(1.500000:float ) [line 27]\n *&n:class NSNumber *=n$9 [line 27]\n REMOVE_TEMPS(n$9); [line 27]\n NULLIFY(&n); [line 27]\n " shape="box"] 14 -> 13 ; @@ -59,7 +59,7 @@ digraph iCFG { 11 -> 14 ; -10 [label="10: DeclStmt \n n$7=_fun_NSNumber_numberWithInt:(5:int ) [line 22]\n *&n:class NSNumber *=n$7 [line 22]\n REMOVE_TEMPS(n$7); [line 22]\n NULLIFY(&n,false); [line 22]\n " shape="box"] +10 [label="10: DeclStmt \n n$7=_fun_NSNumber_numberWithInt:(5:int ) [line 22]\n *&n:class NSNumber *=n$7 [line 22]\n REMOVE_TEMPS(n$7); [line 22]\n NULLIFY(&n); [line 22]\n " shape="box"] 10 -> 9 ; @@ -82,11 +82,11 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: DeclStmt \n n$3=*&x:int [line 17]\n n$4=*&y:int [line 17]\n n$5=_fun_NSNumber_numberWithInt:((n$3 + n$4):int ) [line 17]\n *&n:class NSNumber *=n$5 [line 17]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 17]\n NULLIFY(&n,false); [line 17]\n " shape="box"] +4 [label="4: DeclStmt \n n$3=*&x:int [line 17]\n n$4=*&y:int [line 17]\n n$5=_fun_NSNumber_numberWithInt:((n$3 + n$4):int ) [line 17]\n *&n:class NSNumber *=n$5 [line 17]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 17]\n NULLIFY(&n); [line 17]\n " shape="box"] 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 18]\n n$1=*&y:int [line 18]\n n$2=_fun_NSNumber_numberWithInt:((n$0 + n$1):int ) [line 18]\n *&return:class NSNumber *=n$2 [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&x,false); [line 18]\n NULLIFY(&y,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 18]\n n$1=*&y:int [line 18]\n n$2=_fun_NSNumber_numberWithInt:((n$0 + n$1):int ) [line 18]\n *&return:class NSNumber *=n$2 [line 18]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 18]\n NULLIFY(&x); [line 18]\n NULLIFY(&y); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot index 735a4b25f..4237db2e2 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/array.dot @@ -3,7 +3,7 @@ digraph iCFG { 12 -> 11 ; -11 [label="11: BinaryOperatorStmt: Assign \n n$7=*&germanCars:class NSArray * [line 24]\n n$8=_fun_NSArray_objectAtIndexedSubscript:(n$7:class NSArray *,3:unsigned long ) virtual [line 24]\n *&s:class NSString *=n$8 [line 24]\n REMOVE_TEMPS(n$7,n$8); [line 24]\n NULLIFY(&s,false); [line 24]\n " shape="box"] +11 [label="11: BinaryOperatorStmt: Assign \n n$7=*&germanCars:class NSArray * [line 24]\n n$8=_fun_NSArray_objectAtIndexedSubscript:(n$7:class NSArray *,3:unsigned long ) virtual [line 24]\n *&s:class NSString *=n$8 [line 24]\n REMOVE_TEMPS(n$7,n$8); [line 24]\n NULLIFY(&s); [line 24]\n " shape="box"] 11 -> 10 ; @@ -11,7 +11,7 @@ digraph iCFG { 10 -> 4 ; -9 [label="9: Call _fun_NSLog \n n$3=_fun_NSString_stringWithUTF8String:(\"%@\":char *) [line 27]\n n$4=*&item:class NSString * [line 27]\n _fun_NSLog(n$3:struct objc_object *,n$4:class NSString *) [line 27]\n REMOVE_TEMPS(n$3,n$4); [line 27]\n NULLIFY(&item,false); [line 27]\n " shape="box"] +9 [label="9: Call _fun_NSLog \n n$3=_fun_NSString_stringWithUTF8String:(\"%@\":char *) [line 27]\n n$4=*&item:class NSString * [line 27]\n _fun_NSLog(n$3:struct objc_object *,n$4:class NSString *) [line 27]\n REMOVE_TEMPS(n$3,n$4); [line 27]\n NULLIFY(&item); [line 27]\n " shape="box"] 9 -> 8 ; @@ -19,7 +19,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 != 0) == 0), false); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n NULLIFY(&germanCars,false); [line 26]\n NULLIFY(&item,false); [line 26]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 != 0) == 0), false); [line 26]\n REMOVE_TEMPS(n$0); [line 26]\n NULLIFY(&germanCars); [line 26]\n NULLIFY(&item); [line 26]\n " shape="invhouse"] 7 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.dot b/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.dot index a6c289c17..5d4137868 100644 --- a/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.dot +++ b/infer/tests/codetoanalyze/objc/frontend/boxing/array_literal.dot @@ -1,5 +1,5 @@ digraph iCFG { -4 [label="4: DeclStmt \n n$3=_fun_NSString_stringWithUTF8String:(\"cat\":char *) [line 13]\n n$4=_fun_NSString_stringWithUTF8String:(\"dog\":char *) [line 13]\n n$5=_fun_NSArray_arrayWithObjects:(n$3:struct objc_object *,n$4:class NSString *,0:void *) [line 13]\n *&animals:class NSArray *=n$5 [line 13]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 13]\n NULLIFY(&animals,false); [line 13]\n " shape="box"] +4 [label="4: DeclStmt \n n$3=_fun_NSString_stringWithUTF8String:(\"cat\":char *) [line 13]\n n$4=_fun_NSString_stringWithUTF8String:(\"dog\":char *) [line 13]\n n$5=_fun_NSArray_arrayWithObjects:(n$3:struct objc_object *,n$4:class NSString *,0:void *) [line 13]\n *&animals:class NSArray *=n$5 [line 13]\n REMOVE_TEMPS(n$3,n$4,n$5); [line 13]\n NULLIFY(&animals); [line 13]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot index ec935fe18..efffa9754 100644 --- a/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot +++ b/infer/tests/codetoanalyze/objc/frontend/conditional_operation/ConditionalOperation.dot @@ -1,5 +1,5 @@ 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 REMOVE_TEMPS(n$1,n$5,n$6); [line 24]\n NULLIFY(&SIL_temp_conditional___n$2,false); [line 24]\n NULLIFY(&self,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +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 REMOVE_TEMPS(n$1,n$5,n$6); [line 24]\n NULLIFY(&SIL_temp_conditional___n$2); [line 24]\n NULLIFY(&self); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 11 -> 5 ; @@ -7,11 +7,11 @@ digraph iCFG { 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 REMOVE_TEMPS(n$4); [line 24]\n NULLIFY(&b,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +9 [label="9: ConditinalStmt Branch \n n$4=*&b:_Bool [line 24]\n *&SIL_temp_conditional___n$2:int =n$4 [line 24]\n REMOVE_TEMPS(n$4); [line 24]\n NULLIFY(&b); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 9 -> 6 ; -8 [label="8: Prune (false branch) \n n$3=*&b:_Bool [line 24]\n PRUNE((n$3 == 0), false); [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b,false); [line 24]\n " shape="invhouse"] +8 [label="8: Prune (false branch) \n n$3=*&b:_Bool [line 24]\n PRUNE((n$3 == 0), false); [line 24]\n REMOVE_TEMPS(n$3); [line 24]\n NULLIFY(&b); [line 24]\n " shape="invhouse"] 8 -> 10 ; @@ -31,7 +31,7 @@ digraph iCFG { 4 -> 7 ; 4 -> 8 ; -3 [label="3: Return Stmt \n n$0=*&x:int [line 20]\n *&return:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&x,false); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&x:int [line 20]\n *&return:int =n$0 [line 20]\n REMOVE_TEMPS(n$0); [line 20]\n NULLIFY(&x); [line 20]\n APPLY_ABSTRACTION; [line 20]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot index 51747c3f0..9472248ed 100644 --- a/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot +++ b/infer/tests/codetoanalyze/objc/frontend/exceptions/ExceptionExample.dot @@ -8,11 +8,11 @@ digraph iCFG { 11 -> 6 ; -10 [label="10: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s,false); [line 29]\n " shape="invhouse"] +10 [label="10: Prune (false branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 == 0), false); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s); [line 29]\n " shape="invhouse"] 10 -> 7 ; -9 [label="9: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s,false); [line 29]\n " shape="invhouse"] +9 [label="9: Prune (true branch) \n n$3=*&s:class NSString * [line 29]\n PRUNE((n$3 != 0), true); [line 29]\n REMOVE_TEMPS(n$3); [line 29]\n NULLIFY(&s); [line 29]\n " shape="invhouse"] 9 -> 11 ; @@ -31,11 +31,11 @@ digraph iCFG { 5 -> 12 ; -4 [label="4: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 20]\n *&s:class NSString *=n$2 [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&s,false); [line 20]\n " shape="box"] +4 [label="4: DeclStmt \n n$2=_fun___objc_alloc_no_fail(sizeof(class NSString ):unsigned long ) [line 20]\n *&s:class NSString *=n$2 [line 20]\n REMOVE_TEMPS(n$2); [line 20]\n NULLIFY(&s); [line 20]\n " shape="box"] 4 -> 3 ; -3 [label="3: Message Call: description \n n$0=*&self:class ExceptionExample * [line 23]\n n$1=_fun_ExceptionExample_description(n$0:class ExceptionExample *) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&self,false); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] +3 [label="3: Message Call: description \n n$0=*&self:class ExceptionExample * [line 23]\n n$1=_fun_ExceptionExample_description(n$0:class ExceptionExample *) [line 23]\n REMOVE_TEMPS(n$0,n$1); [line 23]\n NULLIFY(&self); [line 23]\n APPLY_ABSTRACTION; [line 23]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot index 2814a9dcb..bc355e19b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot +++ b/infer/tests/codetoanalyze/objc/frontend/fast_enumeration/Fast_enumeration.dot @@ -3,15 +3,15 @@ digraph iCFG { 21 -> 20 ; -20 [label="20: DeclStmt \n *&item:class NSArray *=0 [line 27]\n NULLIFY(&item,false); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] +20 [label="20: DeclStmt \n *&item:class NSArray *=0 [line 27]\n NULLIFY(&item); [line 27]\n APPLY_ABSTRACTION; [line 27]\n " shape="box"] 20 -> 15 ; -19 [label="19: BinaryOperatorStmt: AddAssign \n n$13=*&item:class NSArray * [line 29]\n n$14=_fun_NSArray_count(n$13:class NSArray *) [line 29]\n n$15=*&size:int [line 29]\n *&size:int =(n$15 + n$14) [line 29]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 29]\n NULLIFY(&item,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: AddAssign \n n$13=*&item:class NSArray * [line 29]\n n$14=_fun_NSArray_count(n$13:class NSArray *) [line 29]\n n$15=*&size:int [line 29]\n *&size:int =(n$15 + n$14) [line 29]\n REMOVE_TEMPS(n$13,n$14,n$15); [line 29]\n NULLIFY(&item); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 19 -> 15 ; -18 [label="18: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n NULLIFY(&item,false); [line 28]\n " shape="invhouse"] +18 [label="18: Prune (false branch) \n PRUNE((n$12 == 0), false); [line 28]\n REMOVE_TEMPS(n$10,n$11,n$12); [line 28]\n NULLIFY(&item); [line 28]\n " shape="invhouse"] 18 -> 14 ; @@ -28,7 +28,7 @@ digraph iCFG { 15 -> 16 ; -14 [label="14: Return Stmt \n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +14 [label="14: Return Stmt \n n$9=*&size:int [line 31]\n *&return:int =n$9 [line 31]\n REMOVE_TEMPS(n$9); [line 31]\n NULLIFY(&size); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 14 -> 13 ; @@ -47,7 +47,7 @@ digraph iCFG { 10 -> 4 ; -9 [label="9: BinaryOperatorStmt: AddAssign \n n$4=*&item:class NSArray * [line 20]\n n$5=_fun_NSArray_count(n$4:class NSArray *) [line 20]\n n$6=*&size:int [line 20]\n *&size:int =(n$6 + n$5) [line 20]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 20]\n NULLIFY(&item,false); [line 20]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: AddAssign \n n$4=*&item:class NSArray * [line 20]\n n$5=_fun_NSArray_count(n$4:class NSArray *) [line 20]\n n$6=*&size:int [line 20]\n *&size:int =(n$6 + n$5) [line 20]\n REMOVE_TEMPS(n$4,n$5,n$6); [line 20]\n NULLIFY(&item); [line 20]\n " shape="box"] 9 -> 8 ; @@ -55,7 +55,7 @@ digraph iCFG { 8 -> 4 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n NULLIFY(&item,false); [line 19]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$1 != 0) == 0), false); [line 19]\n REMOVE_TEMPS(n$1); [line 19]\n NULLIFY(&item); [line 19]\n " shape="invhouse"] 7 -> 3 ; @@ -72,7 +72,7 @@ digraph iCFG { 4 -> 5 ; -3 [label="3: Return Stmt \n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size,false); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&size:int [line 22]\n *&return:int =n$0 [line 22]\n REMOVE_TEMPS(n$0); [line 22]\n NULLIFY(&size); [line 22]\n APPLY_ABSTRACTION; [line 22]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot index 2a7bc1abd..1cbe563d5 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyAttributes.dot @@ -3,11 +3,11 @@ digraph iCFG { 18 -> 17 ; -17 [label="17: Message Call: setLast_name: \n n$1=*&a:class A * [line 40]\n n$2=*&a2:class A * [line 40]\n _fun_A_setLast_name:(n$1:class A *,n$2:class A *) [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a2,false); [line 40]\n " shape="box"] +17 [label="17: Message Call: setLast_name: \n n$1=*&a:class A * [line 40]\n n$2=*&a2:class A * [line 40]\n _fun_A_setLast_name:(n$1:class A *,n$2:class A *) [line 40]\n REMOVE_TEMPS(n$1,n$2); [line 40]\n NULLIFY(&a2); [line 40]\n " shape="box"] 17 -> 16 ; -16 [label="16: Message Call: release \n n$0=*&a:class A * [line 41]\n _fun___objc_release(n$0:class A *) [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&a,false); [line 41]\n " shape="box"] +16 [label="16: Message Call: release \n n$0=*&a:class A * [line 41]\n _fun___objc_release(n$0:class A *) [line 41]\n REMOVE_TEMPS(n$0); [line 41]\n NULLIFY(&a); [line 41]\n " shape="box"] 16 -> 15 ; @@ -35,7 +35,7 @@ digraph iCFG { 10 -> 9 ; -9 [label="9: BinaryOperatorStmt: Assign \n n$2=*&other:class A * [line 31]\n n$3=*&self:class A * [line 31]\n n$4=*n$3._child:class A * [line 31]\n *n$2._child:class A *=n$4 [line 31]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 31]\n NULLIFY(&self,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +9 [label="9: BinaryOperatorStmt: Assign \n n$2=*&other:class A * [line 31]\n n$3=*&self:class A * [line 31]\n n$4=*n$3._child:class A * [line 31]\n *n$2._child:class A *=n$4 [line 31]\n REMOVE_TEMPS(n$2,n$3,n$4); [line 31]\n NULLIFY(&self); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 9 -> 6 ; @@ -51,7 +51,7 @@ digraph iCFG { 6 -> 5 ; -5 [label="5: Return Stmt \n n$0=*&other:class A * [line 33]\n *&return:class A *=n$0 [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n NULLIFY(&other,false); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] +5 [label="5: Return Stmt \n n$0=*&other:class A * [line 33]\n *&return:class A *=n$0 [line 33]\n REMOVE_TEMPS(n$0); [line 33]\n NULLIFY(&other); [line 33]\n APPLY_ABSTRACTION; [line 33]\n " shape="box"] 5 -> 4 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot index 770101ac8..8c9ccd2a7 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class PropertyImplSetter * [line 15]\n *n$0._maximumFileSize:int =0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self,false); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] +3 [label="3: BinaryOperatorStmt: Assign \n n$0=*&self:class PropertyImplSetter * [line 15]\n *n$0._maximumFileSize:int =0 [line 15]\n REMOVE_TEMPS(n$0); [line 15]\n NULLIFY(&self); [line 15]\n APPLY_ABSTRACTION; [line 15]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot index 885854c0e..49334be14 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.dot @@ -1,5 +1,5 @@ digraph iCFG { -3 [label="3: Return Stmt \n n$0=*&target:class A * [line 19]\n n$1=_fun_A_x(n$0:class A *) [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&target,false); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&target:class A * [line 19]\n n$1=_fun_A_x(n$0:class A *) [line 19]\n *&return:int =n$1 [line 19]\n REMOVE_TEMPS(n$0,n$1); [line 19]\n NULLIFY(&target); [line 19]\n APPLY_ABSTRACTION; [line 19]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/property/main_car.dot b/infer/tests/codetoanalyze/objc/frontend/property/main_car.dot index e9b0ea69e..5c007699f 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/main_car.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/main_car.dot @@ -7,7 +7,7 @@ digraph iCFG { 5 -> 4 ; -4 [label="4: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"%d\":char *) [line 15]\n n$1=*&honda:class Car * [line 15]\n n$2=_fun_Car_running(n$1:class Car *) [line 15]\n _fun_NSLog(n$0:struct objc_object *,n$2:int ) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 15]\n NULLIFY(&honda,false); [line 15]\n " shape="box"] +4 [label="4: Call _fun_NSLog \n n$0=_fun_NSString_stringWithUTF8String:(\"%d\":char *) [line 15]\n n$1=*&honda:class Car * [line 15]\n n$2=_fun_Car_running(n$1:class Car *) [line 15]\n _fun_NSLog(n$0:struct objc_object *,n$2:int ) [line 15]\n REMOVE_TEMPS(n$0,n$1,n$2); [line 15]\n NULLIFY(&honda); [line 15]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot b/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot index f01e235b5..2ec7f4af8 100644 --- a/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot +++ b/infer/tests/codetoanalyze/objc/frontend/protocol/protocol.dot @@ -11,7 +11,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: Message Call: conformsToProtocol: \n n$0=*&self:class Bla * [line 25]\n n$1=_fun_Bla_conformsToProtocol:(n$0:class Bla *,\"Foo\":class Protocol *) virtual [line 25]\n NULLIFY(&self,false); [line 25]\n " shape="box"] +5 [label="5: Message Call: conformsToProtocol: \n n$0=*&self:class Bla * [line 25]\n n$1=_fun_Bla_conformsToProtocol:(n$0:class Bla *,\"Foo\":class Protocol *) virtual [line 25]\n NULLIFY(&self); [line 25]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot index 3bf157f98..54da9f8cc 100644 --- a/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot +++ b/infer/tests/codetoanalyze/objc/frontend/returnstmt/void_return.dot @@ -15,7 +15,7 @@ digraph iCFG { 12 -> 9 ; -11 [label="11: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n NULLIFY(&i,false); [line 21]\n NULLIFY(&j,false); [line 21]\n " shape="invhouse"] +11 [label="11: Prune (true branch) \n PRUNE(((n$2 == 0) != 0), true); [line 21]\n REMOVE_TEMPS(n$2); [line 21]\n NULLIFY(&i); [line 21]\n NULLIFY(&j); [line 21]\n " shape="invhouse"] 11 -> 13 ; @@ -28,11 +28,11 @@ digraph iCFG { 9 -> 5 ; -8 [label="8: UnaryOperator \n n$1=*&i:int [line 26]\n *&i:int =(n$1 + 1) [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n NULLIFY(&i,false); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] +8 [label="8: UnaryOperator \n n$1=*&i:int [line 26]\n *&i:int =(n$1 + 1) [line 26]\n REMOVE_TEMPS(n$1); [line 26]\n NULLIFY(&i); [line 26]\n APPLY_ABSTRACTION; [line 26]\n " shape="box"] 8 -> 3 ; -7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&i,false); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] +7 [label="7: Prune (false branch) \n PRUNE(((n$0 == 0) == 0), false); [line 25]\n REMOVE_TEMPS(n$0); [line 25]\n NULLIFY(&i); [line 25]\n APPLY_ABSTRACTION; [line 25]\n " shape="invhouse"] 7 -> 3 ; @@ -40,7 +40,7 @@ digraph iCFG { 6 -> 8 ; -5 [label="5: BinaryOperatorStmt: EQ \n n$0=*&j:int [line 25]\n NULLIFY(&j,false); [line 25]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: EQ \n n$0=*&j:int [line 25]\n NULLIFY(&j); [line 25]\n " shape="box"] 5 -> 6 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot index 790dd9219..c6774f35e 100644 --- a/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot +++ b/infer/tests/codetoanalyze/objc/frontend/self_static/Self.dot @@ -15,7 +15,7 @@ digraph iCFG { 49 -> 51 ; -48 [label="48: BinaryOperatorStmt: NE \n n$15=*&c:struct objc_class * [line 95]\n NULLIFY(&c,false); [line 95]\n " shape="box"] +48 [label="48: BinaryOperatorStmt: NE \n n$15=*&c:struct objc_class * [line 95]\n NULLIFY(&c); [line 95]\n " shape="box"] 48 -> 49 ; @@ -46,7 +46,7 @@ digraph iCFG { 41 -> 43 ; -40 [label="40: Message Call: init \n n$11=*&self:class A * [line 87]\n n$12=_fun_NSObject_init(n$11:class A *) [line 87]\n REMOVE_TEMPS(n$11,n$12); [line 87]\n NULLIFY(&self,false); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] +40 [label="40: Message Call: init \n n$11=*&self:class A * [line 87]\n n$12=_fun_NSObject_init(n$11:class A *) [line 87]\n REMOVE_TEMPS(n$11,n$12); [line 87]\n NULLIFY(&self); [line 87]\n APPLY_ABSTRACTION; [line 87]\n " shape="box"] 40 -> 39 ; @@ -68,7 +68,7 @@ digraph iCFG { 35 -> 37 ; -34 [label="34: Return Stmt \n n$8=*&object:class B * [line 79]\n n$10=_fun_B_isC:(n$8:class B *,sizeof(class A ):unsigned long ) virtual [line 79]\n *&return:_Bool =n$10 [line 79]\n REMOVE_TEMPS(n$8,n$10); [line 79]\n NULLIFY(&object,false); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] +34 [label="34: Return Stmt \n n$8=*&object:class B * [line 79]\n n$10=_fun_B_isC:(n$8:class B *,sizeof(class A ):unsigned long ) virtual [line 79]\n *&return:_Bool =n$10 [line 79]\n REMOVE_TEMPS(n$8,n$10); [line 79]\n NULLIFY(&object); [line 79]\n APPLY_ABSTRACTION; [line 79]\n " shape="box"] 34 -> 33 ; @@ -79,7 +79,7 @@ digraph iCFG { 32 -> 34 ; -31 [label="31: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 74]\n n$7=_fun_NSObject_init(n$6:class B *) virtual [line 74]\n *&b:class B *=n$7 [line 74]\n REMOVE_TEMPS(n$6,n$7); [line 74]\n NULLIFY(&b,false); [line 74]\n " shape="box"] +31 [label="31: DeclStmt \n n$6=_fun___objc_alloc_no_fail(sizeof(class B ):unsigned long ) [line 74]\n n$7=_fun_NSObject_init(n$6:class B *) virtual [line 74]\n *&b:class B *=n$7 [line 74]\n REMOVE_TEMPS(n$6,n$7); [line 74]\n NULLIFY(&b); [line 74]\n " shape="box"] 31 -> 30 ; @@ -156,7 +156,7 @@ digraph iCFG { 11 -> 12 ; -10 [label="10: Message Call: test \n n$0=*&self:class A * [line 47]\n _fun_A_test(n$0:class A *) virtual [line 47]\n REMOVE_TEMPS(n$0); [line 47]\n NULLIFY(&self,false); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] +10 [label="10: Message Call: test \n n$0=*&self:class A * [line 47]\n _fun_A_test(n$0:class A *) virtual [line 47]\n REMOVE_TEMPS(n$0); [line 47]\n NULLIFY(&self); [line 47]\n APPLY_ABSTRACTION; [line 47]\n " shape="box"] 10 -> 9 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot b/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot index 09c42c9c8..0a5511d14 100644 --- a/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot +++ b/infer/tests/codetoanalyze/objc/frontend/self_static/static.dot @@ -1,5 +1,5 @@ digraph iCFG { -15 [label="15: Message Call: getX \n n$1=*&self:class MyClass * [line 37]\n n$2=_fun_MyClass_getX(n$1:class MyClass *) virtual [line 37]\n REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&self,false); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] +15 [label="15: Message Call: getX \n n$1=*&self:class MyClass * [line 37]\n n$2=_fun_MyClass_getX(n$1:class MyClass *) virtual [line 37]\n REMOVE_TEMPS(n$1,n$2); [line 37]\n NULLIFY(&self); [line 37]\n APPLY_ABSTRACTION; [line 37]\n " shape="box"] 15 -> 14 ; @@ -43,7 +43,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class MyClass ):unsigned long ) [line 21]\n *&myClass:class MyClass *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&myClass,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class MyClass ):unsigned long ) [line 21]\n *&myClass:class MyClass *=n$0 [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&myClass); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/strings/string_literal.dot b/infer/tests/codetoanalyze/objc/frontend/strings/string_literal.dot index 06fee6a74..b1ee107b2 100644 --- a/infer/tests/codetoanalyze/objc/frontend/strings/string_literal.dot +++ b/infer/tests/codetoanalyze/objc/frontend/strings/string_literal.dot @@ -1,5 +1,5 @@ digraph iCFG { -4 [label="4: DeclStmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Rodriguez\":char *) [line 13]\n *&lastName:class NSString *=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&lastName,false); [line 13]\n " shape="box"] +4 [label="4: DeclStmt \n n$0=_fun_NSString_stringWithUTF8String:(\"Rodriguez\":char *) [line 13]\n *&lastName:class NSString *=n$0 [line 13]\n REMOVE_TEMPS(n$0); [line 13]\n NULLIFY(&lastName); [line 13]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot b/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot index bd928834a..f82dc51a7 100644 --- a/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot +++ b/infer/tests/codetoanalyze/objc/frontend/subclass/MySubClass.dot @@ -1,9 +1,9 @@ digraph iCFG { -4 [label="4: DeclStmt \n n$1=*&self:class MySubclass * [line 17]\n n$2=_fun_MyClass_myNumber(n$1:class MySubclass *) [line 17]\n *&subclassNumber:int =(n$2 + 1) [line 17]\n REMOVE_TEMPS(n$1,n$2); [line 17]\n NULLIFY(&self,false); [line 17]\n " shape="box"] +4 [label="4: DeclStmt \n n$1=*&self:class MySubclass * [line 17]\n n$2=_fun_MyClass_myNumber(n$1:class MySubclass *) [line 17]\n *&subclassNumber:int =(n$2 + 1) [line 17]\n REMOVE_TEMPS(n$1,n$2); [line 17]\n NULLIFY(&self); [line 17]\n " shape="box"] 4 -> 3 ; -3 [label="3: Return Stmt \n n$0=*&subclassNumber:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&subclassNumber,false); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] +3 [label="3: Return Stmt \n n$0=*&subclassNumber:int [line 18]\n *&return:int =n$0 [line 18]\n REMOVE_TEMPS(n$0); [line 18]\n NULLIFY(&subclassNumber); [line 18]\n APPLY_ABSTRACTION; [line 18]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/subclass/main.dot b/infer/tests/codetoanalyze/objc/frontend/subclass/main.dot index f076dade4..4168debf7 100644 --- a/infer/tests/codetoanalyze/objc/frontend/subclass/main.dot +++ b/infer/tests/codetoanalyze/objc/frontend/subclass/main.dot @@ -1,5 +1,5 @@ digraph iCFG { -4 [label="4: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 13]\n n$1=_fun_NSObject_init(n$0:class A *) virtual [line 13]\n *&a:class A *=n$1 [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&a,false); [line 13]\n " shape="box"] +4 [label="4: DeclStmt \n n$0=_fun___objc_alloc_no_fail(sizeof(class A ):unsigned long ) [line 13]\n n$1=_fun_NSObject_init(n$0:class A *) virtual [line 13]\n *&a:class A *=n$1 [line 13]\n REMOVE_TEMPS(n$0,n$1); [line 13]\n NULLIFY(&a); [line 13]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot b/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot index 280493217..ca68e715a 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/attributes.dot @@ -3,7 +3,7 @@ digraph iCFG { 14 -> 13 ; -13 [label="13: DeclStmt \n _fun___objc_retain(0:class A *) [line 23]\n *&aStrongRef:class A *=0 [line 23]\n NULLIFY(&aStrongRef,false); [line 23]\n " shape="box"] +13 [label="13: DeclStmt \n _fun___objc_retain(0:class A *) [line 23]\n *&aStrongRef:class A *=0 [line 23]\n NULLIFY(&aStrongRef); [line 23]\n " shape="box"] 13 -> 12 ; @@ -27,19 +27,19 @@ digraph iCFG { 8 -> 7 ; -7 [label="7: BinaryOperatorStmt: Assign \n _fun___objc_retain(0:class A *) [line 33]\n n$6=*&aStrongRef:class A * [line 33]\n *&aStrongRef:class A *=0 [line 33]\n _fun___objc_release(n$6:class A *) [line 33]\n REMOVE_TEMPS(n$6); [line 33]\n NULLIFY(&aStrongRef,false); [line 33]\n " shape="box"] +7 [label="7: BinaryOperatorStmt: Assign \n _fun___objc_retain(0:class A *) [line 33]\n n$6=*&aStrongRef:class A * [line 33]\n *&aStrongRef:class A *=0 [line 33]\n _fun___objc_release(n$6:class A *) [line 33]\n REMOVE_TEMPS(n$6); [line 33]\n NULLIFY(&aStrongRef); [line 33]\n " shape="box"] 7 -> 6 ; -6 [label="6: BinaryOperatorStmt: Assign \n n$4=*&aStdRef:class A * [line 35]\n _fun___objc_retain(n$4:class A *) [line 35]\n n$5=*&aWeakRef:class A * [line 35]\n *&aWeakRef:class A *=n$4 [line 35]\n _fun___objc_release(n$5:class A *) [line 35]\n REMOVE_TEMPS(n$4,n$5); [line 35]\n NULLIFY(&aWeakRef,false); [line 35]\n " shape="box"] +6 [label="6: BinaryOperatorStmt: Assign \n n$4=*&aStdRef:class A * [line 35]\n _fun___objc_retain(n$4:class A *) [line 35]\n n$5=*&aWeakRef:class A * [line 35]\n *&aWeakRef:class A *=n$4 [line 35]\n _fun___objc_release(n$5:class A *) [line 35]\n REMOVE_TEMPS(n$4,n$5); [line 35]\n NULLIFY(&aWeakRef); [line 35]\n " shape="box"] 6 -> 5 ; -5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&aStdRef:class A * [line 37]\n _fun___objc_retain(n$2:class A *) [line 37]\n n$3=*&anAutoRelRef:class A * [line 37]\n *&anAutoRelRef:class A *=n$2 [line 37]\n _fun___objc_release(n$3:class A *) [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n NULLIFY(&anAutoRelRef,false); [line 37]\n " shape="box"] +5 [label="5: BinaryOperatorStmt: Assign \n n$2=*&aStdRef:class A * [line 37]\n _fun___objc_retain(n$2:class A *) [line 37]\n n$3=*&anAutoRelRef:class A * [line 37]\n *&anAutoRelRef:class A *=n$2 [line 37]\n _fun___objc_release(n$3:class A *) [line 37]\n REMOVE_TEMPS(n$2,n$3); [line 37]\n NULLIFY(&anAutoRelRef); [line 37]\n " shape="box"] 5 -> 4 ; -4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&aStdRef:class A * [line 39]\n _fun___objc_retain(n$0:class A *) [line 39]\n n$1=*&anUnsafeUnretRef:class A * [line 39]\n *&anUnsafeUnretRef:class A *=n$0 [line 39]\n _fun___objc_release(n$1:class A *) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&aStdRef,false); [line 39]\n NULLIFY(&anUnsafeUnretRef,false); [line 39]\n " shape="box"] +4 [label="4: BinaryOperatorStmt: Assign \n n$0=*&aStdRef:class A * [line 39]\n _fun___objc_retain(n$0:class A *) [line 39]\n n$1=*&anUnsafeUnretRef:class A * [line 39]\n *&anUnsafeUnretRef:class A *=n$0 [line 39]\n _fun___objc_release(n$1:class A *) [line 39]\n REMOVE_TEMPS(n$0,n$1); [line 39]\n NULLIFY(&aStdRef); [line 39]\n NULLIFY(&anUnsafeUnretRef); [line 39]\n " shape="box"] 4 -> 3 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot index 615286d34..1ad29a43b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot +++ b/infer/tests/codetoanalyze/objc/frontend/types/void_call.dot @@ -20,11 +20,11 @@ digraph iCFG { 20 -> 19 ; -19 [label="19: BinaryOperatorStmt: Assign \n n$1=*&o:class AClass * [line 45]\n n$2=*&x:int [line 45]\n n$3=_fun_AClass_bar:(n$1:class AClass *,n$2:int ) virtual [line 45]\n *&x:int =n$3 [line 45]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 45]\n NULLIFY(&o,false); [line 45]\n NULLIFY(&x,false); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] +19 [label="19: BinaryOperatorStmt: Assign \n n$1=*&o:class AClass * [line 45]\n n$2=*&x:int [line 45]\n n$3=_fun_AClass_bar:(n$1:class AClass *,n$2:int ) virtual [line 45]\n *&x:int =n$3 [line 45]\n REMOVE_TEMPS(n$1,n$2,n$3); [line 45]\n NULLIFY(&o); [line 45]\n NULLIFY(&x); [line 45]\n APPLY_ABSTRACTION; [line 45]\n " shape="box"] 19 -> 16 ; -18 [label="18: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n NULLIFY(&o,false); [line 42]\n NULLIFY(&x,false); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] +18 [label="18: Prune (false branch) \n n$0=*&o:class AClass * [line 42]\n PRUNE((n$0 == 0), false); [line 42]\n REMOVE_TEMPS(n$0); [line 42]\n NULLIFY(&o); [line 42]\n NULLIFY(&x); [line 42]\n APPLY_ABSTRACTION; [line 42]\n " shape="invhouse"] 18 -> 16 ; @@ -47,7 +47,7 @@ digraph iCFG { 13 -> 24 ; -12 [label="12: Return Stmt \n n$0=*&a:int [line 31]\n *&a:int =(n$0 + 1) [line 31]\n *&return:int =n$0 [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&a,false); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] +12 [label="12: Return Stmt \n n$0=*&a:int [line 31]\n *&a:int =(n$0 + 1) [line 31]\n *&return:int =n$0 [line 31]\n REMOVE_TEMPS(n$0); [line 31]\n NULLIFY(&a); [line 31]\n APPLY_ABSTRACTION; [line 31]\n " shape="box"] 12 -> 11 ; @@ -58,7 +58,7 @@ digraph iCFG { 10 -> 12 ; -9 [label="9: UnaryOperator \n n$0=*&a:int [line 29]\n *&a:int =(n$0 + 1) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a,false); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] +9 [label="9: UnaryOperator \n n$0=*&a:int [line 29]\n *&a:int =(n$0 + 1) [line 29]\n REMOVE_TEMPS(n$0); [line 29]\n NULLIFY(&a); [line 29]\n APPLY_ABSTRACTION; [line 29]\n " shape="box"] 9 -> 8 ; @@ -69,7 +69,7 @@ digraph iCFG { 7 -> 9 ; -6 [label="6: Return Stmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 + 1) [line 24]\n *&return:int =n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&a,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +6 [label="6: Return Stmt \n n$1=*&a:int [line 24]\n *&a:int =(n$1 + 1) [line 24]\n *&return:int =n$1 [line 24]\n REMOVE_TEMPS(n$1); [line 24]\n NULLIFY(&a); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 6 -> 5 ; @@ -80,7 +80,7 @@ digraph iCFG { 4 -> 6 ; -3 [label="3: UnaryOperator \n n$0=*&a:int [line 21]\n *&a:int =(n$0 + 1) [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a,false); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] +3 [label="3: UnaryOperator \n n$0=*&a:int [line 21]\n *&a:int =(n$0 + 1) [line 21]\n REMOVE_TEMPS(n$0); [line 21]\n NULLIFY(&a); [line 21]\n APPLY_ABSTRACTION; [line 21]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot index 2ee512d55..990c1686f 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/initlist.dot @@ -7,7 +7,7 @@ digraph iCFG { 7 -> 6 ; -6 [label="6: DeclStmt \n n$2=*&c1:class C * [line 24]\n n$3=_fun_NSObject_init(n$2:class C *) virtual [line 24]\n n$1=*&c1:class C * [line 24]\n n$0=*&c2:class C * [line 24]\n *&a[0]:class C *=n$3 [line 24]\n *&a[1]:class C *=n$1 [line 24]\n *&a[2]:class C *=n$0 [line 24]\n REMOVE_TEMPS(n$2,n$3,n$1,n$0); [line 24]\n NULLIFY(&a,false); [line 24]\n NULLIFY(&c1,false); [line 24]\n NULLIFY(&c2,false); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] +6 [label="6: DeclStmt \n n$2=*&c1:class C * [line 24]\n n$3=_fun_NSObject_init(n$2:class C *) virtual [line 24]\n n$1=*&c1:class C * [line 24]\n n$0=*&c2:class C * [line 24]\n *&a[0]:class C *=n$3 [line 24]\n *&a[1]:class C *=n$1 [line 24]\n *&a[2]:class C *=n$0 [line 24]\n REMOVE_TEMPS(n$2,n$3,n$1,n$0); [line 24]\n NULLIFY(&a); [line 24]\n NULLIFY(&c1); [line 24]\n NULLIFY(&c2); [line 24]\n APPLY_ABSTRACTION; [line 24]\n " shape="box"] 6 -> 5 ; @@ -18,7 +18,7 @@ digraph iCFG { 4 -> 8 ; -3 [label="3: DeclStmt \n n$0=*&z:int [line 14]\n *&a[0][0]:int =(n$0 + 1) [line 14]\n *&a[0][1]:int =2 [line 14]\n *&a[0][2]:int =3 [line 14]\n *&a[1][0]:int =5 [line 14]\n *&a[1][1]:int =6 [line 14]\n *&a[1][2]:int =7 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&a,false); [line 14]\n NULLIFY(&z,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&z:int [line 14]\n *&a[0][0]:int =(n$0 + 1) [line 14]\n *&a[0][1]:int =2 [line 14]\n *&a[0][2]:int =3 [line 14]\n *&a[1][0]:int =5 [line 14]\n *&a[1][1]:int =6 [line 14]\n *&a[1][2]:int =7 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&a); [line 14]\n NULLIFY(&z); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objc/frontend/vardecl/last_af.dot b/infer/tests/codetoanalyze/objc/frontend/vardecl/last_af.dot index 3a857e435..64f1eba8d 100644 --- a/infer/tests/codetoanalyze/objc/frontend/vardecl/last_af.dot +++ b/infer/tests/codetoanalyze/objc/frontend/vardecl/last_af.dot @@ -3,7 +3,7 @@ digraph iCFG { 4 -> 3 ; -3 [label="3: DeclStmt \n n$0=*&a:int [line 10]\n *&b:int =(n$0 + 2) [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&a,false); [line 10]\n NULLIFY(&b,false); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] +3 [label="3: DeclStmt \n n$0=*&a:int [line 10]\n *&b:int =(n$0 + 2) [line 10]\n REMOVE_TEMPS(n$0); [line 10]\n NULLIFY(&a); [line 10]\n NULLIFY(&b); [line 10]\n APPLY_ABSTRACTION; [line 10]\n " shape="box"] 3 -> 2 ; diff --git a/infer/tests/codetoanalyze/objcpp/frontend/funcoverloading/af_test.dot b/infer/tests/codetoanalyze/objcpp/frontend/funcoverloading/af_test.dot index 6eb1b4f6b..14fbc4950 100644 --- a/infer/tests/codetoanalyze/objcpp/frontend/funcoverloading/af_test.dot +++ b/infer/tests/codetoanalyze/objcpp/frontend/funcoverloading/af_test.dot @@ -1,5 +1,5 @@ digraph iCFG { -6 [label="6: Return Stmt \n n$0=*&v:int [line 14]\n *&return:int =n$0 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&v,false); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] +6 [label="6: Return Stmt \n n$0=*&v:int [line 14]\n *&return:int =n$0 [line 14]\n REMOVE_TEMPS(n$0); [line 14]\n NULLIFY(&v); [line 14]\n APPLY_ABSTRACTION; [line 14]\n " shape="box"] 6 -> 5 ;