[clang] [Clang] Warn when `std::atomic_thread_fence` is used with `fsanitize=thread` (PR #166542)

Benjamin Stott via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 28 01:58:23 PST 2025


BStott6 wrote:

> I appreciate the effort you've put into this @BStott6; are you using `atomic_thread_fence` in a way that gives false positives? Perhaps I can try to add support for them in TSan (it looks like someone has a workaround here for now: https://stackoverflow.com/a/70543751)

[This](https://github.com/llvm/llvm-project/issues/52942) issue documents false positives when using `atomic_thread_fence`. Supporting it in TSan would be the best solution, then this PR can be closed.

https://github.com/llvm/llvm-project/pull/166542


More information about the cfe-commits mailing list