From 42663606067814a8b8210692172ee88dd8bb92c5 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 16 May 2017 10:16:43 -0700 Subject: [PATCH] [build] taking the .mli into account actually broke the build Summary: oops_house Reviewed By: mbouaziz Differential Revision: D5070159 fbshipit-source-id: ba9232e --- infer/src/clang/ctl_parser_types.ml | 62 ++++++++++++++-------------- infer/src/clang/ctl_parser_types.mli | 42 ++++++++++++++++++- 2 files changed, 71 insertions(+), 33 deletions(-) diff --git a/infer/src/clang/ctl_parser_types.ml b/infer/src/clang/ctl_parser_types.ml index d64dab5ef..8eb41faa7 100644 --- a/infer/src/clang/ctl_parser_types.ml +++ b/infer/src/clang/ctl_parser_types.ml @@ -46,39 +46,39 @@ let mode_const = "mode" exception ALParsingException of string -(* Data structures for type parser. - Correspondence with clang types inferred from - StringRef BuiltinType::getName in - https://clang.llvm.org/doxygen/Type_8cpp_source.html +(** Data structures for type parser. + Correspondence with clang types inferred from + StringRef BuiltinType::getName in + https://clang.llvm.org/doxygen/Type_8cpp_source.html *) type builtin_kind = - | Void (* void *) - | Bool (* bool *) - | Char_U (* char *) - | UChar (* unsigned char *) - | WChar_U (* wchar_t *) - | Char16 (* char16_t *) - | Char32 (* char32_t *) - | UShort (* unsigned short *) - | UInt (* unsigned int *) - | ULong (* unsigned long *) - | ULongLong (* unsigned long long *) - | Int128 (* __int128 *) - | UInt128 (* unsigned __int128 *) - | SChar (* signed char *) - | Short (* short *) - | Int (* int *) - | Long (* long *) - | LongLong (* long long *) - | Half (* half of __fp16 *) - | Float (* float *) - | Double (* double *) - | LongDouble (* long double *) - | Float128 (* __float128 *) - | NullPtr (* nullptr_t *) - | ObjCId (* id *) - | ObjCClass (* Class *) - | ObjCSel (* SEL *) + | Void (** void *) + | Bool (** bool *) + | Char_U (** char *) + | UChar (** unsigned char *) + | WChar_U (** wchar_t *) + | Char16 (** char16_t *) + | Char32 (** char32_t *) + | UShort (** unsigned short *) + | UInt (** unsigned int *) + | ULong (** unsigned long *) + | ULongLong (** unsigned long long *) + | Int128 (** __int128 *) + | UInt128 (** unsigned __int128 *) + | SChar (** signed char *) + | Short (** short *) + | Int (** int *) + | Long (** long *) + | LongLong (** long long *) + | Half (** half of __fp16 *) + | Float (** float *) + | Double (** double *) + | LongDouble (** long double *) + | Float128 (** __float128 *) + | NullPtr (** nullptr_t *) + | ObjCId (** id *) + | ObjCClass (** Class *) + | ObjCSel (** SEL *) (* | OCLSampler | OCLEvent | OCLClkEvent | OCLQueue | OCLNDRange | OCLReserveID | Dependent | Overload | BoundMember | PseudoObject | UnknownAny | BuiltinFn | ARCUnbridgedCast | OMPArraySection *) diff --git a/infer/src/clang/ctl_parser_types.mli b/infer/src/clang/ctl_parser_types.mli index af63a17a1..c25a444a3 100644 --- a/infer/src/clang/ctl_parser_types.mli +++ b/infer/src/clang/ctl_parser_types.mli @@ -27,6 +27,44 @@ val suggestion_const : string val severity_const : string val mode_const : string -type abs_ctype +(** Data structures for type parser. + Correspondence with clang types inferred from + StringRef BuiltinType::getName in + https://clang.llvm.org/doxygen/Type_8cpp_source.html +*) +type builtin_kind = + | Void (** void *) + | Bool (** bool *) + | Char_U (** char *) + | UChar (** unsigned char *) + | WChar_U (** wchar_t *) + | Char16 (** char16_t *) + | Char32 (** char32_t *) + | UShort (** unsigned short *) + | UInt (** unsigned int *) + | ULong (** unsigned long *) + | ULongLong (** unsigned long long *) + | Int128 (** __int128 *) + | UInt128 (** unsigned __int128 *) + | SChar (** signed char *) + | Short (** short *) + | Int (** int *) + | Long (** long *) + | LongLong (** long long *) + | Half (** half of __fp16 *) + | Float (** float *) + | Double (** double *) + | LongDouble (** long double *) + | Float128 (** __float128 *) + | NullPtr (** nullptr_t *) + | ObjCId (** id *) + | ObjCClass (** Class *) + | ObjCSel (** SEL *) -val tmp_c_type_equal : ?name_c_type : string -> Clang_ast_t.c_type -> abs_ctype -> bool +type abs_ctype = + | BuiltIn of builtin_kind + | Pointer of abs_ctype + +val tmp_c_type_equal : Clang_ast_t.c_type -> abs_ctype -> bool + +val abs_ctype_to_string : abs_ctype -> string