[PATCH] D28520: Disable -Wthread-safety-analysis for some functions in __thread_support
Delesley Hutchins via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 17 14:41:01 PST 2017
delesley added a comment.
Sorry about the slow response. My main concern here is that the thread safety analysis was designed for use with a library that wraps the system mutex in a separate Mutex class. We did that specifically to avoid breaking anything; code has to opt-in to the static checking by defining and using a Mutex class, and the API of that class is restricted to calls that can be easily checked via annotations. Including attributes directly in the standard library has the potential to cause lots of breakage and false positives.
Is there some way to control the #ifdefs so that the annotations are turned off by default for everyone except possibly freebsd, but there's still a way to turn them on for users who want to see the warnings? I'm not a libcxx expert.
More information about the cfe-commits