================
@@ -0,0 +1,11 @@
+// RUN: %clang -std=c++17 %s 2>&1 | FileCheck %s --check-prefix=NO-TSAN
--allow-empty
+// RUN: %clang -std=c++17 -fsanitize=thread %s 2>&1 | FileCheck %s
--check-prefix=WITH-TSAN
+
+// WITH-TSAN: `std::atomic_thread_fence` is not supported with
`-fsanitize=thread`
+// NO-TSAN-NOT: `std::atomic_thread_fence` is not supported with
`-fsanitize=thread`
+
+#include <atomic>
----------------
AaronBallman wrote:
Please do not include system headers; that makes the test non-hermetic.
Instead, manually add just the declarations needed for the test case.
Some other test cases to add: use of `no_sanitize("thread")` and
`no_sanitize_thread` attributes on the function using `atomic_thread_fence`.
https://github.com/llvm/llvm-project/pull/166542
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits