jamesr added a comment.

Ah, that's true.  I didn't think of that case.  With the design of these 
annotations the author of that function would have to disable checks in each 
piece of code that uses these patterns.

What about adding a different guard for these annotations in libc++ that 
consumers could choose to toggle independently of the -Wthread-safety compiler 
option?  That way consumers could choose to enable the libc++ annotations if 
their codebase was compatible with them.  The alternative is that consumers 
have to fully wrap the std:: types in their own types to add the annotations 
which works but makes code reuse very difficult.


http://reviews.llvm.org/D14731



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

Reply via email to