[PATCH] D14731: [libcxx] Add clang thread safety annotations to mutex and lock_guard

James Robinson via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 15 19:20:18 PDT 2016


jamesr added a comment.

In http://reviews.llvm.org/D14731#376138, @EricWF wrote:

> So this LGTM except for one last change (I'm sorry). LIT now knows when "-Werror=thread-safety" is being passed. Could you change the tests guarded by "#if !defined(__clang__) || !__has_attribute(aquire_capability)` to say "// REQUIRES: thread-safety" instead? I prefer using LIT to manage when tests run because it can report un-run tests where simply using macros cant.
>
> After that LGTM.


If I do that, does that mean I can omit the extra main()s, etc, and the LIT harness will avoid attempting the test at all when the feature bit is set?


http://reviews.llvm.org/D14731





More information about the cfe-commits mailing list