From 2caaa97d2a699d90b04d062deba90b1c97783828 Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Tue, 18 Aug 2020 03:02:58 -0700 Subject: [PATCH] [minor] fix doc comment in cTrans.ml Summary: There was a syntax error in the comment as `[code]` is interpreted as code but backticks were used instead. This made `ocamlformat` produce a warning but no error. Reviewed By: skcho Differential Revision: D23167273 fbshipit-source-id: a7fad10d5 --- infer/src/clang/cTrans.ml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index fad27c469..5a78d2f6f 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -2873,16 +2873,18 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s objCArrayDictLiteral_trans trans_state expr_info stmt_info stmts method_pointer - (** Translates an array literal `NSArray* a = @ [ @2, @3 ];` to + (** Translates an array literal [NSArray* a = @\[ @2, @3 \];] to - n$1=NSNumber.numberWithInt:(2:int) - n$2=NSNumber.numberWithInt:(3:int) - temp[0]:objc_object*=n$1 - temp[1]:objc_object*=n$2 - n$3=NSArray.arrayWithObjects:count:(temp:objc_object* const [2*8],2:int) - a:NSArray*=n$3 - - where `temp` is an additional local variable declared as array. *) + {[ + n$1=NSNumber.numberWithInt:(2:int) + n$2=NSNumber.numberWithInt:(3:int) + temp[0]:objc_object*=n$1 + temp[1]:objc_object*=n$2 + n$3=NSArray.arrayWithObjects:count:(temp:objc_object* const [2*8],2:int) + a:NSArray*=n$3 + ]} + + where [temp] is an additional local variable declared as array. *) and objCArrayLiteral_arrayWithObjects_count_trans ({context= {procdesc; tenv; translation_unit_context} as context} as trans_state) expr_info stmt_info stmts (decl_info, objects_qual_typ) method_pointer =