[biabduction] Do not log unamatched parameter errors to standard out

Reviewed By: jvillard

Differential Revision: D8784091

fbshipit-source-id: 462f7eb
master
Dulma Churchill 6 years ago committed by Facebook Github Bot
parent be855d3589
commit eab20602a0

@ -684,7 +684,7 @@ let specialize_types ?(has_clang_model= false) callee_pdesc resolved_pname args
((param_name, param_typ) :: params, subts) ) ((param_name, param_typ) :: params, subts) )
~init:([], Mangled.Map.empty) callee_attributes.formals args ~init:([], Mangled.Map.empty) callee_attributes.formals args
with Invalid_argument _ -> with Invalid_argument _ ->
L.internal_error L.(debug Analysis Medium)
"Call mismatch: method %a has %i paramters but is called with %i arguments@." "Call mismatch: method %a has %i paramters but is called with %i arguments@."
Typ.Procname.pp resolved_pname Typ.Procname.pp resolved_pname
(List.length callee_attributes.formals) (List.length callee_attributes.formals)

@ -641,7 +641,7 @@ let resolve_pname ~caller_pdesc tenv prop args pname call_flags : Typ.Procname.t
with Invalid_argument _ -> with Invalid_argument _ ->
let loc = (Procdesc.get_attributes caller_pdesc).loc in let loc = (Procdesc.get_attributes caller_pdesc).loc in
let file = loc.Location.file in let file = loc.Location.file in
L.internal_error L.(debug Analysis Medium)
"Call mismatch: method %a has %i paramters but is called with %i arguments, in %a, %a@." "Call mismatch: method %a has %i paramters but is called with %i arguments, in %a, %a@."
Typ.Procname.pp pname (List.length resolved_parameters) (List.length args) SourceFile.pp Typ.Procname.pp pname (List.length resolved_parameters) (List.length args) SourceFile.pp
file Location.pp loc ; file Location.pp loc ;
@ -672,7 +672,7 @@ let resolve_pname ~caller_pdesc tenv prop args pname call_flags : Typ.Procname.t
| args -> | args ->
let loc = (Procdesc.get_attributes caller_pdesc).loc in let loc = (Procdesc.get_attributes caller_pdesc).loc in
let file = loc.Location.file in let file = loc.Location.file in
L.internal_error L.(debug Analysis Medium)
"Call mismatch: method %a has %i paramters but is called with %i arguments, in %a, %a@." "Call mismatch: method %a has %i paramters but is called with %i arguments, in %a, %a@."
Typ.Procname.pp pname (List.length parameters) (List.length args) SourceFile.pp file Typ.Procname.pp pname (List.length parameters) (List.length args) SourceFile.pp file
Location.pp loc ; Location.pp loc ;

Loading…
Cancel
Save