[inferprint] fix template deduplication

Reviewed By: jeremydubreil

Differential Revision: D6024848

fbshipit-source-id: 8223fcd
master
Sam Blackshear 7 years ago committed by Facebook Github Bot
parent 9282e30d72
commit c2c1679a5f

@ -32,6 +32,7 @@ BUILD_SYSTEMS_TESTS += \
clang_with_E_flag \ clang_with_E_flag \
clang_with_M_flag \ clang_with_M_flag \
clang_with_MD_flag \ clang_with_MD_flag \
deduplicate_template_warnings \
delete_results_dir \ delete_results_dir \
diff \ diff \
diff_gen_build_script \ diff_gen_build_script \

@ -731,11 +731,13 @@ module Issue = struct
let compare_err_data_ (err_data1: Errlog.err_data) (err_data2: Errlog.err_data) = let compare_err_data_ (err_data1: Errlog.err_data) (err_data2: Errlog.err_data) =
Location.compare err_data1.loc err_data2.loc Location.compare err_data1.loc err_data2.loc
type proc_name_ = Typ.Procname.t
(* ignore proc name *)
let compare_proc_name_ _ _ = 0
type t = type t =
{ proc_name: Typ.Procname.t [@compare.ignore ] {proc_name: proc_name_; proc_location: Location.t; err_key: Errlog.err_key; err_data: err_data_}
; proc_location: Location.t
; err_key: Errlog.err_key
; err_data: err_data_ }
[@@deriving compare] [@@deriving compare]
(* If two issues are identical except for their procnames, they are probably duplicate reports on (* If two issues are identical except for their procnames, they are probably duplicate reports on

@ -1,7 +1,4 @@
INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared<lol>, 1, MEMORY_LEAK, [start of procedure std::make_shared<lol>(),Skipping lol: function or method not found] INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared<lol>, 1, MEMORY_LEAK, [start of procedure std::make_shared<lol>(),Skipping lol: function or method not found]
INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared<weak_ptr_constructors::Base,_int_*>, 1, MEMORY_LEAK, [start of procedure std::make_shared<weak_ptr_constructors::Base,_int_*>(),start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base]
INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared<weak_ptr_constructors::Derived,_int_*>, 1, MEMORY_LEAK, [start of procedure std::make_shared<weak_ptr_constructors::Derived,_int_*>(),start of procedure Derived,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,return from a call to weak_ptr_constructors::Derived_Derived,start of procedure Derived,start of procedure Base,return from a call to weak_ptr_constructors::Base_Base,return from a call to weak_ptr_constructors::Derived_Derived]
INFER_MODEL/cpp/include/infer_model/shared_ptr.h, std::make_shared<weak_ptr_lock_repro_large::RDC>, 1, MEMORY_LEAK, [start of procedure std::make_shared<weak_ptr_lock_repro_large::RDC>(),start of procedure RDC,start of procedure DC,return from a call to weak_ptr_lock_repro_large::DC_DC,return from a call to weak_ptr_lock_repro_large::RDC_RDC,start of procedure RDC,start of procedure DC,return from a call to weak_ptr_lock_repro_large::DC_DC,return from a call to weak_ptr_lock_repro_large::RDC_RDC]
codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_fgetc, 4, NULL_DEREFERENCE, [start of procedure crash_fgetc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_fgetc, 4, NULL_DEREFERENCE, [start of procedure crash_fgetc()]
codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_getc, 4, NULL_DEREFERENCE, [start of procedure crash_getc()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, crash_getc, 4, NULL_DEREFERENCE, [start of procedure crash_getc()]
codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, malloc_fail_gets_reported, 2, NULL_DEREFERENCE, [start of procedure malloc_fail_gets_reported()] codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, malloc_fail_gets_reported, 2, NULL_DEREFERENCE, [start of procedure malloc_fail_gets_reported()]
@ -11,9 +8,7 @@ codetoanalyze/cpp/errors/c_tests/c_bugs.cpp, resource_leak_is_reported, 0, RESOU
codetoanalyze/cpp/errors/include_header/header.h, header::A_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0] codetoanalyze/cpp/errors/include_header/header.h, header::A_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0]
codetoanalyze/cpp/errors/include_header/header.h, header::div0_fun, 0, DIVIDE_BY_ZERO, [start of procedure header::div0_fun()] codetoanalyze/cpp/errors/include_header/header.h, header::div0_fun, 0, DIVIDE_BY_ZERO, [start of procedure header::div0_fun()]
codetoanalyze/cpp/errors/include_header/header2.h, header2::B<header2::A>_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0] codetoanalyze/cpp/errors/include_header/header2.h, header2::B<header2::A>_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0]
codetoanalyze/cpp/errors/include_header/header2.h, header2::B<int>_div0, 0, DIVIDE_BY_ZERO, [start of procedure div0]
codetoanalyze/cpp/errors/include_header/header2.h, header2::div0_templ<header2::A>, 1, DIVIDE_BY_ZERO, [start of procedure header2::div0_templ<header2::A>()] codetoanalyze/cpp/errors/include_header/header2.h, header2::div0_templ<header2::A>, 1, DIVIDE_BY_ZERO, [start of procedure header2::div0_templ<header2::A>()]
codetoanalyze/cpp/errors/include_header/header2.h, header2::div0_templ<int>, 1, DIVIDE_BY_ZERO, [start of procedure header2::div0_templ<int>()]
codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 1, MEMORY_LEAK, [start of procedure leak()] codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 1, MEMORY_LEAK, [start of procedure leak()]
codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure leak()] codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, leak, 2, DANGLING_POINTER_DEREFERENCE, [start of procedure leak()]
codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, no_leak, 1, MEMORY_LEAK, [start of procedure no_leak()] codetoanalyze/cpp/errors/memory_leaks/array_leak.cpp, no_leak, 1, MEMORY_LEAK, [start of procedure no_leak()]

Loading…
Cancel
Save