[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities
Delesley Hutchins via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 4 15:21:23 PDT 2018
delesley added inline comments.
================
Comment at: lib/Analysis/ThreadSafety.cpp:893
private:
- SmallVector<const til::SExpr *, 4> UnderlyingMutexes;
+ enum UnderlyingCapabilityKind {
+ UCK_Acquired, ///< Any kind of acquired capability.
----------------
aaronpuchert wrote:
> delesley wrote:
> > IMHO, it would make more sense to break this into two properties (or bits): acquired/released and shared/exclusive.
> We don't use the information (shared/exclusive) for acquired locks, but we need two bits anyway, so why not.
The normal unlock doesn't distinguish between shared/exclusive, but there is a release_shared_capability which does...
Repository:
rC Clang
https://reviews.llvm.org/D52578
More information about the cfe-commits
mailing list