lhchavez added inline comments.
Comment at: include/__mutex_base:65
void unlock() _NOEXCEPT
_LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+#ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
+const mutex& operator!() const { return *this; }
mclow.lists added inline comments.
Comment at: include/__mutex_base:65
void unlock() _NOEXCEPT
_LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+#ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
+const mutex& operator!() const { return *this; }
We
lhchavez created this revision.
Herald added a reviewer: EricWF.
Herald added a subscriber: cfe-commits.
This adds clang negative thread safery assertion support to std::mutex,
as documented in:
https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
Fixes #34951.
Repository:
rCXX libc++