From caba37621103136218c55ed490888534b77db4c9 Mon Sep 17 00:00:00 2001 From: Fabio Milano Date: Fri, 13 Sep 2019 09:38:02 -0700 Subject: [PATCH] [UIComponentContext] Added UIContext to mutable_local_variables whitelist Summary: We want to allow following declaration ``` CK::UIContext t(foo); ``` In this case t is only part of the scope and we don't want to check that is never mutated. Reviewed By: kfirapps Differential Revision: D17367040 fbshipit-source-id: 5312a1249 --- infer/src/al/ComponentKit.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/src/al/ComponentKit.ml b/infer/src/al/ComponentKit.ml index 2321ee619..b82c7ce63 100644 --- a/infer/src/al/ComponentKit.ml +++ b/infer/src/al/ComponentKit.ml @@ -108,7 +108,8 @@ let mutable_local_vars_advice context an = ; "FBTrackingNodeScope" ; "FBTrackingCodeScope" ; "CKComponentContext" - ; "CKComponentKey" ] + ; "CKComponentKey" + ; "UIContext" ] in let objc_whitelist = ["NSError"] in match get_referenced_type qual_type with