[libcxx-commits] [libcxx] [libc++] Do not remove a root-name followed by ".." in `path::lexically_normal()` (PR #201261)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 2 21:09:45 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 -- libcxx/src/filesystem/path.cpp libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_normal.pass.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/libcxx/src/filesystem/path.cpp b/libcxx/src/filesystem/path.cpp
index 7b60e0062..faa7b4f1f 100644
--- a/libcxx/src/filesystem/path.cpp
+++ b/libcxx/src/filesystem/path.cpp
@@ -142,7 +142,7 @@ string_view_t path::__extension() const { return parser::separate_filename(__fil
enum PathPartKind : unsigned char { PK_None, PK_RootName, PK_RootSep, PK_Filename, PK_Dot, PK_DotDot, PK_TrailingSep };
-static PathPartKind ClassifyPathPart(const PathParser &PP) {
+static PathPartKind ClassifyPathPart(const PathParser& PP) {
if (PP.inRootName())
return PK_RootName;
if (PP.inRootDir())
``````````
</details>
https://github.com/llvm/llvm-project/pull/201261
More information about the libcxx-commits
mailing list