[compiler-rt] [rtsan][test] Prevent test check from being optimized out in LTO builds (PR #122524)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 13:02:56 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 3b0dafff87adf10480376a81f5c554857ea73ec7 2b868ed501c061732f6d9990f4bf38324ae48c9c --extensions cpp -- compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp
index 40c4f3b129..e05d7ae78b 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp
@@ -146,8 +146,7 @@ TEST(TestRtsan, LaunchingAThreadDiesWhenRealtime) {
namespace {
void InvokeStdFunction(std::function<void()> &&function) { function(); }
-template <typename T>
-void HideMemoryFromCompiler(T* memory) {
+template <typename T> void HideMemoryFromCompiler(T *memory) {
// Pass the pointer to an empty assembly block as an input, and inform
// the compiler that memory is read to and possibly modified. This should not
// be architecture specific, since the asm block is empty.
``````````
</details>
https://github.com/llvm/llvm-project/pull/122524
More information about the llvm-commits
mailing list