[threadsafety] Don't warn autogenerated methods (containing '$' in proc name)

Reviewed By: sblackshear

Differential Revision: D4037106

fbshipit-source-id: 35c0a2f
master
Peter O'Hearn 8 years ago committed by Facebook Github Bot
parent 2601af5ade
commit b1e9267e08

@ -430,6 +430,13 @@ let java_is_access_method =
| _ => false;
/** Check if the procedure name is of an auto-generated method containing '$'. */
let java_is_autogen_method =
fun
| Java js => String.contains js.method_name '$'
| _ => false;
/** Check if the proc name has the type of a java vararg.
Note: currently only checks that the last argument has type Object[]. */
let java_is_vararg =

@ -193,6 +193,10 @@ let java_get_parameters_as_strings: java => list string;
let java_is_access_method: t => bool;
/** Check if the procedure name is of an auto-generated method containing '$'. */
let java_is_autogen_method: t => bool;
/** Check if the procedure belongs to an anonymous inner class. */
let java_is_anonymous_inner_class: t => bool;

@ -110,6 +110,7 @@ module ResultsTableType = Map.Make (struct
end)
let should_analyze_proc (_,_,proc_name,proc_desc) =
not (Procname.java_is_autogen_method proc_name) &&
not (Procname.is_constructor proc_name) &&
not (Procname.is_class_initializer proc_name) &&
Cfg.Procdesc.get_access proc_desc <> PredSymb.Private

Loading…
Cancel
Save