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

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 5 07:54:48 PST 2025


================
@@ -1769,3 +1769,5 @@ def ExplicitSpecializationStorageClass : DiagGroup<"explicit-specialization-stor
 
 // A warning for options that enable a feature that is not yet complete
 def ExperimentalOption : DiagGroup<"experimental-option">;
+
+def TSan : DiagGroup<"tsan">;
----------------
AaronBallman wrote:

Given that this is only needed for a single diagnostic, I would skip making a group entirely and just use an inline group in `DiagnosticSemaKinds.td`. As for the string we expose for the group name, I think consistency with GCC is more useful; the `sanitize-address` group is for controlling remarks rather than warnings anyway.

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


More information about the cfe-commits mailing list