From f83927f0d72aad3b0d02019c32ea15b73e76a9ee Mon Sep 17 00:00:00 2001 From: Andrzej Kotulski Date: Thu, 17 Dec 2015 05:00:12 -0800 Subject: [PATCH] Don't set is_objc_instance_method=true for any C++ methods Summary: public There was one oversight that caused frontend to mark C++ method as objc instance method. Reviewed By: dulmarod Differential Revision: D2769060 fb-gh-sync-id: d7a92bc --- infer/src/clang/cMethod_decl.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infer/src/clang/cMethod_decl.ml b/infer/src/clang/cMethod_decl.ml index 1deeaf268..e1616bc34 100644 --- a/infer/src/clang/cMethod_decl.ml +++ b/infer/src/clang/cMethod_decl.ml @@ -87,7 +87,8 @@ struct | Some body -> let is_instance = CMethod_signature.ms_is_instance ms in let procname = CMethod_signature.ms_get_name ms in - if CMethod_trans.create_local_procdesc cfg tenv ms [body] [] is_instance then + let is_objc_inst_method = is_instance && is_objc in + if CMethod_trans.create_local_procdesc cfg tenv ms [body] [] is_objc_inst_method then add_method tenv cg cfg curr_class procname [body] is_objc [] None extra_instrs | None -> ()