[llvm] [Windows][test] Fix "LLVM" test failures when LLVM_WINDOWS_PREFER_FORWARD_SLASH is ON (PR #184556)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 23:06:37 PST 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 c,cpp -- llvm/test/tools/llvm-cov/native_separators.c llvm/unittests/Support/CommandLineTest.cpp llvm/unittests/Support/Path.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/llvm/unittests/Support/Path.cpp b/llvm/unittests/Support/Path.cpp
index c89df4f01..984e99024 100644
--- a/llvm/unittests/Support/Path.cpp
+++ b/llvm/unittests/Support/Path.cpp
@@ -2585,7 +2585,9 @@ TEST_F(FileSystemTest, makeLongFormPath) {
 
   // Setup: A test directory longer than 8 characters for which a distinct
   // short 8.3 form name will be created on Windows. Typically, 123456~1.
-  const char *OneDir = LLVM_WINDOWS_PREFER_FORWARD_SLASH ? "/123456789" : "\\123456789"; // >8 chars
+  const char *OneDir = LLVM_WINDOWS_PREFER_FORWARD_SLASH
+                           ? "/123456789"
+                           : "\\123456789"; // >8 chars
 
   // Setup: Create a path where even if all components were reduced to short 8.3
   // form names, the total length would exceed MAX_PATH.

``````````

</details>


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


More information about the llvm-commits mailing list