[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Aug 25 12:52:15 PDT 2018
aaronpuchert updated this revision to Diff 162562.
aaronpuchert added a comment.
Use Locked flag to determine whether to unlock on destruction
Instead of unlocking the mutexes that are still available while not complaining about those that aren't, we use the status of the scoped capability to determine whether to unlock the underlying mutexes.
This way we will attempt to unlock the mutex even if the user unlocked it manually, warning if it is no longer available, and we will not attempt to unlock if we are already released, hence warning if it is manually acquired again.
Repository:
rC Clang
https://reviews.llvm.org/D51187
Files:
lib/Analysis/ThreadSafety.cpp
test/SemaCXX/warn-thread-safety-analysis.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51187.162562.patch
Type: text/x-patch
Size: 8300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180825/1f00a07c/attachment.bin>
More information about the cfe-commits
mailing list