Skip to content

Commit

Permalink
[autofix] Add line and col to the autofixes in the tests
Browse files Browse the repository at this point in the history
Reviewed By: martintrojer

Differential Revision: D64177286

fbshipit-source-id: f32cfaea4691a1e62db267f7e2db8cf1ccab1858
  • Loading branch information
dulmarod authored and facebook-github-bot committed Oct 10, 2024
1 parent 6da2fc9 commit e406c23
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 41 deletions.
12 changes: 6 additions & 6 deletions infer/src/integration/IssuesTest.ml
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,20 @@ let pp_custom_of_report fmt report fields =
transitive_missed_captures )
| Autofix ->
let escape s = Escape.escape_double_quotes s |> Escape.escape_line_space in
let pp_autofix fmt (original, replacement) =
F.fprintf fmt "\"%s\"=>\"%s\"" (escape original) (escape replacement)
let pp_autofix fmt (original, replacement, line, col) =
F.fprintf fmt "\"%s\"=>\"%s\"@%d:%d" (escape original) (escape replacement) line col
in
let pp_autofix_opt fmt (original, replacement) =
let pp_autofix_opt fmt (original, replacement, line, col) =
if Option.is_some original || Option.is_some replacement then
pp_autofix fmt
(Option.value ~default:"" original, Option.value ~default:"" replacement)
(Option.value ~default:"" original, Option.value ~default:"" replacement, line, col)
in
Option.iter issue.autofix ~f:(fun {original; replacement; additional} ->
F.pp_print_string fmt (comma_separator index) ;
pp_autofix_opt fmt (original, replacement) ;
F.fprintf fmt "%a" pp_autofix_opt (original, replacement, issue.line, issue.column) ;
Option.iter additional ~f:(fun additional ->
List.iter additional ~f:(fun {line; column; original; replacement} ->
F.fprintf fmt "+%a@%d:%d" pp_autofix (original, replacement) line column ) ) )
F.fprintf fmt "+%a" pp_autofix (original, replacement, line, column) ) ) )
in
List.iteri ~f:pp_field fields ;
F.fprintf fmt "@."
Expand Down
4 changes: 2 additions & 2 deletions infer/tests/codetoanalyze/cpp/pulse-17/issues.exp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
codetoanalyze/cpp/pulse-17/closures.cpp, generic_lambda_ok_FP, 5, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::SharedPtr::SharedPtr, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::shared_ptr<int>&`)], "s_ptr0 = _s_ptr;"=>"s_ptr0 = std::move(_s_ptr);"
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::SharedPtr::SharedPtr, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::shared_ptr<float>&`)], "s_ptr1(_s_ptr)"=>"s_ptr1(std::move(_s_ptr))"
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::SharedPtr::SharedPtr, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::shared_ptr<int>&`)], "s_ptr0 = _s_ptr;"=>"s_ptr0 = std::move(_s_ptr);"@40:44
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::SharedPtr::SharedPtr, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::shared_ptr<float>&`)], "s_ptr1(_s_ptr)"=>"s_ptr1(std::move(_s_ptr))"@41:46
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::make_shared0_bad, 5, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::make_shared1_bad, 7, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse-17/make_shared.cpp, make_shared_ptr::make_shared2_bad, 5, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
Expand Down
22 changes: 11 additions & 11 deletions infer/tests/codetoanalyze/cpp/pulse/issues.exp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ codetoanalyze/cpp/pulse/closures.cpp, struct_capture_by_val_bad, 7, NULLPTR_DERE
codetoanalyze/cpp/pulse/closures.cpp, struct_capture_by_val_ok_FP, 7, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/closures.cpp, call_argument, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter f with type `std::function<_fn_>`]
codetoanalyze/cpp/pulse/closures.cpp, FP_update_inside_lambda_visible_outside_ok, 10, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::Counter::Counter, 1, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::basic_string<char,std::char_traits<char>,std::allocator<char>>&`)], "name(name_)"=>"name(std::move(name_))"
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::Counter::Counter, 1, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::basic_string<char,std::char_traits<char>,std::allocator<char>>&`)], "name(name_)"=>"name(std::move(name_))"@21:9
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::X::__infer_inner_destructor_~X, 1, NULLPTR_DEREFERENCE_LATENT, no_bucket, ERROR, [*** SUPPRESSED ***,source of the null value part of the trace starts here,is assigned to the null pointer,null pointer dereference part of the trace starts here,parameter `this` of condtemp::X::__infer_inner_destructor_~X,when calling `condtemp::X::name` here,parameter `this` of condtemp::X::name,invalid access occurs here]
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::FP_track_copy_operations_one_copy_ok, 17, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/conditional_temporaries.cpp, condtemp::FP_track_copy_operations_complex_ok, 16, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
Expand Down Expand Up @@ -129,7 +129,7 @@ codetoanalyze/cpp/pulse/leaks.cpp, leaks::unknown_wrapper_alloc_then_leak_bad, 3
codetoanalyze/cpp/pulse/max_disjuncts.cpp, max_disjuncts::call_join_full_disjs1_bad, 3, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/max_disjuncts.cpp, max_disjuncts::call_join_full_disjs2_bad, 3, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/max_disjuncts.cpp, max_disjuncts::call_join_full_disjs3_bad, 3, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/max_disjuncts.cpp, max_disjuncts::FullDisjsInLoop::full_disjs_in_loop_ok2_FP, 5, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `max_disjuncts::Arr&`)], "arr = x;"=>"arr = std::move(x);"
codetoanalyze/cpp/pulse/max_disjuncts.cpp, max_disjuncts::FullDisjsInLoop::full_disjs_in_loop_ok2_FP, 5, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `max_disjuncts::Arr&`)], "arr = x;"=>"arr = std::move(x);"@155:7
codetoanalyze/cpp/pulse/nullptr.cpp, A::this_notnull_bad, 3, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/nullptr.cpp, A::call_null_arg_bad, 0, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,when calling `A::expect_notnull_ok` here,parameter `a` of A::expect_notnull_ok,invalid access occurs here]
codetoanalyze/cpp/pulse/nullptr.cpp, deref_nullptr_bad, 2, NULLPTR_DEREFERENCE, no_bucket, ERROR, [is assigned to the null pointer,assigned,invalid access occurs here]
Expand Down Expand Up @@ -163,7 +163,7 @@ codetoanalyze/cpp/pulse/path.cpp, FP_only_bad_on_42_latent, 2, NULLPTR_DEREFEREN
codetoanalyze/cpp/pulse/path.cpp, FN_faulty_call_bad, 0, NULLPTR_DEREFERENCE, no_bucket, ERROR, [when calling `FP_only_bad_on_42_latent` here,in call to `may_return_null`,is assigned to the null pointer,returned,return from call to `may_return_null`,assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, read_shared_ptr_param_bad, 0, PULSE_READONLY_SHARED_PTR_PARAM, no_bucket, ERROR, [Parameter x with type `std::shared_ptr<int>`,used]
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, read_shared_ptr_param_cond_bad, 0, PULSE_READONLY_SHARED_PTR_PARAM, no_bucket, ERROR, [Parameter x with type `std::shared_ptr<int>`,used,used]
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, SharedPtrField1_Bad::SharedPtrField1_Bad, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::shared_ptr<int>&`)], "field = x;"=>"field = std::move(x);"
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, SharedPtrField1_Bad::SharedPtrField1_Bad, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::shared_ptr<int>&`)], "field = x;"=>"field = std::move(x);"@32:49
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, copy_raw_ptr_to_global_bad, 0, PULSE_READONLY_SHARED_PTR_PARAM, no_bucket, ERROR, [Parameter x with type `std::shared_ptr<int>`,used]
codetoanalyze/cpp/pulse/readonly_shared_ptr_param.cpp, copy_shared_ptr_to_global_bad, 1, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::shared_ptr<int>&`)]
codetoanalyze/cpp/pulse/reference_stability.cpp, folly_fastmap_bad, 9, PULSE_REFERENCE_STABILITY, no_bucket, ERROR, [invalidation part of the trace starts here,variable `map` declared here,in call to `folly::F14FastMap::emplace` (modelled),was potentially invalidated by `folly::F14FastMap::emplace`,use-after-lifetime part of the trace starts here,variable `map` declared here,in call to `folly::F14FastMap::begin` (modelled),in call to `folly::f14::detail::ValueContainerIterator::operator->` (modelled),assigned,invalid access occurs here]
Expand Down Expand Up @@ -509,7 +509,7 @@ codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_assignment_bad, 0, PULSE_CONS
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_assignment_bad, 2, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::set<int,std::less<int>,std::allocator<int>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_and_move_bad, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter source with type `std::set<int,std::less<int>,std::allocator<int>>`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_and_move_bad, 1, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [copied here (with type `std::set<int,std::less<int>,std::allocator<int>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, WrapperArr::WrapperArr, 0, PULSE_UNNECESSARY_COPY_MOVABLE, no_bucket, ERROR, [copied here (with type `Arr&&`)], "hidden_arr_(internal_arr)"=>"hidden_arr_(std::move(internal_arr))"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, WrapperArr::WrapperArr, 0, PULSE_UNNECESSARY_COPY_MOVABLE, no_bucket, ERROR, [copied here (with type `Arr&&`)], "hidden_arr_(internal_arr)"=>"hidden_arr_(std::move(internal_arr))"@391:45
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, WrapperArr::unnecessary_copy_moveable_bad, 1, PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE, no_bucket, ERROR, [copy assigned here (with type `Arr&&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, WrapperArr::unnecessary_copy_moveable_copy_mod_bad, 1, PULSE_UNNECESSARY_COPY_ASSIGNMENT_MOVABLE, no_bucket, ERROR, [copy assigned here (with type `Arr&&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, unnecessary_copy_initializer_list, 2, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::vector<int,std::allocator<int>>&`)]
Expand All @@ -520,13 +520,13 @@ codetoanalyze/cpp/pulse/unnecessary_copy.cpp, call_get_arr_implicit_cpy_bad, 1,
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, ClassWithoutConstructDef::field_setter_bad, 1, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `std::vector<int,std::allocator<int>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, foo, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter my_vec with type `std::vector<int,std::allocator<int>>`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, foo, 0, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [macro expanded here,copied here (with type `std::vector<int,std::allocator<int>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToField1_Bad::CopiedToField1_Bad, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "field(a)"=>"field(std::move(a))"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToField2_Bad::CopiedToField2_Bad, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Arr&`)], "field = a;"=>"field = std::move(a);"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToField1_Bad::CopiedToField1_Bad, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "field(a)"=>"field(std::move(a))"@549:31
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToField2_Bad::CopiedToField2_Bad, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Arr&`)], "field = a;"=>"field = std::move(a);"@563:31
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToField3_Last_Bad::CopiedToField3_Last_Bad, 2, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, PassedToUnknown_Bad::PassedToUnknown_Bad, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter a with type `Arr`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, PassedToUnknown_Bad::PassedToUnknown_Bad, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, PassedToUnknownRef_Bad::PassedToUnknownRef_Bad, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter a with type `Arr`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToMultipleField_Last_Bad::CopiedToMultipleField_Last_Bad, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "field2(a)"=>"field2(std::move(a))"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopiedToMultipleField_Last_Bad::CopiedToMultipleField_Last_Bad, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "field2(a)"=>"field2(std::move(a))"@626:54
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, intermediate_copy_modified_unused_bad, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter input with type `std::vector<int,std::allocator<int>>`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, intermediate_copy_modified_unused_bad, 1, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `std::vector<int,std::allocator<int>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, intermediate_copy_modified_used_ok, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter input with type `std::vector<int,std::allocator<int>>`]
Expand All @@ -537,18 +537,18 @@ codetoanalyze/cpp/pulse/unnecessary_copy.cpp, intermediate_copy_assignment_const
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, intermediate_copy_assignment_const_value_bad, 1, PULSE_UNNECESSARY_COPY_INTERMEDIATE_CONST, no_bucket, ERROR, [copied here (with type `Arr const &`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, FieldCopyClass::copy_assign_bad, 0, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `NonTrivialCopyClass&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_from_global_bad, 0, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopyConstructFromRefBad1::CopyConstructFromRefBad1, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "my_arr(arr)"=>"my_arr(std::move(arr))"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopyConstructFromRefBad2::CopyConstructFromRefBad2, 0, PULSE_UNNECESSARY_COPY_MOVABLE, no_bucket, ERROR, [copied here (with type `Arr&&`)], "my_arr(arr)"=>"my_arr(std::move(arr))"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopyConstructFromRefBad1::CopyConstructFromRefBad1, 0, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)], "my_arr(arr)"=>"my_arr(std::move(arr))"@806:39
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, CopyConstructFromRefBad2::CopyConstructFromRefBad2, 0, PULSE_UNNECESSARY_COPY_MOVABLE, no_bucket, ERROR, [copied here (with type `Arr&&`)], "my_arr(arr)"=>"my_arr(std::move(arr))"@813:41
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_assignment_from_lvalue_ref_ok_intermediate_bad, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter arr with type `Arr`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, copy_assignment_from_lvalue_ref_ok_intermediate_bad, 5, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, normal_copy_from_lvalue_ref_bad, 1, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [copied here (with type `std::basic_string<char,std::char_traits<char>,std::allocator<char>>&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, NonDisjJoin_ok::NonDisjJoin_ok, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter myStr with type `std::basic_string<char,std::char_traits<char>,std::allocator<char>>`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, NonDisjJoinLoop_ok_FP::NonDisjJoinLoop_ok_FP, 0, PULSE_CONST_REFABLE, no_bucket, ERROR, [Parameter myStr with type `std::basic_string<char,std::char_traits<char>,std::allocator<char>>`]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::copy_assignment_copy_of_global_bad, 1, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::copy_assignment_copy_of_global_bad, 2, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Arr&`)], "field = ref;"=>"field = std::move(ref);"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::copy_assignment_copy_of_global_bad, 2, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Arr&`)], "field = ref;"=>"field = std::move(ref);"@903:5
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::intermediate_copy_copy_of_global_bad, 1, PULSE_UNNECESSARY_COPY, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::intermediate_copy_copy_of_global_bad, 2, PULSE_UNNECESSARY_COPY_INTERMEDIATE, no_bucket, ERROR, [copied here (with type `Arr&`)]
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::copy_assignment_copy_ptr_bad, 3, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Ptr&`)], "ptr_field = c;"=>"ptr_field = std::move(c);"
codetoanalyze/cpp/pulse/unnecessary_copy.cpp, UnownedTest::copy_assignment_copy_ptr_bad, 3, PULSE_UNNECESSARY_COPY_ASSIGNMENT, no_bucket, ERROR, [copy assigned here (with type `Ptr&`)], "ptr_field = c;"=>"ptr_field = std::move(c);"@941:5
codetoanalyze/cpp/pulse/use_after_delete.cpp, deref_deleted_bad, 3, USE_AFTER_DELETE, no_bucket, ERROR, [invalidation part of the trace starts here,allocated by call to `new` (modelled),assigned,was invalidated by `delete`,use-after-lifetime part of the trace starts here,allocated by call to `new` (modelled),assigned,when calling `Simple::Simple` here,parameter `__param_0` of Simple::Simple,invalid access occurs here]
codetoanalyze/cpp/pulse/use_after_delete.cpp, reassign_field_of_deleted_bad, 3, USE_AFTER_DELETE, no_bucket, ERROR, [invalidation part of the trace starts here,allocated by call to `new` (modelled),assigned,was invalidated by `delete`,use-after-lifetime part of the trace starts here,allocated by call to `new` (modelled),assigned,invalid access occurs here]
codetoanalyze/cpp/pulse/use_after_delete.cpp, double_delete_bad, 3, USE_AFTER_DELETE, no_bucket, ERROR, [invalidation part of the trace starts here,allocated by call to `new` (modelled),assigned,was invalidated by `delete`,use-after-lifetime part of the trace starts here,allocated by call to `new` (modelled),assigned,invalid access occurs here]
Expand Down
Loading

0 comments on commit e406c23

Please sign in to comment.