From 315db072acfa74b5261a4ac0014fae9e047ad921 Mon Sep 17 00:00:00 2001 From: Varun Arora Date: Mon, 5 Feb 2018 10:11:08 -0800 Subject: [PATCH] [clang] change CTrans_utils.Self.SelfClassException to use new CFrontend_config.ocaml_pos type instead of raw tuple Summary: There's a new `ocaml_pos` type that the other clang frontend exceptions use, but Self.SelfClassException still used the raw tuple. Now, SelfClassException also uses this type. Reviewed By: dulmarod Differential Revision: D6900258 fbshipit-source-id: 94c7042 --- infer/src/clang/cFrontend_config.ml | 1 + infer/src/clang/cTrans_utils.ml | 2 +- infer/src/clang/cTrans_utils.mli | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/src/clang/cFrontend_config.ml b/infer/src/clang/cFrontend_config.ml index 95e303b8e..8c4bfb7f4 100644 --- a/infer/src/clang/cFrontend_config.ml +++ b/infer/src/clang/cFrontend_config.ml @@ -39,6 +39,7 @@ exception IncorrectAssumption of exception_details let incorrect_assumption position source_range ?ast_node fmt = F.kasprintf (fun msg -> raise (IncorrectAssumption {msg; position; source_range; ast_node})) fmt + type translation_unit_context = {lang: clang_lang; source_file: SourceFile.t} (** Constants *) diff --git a/infer/src/clang/cTrans_utils.ml b/infer/src/clang/cTrans_utils.ml index 444c24b7e..a1d557fa5 100644 --- a/infer/src/clang/cTrans_utils.ml +++ b/infer/src/clang/cTrans_utils.ml @@ -584,7 +584,7 @@ let extract_stmt_from_singleton stmt_list warning_string = module Self = struct exception SelfClassException of { class_name: Typ.Name.t - ; position: string * int * int * int + ; position: CFrontend_config.ocaml_pos ; source_range: Clang_ast_t.source_range } let add_self_parameter_for_super_instance context procname loc mei = diff --git a/infer/src/clang/cTrans_utils.mli b/infer/src/clang/cTrans_utils.mli index a89d00aaf..cd7f52a6d 100644 --- a/infer/src/clang/cTrans_utils.mli +++ b/infer/src/clang/cTrans_utils.mli @@ -158,7 +158,7 @@ end module Self : sig exception SelfClassException of { class_name: Typ.Name.t - ; position: string * int * int * int + ; position: CFrontend_config.ocaml_pos ; source_range: Clang_ast_t.source_range } val add_self_parameter_for_super_instance :