[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability

2018-08-25 Thread Aaron Puchert via Phabricator via cfe-commits
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 d

[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability

2018-08-24 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Sure. As I wrote in the commit message, I'm not sure about it myself, but I think it's worth a discussion. Maybe I should have tagged it as RFC. Releasable scopes need a way of knowing whether the lock is currently held to prevent double unlocking in the destructor

[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability

2018-08-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not certain how I feel about this as it seems to be removing functionality users may be relying on that I think is still technically correct. Can you describe more about why you think this should change? Repository: rC Clang https://reviews.llvm.org/D51187

[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability

2018-08-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: delesley, aaron.ballman. Herald added a subscriber: cfe-commits. We now warn when acquiring or releasing a scoped capability a second time, not just if the underlying mutexes have been acquired or released a second time. It's debata