delesley added a comment.

In https://reviews.llvm.org/D51187#1241354, @aaronpuchert wrote:

> Thanks for pointing out my error! Ignoring the implementation for a moment, 
> do you think this is a good idea or will it produce too many false positives? 
> Releasable/relockable scoped capabilities that I have seen keep track of the 
> status, so it makes sense, but maybe there are others out there.


I think this is probably a good idea.  Code which manipulates the underlying 
mutex while it is being managed by another object is a recipe for trouble.  
It's hard for me to guess how many false positives it will generate without 
actually running it over our code base, which I personally don't have time to 
do right now.  It should definitely go in -Wthread-safety-beta so it won't 
break the build.  Unfortunately, the before/after checks are still in 
thread-safety-beta, and they should really be moved out of beta before 
something else is moved in.  The good news is that Matthew O'Niel just 
volunteered to do that.  That is, unfortunately, not a trivial operation, so it 
may be some weeks before he's done.


Repository:
  rC Clang

https://reviews.llvm.org/D51187



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

Reply via email to