[litho] Handle non-existing caller path

Reviewed By: skcho

Differential Revision: D26975222

fbshipit-source-id: 758c4f0b3
master
Ezgi Çiçek 4 years ago committed by Facebook GitHub Bot
parent 2d56b1bff1
commit 7110c1ca3f

@ -130,9 +130,10 @@ module Created = struct
| CreatedLocation.ByCreateMethod _ -> | CreatedLocation.ByCreateMethod _ ->
append_one caller_return callee_return acc append_one caller_return callee_return acc
| CreatedLocation.ByParameter path -> | CreatedLocation.ByParameter path ->
let caller_path = SubstPathMap.find path map in SubstPathMap.find_opt path map
Option.value_map (find_opt caller_path caller) ~default:acc ~f:(fun caller_created -> |> Option.value_map ~default:acc ~f:(fun caller_path ->
append caller_return caller_created acc ) Option.value_map (find_opt caller_path caller) ~default:acc
~f:(fun caller_created -> append caller_return caller_created acc) )
in in
CreatedLocations.fold accum_subst callee_returns acc ) CreatedLocations.fold accum_subst callee_returns acc )

Loading…
Cancel
Save