[PATCH] D50110: Handle shared release attributes correctly
Aaron Puchert via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 3 04:45:05 PDT 2018
aaronpuchert added inline comments.
================
Comment at: test/SemaCXX/warn-thread-safety-analysis.cpp:4081-4085
+ void unlockExclusive() EXCLUSIVE_UNLOCK_FUNCTION(mu_) {
+ mu_.Unlock();
+ }
+
+ void unlockShared() SHARED_UNLOCK_FUNCTION(mu_) {
----------------
aaron.ballman wrote:
> Nothing calls either of these functions within the test; is that intended?
Yes, I just wanted to check that there are no warnings within the functions. Before the changes in `lib/Analysis/ThreadSafety.cpp`, we would get a warning "releasing mutex 'mu' using shared access, expected exclusive access" on line 4086.
My changes address the attributes on the function being analyzed, not on a function that is called from the function being analyzed.
Repository:
rC Clang
https://reviews.llvm.org/D50110
More information about the cfe-commits
mailing list