Module Nullsafe.TypeCheck

type check_return_type = IR.Procdesc.t -> IR.Typ.t -> IR.Typ.t option -> IBase.Location.t -> unit
type find_canonical_duplicate = IR.Procdesc.Node.t -> IR.Procdesc.Node.t
type checks = {
eradicate : bool;
check_ret_type : check_return_type list;
}
type typecheck_result = {
normal_flow_typestate : TypeState.t option;

Typestate at the exit of the node. None if node is determined dead end (e.g. noreturn function). Will be passed to all output nodes of the current node.

exception_flow_typestates : TypeState.t list;

If an exception might be thrown after this node, this list should contain all possible states at which the exception can be thrown. (Can be several states because different instructions in the single node can potentially throw). These typestates (joined together) will be passed to all "exception output" nodes of the current node.

}
val typecheck_node : Absint.IntraproceduralAnalysis.t -> bool IStdlib.IStd.ref -> checks -> IDEnv.t -> find_canonical_duplicate -> AnnotatedSignature.t -> TypeState.t -> IR.Procdesc.Node.t -> IBase.LineReader.t -> typecheck_result

Main entry point. Typecheck the CFG node given input typestate, and report issues, if found