[thread-safety][c++] Skip destructors

Summary:
The concurrency analyzer often does not understand object lifetimes
well enough to realize that destructors are usually not called in
parallel with any other methods. This leads to false alarms. This diff
suppresses these by simply skipping destructors in the concurrency
analysis.

Reviewed By: sblackshear

Differential Revision: D6182646

fbshipit-source-id: e9d1cac
master
Josh Berdine 7 years ago committed by Facebook Github Bot
parent c2a67bb300
commit bb0a42d25d

@ -558,8 +558,9 @@ module TransferFunctions (CFG : ProcCfg.S) = struct
["folly::AtomicStruct::load"; "folly::detail::SingletonHolder::createInstance"])
in
fun pname ->
QualifiedCppName.Match.match_qualifiers (Lazy.force matcher)
(Typ.Procname.get_qualifiers pname)
Typ.Procname.is_destructor pname
|| QualifiedCppName.Match.match_qualifiers (Lazy.force matcher)
(Typ.Procname.get_qualifiers pname)
let get_summary caller_pdesc callee_pname actuals callee_loc tenv =

Loading…
Cancel
Save