[compiler-rt] [compiler-rt][UBSan][NFC] Reorder includes per coding standard (PR #195435)

via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 02:04:12 PDT 2026


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 origin/main HEAD --extensions cpp,h -- compiler-rt/lib/ubsan/ubsan_diag.cpp compiler-rt/lib/ubsan/ubsan_diag.h compiler-rt/lib/ubsan/ubsan_flags.cpp compiler-rt/lib/ubsan/ubsan_init.cpp compiler-rt/lib/ubsan/ubsan_init_standalone.cpp compiler-rt/lib/ubsan/ubsan_init_standalone_preinit.cpp compiler-rt/lib/ubsan/ubsan_signals_standalone.cpp compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp compiler-rt/lib/ubsan/ubsan_value.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/compiler-rt/lib/ubsan/ubsan_init.cpp b/compiler-rt/lib/ubsan/ubsan_init.cpp
index 334e2d8c7..254e47402 100644
--- a/compiler-rt/lib/ubsan/ubsan_init.cpp
+++ b/compiler-rt/lib/ubsan/ubsan_init.cpp
@@ -12,9 +12,9 @@
 
 #include "ubsan_platform.h"
 #if CAN_SANITIZE_UB
-#include "ubsan_init.h"
 #include "ubsan_diag.h"
 #include "ubsan_flags.h"
+#include "ubsan_init.h"
 
 #include "sanitizer_common/sanitizer_common.h"
 #include "sanitizer_common/sanitizer_interface_internal.h"
diff --git a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp
index 965c9a8cf..8b216a747 100644
--- a/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp
+++ b/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cpp
@@ -15,8 +15,8 @@
 #include "ubsan_type_hash.h"
 
 #include "sanitizer_common/sanitizer_common.h"
-#include "sanitizer_common/sanitizer_ptrauth.h"
 #include "sanitizer_common/sanitizer_platform.h"
+#include "sanitizer_common/sanitizer_ptrauth.h"
 
 #include <stdint.h>
 
@@ -279,4 +279,4 @@ bool __ubsan::checkTypeInfoEquality(const void *TypeInfo1,
          TI2->name()[0] != '*' && !internal_strcmp(TI1->name(), TI2->name());
 }
 
-#endif  // CAN_SANITIZE_UB && !defined(_MSC_VER)
+#endif // CAN_SANITIZE_UB && !defined(_MSC_VER)
diff --git a/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp b/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp
index 877f18979..b546ae6bf 100644
--- a/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp
+++ b/compiler-rt/lib/ubsan/ubsan_type_hash_win.cpp
@@ -81,4 +81,4 @@ bool __ubsan::checkTypeInfoEquality(const void *, const void *) {
   return false;
 }
 
-#endif  // CAN_SANITIZE_UB && defined(_MSC_VER)
+#endif // CAN_SANITIZE_UB && defined(_MSC_VER)

``````````

</details>


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


More information about the llvm-commits mailing list