From bb5518b221d372ca041507b088d20496ffbb2e16 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Thu, 25 Oct 2018 14:47:59 -0700 Subject: [PATCH] [infer] no need to store the procedure attributes for the Java methods Reviewed By: mbouaziz Differential Revision: D10520956 fbshipit-source-id: f505d9bc2 --- infer/src/IR/SpecializeProcdesc.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/infer/src/IR/SpecializeProcdesc.ml b/infer/src/IR/SpecializeProcdesc.ml index 7b4e0fee4..d5e6160a4 100644 --- a/infer/src/IR/SpecializeProcdesc.ml +++ b/infer/src/IR/SpecializeProcdesc.ml @@ -174,7 +174,10 @@ let with_formals_types ?(has_clang_model = false) callee_pdesc resolved_pname ar in let resolved_proc_desc = Procdesc.from_proc_attributes resolved_attributes in let resolved_proc_desc = with_formals_types_proc callee_pdesc resolved_proc_desc substitutions in - Attributes.store ~proc_desc:(Some resolved_proc_desc) resolved_attributes ; + (* The attributes here are used to retrieve the per-file type environment for Clang languages. + The analysis for Java is using a global type environment *) + if not (Typ.Procname.is_java resolved_pname) then + Attributes.store ~proc_desc:(Some resolved_proc_desc) resolved_attributes ; resolved_proc_desc