This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add clang negative thread safety assertions to std::mutex
AbandonedPublic

Authored by lhchavez on Dec 21 2017, 9:22 AM.

Details

Summary

This adds clang negative thread safery assertion support to std::mutex,
as documented in:

https://clang.llvm.org/docs/ThreadSafetyAnalysis.html

Fixes #34951.

Event Timeline

lhchavez created this revision.Dec 21 2017, 9:22 AM
mclow.lists added inline comments.Dec 21 2017, 11:17 AM
include/__mutex_base
65

We don't get to add public member functions to classes defined in the standard - at least not ones with pronounceable names.

lhchavez added inline comments.Dec 21 2017, 2:15 PM
include/__mutex_base
65

So there's no way to support negative assertions as stated in the docs? That's unfortunate :(

lhchavez abandoned this revision.Dec 22 2017, 8:38 AM