[ThreadSafety] Do not report on private C++ methods

Reviewed By: jberdine

Differential Revision: D5337791

fbshipit-source-id: 7ea95ab
master
Daiva Naudziuniene 8 years ago committed by Facebook Github Bot
parent c2f7ee9337
commit 8e91932be2

@ -1381,6 +1381,8 @@ let report_unsafe_accesses aggregated_access_map =
is_class_threadsafe)
&& should_report_on_proc pdesc tenv
| ObjC_Cpp objc_cpp ->
(* do not report if a procedure is private *)
Procdesc.get_access pdesc <> PredSymb.Private &&
(* report if the class has a mutex member *)
class_has_mutex_member objc_cpp tenv
| _ ->

@ -52,5 +52,7 @@ class LockGuard {
int suspiciously_written;
int not_guarded;
std::mutex mutex_;
int test2() { return suspiciously_read; }
};
}

Loading…
Cancel
Save