[PATCH] D28520: Disable -Wthread-safety-analysis for some functions in __thread_support

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 17 13:30:56 PST 2017

dim added inline comments.

Comment at: include/__threading_support:43
+#if defined(__clang__) && __has_attribute(acquire_capability)
+#define _LIBCPP_THREAD_SAFETY_ATTRIBUTE(x) __attribute__((x))
I think the least intrusive way would be to add a `defined(__FreeBSD__)` here, as that is the only OS with thread annotations for pthread functions, as far as I know.

The alternative is to turn off the capability annotations for `__libcpp_mutex_t` again, and use the `no_thread_safety_analysis` annotation for the functions.

Any particular preference?


More information about the cfe-commits mailing list