From d13ae13a71ffc89582d41a8274b1bd7d2e349486 Mon Sep 17 00:00:00 2001 From: Sungkeun Cho Date: Thu, 17 Sep 2020 06:43:56 -0700 Subject: [PATCH] [pulse] Fix linting issue Reviewed By: jvillard Differential Revision: D23758187 fbshipit-source-id: 4d9f47e66 --- infer/src/clang/cTrans.ml | 2 +- infer/src/pulse/PulseModels.ml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/infer/src/clang/cTrans.ml b/infer/src/clang/cTrans.ml index 1e8ea3d6b..d5aa97ddf 100644 --- a/infer/src/clang/cTrans.ml +++ b/infer/src/clang/cTrans.ml @@ -2975,7 +2975,7 @@ module CTrans_funct (F : CModule_type.CFrontend) : CModule_type.CTranslation = s objCArrayDictLiteral_trans trans_state expr_info stmt_info stmts method_pointer - (** Translates an dictionary literal @ [ @"firstName": @"Foo", @"lastName":@"Bar" ] to + (** Translates an dictionary literal [@\[ @"firstName": @"Foo", @"lastName":@"Bar" \]] to {[ n$1=NSString.stringWithUTF8:(@"firstName") diff --git a/infer/src/pulse/PulseModels.ml b/infer/src/pulse/PulseModels.ml index 837fc9816..a2023e1c9 100644 --- a/infer/src/pulse/PulseModels.ml +++ b/infer/src/pulse/PulseModels.ml @@ -939,9 +939,9 @@ module ProcNameDispatcher = struct $--> StdFunction.assign ~desc:"std::function::operator=" ; +map_context_tenv (PatternMatch.Java.implements_lang "Object") &:: "clone" $ capt_arg_payload $--> JavaObject.clone - ; +map_context_tenv (PatternMatch.Java.implements_lang "System") + ; ( +map_context_tenv (PatternMatch.Java.implements_lang "System") &:: "arraycopy" $ capt_arg_payload $+ any_arg $+ capt_arg_payload - $+...$--> (fun src dest -> Misc.shallow_copy_model "System.arraycopy" dest src ) + $+...$--> fun src dest -> Misc.shallow_copy_model "System.arraycopy" dest src ) ; -"std" &:: "atomic" &:: "atomic" <>$ capt_arg_payload $+ capt_arg_payload $--> StdAtomicInteger.constructor ; -"std" &:: "__atomic_base" &:: "fetch_add" <>$ capt_arg_payload $+ capt_arg_payload @@ -1049,10 +1049,10 @@ module ProcNameDispatcher = struct ; +map_context_tenv PatternMatch.Java.implements_queue &::+ (fun _ str -> StringSet.mem str pushback_modeled) <>$ capt_arg_payload $+...$--> StdVector.push_back - ; +map_context_tenv( PatternMatch.Java.implements_lang "StringBuilder") + ; +map_context_tenv (PatternMatch.Java.implements_lang "StringBuilder") &::+ (fun _ str -> StringSet.mem str pushback_modeled) <>$ capt_arg_payload $+...$--> StdVector.push_back - ; +map_context_tenv( PatternMatch.Java.implements_lang "StringBuilder") + ; +map_context_tenv (PatternMatch.Java.implements_lang "StringBuilder") &:: "setLength" <>$ capt_arg_payload $+...$--> StdVector.invalidate_references ShrinkToFit ; +map_context_tenv (PatternMatch.Java.implements_lang "String") @@ -1078,7 +1078,7 @@ module ProcNameDispatcher = struct ; +map_context_tenv PatternMatch.Java.implements_enumeration &:: "hasMoreElements" &--> Misc.nondet ~fn_name:"Enumeration.hasMoreElements()" - ; +map_context_tenv( PatternMatch.Java.implements_lang "Object") + ; +map_context_tenv (PatternMatch.Java.implements_lang "Object") &:: "equals" &--> Misc.nondet ~fn_name:"Object.equals" ; +map_context_tenv (PatternMatch.Java.implements_lang "Iterable")