aaronpuchert added a comment.

The case distinction in `case attr::AcquireCapability` is not very beautiful, 
but it's due to the fact that scoped capabilities are not "real" capabilities 
and so we need to distinguish them.

What this still doesn't allow for is attributes on other classes than the 
scoped capability that reacquire it from the outside. So maybe this isn't the 
right solution, and we need to approach it in a different way. Maybe instead of 
modifying the `BuildLockset::handleCall`, we should change 
`ThreadSafetyAnalyzer::addLock`. I'll think about that, but not today.



================
Comment at: test/SemaCXX/warn-thread-safety-analysis.cpp:2769-2781
+class SCOPED_LOCKABLE MemberLock {
+ public:
+  MemberLock() EXCLUSIVE_LOCK_FUNCTION(mutex);
+  ~MemberLock() UNLOCK_FUNCTION(mutex);
+  void Lock() EXCLUSIVE_LOCK_FUNCTION(mutex);
+  Mutex mutex;
+};
----------------
@hokein This is your test case, I just renamed some things.


Repository:
  rC Clang

https://reviews.llvm.org/D49885



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to