diff --git a/infer/src/IR/Errlog.mli b/infer/src/IR/Errlog.mli index 1f2b0fa7b..f77193c37 100644 --- a/infer/src/IR/Errlog.mli +++ b/infer/src/IR/Errlog.mli @@ -28,6 +28,8 @@ val make_trace_element : int -> Location.t -> string -> node_tag list -> loc_tra (** Trace of locations *) type loc_trace = loc_trace_elem list +val concat_traces : (string * loc_trace) list -> loc_trace + val compute_local_exception_line : loc_trace -> int option (** Look at all the trace steps and find those that are arising any exception, then bind them to the closest step at level 0. diff --git a/infer/src/concurrency/RacerD.ml b/infer/src/concurrency/RacerD.ml index 608c0e0d1..168cdfc76 100644 --- a/infer/src/concurrency/RacerD.ml +++ b/infer/src/concurrency/RacerD.ml @@ -857,14 +857,7 @@ let make_trace ~report_kind original_path pdesc = (* create a trace for one of the conflicts and append it to the trace for the original sink *) let conflict_trace = make_trace_for_sink conflict_sink in let conflict_end = get_end_loc conflict_trace in - let get_start_loc = function head :: _ -> head.Errlog.lt_loc | [] -> Location.dummy in - let first_trace_spacer = - Errlog.make_trace_element 0 (get_start_loc original_trace) label1 [] - in - let second_trace_spacer = - Errlog.make_trace_element 0 (get_start_loc conflict_trace) label2 [] - in - ( (first_trace_spacer :: original_trace) @ (second_trace_spacer :: conflict_trace) + ( Errlog.concat_traces [(label1, original_trace); (label2, conflict_trace)] , original_end , conflict_end ) in