[compiler-rt] [compiler-rt] [test] Work around MS CRT stdio format quirks on mingw too (PR #93787)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 01:43:26 PDT 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 cd9a02e2c76ec2f37409c6f7becd61e605c117d8 cc6f0cf1088079efd7b4f61199cbdcf245da9ec1 -- compiler-rt/test/asan/TestCases/debug_double_free.cpp compiler-rt/test/asan/TestCases/debug_report.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/debug_double_free.cpp b/compiler-rt/test/asan/TestCases/debug_double_free.cpp
index d7c59f8b41..650eb6ace6 100644
--- a/compiler-rt/test/asan/TestCases/debug_double_free.cpp
+++ b/compiler-rt/test/asan/TestCases/debug_double_free.cpp
@@ -10,11 +10,11 @@
// If we use %p with MS CRTs, it comes out all upper case. Use %08x to get
// lowercase hex.
#ifdef _WIN32
-# ifdef _WIN64
-# define PTR_FMT "0x%08llx"
-# else
-# define PTR_FMT "0x%08x"
-# endif
+# ifdef _WIN64
+# define PTR_FMT "0x%08llx"
+# else
+# define PTR_FMT "0x%08x"
+# endif
// Solaris libc omits the leading 0x.
#elif defined(__sun__) && defined(__svr4__)
# define PTR_FMT "0x%p"
diff --git a/compiler-rt/test/asan/TestCases/debug_report.cpp b/compiler-rt/test/asan/TestCases/debug_report.cpp
index d02ce50312..06e4ae5724 100644
--- a/compiler-rt/test/asan/TestCases/debug_report.cpp
+++ b/compiler-rt/test/asan/TestCases/debug_report.cpp
@@ -25,11 +25,11 @@ int main() {
// If we use %p with MS CRTs, it comes out all upper case. Use %08x to get
// lowercase hex.
#ifdef _WIN32
-# ifdef _WIN64
-# define PTR_FMT "0x%08llx"
-# else
-# define PTR_FMT "0x%08x"
-# endif
+# ifdef _WIN64
+# define PTR_FMT "0x%08llx"
+# else
+# define PTR_FMT "0x%08x"
+# endif
// Solaris libc omits the leading 0x.
#elif defined(__sun__) && defined(__svr4__)
# define PTR_FMT "0x%p"
``````````
</details>
https://github.com/llvm/llvm-project/pull/93787
More information about the llvm-commits
mailing list