[patternmatch] fix wrong regexp in getter detection

Summary: The regexp would match `ge` and is also unnecessary and was compiled on every call. Save some cpu cycles while fixing it.

Reviewed By: jvillard

Differential Revision: D17789586

fbshipit-source-id: a3f6612c6
master
Nikos Gorogiannis 5 years ago committed by Facebook Github Bot
parent 6cfbd38355
commit 615100e55e

@ -233,9 +233,7 @@ let get_vararg_type_names tenv (call_node : Procdesc.Node.t) (ivar : Pvar.t) : s
type_names [] call_node type_names [] call_node
let is_getter pname_java = let is_getter pname_java = String.is_prefix ~prefix:"get" (Typ.Procname.Java.get_method pname_java)
Str.string_match (Str.regexp "get*") (Typ.Procname.Java.get_method pname_java) 0
let type_is_class typ = let type_is_class typ =
match typ.Typ.desc with match typ.Typ.desc with

Loading…
Cancel
Save