Module ClangFrontend.CContext

module StmtMap = ClangPointers.Map
type curr_class =
| ContextClsDeclPtr of int
| ContextNoCls
val compare_curr_class : curr_class -> curr_class -> int
type str_node_map = (string, IR.Procdesc.Node.t) IStdlib.IStd.Caml.Hashtbl.t
type t = {
translation_unit_context : CFrontend_config.translation_unit_context;
tenv : IR.Tenv.t;
cfg : IR.Cfg.t;
procdesc : IR.Procdesc.t;
immediate_curr_class : curr_class;
return_param_typ : IR.Typ.t option;
outer_context : t option;

in case of objc blocks, the context of the method containing the block

mutable blocks_static_vars : (IR.Pvar.t * IR.Typ.t) list IR.Procname.Map.t;
label_map : str_node_map;
vars_to_destroy : ATDGenerated.Clang_ast_t.decl list StmtMap.t;

mapping from a statement to a list of variables, that go out of scope after the end of the statement

temporary_names : (ATDGenerated.Clang_ast_t.pointerIR.Pvar.t * IR.Typ.t) IStdlib.IStd.Caml.Hashtbl.t;
temporaries_constructor_markers : (IR.Pvar.t * IR.Typ.t) IR.Exp.Map.t;

In order to know when to destruct C++ temporaries created in expressions containing conditionals (e.g. to hold the object created by X() in b?foo(X()):goo()), we associate "markers" to each one of them, set to true if and only if the temporary has been created. This is the map associating each such C++ temporary with its marker variable.

}
val get_curr_class : t -> curr_class
val get_curr_class_typename : ATDGenerated.Clang_ast_t.stmt_info -> t -> IR.Typ.Name.t
val get_curr_class_decl_ptr : ATDGenerated.Clang_ast_t.stmt_info -> curr_class -> ATDGenerated.Clang_ast_t.pointer
val is_objc_method : t -> bool
val is_objc_class_method : t -> bool
val create_context : CFrontend_config.translation_unit_context -> IR.Tenv.t -> IR.Cfg.t -> IR.Procdesc.t -> curr_class -> IR.Typ.t option -> t option -> ATDGenerated.Clang_ast_t.decl list StmtMap.t -> t
val add_block_static_var : t -> IR.Procname.t -> (IR.Pvar.t * IR.Typ.t) -> unit
val get_outer_procname : t -> IR.Procname.t