[compiler-rt] [win/asan] Avoid warnings in compiling interception_win_test.cpp. (PR #116887)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 20 02:37:44 PST 2024


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 47ef5c4b7f85bc1c8a859d721db9fd1dde7b8d8e 5091eeaadede71641928d7557b4702054c722007 --extensions cpp -- compiler-rt/lib/interception/tests/interception_win_test.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/interception/tests/interception_win_test.cpp b/compiler-rt/lib/interception/tests/interception_win_test.cpp
index 17ff514577..fcf9abc585 100644
--- a/compiler-rt/lib/interception/tests/interception_win_test.cpp
+++ b/compiler-rt/lib/interception/tests/interception_win_test.cpp
@@ -230,7 +230,7 @@ const u8 kUnpatchableCode6[] = {
     0x90, 0x90, 0x90, 0x90,
 };
 
-#if SANITIZER_WINDOWS64
+#      if SANITIZER_WINDOWS64
 const u8 kUnpatchableCode7[] = {
     0x33, 0xc0,                     // xor     eax,eax
     0x48, 0x85, 0xd2,               // test    rdx,rdx
@@ -252,9 +252,9 @@ const u8 kUnpatchableCode9[] = {
     0x84, 0xc0,                     // test    al,al
     0x75, 0xf7,                     // jne     -9  (unpatchable)
 };
-#endif
+#      endif
 
-#if SANITIZER_WINDOWS64
+#      if SANITIZER_WINDOWS64
 const u8 kPatchableCode6[] = {
     0x48, 0x89, 0x54, 0x24, 0xBB, // mov QWORD PTR [rsp + 0xBB], rdx
     0x33, 0xC9,                   // xor ecx,ecx
@@ -289,9 +289,9 @@ const u8 kPatchableCode11[] = {
     0x48, 0x83, 0xec, 0x38,         // sub     rsp,38h
     0x83, 0x64, 0x24, 0x28, 0x00,   // and     dword ptr [rsp+28h],0
 };
-#endif
+#      endif
 
-#if !SANITIZER_WINDOWS64
+#      if !SANITIZER_WINDOWS64
 const u8 kPatchableCode12[] = {
     0x55,                           // push    ebp
     0x53,                           // push    ebx
@@ -307,7 +307,7 @@ const u8 kPatchableCode13[] = {
     0x56,                           // push    esi
     0x8b, 0x5c, 0x24, 0x14,         // mov     ebx,dword ptr[esp+14h]
 };
-#endif
+#      endif
 
 const u8 kPatchableCode14[] = {
     0x55,                           // push    ebp

``````````

</details>


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


More information about the llvm-commits mailing list