[libcxx-commits] [libcxx] [libc++] Avoid string reallocation in `std::filesystem::path::lexically_relative` (PR #152964)
via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 11 01:18:30 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- libcxx/src/filesystem/path.cpp libcxx/test/benchmarks/filesystem.bench.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/benchmarks/filesystem.bench.cpp b/libcxx/test/benchmarks/filesystem.bench.cpp
index 9c20bc47b..c058a5d41 100644
--- a/libcxx/test/benchmarks/filesystem.bench.cpp
+++ b/libcxx/test/benchmarks/filesystem.bench.cpp
@@ -173,7 +173,7 @@ BENCHMARK_CAPTURE(BM_LexicallyNormal, large_path, getRandomPaths, /*PathLen*/ 32
template <class GenInput>
void BM_LexicallyRelative(benchmark::State& st, GenInput gen, size_t PathLen) {
- auto BasePath = gen(st.range(0), PathLen);
+ auto BasePath = gen(st.range(0), PathLen);
auto TargetPath = gen(st.range(0), PathLen);
benchmark::DoNotOptimize(&BasePath);
benchmark::DoNotOptimize(&TargetPath);
``````````
</details>
https://github.com/llvm/llvm-project/pull/152964
More information about the libcxx-commits
mailing list