[racerd] add support for folly's synchronized() {}

Summary: Folly has a macro SYNCHRONIZED(..) {...} which boils down to the creation/destruction of a LockedPtr object, doing the locking/unlocking.  Add support for that.

Reviewed By: sblackshear

Differential Revision: D7844847

fbshipit-source-id: c7a146d
master
Nikos Gorogiannis 7 years ago committed by Facebook Github Bot
parent bef38bbf1a
commit 96c6ff718b

@ -72,7 +72,9 @@ module Models = struct
in in
let matcher_lock_constructor = let matcher_lock_constructor =
QualifiedCppName.Match.of_fuzzy_qual_names QualifiedCppName.Match.of_fuzzy_qual_names
["std::lock_guard::lock_guard"; "std::unique_lock::unique_lock"] [ "std::lock_guard::lock_guard"
; "std::unique_lock::unique_lock"
; "folly::LockedPtr::LockedPtr" ]
in in
fun pname actuals -> fun pname actuals ->
QualifiedCppName.Match.match_qualifiers matcher_lock (Typ.Procname.get_qualifiers pname) QualifiedCppName.Match.match_qualifiers matcher_lock (Typ.Procname.get_qualifiers pname)
@ -92,7 +94,8 @@ module Models = struct
; "std::lock_guard::~lock_guard" ; "std::lock_guard::~lock_guard"
; "std::mutex::unlock" ; "std::mutex::unlock"
; "std::unique_lock::unlock" ; "std::unique_lock::unlock"
; "std::unique_lock::~unique_lock" ] ; "std::unique_lock::~unique_lock"
; "folly::LockedPtr::~LockedPtr" ]
in in
fun pname -> fun pname ->
QualifiedCppName.Match.match_qualifiers matcher (Typ.Procname.get_qualifiers pname) QualifiedCppName.Match.match_qualifiers matcher (Typ.Procname.get_qualifiers pname)

Loading…
Cancel
Save