diff --git a/infer/src/IR/Attributes.ml b/infer/src/IR/Attributes.ml index 916855574..b293e190d 100644 --- a/infer/src/IR/Attributes.ml +++ b/infer/src/IR/Attributes.ml @@ -8,13 +8,11 @@ open! IStd module F = Format -type attributes_kind = ProcUndefined | ProcObjCAccessor | ProcDefined [@@deriving compare] +type attributes_kind = ProcUndefined | ProcDefined [@@deriving compare] let equal_attributes_kind = [%compare.equal: attributes_kind] -let attributes_kind_to_int64 = - [(ProcUndefined, Int64.zero); (ProcObjCAccessor, Int64.one); (ProcDefined, Int64.of_int 2)] - +let attributes_kind_to_int64 = [(ProcUndefined, Int64.zero); (ProcDefined, Int64.of_int 2)] let int64_of_attributes_kind a = List.Assoc.find_exn ~equal:equal_attributes_kind attributes_kind_to_int64 a @@ -27,9 +25,7 @@ let deserialize_attributes_kind = let proc_kind_of_attr (proc_attributes : ProcAttributes.t) = - if proc_attributes.is_defined then ProcDefined - else if Option.is_some proc_attributes.objc_accessor then ProcObjCAccessor - else ProcUndefined + if proc_attributes.is_defined then ProcDefined else ProcUndefined let replace pname pname_blob akind source_file attributes proc_desc callees = @@ -105,7 +101,5 @@ let find_file_capturing_procedure pname = let pp_attributes_kind f = function | ProcUndefined -> F.pp_print_string f "" - | ProcObjCAccessor -> - F.pp_print_string f "" | ProcDefined -> F.pp_print_string f "" diff --git a/infer/src/IR/ProcAttributes.mli b/infer/src/IR/ProcAttributes.mli index d8ffb288d..13eb14504 100644 --- a/infer/src/IR/ProcAttributes.mli +++ b/infer/src/IR/ProcAttributes.mli @@ -11,8 +11,6 @@ open! IStd type objc_accessor_type = Objc_getter of Struct.field | Objc_setter of Struct.field -val kind_of_objc_accessor_type : objc_accessor_type -> string - type var_data = { name: Mangled.t ; typ: Typ.t diff --git a/infer/src/biabduction/SymExec.ml b/infer/src/biabduction/SymExec.ml index 280f1094c..607d71ac7 100644 --- a/infer/src/biabduction/SymExec.ml +++ b/infer/src/biabduction/SymExec.ml @@ -1264,31 +1264,23 @@ let rec sym_exec load_ret_annots resolved_pname in match resolved_pdesc_opt with - | Some resolved_pdesc -> ( + | Some resolved_pdesc -> let attrs = Procdesc.get_attributes resolved_pdesc in let ret_type = attrs.ProcAttributes.ret_type in let model_as_malloc ret_type resolved_pname = Objc_models.is_malloc_model ret_type resolved_pname in - match attrs.ProcAttributes.objc_accessor with - | Some objc_accessor -> - (* If it's an ObjC getter or setter, call the builtin rather than skipping *) - handle_objc_instance_method_call n_actual_params prop tenv - (fst ret_id_typ) current_pdesc resolved_pname path (fun () -> - sym_exec_objc_accessor resolved_pname objc_accessor ret_type - (fst ret_id_typ) analysis_data callee_pname loc n_actual_params - prop path ) - | None when model_as_malloc ret_type resolved_pname -> - (* If it's an alloc model, call alloc rather than skipping *) - sym_exec_alloc_model analysis_data resolved_pname ret_type ret_id_typ - loc prop path - | _ -> - let is_objc_instance_method = - ClangMethodKind.equal attrs.ProcAttributes.clang_method_kind - ClangMethodKind.OBJC_INSTANCE - in - skip_call ~is_objc_instance_method ~reason prop path resolved_pname - ret_annots loc ret_id_typ ret_type n_actual_params ) + if model_as_malloc ret_type resolved_pname then + (* If it's an alloc model, call alloc rather than skipping *) + sym_exec_alloc_model analysis_data resolved_pname ret_type ret_id_typ loc + prop path + else + let is_objc_instance_method = + ClangMethodKind.equal attrs.ProcAttributes.clang_method_kind + ClangMethodKind.OBJC_INSTANCE + in + skip_call ~is_objc_instance_method ~reason prop path resolved_pname + ret_annots loc ret_id_typ ret_type n_actual_params | None -> skip_call ~reason prop path resolved_pname ret_annots loc ret_id_typ (snd ret_id_typ) n_actual_params ) @@ -1613,59 +1605,6 @@ and check_variadic_sentinel_if_present ({Builtin.prop_; path; proc_name} as buil [(prop_, path)] -and sym_exec_objc_getter field ret_typ ret_id ({InterproceduralAnalysis.tenv; _} as analysis_data) - loc args prop = - let field_name, _, _ = field in - L.d_printfln "No custom getter found. Executing the ObjC builtin getter with ivar %a." - Fieldname.pp field_name ; - match args with - | [ ( lexp - , ( ({Typ.desc= Tstruct struct_name} as typ) - | {desc= Tptr (({desc= Tstruct struct_name} as typ), _)} ) ) ] -> - Tenv.add_field tenv struct_name field ; - let field_access_exp = Exp.Lfield (lexp, field_name, typ) in - execute_load ~report_deref_errors:false analysis_data ret_id field_access_exp ret_typ loc prop - | _ -> - raise (Exceptions.Wrong_argument_number __POS__) - - -and sym_exec_objc_setter field _ _ ({InterproceduralAnalysis.tenv; _} as analysis_data) loc args - prop = - let field_name, _, _ = field in - L.d_printfln "No custom setter found. Executing the ObjC builtin setter with ivar %a." - Fieldname.pp field_name ; - match args with - | ( lexp1 - , ( ({Typ.desc= Tstruct struct_name} as typ1) - | {Typ.desc= Tptr (({Typ.desc= Tstruct struct_name} as typ1), _)} ) ) - :: (lexp2, typ2) :: _ -> - Tenv.add_field tenv struct_name field ; - let field_access_exp = Exp.Lfield (lexp1, field_name, typ1) in - execute_store ~report_deref_errors:false analysis_data field_access_exp typ2 lexp2 loc prop - | _ -> - raise (Exceptions.Wrong_argument_number __POS__) - - -and sym_exec_objc_accessor callee_pname property_accesor ret_typ ret_id analysis_data _ loc args - prop path : Builtin.ret_typ = - let f_accessor = - match property_accesor with - | ProcAttributes.Objc_getter field -> - sym_exec_objc_getter field - | ProcAttributes.Objc_setter field -> - sym_exec_objc_setter field - in - (* we want to execute in the context of the current procedure, not in the context of callee_pname, - since this is the procname of the setter/getter method *) - let path_description = - F.sprintf "Executing synthesized %s %s" - (ProcAttributes.kind_of_objc_accessor_type property_accesor) - (Procname.to_simplified_string callee_pname) - in - let path = Paths.Path.add_description path path_description in - f_accessor ret_typ ret_id analysis_data loc args prop |> List.map ~f:(fun p -> (p, path)) - - and sym_exec_alloc_model analysis_data pname ret_typ ret_id_typ loc prop path : Builtin.ret_typ = let alloc_source_function_arg = (Exp.Const (Const.Cfun pname), Typ.void) in let args = diff --git a/infer/src/clang/CAddImplicitGettersSetters.ml b/infer/src/clang/CAddImplicitGettersSetters.ml new file mode 100644 index 000000000..3b7c9ff03 --- /dev/null +++ b/infer/src/clang/CAddImplicitGettersSetters.ml @@ -0,0 +1,78 @@ +(* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +open! IStd + +let objc_getter proc_desc location (self_var, self_typ) (fieldname, field_typ, _) = + let id_pvar = Ident.create_fresh Ident.knormal in + let load_pvar_instr = + Sil.Load {id= id_pvar; e= Lvar self_var; root_typ= self_typ; typ= self_typ; loc= location} + in + let id_field = Ident.create_fresh Ident.knormal in + let class_typ = match self_typ.Typ.desc with Typ.Tptr (t, _) -> t | _ -> self_typ in + let e = Exp.Lfield (Var id_pvar, fieldname, class_typ) in + let load_field_instr = + Sil.Load {id= id_field; e; root_typ= field_typ; typ= field_typ; loc= location} + in + let exp_var = Exp.Lvar (Procdesc.get_ret_var proc_desc) in + let return_exp = + Sil.Store {e1= exp_var; root_typ= field_typ; typ= field_typ; e2= Exp.Var id_field; loc= location} + in + [load_pvar_instr; load_field_instr; return_exp] + + +let objc_setter location (self, self_typ) (var, var_typ) (fieldname, field_typ, _) = + let id_self = Ident.create_fresh Ident.knormal in + let load_self_instr = + Sil.Load {id= id_self; e= Lvar self; root_typ= self_typ; typ= self_typ; loc= location} + in + let id_var = Ident.create_fresh Ident.knormal in + let load_var_instr = + Sil.Load {id= id_var; e= Lvar var; root_typ= var_typ; typ= var_typ; loc= location} + in + let class_typ = match self_typ.Typ.desc with Typ.Tptr (t, _) -> t | _ -> self_typ in + let field_exp = Exp.Lfield (Var id_self, fieldname, class_typ) in + let store_exp = + Sil.Store {e1= field_exp; root_typ= field_typ; typ= field_typ; e2= Exp.Var id_var; loc= location} + in + [load_self_instr; load_var_instr; store_exp] + + +let process_getter_setter proc_name proc_desc = + let location = Procdesc.get_loc proc_desc in + let formals = Procdesc.get_formals proc_desc in + let attributes = Procdesc.get_attributes proc_desc in + let getter_setter_instrs = + match (attributes.ProcAttributes.objc_accessor, formals) with + | Some (Objc_getter field), [(self, self_typ)] -> + let self_var = Pvar.mk self proc_name in + objc_getter proc_desc location (self_var, self_typ) field + | Some (Objc_setter field), [(self, self_typ); (var_name, var_typ)] -> + let self_var = Pvar.mk self proc_name in + let var = Pvar.mk var_name proc_name in + objc_setter location (self_var, self_typ) (var, var_typ) field + | _ -> + [] + in + if List.is_empty getter_setter_instrs then () + else + let new_attributes = {attributes with is_defined= true} in + Procdesc.set_attributes proc_desc new_attributes ; + let start_node = Procdesc.create_node proc_desc location Procdesc.Node.Start_node [] in + let exit_node = Procdesc.create_node proc_desc location Procdesc.Node.Exit_node [] in + Procdesc.set_start_node proc_desc start_node ; + Procdesc.set_exit_node proc_desc exit_node ; + let node_name = Procdesc.Node.BinaryOperatorStmt "Node" in + let node_kind = Procdesc.Node.Stmt_node node_name in + let getter_setter_node = + Procdesc.create_node proc_desc location node_kind getter_setter_instrs + in + Procdesc.node_set_succs proc_desc start_node ~normal:[getter_setter_node] ~exn:[] ; + Procdesc.node_set_succs proc_desc getter_setter_node ~normal:[exit_node] ~exn:[] + + +let process cfg = Procname.Hash.iter process_getter_setter cfg diff --git a/infer/src/clang/CAddImplicitGettersSetters.mli b/infer/src/clang/CAddImplicitGettersSetters.mli new file mode 100644 index 000000000..7d9426ce0 --- /dev/null +++ b/infer/src/clang/CAddImplicitGettersSetters.mli @@ -0,0 +1,15 @@ +(* + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + *) + +open! IStd + +val process : Cfg.t -> unit +(** In Objective-C when properties are created in the interface of a class, the compiler creates + automatically the instance variable for it and also the getter and setter in the implementation + of the class. In the frontend we collect the information about which method is the implicit + getter and setter of which instance variable (we get the method declaration but not the + implementation), and here we add the implicit implementation. *) diff --git a/infer/src/clang/cFrontend.ml b/infer/src/clang/cFrontend.ml index 753476160..fc1c97fee 100644 --- a/infer/src/clang/cFrontend.ml +++ b/infer/src/clang/cFrontend.ml @@ -51,6 +51,7 @@ let do_source_file (translation_unit_context : CFrontend_config.translation_unit "@\n Start building call/cfg graph for '%a'....@\n" SourceFile.pp source_file ; let cfg = compute_icfg translation_unit_context tenv ast in CAddImplicitDeallocImpl.process cfg tenv ; + CAddImplicitGettersSetters.process cfg ; L.(debug Capture Verbose) "@\n End building call/cfg graph for '%a'.@\n" SourceFile.pp source_file ; NullabilityPreanalysis.analysis cfg tenv ; SourceFiles.add source_file cfg (Tenv.FileLocal tenv) (Some integer_type_widths) ; diff --git a/infer/tests/build_systems/objc_getters_setters/issues.exp b/infer/tests/build_systems/objc_getters_setters/issues.exp index 7adfbe118..ee4bf2a4d 100644 --- a/infer/tests/build_systems/objc_getters_setters/issues.exp +++ b/infer/tests/build_systems/objc_getters_setters/issues.exp @@ -1,5 +1,5 @@ build_systems/codetoanalyze/objc_getters_setters/B.m, B.calling_c_function_with_block_parameters_sets_fields_correctly, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure calling_c_function_with_block_parameters_sets_fields_correctly,start of procedure calling_c_function_with_block_parameters,start of procedure c_function(),start of procedure block,return from a call to objc_blockB.calling_c_function_with_block_parameters_3,start of procedure block,return from a call to objc_blockB.calling_c_function_with_block_parameters_4,return from a call to c_function_objc_blockB.calling_c_function_with_block_parameters_3_objc_blockB.calling_c_function_with_block_parameters_4,return from a call to B.calling_c_function_with_block_parameters,Taking true branch] build_systems/codetoanalyze/objc_getters_setters/B.m, B.calling_method_with_block_parameters_sets_fields_correctly, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure calling_method_with_block_parameters_sets_fields_correctly,start of procedure calling_method_with_block_parameters,start of procedure foo:and:and_also:and:,start of procedure block,return from a call to objc_blockB.calling_method_with_block_parameters_1,start of procedure block,return from a call to objc_blockB.calling_method_with_block_parameters_2,return from a call to A.foo:and:and_also:and:_objc_blockB.calling_method_with_block_parameters_1_objc_blockB.calling_method_with_block_parameters_2,return from a call to B.calling_method_with_block_parameters,Taking true branch] -build_systems/codetoanalyze/objc_getters_setters/B.m, B.npe_no_bad_footprint_in_getter:, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe_no_bad_footprint_in_getter:,Executing synthesized getter metadata] -build_systems/codetoanalyze/objc_getters_setters/B.m, B.npe_no_bad_footprint_in_setter:andMetadata:, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe_no_bad_footprint_in_setter:andMetadata:,Executing synthesized setter setMetadata:] +build_systems/codetoanalyze/objc_getters_setters/B.m, B.npe_no_bad_footprint_in_getter:, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe_no_bad_footprint_in_getter:,start of procedure metadata,return from a call to A.metadata] +build_systems/codetoanalyze/objc_getters_setters/B.m, B.npe_no_bad_footprint_in_setter:andMetadata:, 3, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe_no_bad_footprint_in_setter:andMetadata:,start of procedure setMetadata:,return from a call to A.setMetadata:] build_systems/codetoanalyze/objc_getters_setters/B.m, B.npe_no_precondition_not_met:, 4, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure npe_no_precondition_not_met:,start of procedure infer_field_get_spec:,start of procedure withMetadata:,return from a call to A.withMetadata:,return from a call to B.infer_field_get_spec:,start of procedure getX,return from a call to A.getX,Taking true branch] diff --git a/infer/tests/build_systems/objc_missing_fld/issues.exp b/infer/tests/build_systems/objc_missing_fld/issues.exp index 5df021d76..2b1cd28a5 100644 --- a/infer/tests/build_systems/objc_missing_fld/issues.exp +++ b/infer/tests/build_systems/objc_missing_fld/issues.exp @@ -1,2 +1,2 @@ -build_systems/codetoanalyze/objc_missing_fld/A.m, badOnlyOneNDA, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badOnlyOneNDA(),start of procedure predA(),start of procedure implOnlyFn:,return from a call to A.implOnlyFn:,Executing synthesized getter delegate,Condition is true,return from a call to predA,Taking false branch] -build_systems/codetoanalyze/objc_missing_fld/B.m, badOnlyOneNDB, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badOnlyOneNDB(),start of procedure predB(),start of procedure implOnlyFn:,return from a call to A.implOnlyFn:,Executing synthesized getter delegate,Condition is true,return from a call to predB,Taking false branch] +build_systems/codetoanalyze/objc_missing_fld/A.m, badOnlyOneNDA, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badOnlyOneNDA(),start of procedure predA(),start of procedure implOnlyFn:,return from a call to A.implOnlyFn:,start of procedure delegate,return from a call to A.delegate,Condition is true,return from a call to predA,Taking false branch] +build_systems/codetoanalyze/objc_missing_fld/B.m, badOnlyOneNDB, 5, NULL_DEREFERENCE, no_bucket, ERROR, [start of procedure badOnlyOneNDB(),start of procedure predB(),start of procedure implOnlyFn:,return from a call to A.implOnlyFn:,start of procedure delegate,return from a call to A.delegate,Condition is true,return from a call to predB,Taking false branch] diff --git a/infer/tests/build_systems/objc_retain_cycles_weak/issues.exp b/infer/tests/build_systems/objc_retain_cycles_weak/issues.exp index 16ebad06d..72545f920 100644 --- a/infer/tests/build_systems/objc_retain_cycles_weak/issues.exp +++ b/infer/tests/build_systems/objc_retain_cycles_weak/issues.exp @@ -1,4 +1,4 @@ build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, TimeSpent.init_bad, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure init_bad,Taking true branch,start of procedure setDataSourceStrong:,return from a call to ListAdapter.setDataSourceStrong:] build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, TimeSpent.init_bad_ref, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure init_bad_ref,Taking true branch] build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, TimeSpent.init_bad_ref2, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure init_bad_ref2,Taking true branch] -build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, retain_cycle_weak_bad, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_cycle_weak_bad(),start of procedure init,start of procedure initWithDelegate:,Executing synthesized setter setDelegate:,return from a call to AnalyticsTimeSpent.initWithDelegate:,return from a call to TimeSpent.init,start of procedure initWithStrongDelegate:,return from a call to AnalyticsTimeSpent.initWithStrongDelegate:,start of procedure setAnalyticsTimeSpent:,return from a call to TimeSpent.setAnalyticsTimeSpent:] +build_systems/codetoanalyze/objc_retain_cycles_weak/TimeSpent.m, retain_cycle_weak_bad, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_cycle_weak_bad(),start of procedure init,start of procedure initWithDelegate:,start of procedure setDelegate:,return from a call to AnalyticsTimeSpent.setDelegate:,return from a call to AnalyticsTimeSpent.initWithDelegate:,return from a call to TimeSpent.init,start of procedure initWithStrongDelegate:,return from a call to AnalyticsTimeSpent.initWithStrongDelegate:,start of procedure setAnalyticsTimeSpent:,return from a call to TimeSpent.setAnalyticsTimeSpent:] diff --git a/infer/tests/codetoanalyze/objc/biabduction/issues.exp b/infer/tests/codetoanalyze/objc/biabduction/issues.exp index fde1a8613..c0b450292 100644 --- a/infer/tests/codetoanalyze/objc/biabduction/issues.exp +++ b/infer/tests/codetoanalyze/objc/biabduction/issues.exp @@ -3,13 +3,13 @@ codetoanalyze/objc/biabduction/field_superclass/field.c, field_superclass_main, codetoanalyze/objc/biabduction/global_const/global_const.m, SimpleRoot.doSomethingBadWithDict:andString:, 3, NULL_DEREFERENCE, B2, ERROR, [start of procedure doSomethingBadWithDict:andString:,Message stringByAppendingString: with receiver nil returns nil.] codetoanalyze/objc/biabduction/global_const/global_const.m, SimpleRoot.doSomethingOkWithDict:andString:, 3, NULL_DEREFERENCE, B2, ERROR, [start of procedure doSomethingOkWithDict:andString:,Message stringByAppendingString: with receiver nil returns nil.] codetoanalyze/objc/biabduction/initialization/compound_literal.c, init_with_compound_literal, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure init_with_compound_literal()] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure foo,Executing synthesized setter setHandler:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure foo,Executing synthesized setter setHandler:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure foo,start of procedure setHandler:,return from a call to RetainCSV.setHandler:_objc_blockRetainCSV.foo_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleStaticVar.m, RetainCSV.foo, 13, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure foo,start of procedure setHandler:,return from a call to RetainCSV.setHandler:_objc_blockRetainCSV.foo_1] codetoanalyze/objc/biabduction/npe/null_returned_by_method.m, NullReturnedByMethodA.test1, 1, NULL_DEREFERENCE, B5, ERROR, [start of procedure test1,start of procedure test,return from a call to NullReturnedByMethodA.test] codetoanalyze/objc/biabduction/procdescs/main.c, ProcdescMain, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure ProcdescMain(),Skipping plusX:andY:: method has no implementation] codetoanalyze/objc/biabduction/procdescs/main.c, call_nslog, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure call_nslog(),Skipping NSLog(): method has no implementation] codetoanalyze/objc/biabduction/property/main.c, property_main, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure property_main(),Skipping aProperty: method has no implementation] -codetoanalyze/objc/biabduction/warnings/ParameterNotNullableExample.m, FBAudioRecorder.FBAudioInputCallbackChain:, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure FBAudioInputCallbackChain:,Executing synthesized getter recorder Message recordState with receiver nil returns nil.] +codetoanalyze/objc/biabduction/warnings/ParameterNotNullableExample.m, FBAudioRecorder.FBAudioInputCallbackChain:, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure FBAudioInputCallbackChain:,start of procedure recorder,return from a call to FBAudioRecorder.recorder] codetoanalyze/objc/biabduction/warnings/ParameterNotNullableExample.m, FBAudioRecorder.FBAudioInputCallbackChain:, 2, PARAMETER_NOT_NULL_CHECKED, B2, WARNING, [start of procedure FBAudioInputCallbackChain:,Message recorder with receiver nil returns nil. Message recordState with receiver nil returns nil.] codetoanalyze/objc/biabduction/warnings/ParameterNotNullableExample.m, FBAudioRecorder.FBAudioInputCallbackField, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure FBAudioInputCallbackField,Message recordState with receiver nil returns nil.] codetoanalyze/objc/biabduction/warnings/ParameterNotNullableExample.m, FBAudioRecorder.FBAudioInputCallbackSimple:, 2, PARAMETER_NOT_NULL_CHECKED, B2, WARNING, [start of procedure FBAudioInputCallbackSimple:,Message recordState with receiver nil returns nil.] @@ -23,7 +23,7 @@ codetoanalyze/objc/shared/block/block.m, main1, 30, DIVIDE_BY_ZERO, no_bucket, E codetoanalyze/objc/shared/block/block_no_args.m, Block_no_args.m, 10, NULL_DEREFERENCE, B1, ERROR, [start of procedure m,start of procedure block,return from a call to objc_blockBlock_no_args.m_1,Taking true branch] codetoanalyze/objc/shared/category_procdesc/main.c, CategoryProcdescMain, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure CategoryProcdescMain(),Skipping performDaysWork: method has no implementation] codetoanalyze/objc/shared/field_superclass/SuperExample.m, ASuper.init, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure init] -codetoanalyze/objc/biabduction/blocks_in_heap/BlockInHeap.m, block_in_heap_executed_after_bi_abduction_ok_test, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure block_in_heap_executed_after_bi_abduction_ok_test(),start of procedure block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle(),start of procedure assign_block_to_ivar,Executing synthesized setter setHandler:,return from a call to BlockInHeap.assign_block_to_ivar,Executing synthesized getter handler,start of procedure block,return from a call to objc_blockBlockInHeap.assign_block_to_ivar_1,return from a call to block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle,Taking true branch] +codetoanalyze/objc/biabduction/blocks_in_heap/BlockInHeap.m, block_in_heap_executed_after_bi_abduction_ok_test, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure block_in_heap_executed_after_bi_abduction_ok_test(),start of procedure block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle(),start of procedure assign_block_to_ivar,start of procedure setHandler:,return from a call to BlockInHeap.setHandler:_objc_blockBlockInHeap.assign_block_to_ivar_1,return from a call to BlockInHeap.assign_block_to_ivar,start of procedure handler,return from a call to BlockInHeap.handler,start of procedure block,return from a call to objc_blockBlockInHeap.assign_block_to_ivar_1,return from a call to block_in_heap_executed_after_bi_abduction_ok_no_retain_cycle,Taking true branch] codetoanalyze/objc/biabduction/field_superclass/SubtypingExample.m, Employee.initWithName:andAge:andEducation:, 6, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure initWithName:andAge:andEducation:,start of procedure initWithName:andAge:,return from a call to Person.initWithName:andAge:,Taking true branch] codetoanalyze/objc/biabduction/field_superclass/SubtypingExample.m, subtyping_test, 0, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure subtyping_test(),start of procedure testFields(),start of procedure setEmployeeEducation:,return from a call to Employee.setEmployeeEducation:,start of procedure setAge:,return from a call to Person.setAge:,start of procedure setEmployeeEducation:,return from a call to Employee.setEmployeeEducation:,start of procedure getAge,return from a call to Person.getAge,return from a call to testFields] codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, field_set_correctly, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure field_set_correctly()] @@ -31,20 +31,23 @@ codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, implicit_ex codetoanalyze/objc/biabduction/initialization/struct_initlistexpr.c, point_coords_set_correctly, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure point_coords_set_correctly()] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockAsParameter.m, FBSomeDataManager.fetchNewData, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure fetchNewData,start of procedure initWithCompletionBlock:,return from a call to Fetcher.initWithCompletionBlock:_objc_blockFBSomeDataManager.fetchNewData_1] codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockAsParameter.m, FBSomeDataManager.fetchNewData, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure fetchNewData,start of procedure initWithCompletionBlock:,return from a call to Fetcher.initWithCompletionBlock:_objc_blockFBSomeDataManager.fetchNewData_1] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure test_bad,Executing synthesized setter setDidFinishLoad:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure test_bad,Executing synthesized setter setDidFinishLoad:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_self_in_block,Executing synthesized setter setHandler:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_self_in_block,Executing synthesized setter setHandler:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure block,Executing synthesized setter setChild:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure block,Executing synthesized setter setChild:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_a_in_block_cycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_a_in_block_cycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure setCaptureInteractionController:,Taking true branch,Executing synthesized setter setDelegate:,Executing synthesized setter setDelegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure setCaptureInteractionController:,Taking true branch,Executing synthesized setter setDelegate:,Executing synthesized setter setDelegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController.loadViewBad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, MyCustomViewController.loadViewBad, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure loadViewBad,Executing synthesized setter setView:,Executing synthesized setter setStrong_delegate:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure test_bad,start of procedure setDidFinishLoad:,return from a call to Listener.setDidFinishLoad:_objc_blockLinkResolver.test_bad_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlockCapturedVar.m, LinkResolver.test_bad, 3, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure test_bad,start of procedure setDidFinishLoad:,return from a call to Listener.setDidFinishLoad:_objc_blockLinkResolver.test_bad_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_self_in_block,start of procedure setHandler:,return from a call to RCBlock.setHandler:_objc_blockRCBlock.retain_self_in_block_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, RCBlock.retain_self_in_block, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_self_in_block,start of procedure setHandler:,return from a call to RCBlock.setHandler:_objc_blockRCBlock.retain_self_in_block_1] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure block,start of procedure setChild:,return from a call to RCBlockAA.setChild:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, objc_blockretain_a_in_block_cycle_3, 1, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure block,start of procedure setChild:,return from a call to RCBlockAA.setChild:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure retain_a_in_block_cycle(),start of procedure setB:,return from a call to RCBlockAA.setB:,start of procedure setA:,return from a call to RCBlock.setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleBlocks.m, retain_a_in_block_cycle, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure retain_a_in_block_cycle(),start of procedure setB:,return from a call to RCBlockAA.setB:,start of procedure setA:,return from a call to RCBlock.setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure setCaptureInteractionController:,Taking true branch,start of procedure setDelegate:,return from a call to CaptureController.setDelegate:,start of procedure setDelegate:,return from a call to CaptureController.setDelegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleDeduplication.m, CViewController.setCaptureInteractionController:, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure setCaptureInteractionController:,Taking true branch,start of procedure setDelegate:,return from a call to CaptureController.setDelegate:,start of procedure setDelegate:,return from a call to CaptureController.setDelegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, Delegate.delegate, 0, Bad_footprint, no_bucket, ERROR, [start of procedure delegate] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, Delegate.setDelegate:, 0, Bad_footprint, no_bucket, ERROR, [start of procedure setDelegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, Delegate.setStrong_delegate:, 0, Bad_footprint, no_bucket, ERROR, [start of procedure setStrong_delegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, Delegate.setStrong_delegate:, 0, Bad_footprint, no_bucket, ERROR, [start of procedure setStrong_delegate:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCyclePropertyInProtocol.m, Delegate.strong_delegate, 0, Bad_footprint, no_bucket, ERROR, [start of procedure strong_delegate] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),start of procedure setB:,return from a call to AA.setB:,start of procedure setA:,return from a call to BBStrong.setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),start of procedure setB:,return from a call to AA.setB:,start of procedure setA:,return from a call to BBStrong.setA:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent.init,start of procedure init,return from a call to Child.init,start of procedure setChild:,return from a call to Parent.setChild:,start of procedure setParent:,return from a call to Child.setParent:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/retain_cycle2.m, strongcycle2, 4, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle2(),start of procedure init,return from a call to Parent.init,start of procedure init,return from a call to Child.init,start of procedure setChild:,return from a call to Parent.setChild:,start of procedure setParent:,return from a call to Child.setParent:] codetoanalyze/objc/biabduction/npe/UpdateDict.m, add_nil_in_dict, 10, NULL_DEREFERENCE, B1, ERROR, [start of procedure add_nil_in_dict(),Skipping dictionaryWithObjectsAndKeys:: method has no implementation] @@ -76,7 +79,7 @@ codetoanalyze/objc/biabduction/npe/nullable.m, derefNullableParamDirect, 0, NULL codetoanalyze/objc/biabduction/npe/nullable.m, derefNullableParamIndirect, 2, NULL_DEREFERENCE, B1, ERROR, [start of procedure derefNullableParamIndirect()] codetoanalyze/objc/biabduction/npe/nullable.m, parameter_nullable_bug, 5, NULL_DEREFERENCE, B1, ERROR, [start of procedure parameter_nullable_bug()] codetoanalyze/objc/biabduction/property/ExplicitIvarName.m, ExplicitIvarNameA.testDefaultName, 7, NULL_DEREFERENCE, B1, ERROR, [start of procedure testDefaultName,Skipping setY:: method has no implementation,Taking true branch] -codetoanalyze/objc/biabduction/property/ExplicitIvarName.m, ExplicitIvarNameA.testExplicit, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure testExplicit,Taking true branch] +codetoanalyze/objc/biabduction/property/ExplicitIvarName.m, ExplicitIvarNameA.testExplicit, 6, NULL_DEREFERENCE, B1, ERROR, [start of procedure testExplicit,start of procedure x,return from a call to ExplicitIvarNameA.x,Taking true branch] codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero1, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero1(),start of procedure init,return from a call to Base.init,start of procedure returnsZero1:,Taking true branch,return from a call to Base.returnsZero1:] codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero2, 2, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero2(),start of procedure init,return from a call to Base.init,start of procedure returnsZero2(),Taking false branch,return from a call to returnsZero2] codetoanalyze/objc/biabduction/subtyping/KindOfClassExample.m, shouldThrowDivideByZero3, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure shouldThrowDivideByZero3(),start of procedure init,return from a call to Derived.init,Taking true branch] @@ -85,8 +88,8 @@ codetoanalyze/objc/shared/memory_leaks_benchmark/TollBridgeExample.m, TollBridge codetoanalyze/objc/biabduction/memory_leaks_benchmark/CoreVideoExample.m, CoreVideoExample.cvpixelbuffer_not_released_leak, 1, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure cvpixelbuffer_not_released_leak] codetoanalyze/objc/biabduction/memory_leaks_benchmark/NSData_models_tests.m, NSData_models_tests.macForIV:, 2, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure macForIV:] codetoanalyze/objc/biabduction/memory_leaks_benchmark/NSString_models_tests.m, StringInitA.hexStringValue, 11, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure hexStringValue,Skipping CFStringCreateWithBytesNoCopy(): method has no implementation,Taking false branch] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] -codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),Executing synthesized setter setB:,Executing synthesized setter setC:,Executing synthesized setter setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure strongcycle(),start of procedure setB:,return from a call to AA.setB:,start of procedure setC:,return from a call to BB.setC:,start of procedure setA:,return from a call to CC.setA:] +codetoanalyze/objc/biabduction/memory_leaks_benchmark/RetainCycleLength3.m, strongcycle, 6, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure strongcycle(),start of procedure setB:,return from a call to AA.setB:,start of procedure setC:,return from a call to BB.setC:,start of procedure setA:,return from a call to CC.setA:] codetoanalyze/objc/biabduction/npe/Fraction.m, test_virtual_call, 7, NULL_DEREFERENCE, B1, ERROR, [start of procedure test_virtual_call(),start of procedure setNumerator:,return from a call to Fraction.setNumerator:,start of procedure getNumerator,return from a call to Fraction.getNumerator,Taking true branch] codetoanalyze/objc/biabduction/npe/Npe_with_equal_names.m, EqualNamesTest, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure EqualNamesTest(),start of procedure meth,return from a call to EqualNamesA.meth] codetoanalyze/objc/biabduction/npe/Nsstring_nil_args.m, initWithFormatBad, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure initWithFormatBad()] @@ -116,7 +119,7 @@ codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeak codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.createCloseCrossGlyph:, 2, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure createCloseCrossGlyph:,Skipping CGRectGetHeight(): method has no implementation] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.measureFrameSizeForText, 1, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure measureFrameSizeForText] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.regularLeak, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure regularLeak] -codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.test, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure test,Skipping bounds: method has no implementation,Skipping setShadowPath:: method has no implementation] +codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.test, 3, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure test,start of procedure backgroundCoveringView,return from a call to MemoryLeakExample.backgroundCoveringView,Skipping bounds: method has no implementation,start of procedure backgroundCoveringView,return from a call to MemoryLeakExample.backgroundCoveringView,Skipping setShadowPath:: method has no implementation] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.test1:, 1, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure test1:] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample.test2:, 1, BIABDUCTION_MEMORY_LEAK, no_bucket, ERROR, [start of procedure test2:] codetoanalyze/objc/shared/npe/Available_expr.m, Available_expr.test_no_bug, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure test_no_bug,Taking true branch] diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.m.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.m.dot index b35ea528c..6863c4628 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyCustomAccessor.m.dot @@ -11,4 +11,26 @@ digraph cfg { "dealloc#ASDisplayNode#instance.2cf9321d9a068615e100a3ac2a62e774_3" -> "dealloc#ASDisplayNode#instance.2cf9321d9a068615e100a3ac2a62e774_2" ; +"isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_1" [label="1: Start ASDisplayNode.isOpaque\nFormals: self:ASDisplayNode*\nLocals: \n " color=yellow style=filled] + + + "isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_1" -> "isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_3" ; +"isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_2" [label="2: Exit ASDisplayNode.isOpaque \n " color=yellow style=filled] + + +"isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_3" [label="3: BinaryOperatorStmt: Node \n n$2=*&self:ASDisplayNode* [line 12, column 41]\n n$3=*n$2._opaque:_Bool [line 12, column 41]\n *&return:_Bool=n$3 [line 12, column 41]\n " shape="box"] + + + "isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_3" -> "isOpaque#ASDisplayNode#instance.efbf8192c0bb59de353a9d71765d463c_2" ; +"setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_1" [label="1: Start ASDisplayNode.setOpaque:\nFormals: self:ASDisplayNode* opaque:_Bool\nLocals: \n " color=yellow style=filled] + + + "setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_1" -> "setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_3" ; +"setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_2" [label="2: Exit ASDisplayNode.setOpaque: \n " color=yellow style=filled] + + +"setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:ASDisplayNode* [line 12, column 41]\n n$1=*&opaque:_Bool [line 12, column 41]\n *n$0._opaque:_Bool=n$1 [line 12, column 41]\n " shape="box"] + + + "setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_3" -> "setOpaque:#ASDisplayNode#instance.f5e64d1703bd4ab716e8ec5de489150d_2" ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.m.dot b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.m.dot index 815405370..8d6cbf8f5 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/PropertyImplSetter.m.dot @@ -11,6 +11,17 @@ digraph cfg { "dealloc#PropertyImplSetter#instance.5650d9bd0d7d0f070430d4aa59d7fb97_3" -> "dealloc#PropertyImplSetter#instance.5650d9bd0d7d0f070430d4aa59d7fb97_2" ; +"maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_1" [label="1: Start PropertyImplSetter.maximumFileSize\nFormals: self:PropertyImplSetter*\nLocals: \n " color=yellow style=filled] + + + "maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_1" -> "maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_3" ; +"maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_2" [label="2: Exit PropertyImplSetter.maximumFileSize \n " color=yellow style=filled] + + +"maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:PropertyImplSetter* [line 12, column 26]\n n$1=*n$0._maximumFileSize:int [line 12, column 26]\n *&return:int=n$1 [line 12, column 26]\n " shape="box"] + + + "maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_3" -> "maximumFileSize#PropertyImplSetter#instance.716325bc2c2bc7e4d2d62472c6a1d10d_2" ; "setMaximumFileSize:#PropertyImplSetter#instance.1d600fefeeb62155817021d20e02a478_1" [label="1: Start PropertyImplSetter.setMaximumFileSize:\nFormals: self:PropertyImplSetter* newMaximumFileSize:int\nLocals: \n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.m.dot b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.m.dot index 3e8d06727..9deac3f18 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property/Property_getter.m.dot @@ -22,4 +22,26 @@ digraph cfg { "dealloc#A#instance.55ac864e91dcd5d484e8ab7d8eb94fcb_3" -> "dealloc#A#instance.55ac864e91dcd5d484e8ab7d8eb94fcb_2" ; +"setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_1" [label="1: Start A.setX:\nFormals: self:A* x:int\nLocals: \n " color=yellow style=filled] + + + "setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_1" -> "setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_3" ; +"setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_2" [label="2: Exit A.setX: \n " color=yellow style=filled] + + +"setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_3" [label="3: BinaryOperatorStmt: Node \n n$2=*&self:A* [line 11, column 15]\n n$3=*&x:int [line 11, column 15]\n *n$2._x:int=n$3 [line 11, column 15]\n " shape="box"] + + + "setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_3" -> "setX:#A#instance.00c5402542b9aade8ca8191be56dcd87_2" ; +"x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_1" [label="1: Start A.x\nFormals: self:A*\nLocals: \n " color=yellow style=filled] + + + "x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_1" -> "x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_3" ; +"x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_2" [label="2: Exit A.x \n " color=yellow style=filled] + + +"x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:A* [line 11, column 15]\n n$1=*n$0._x:int [line 11, column 15]\n *&return:int=n$1 [line 11, column 15]\n " shape="box"] + + + "x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_3" -> "x#A#instance.37ea1b3cd5342ae67c7383da2227f91f_2" ; } diff --git a/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.m.dot b/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.m.dot index 55d0df4dc..dbd75214b 100644 --- a/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.m.dot +++ b/infer/tests/codetoanalyze/objc/frontend/property_in_protocol/Test.m.dot @@ -11,4 +11,26 @@ digraph cfg { "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_3" -> "dealloc#Test#instance.5b6eb1b3af87ac0463c4245d2b33c913_2" ; +"numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_1" [label="1: Start MyProtocol.numberOfFiles\nFormals: self:MyProtocol*\nLocals: \n " color=yellow style=filled] + + + "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_1" -> "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" ; +"numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_2" [label="2: Exit MyProtocol.numberOfFiles \n " color=yellow style=filled] + + +"numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" [label="3: BinaryOperatorStmt: Node \n n$2=*&self:MyProtocol* [line 12, column 15]\n n$3=*n$2.numberOfFiles:int [line 12, column 15]\n *&return:int=n$3 [line 12, column 15]\n " shape="box"] + + + "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_3" -> "numberOfFiles#MyProtocol#instance.c9f4776a6bed5539fbf6975c3df32bbd_2" ; +"setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_1" [label="1: Start MyProtocol.setNumberOfFiles:\nFormals: self:MyProtocol* numberOfFiles:int\nLocals: \n " color=yellow style=filled] + + + "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_1" -> "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" ; +"setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_2" [label="2: Exit MyProtocol.setNumberOfFiles: \n " color=yellow style=filled] + + +"setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:MyProtocol* [line 12, column 15]\n n$1=*&numberOfFiles:int [line 12, column 15]\n *n$0.numberOfFiles:int=n$1 [line 12, column 15]\n " shape="box"] + + + "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_3" -> "setNumberOfFiles:#MyProtocol#instance.c62f9b68d4d1ea33789366903af4810a_2" ; } diff --git a/infer/tests/codetoanalyze/objc/performance/cost-issues.exp b/infer/tests/codetoanalyze/objc/performance/cost-issues.exp index 9458fbeef..5fea6005f 100644 --- a/infer/tests/codetoanalyze/objc/performance/cost-issues.exp +++ b/infer/tests/codetoanalyze/objc/performance/cost-issues.exp @@ -53,8 +53,10 @@ codetoanalyze/objc/performance/NSString.m, string_by_appending_same_string_linea codetoanalyze/objc/performance/NSString.m, string_by_appending_string_linear_FN, 7, OnUIThread:false, [] codetoanalyze/objc/performance/NSString.m, substring_from_index_linear_FN, 13, OnUIThread:false, [] codetoanalyze/objc/performance/NSString.m, substring_no_end_linear_FP, ⊤, OnUIThread:false, [Unbounded loop,Loop at line 81, column 3] +codetoanalyze/objc/performance/araii.m, Araii.buffer, 4, OnUIThread:false, [] codetoanalyze/objc/performance/araii.m, Araii.dealloc, 4, OnUIThread:false, [] codetoanalyze/objc/performance/araii.m, Araii.initWithBuffer, 15, OnUIThread:false, [] +codetoanalyze/objc/performance/araii.m, Araii.setBuffer:, 4, OnUIThread:false, [] codetoanalyze/objc/performance/araii.m, memory_leak_raii_main, 18, OnUIThread:false, [] codetoanalyze/objc/performance/break.m, break_constant_FP, 8 + 5 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},call to break_loop,Loop at line 10, column 3,{p},call to break_loop,Loop at line 10, column 3] codetoanalyze/objc/performance/break.m, break_loop, 5 + 5 ⋅ p + 2 ⋅ (1+max(0, p)), OnUIThread:false, [{1+max(0, p)},Loop at line 10, column 3,{p},Loop at line 10, column 3] diff --git a/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot b/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot index 5227ac57e..bc2e9ed47 100644 --- a/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/annotations/nonnull_annotations.m.dot @@ -1,5 +1,16 @@ /* @generated */ digraph cfg { +"child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_1" [label="1: Start NonnullAnnot.child\nFormals: self:NonnullAnnot*\nLocals: \n " color=yellow style=filled] + + + "child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_1" -> "child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_3" ; +"child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_2" [label="2: Exit NonnullAnnot.child \n " color=yellow style=filled] + + +"child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_3" [label="3: BinaryOperatorStmt: Node \n n$5=*&self:NonnullAnnot* [line 11, column 25]\n n$6=*n$5._child:NonnullAnnot* [line 11, column 25]\n *&return:NonnullAnnot*=n$6 [line 11, column 25]\n " shape="box"] + + + "child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_3" -> "child#NonnullAnnot#instance.90b13dcde8e3b2b21533f2a1e45f4dc4_2" ; "dealloc#NonnullAnnot#instance.0759b4c4bc783d3b87f6d785a8b2c369_1" [label="1: Start NonnullAnnot.dealloc\nFormals: self:NonnullAnnot*\nLocals: \n " color=yellow style=filled] @@ -22,6 +33,17 @@ digraph cfg { "init#NonnullAnnot#instance.b2b74f8dde6ae5957922f59d81ccda45_3" -> "init#NonnullAnnot#instance.b2b74f8dde6ae5957922f59d81ccda45_2" ; +"setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_1" [label="1: Start NonnullAnnot.setChild:\nFormals: self:NonnullAnnot* child:NonnullAnnot*\nLocals: \n " color=yellow style=filled] + + + "setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_1" -> "setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_3" ; +"setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_2" [label="2: Exit NonnullAnnot.setChild: \n " color=yellow style=filled] + + +"setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_3" [label="3: BinaryOperatorStmt: Node \n n$3=*&self:NonnullAnnot* [line 11, column 25]\n n$4=*&child:NonnullAnnot* [line 11, column 25]\n *n$3._child:NonnullAnnot*=n$4 [line 11, column 25]\n " shape="box"] + + + "setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_3" -> "setChild:#NonnullAnnot(class NonnullAnnot)#instance.a6a145a3c260c479880c89d93b389160_2" ; "test1:#NonnullAnnot(class NonnullAnnot)#instance.e1bfc3674bdae0a62d7e4bb2a1768f99_1" [label="1: Start NonnullAnnot.test1:\nFormals: self:NonnullAnnot* a:NonnullAnnot*\nLocals: aa:NonnullAnnot* \n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot b/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot index c10ae2695..6ed225600 100644 --- a/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/annotations/nullable_annotations.m.dot @@ -41,6 +41,17 @@ digraph cfg { "initWithName:#User(class NSString)#instance.1755f5e97d3aa5318dd071b864db9bb7_3" -> "initWithName:#User(class NSString)#instance.1755f5e97d3aa5318dd071b864db9bb7_2" ; +"name#User#instance.64d2642dd9cada63b69256c9a7def3b2_1" [label="1: Start User.name\nFormals: self:User*\nLocals: \n " color=yellow style=filled] + + + "name#User#instance.64d2642dd9cada63b69256c9a7def3b2_1" -> "name#User#instance.64d2642dd9cada63b69256c9a7def3b2_3" ; +"name#User#instance.64d2642dd9cada63b69256c9a7def3b2_2" [label="2: Exit User.name \n " color=yellow style=filled] + + +"name#User#instance.64d2642dd9cada63b69256c9a7def3b2_3" [label="3: BinaryOperatorStmt: Node \n n$5=*&self:User* [line 23, column 40]\n n$6=*n$5._name:NSString* [line 23, column 40]\n *&return:NSString*=n$6 [line 23, column 40]\n " shape="box"] + + + "name#User#instance.64d2642dd9cada63b69256c9a7def3b2_3" -> "name#User#instance.64d2642dd9cada63b69256c9a7def3b2_2" ; "otherUserName#User#instance.7b86b8d2191be71dec320c3203056cd7_1" [label="1: Start User.otherUserName\nFormals: self:User*\nLocals: ou:User* \n " color=yellow style=filled] @@ -56,6 +67,17 @@ digraph cfg { "otherUserName#User#instance.7b86b8d2191be71dec320c3203056cd7_4" -> "otherUserName#User#instance.7b86b8d2191be71dec320c3203056cd7_3" ; +"setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_1" [label="1: Start User.setName:\nFormals: self:User* name:NSString*\nLocals: \n " color=yellow style=filled] + + + "setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_1" -> "setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_3" ; +"setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_2" [label="2: Exit User.setName: \n " color=yellow style=filled] + + +"setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_3" [label="3: BinaryOperatorStmt: Node \n n$3=*&self:User* [line 23, column 40]\n n$4=*&name:NSString* [line 23, column 40]\n *n$3._name:NSString*=n$4 [line 23, column 40]\n " shape="box"] + + + "setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_3" -> "setName:#User(class NSString)#instance.feaa984173830aa4a9d325a5924f264f_2" ; "tellMeSomething#User#instance.5ed632cdc46e048613dbc2d7030419cf_1" [label="1: Start User.tellMeSomething\nFormals: self:User*\nLocals: \nAnnotation: <_Nullable> User.tellMeSomething(<>) \n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot index f91660b1d..03b6b4e6a 100644 --- a/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/block/dispatch.m.dot @@ -235,4 +235,26 @@ digraph cfg { "init#DispatchA#instance.ff6c7b9a5a49bb46493519a4290a6582_3" -> "init#DispatchA#instance.ff6c7b9a5a49bb46493519a4290a6582_2" ; +"setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_1" [label="1: Start DispatchA.setX:\nFormals: self:DispatchA* x:int\nLocals: \n " color=yellow style=filled] + + + "setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_1" -> "setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_3" ; +"setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_2" [label="2: Exit DispatchA.setX: \n " color=yellow style=filled] + + +"setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_3" [label="3: BinaryOperatorStmt: Node \n n$0=*&self:DispatchA* [line 12, column 26]\n n$1=*&x:int [line 12, column 26]\n *n$0._x:int=n$1 [line 12, column 26]\n " shape="box"] + + + "setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_3" -> "setX:#DispatchA#instance.b6cea284a46ba947192a21fbc276649b_2" ; +"x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_1" [label="1: Start DispatchA.x\nFormals: self:DispatchA*\nLocals: \n " color=yellow style=filled] + + + "x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_1" -> "x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_3" ; +"x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_2" [label="2: Exit DispatchA.x \n " color=yellow style=filled] + + +"x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_3" [label="3: BinaryOperatorStmt: Node \n n$2=*&self:DispatchA* [line 12, column 26]\n n$3=*n$2._x:int [line 12, column 26]\n *&return:int=n$3 [line 12, column 26]\n " shape="box"] + + + "x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_3" -> "x#DispatchA#instance.f9f4a74f4e170606d41e9af1e202a966_2" ; } diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot index 3d4d2f5c3..20dfcc612 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/ArcExample.m.dot @@ -41,4 +41,26 @@ digraph cfg { "newS#ArcA#instance.9d1f2aa4ea1ccfd32c1438724cfc19ba_4" -> "newS#ArcA#instance.9d1f2aa4ea1ccfd32c1438724cfc19ba_3" ; +"setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_1" [label="1: Start ArcA.setSon:\nFormals: self:ArcA* son:ArcA*\nLocals: \n " color=yellow style=filled] + + + "setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_1" -> "setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_3" ; +"setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_2" [label="2: Exit ArcA.setSon: \n " color=yellow style=filled] + + +"setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_3" [label="3: BinaryOperatorStmt: Node \n n$3=*&self:ArcA* [line 14, column 17]\n n$4=*&son:ArcA* [line 14, column 17]\n *n$3._son:ArcA*=n$4 [line 14, column 17]\n " shape="box"] + + + "setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_3" -> "setSon:#ArcA(class ArcA)#instance.baae73471012ee089a7558f57ddd56fe_2" ; +"son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_1" [label="1: Start ArcA.son\nFormals: self:ArcA*\nLocals: \n " color=yellow style=filled] + + + "son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_1" -> "son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_3" ; +"son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_2" [label="2: Exit ArcA.son \n " color=yellow style=filled] + + +"son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_3" [label="3: BinaryOperatorStmt: Node \n n$5=*&self:ArcA* [line 14, column 17]\n n$6=*n$5._son:ArcA* [line 14, column 17]\n *&return:ArcA*=n$6 [line 14, column 17]\n " shape="box"] + + + "son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_3" -> "son#ArcA#instance.eb40da6c5ac3fdfdee0ebe6b666b1ea5_2" ; } diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot index 3b60653c4..c37361bca 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/AutoreleaseExample.m.dot @@ -138,4 +138,26 @@ digraph cfg { "dealloc#Auto#instance.f75e3ca5aab8c1f0122d42fc04b27666_3" -> "dealloc#Auto#instance.f75e3ca5aab8c1f0122d42fc04b27666_2" ; +"setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_1" [label="1: Start Auto.setSon:\nFormals: self:Auto* son:Auto*\nLocals: \n " color=yellow style=filled] + + + "setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_1" -> "setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_3" ; +"setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_2" [label="2: Exit Auto.setSon: \n " color=yellow style=filled] + + +"setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_3" [label="3: BinaryOperatorStmt: Node \n n$5=*&self:Auto* [line 15, column 17]\n n$6=*&son:Auto* [line 15, column 17]\n *n$5._son:Auto*=n$6 [line 15, column 17]\n " shape="box"] + + + "setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_3" -> "setSon:#Auto(class Auto)#instance.b314785cc6e34d48670dac2910ec765e_2" ; +"son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_1" [label="1: Start Auto.son\nFormals: self:Auto*\nLocals: \n " color=yellow style=filled] + + + "son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_1" -> "son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_3" ; +"son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_2" [label="2: Exit Auto.son \n " color=yellow style=filled] + + +"son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_3" [label="3: BinaryOperatorStmt: Node \n n$3=*&self:Auto* [line 15, column 17]\n n$4=*n$3._son:Auto* [line 15, column 17]\n *&return:Auto*=n$4 [line 15, column 17]\n " shape="box"] + + + "son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_3" -> "son#Auto#instance.10d5e200f659259b61aeb33f58f3b9ab_2" ; } diff --git a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot index 4e31c27b9..b6d887f66 100644 --- a/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m.dot @@ -157,6 +157,28 @@ digraph cfg { "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_4" -> "testImageRefRelease#MemoryLeakExample#class.fa3cf5eac6a14b14c5050c7d62d2a79f_3" ; +"attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_1" [label="1: Start MemoryLeakExample.attachmentContainerView\nFormals: self:MemoryLeakExample*\nLocals: \n " color=yellow style=filled] + + + "attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_1" -> "attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_3" ; +"attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_2" [label="2: Exit MemoryLeakExample.attachmentContainerView \n " color=yellow style=filled] + + +"attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_3" [label="3: BinaryOperatorStmt: Node \n n$10=*&self:MemoryLeakExample* [line 14, column 27]\n n$11=*n$10._attachmentContainerView:UIView* [line 14, column 27]\n *&return:UIView*=n$11 [line 14, column 27]\n " shape="box"] + + + "attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_3" -> "attachmentContainerView#MemoryLeakExample#instance.aff4fd13563e9783b77bb7f4c56c06f7_2" ; +"backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_1" [label="1: Start MemoryLeakExample.backgroundCoveringView\nFormals: self:MemoryLeakExample*\nLocals: \n " color=yellow style=filled] + + + "backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_1" -> "backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_3" ; +"backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_2" [label="2: Exit MemoryLeakExample.backgroundCoveringView \n " color=yellow style=filled] + + +"backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_3" [label="3: BinaryOperatorStmt: Node \n n$6=*&self:MemoryLeakExample* [line 13, column 27]\n n$7=*n$6._backgroundCoveringView:UIView* [line 13, column 27]\n *&return:UIView*=n$7 [line 13, column 27]\n " shape="box"] + + + "backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_3" -> "backgroundCoveringView#MemoryLeakExample#instance.274e2fe96127ee4833b32c350286035f_2" ; "blockCapturedVarLeak#MemoryLeakExample#instance.53bb018bc84d6a696dc756e20b5b3f52_1" [label="1: Start MemoryLeakExample.blockCapturedVarLeak\nFormals: self:MemoryLeakExample*\nLocals: blk:_fn_(*) x:int* \n " color=yellow style=filled] @@ -256,6 +278,28 @@ digraph cfg { "regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_5" -> "regularLeak#MemoryLeakExample#instance.939a892cee505c3459f2d889292f218b_4" ; +"setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_1" [label="1: Start MemoryLeakExample.setAttachmentContainerView:\nFormals: self:MemoryLeakExample* attachmentContainerView:UIView*\nLocals: \n " color=yellow style=filled] + + + "setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_1" -> "setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_3" ; +"setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_2" [label="2: Exit MemoryLeakExample.setAttachmentContainerView: \n " color=yellow style=filled] + + +"setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_3" [label="3: BinaryOperatorStmt: Node \n n$12=*&self:MemoryLeakExample* [line 14, column 27]\n n$13=*&attachmentContainerView:UIView* [line 14, column 27]\n *n$12._attachmentContainerView:UIView*=n$13 [line 14, column 27]\n " shape="box"] + + + "setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_3" -> "setAttachmentContainerView:#MemoryLeakExample(class UIView)#instance.8d85bf92171cba689e1f602ab1f4c0c7_2" ; +"setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_1" [label="1: Start MemoryLeakExample.setBackgroundCoveringView:\nFormals: self:MemoryLeakExample* backgroundCoveringView:UIView*\nLocals: \n " color=yellow style=filled] + + + "setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_1" -> "setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_3" ; +"setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_2" [label="2: Exit MemoryLeakExample.setBackgroundCoveringView: \n " color=yellow style=filled] + + +"setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_3" [label="3: BinaryOperatorStmt: Node \n n$8=*&self:MemoryLeakExample* [line 13, column 27]\n n$9=*&backgroundCoveringView:UIView* [line 13, column 27]\n *n$8._backgroundCoveringView:UIView*=n$9 [line 13, column 27]\n " shape="box"] + + + "setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_3" -> "setBackgroundCoveringView:#MemoryLeakExample(class UIView)#instance.aa3950cc83a096190a5b6798bab718e3_2" ; "test#MemoryLeakExample#instance.cbb708bfe735ac5e5777524359299e00_1" [label="1: Start MemoryLeakExample.test\nFormals: self:MemoryLeakExample*\nLocals: shadowPath:CGPath const * \n " color=yellow style=filled] diff --git a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot index cf848d5b1..7dae9e937 100644 --- a/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/npe/Nonnull_attribute_example.m.dot @@ -63,4 +63,26 @@ digraph cfg { "initWithCoder:and:#NonnullC(class NSString,class NonnullA)#instance.e23828ce4467c2001440771e2c4692f8_5" -> "initWithCoder:and:#NonnullC(class NSString,class NonnullA)#instance.e23828ce4467c2001440771e2c4692f8_4" ; +"name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_1" [label="1: Start NonnullC.name\nFormals: self:NonnullC*\nLocals: \nAnnotation: <_Nonnull> NonnullC.name(<>) \n " color=yellow style=filled] + + + "name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_1" -> "name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_3" ; +"name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_2" [label="2: Exit NonnullC.name \n " color=yellow style=filled] + + +"name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_3" [label="3: BinaryOperatorStmt: Node \n n$5=*&self:NonnullC* [line 30, column 36]\n n$6=*n$5._name:NSString* [line 30, column 36]\n *&return:NSString*=n$6 [line 30, column 36]\n " shape="box"] + + + "name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_3" -> "name#NonnullC#instance.9c59c8694c0f7942ace24d4346f9a7cd_2" ; +"setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_1" [label="1: Start NonnullC.setName:\nFormals: self:NonnullC* name:NSString*\nLocals: \nAnnotation: <> NonnullC.setName:(<> <_Nonnull>) \n " color=yellow style=filled] + + + "setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_1" -> "setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_3" ; +"setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_2" [label="2: Exit NonnullC.setName: \n " color=yellow style=filled] + + +"setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_3" [label="3: BinaryOperatorStmt: Node \n n$3=*&self:NonnullC* [line 30, column 36]\n n$4=*&name:NSString* [line 30, column 36]\n *n$3._name:NSString*=n$4 [line 30, column 36]\n " shape="box"] + + + "setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_3" -> "setName:#NonnullC(class NSString)#instance.06c11492d4403b7a142558aeec6ac42a_2" ; } diff --git a/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot b/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot index 68b6adad5..a48a548da 100644 --- a/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot +++ b/infer/tests/codetoanalyze/objc/shared/property/PropertyAttributes.m.dot @@ -23,6 +23,17 @@ digraph cfg { "test.098f6bcd4621d373cade4e832627b4f6_6" -> "test.098f6bcd4621d373cade4e832627b4f6_5" ; +"child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_1" [label="1: Start PropertyA.child\nFormals: self:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_1" -> "child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_3" ; +"child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_2" [label="2: Exit PropertyA.child \n " color=yellow style=filled] + + +"child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_3" [label="3: BinaryOperatorStmt: Node \n n$15=*&self:PropertyA* [line 12, column 39]\n n$16=*n$15._child:PropertyA* [line 12, column 39]\n *&return:PropertyA*=n$16 [line 12, column 39]\n " shape="box"] + + + "child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_3" -> "child#PropertyA#instance.6f8ba5a5a49be48cc5dabe234a5b1918_2" ; "copy#PropertyA#instance.d5955e11cf35af4b4d602b2971590d5f_1" [label="1: Start PropertyA.copy\nFormals: self:PropertyA*\nLocals: other:PropertyA* \n " color=yellow style=filled] @@ -85,4 +96,59 @@ digraph cfg { "init#PropertyA#instance.a50cf011b0759e26f65bb059fbc6d60c_3" -> "init#PropertyA#instance.a50cf011b0759e26f65bb059fbc6d60c_2" ; +"last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_1" [label="1: Start PropertyA.last_name\nFormals: self:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_1" -> "last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_3" ; +"last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_2" [label="2: Exit PropertyA.last_name \n " color=yellow style=filled] + + +"last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_3" [label="3: BinaryOperatorStmt: Node \n n$13=*&self:PropertyA* [line 16, column 52]\n n$14=*n$13._last_name:PropertyA* [line 16, column 52]\n *&return:PropertyA*=n$14 [line 16, column 52]\n " shape="box"] + + + "last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_3" -> "last_name#PropertyA#instance.1ce5ad70e2d4c718c3a98ccc959a3bc9_2" ; +"name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_1" [label="1: Start PropertyA.name\nFormals: self:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_1" -> "name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_3" ; +"name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_2" [label="2: Exit PropertyA.name \n " color=yellow style=filled] + + +"name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_3" [label="3: BinaryOperatorStmt: Node \n n$19=*&self:PropertyA* [line 14, column 41]\n n$20=*n$19._name:PropertyA* [line 14, column 41]\n *&return:PropertyA*=n$20 [line 14, column 41]\n " shape="box"] + + + "name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_3" -> "name#PropertyA#instance.c1cdbf324fa14cda26c4633e95fc7667_2" ; +"setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_1" [label="1: Start PropertyA.setChild:\nFormals: self:PropertyA* child:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_1" -> "setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_3" ; +"setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_2" [label="2: Exit PropertyA.setChild: \n " color=yellow style=filled] + + +"setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_3" [label="3: BinaryOperatorStmt: Node \n n$9=*&self:PropertyA* [line 12, column 39]\n n$10=*&child:PropertyA* [line 12, column 39]\n *n$9._child:PropertyA*=n$10 [line 12, column 39]\n " shape="box"] + + + "setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_3" -> "setChild:#PropertyA(class PropertyA)#instance.2830b91fc93649a2fb3b313489bf5461_2" ; +"setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_1" [label="1: Start PropertyA.setLast_name:\nFormals: self:PropertyA* last_name:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_1" -> "setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_3" ; +"setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_2" [label="2: Exit PropertyA.setLast_name: \n " color=yellow style=filled] + + +"setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_3" [label="3: BinaryOperatorStmt: Node \n n$11=*&self:PropertyA* [line 16, column 52]\n n$12=*&last_name:PropertyA* [line 16, column 52]\n *n$11._last_name:PropertyA*=n$12 [line 16, column 52]\n " shape="box"] + + + "setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_3" -> "setLast_name:#PropertyA(class PropertyA)#instance.47d6f73ea37f95beeca8ce7a0352c15f_2" ; +"setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_1" [label="1: Start PropertyA.setName:\nFormals: self:PropertyA* name:PropertyA*\nLocals: \n " color=yellow style=filled] + + + "setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_1" -> "setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_3" ; +"setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_2" [label="2: Exit PropertyA.setName: \n " color=yellow style=filled] + + +"setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_3" [label="3: BinaryOperatorStmt: Node \n n$17=*&self:PropertyA* [line 14, column 41]\n n$18=*&name:PropertyA* [line 14, column 41]\n *n$17._name:PropertyA*=n$18 [line 14, column 41]\n " shape="box"] + + + "setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_3" -> "setName:#PropertyA(class PropertyA)#instance.530a6c9eaa83786feeaf3a50fc2cd0e6_2" ; } diff --git a/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp b/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp index d2348f8ee..f0dfb1783 100644 --- a/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp +++ b/infer/tests/codetoanalyze/objcpp/biabduction/issues.exp @@ -1,6 +1,6 @@ codetoanalyze/objcpp/biabduction/BlockLfield.mm, A.mOk, 1, PRECONDITION_NOT_FOUND, no_bucket, ERROR, [start of procedure mOk] codetoanalyze/objcpp/biabduction/BlockLfield.mm, CFunWithBlockOk, 2, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure CFunWithBlockOk()] codetoanalyze/objcpp/biabduction/BlockLfield.mm, CFunWithBlockOk_objc_blockA.mOk_1, 2, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure CFunWithBlockOk()] -codetoanalyze/objcpp/biabduction/c_functions.mm, main, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure main(),start of procedure autoUpdating,return from a call to Functions.autoUpdating,start of procedure autoUpdating2,Skipping dispatch_once2(): method has no implementation,return from a call to Functions.autoUpdating2,Executing synthesized getter block,start of procedure block,return from a call to objc_blockobjc_blockFunctions.autoUpdating_1_2,Message block with receiver nil returns nil.] +codetoanalyze/objcpp/biabduction/c_functions.mm, main, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure main(),start of procedure autoUpdating,return from a call to Functions.autoUpdating,start of procedure autoUpdating2,Skipping dispatch_once2(): method has no implementation,return from a call to Functions.autoUpdating2,start of procedure block,return from a call to Functions.block,start of procedure block,return from a call to objc_blockobjc_blockFunctions.autoUpdating_1_2,Message block with receiver nil returns nil.] codetoanalyze/objcpp/biabduction/retain_cycles/RetainCycleWithStruct.mm, Animation.tracer, 2, BIABDUCTION_ANALYSIS_STOPS, no_bucket, WARNING, [start of procedure tracer,start of procedure _State,return from a call to _State::_State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer.initWithAnimation:] codetoanalyze/objcpp/biabduction/retain_cycles/RetainCycleWithStruct.mm, Animation.tracer, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure tracer,start of procedure _State,return from a call to _State::_State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer.initWithAnimation:]