[compiler-rt] [asan][win][msvc] override new and delete and seperate TUs (PR #68754)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 16:50:07 PDT 2023


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 784a2cd561acf3cf532cf182221be0826b0ec6a1 d5668b27f7d79a6c75208430102c4307a9018f5b -- compiler-rt/lib/asan/asan_win_delete_array_align_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_delete_array_align_thunk.cpp compiler-rt/lib/asan/asan_win_delete_array_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_delete_array_size_align_thunk.cpp compiler-rt/lib/asan/asan_win_delete_array_size_thunk.cpp compiler-rt/lib/asan/asan_win_delete_array_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_align_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_align_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_size_align_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_size_thunk.cpp compiler-rt/lib/asan/asan_win_delete_scalar_thunk.cpp compiler-rt/lib/asan/asan_win_new_array_align_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_new_array_align_thunk.cpp compiler-rt/lib/asan/asan_win_new_array_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_new_array_thunk.cpp compiler-rt/lib/asan/asan_win_new_delete.cpp compiler-rt/lib/asan/asan_win_new_delete_thunk_common.h compiler-rt/lib/asan/asan_win_new_scalar_align_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_new_scalar_align_thunk.cpp compiler-rt/lib/asan/asan_win_new_scalar_nothrow_thunk.cpp compiler-rt/lib/asan/asan_win_new_scalar_thunk.cpp compiler-rt/lib/asan/asan_win_thunk_common.h compiler-rt/test/asan/TestCases/Windows/new_delete_mfc_already_defined.cpp compiler-rt/test/asan/TestCases/Windows/new_delete_mfc_already_defined_dbg.cpp compiler-rt/test/asan/TestCases/Windows/operator_delete_replacement_array.cpp compiler-rt/test/asan/TestCases/Windows/operator_delete_replacement_scalar.cpp compiler-rt/test/asan/TestCases/Windows/operator_new_delete_replacement_all.cpp compiler-rt/test/asan/TestCases/Windows/operator_new_delete_replacement_common.h compiler-rt/test/asan/TestCases/Windows/operator_new_delete_replacement_macros.h compiler-rt/test/asan/TestCases/Windows/operator_new_replacement_array.cpp compiler-rt/test/asan/TestCases/Windows/operator_new_replacement_scalar.cpp compiler-rt/lib/asan/asan_stack.h compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp compiler-rt/test/asan/TestCases/Windows/operator_new_uaf.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/compiler-rt/lib/asan/asan_win_new_delete.cpp b/compiler-rt/lib/asan/asan_win_new_delete.cpp
index be62ce7828fd..9024be167a84 100644
--- a/compiler-rt/lib/asan/asan_win_new_delete.cpp
+++ b/compiler-rt/lib/asan/asan_win_new_delete.cpp
@@ -12,12 +12,11 @@
 //===----------------------------------------------------------------------===//
 #include <stddef.h>
 
-#include "asan_win_thunk_common.h"
 #include "asan_allocator.h"
 #include "asan_internal.h"
 #include "asan_report.h"
 #include "asan_stack.h"
-
+#include "asan_win_thunk_common.h"
 
 using __asan_win_new_delete_data = __sanitizer::__asan_win_stack_data;
 
diff --git a/compiler-rt/lib/asan/asan_win_thunk_common.h b/compiler-rt/lib/asan/asan_win_thunk_common.h
index 2957de4dd3e2..5a9106cc4479 100644
--- a/compiler-rt/lib/asan/asan_win_thunk_common.h
+++ b/compiler-rt/lib/asan/asan_win_thunk_common.h
@@ -48,4 +48,4 @@ struct __asan_win_stack_data {
   __sanitizer::uptr caller_pc;
 };
 
-}
\ No newline at end of file
+}  // namespace __sanitizer
\ No newline at end of file

``````````

</details>


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


More information about the llvm-commits mailing list