[libcxx-commits] [libcxx] [libc++][ranges] Applied `[[nodiscard]]` to `split_view` (PR #205161)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 22 12:49:47 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 -- libcxx/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp libcxx/include/__ranges/split_view.h --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/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp
index ec07f89e9..a68f7f1b7 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.split/nodiscard.verify.cpp
@@ -16,7 +16,7 @@
 
 void test() {
   std::vector<char> range = {'1', '9', ',', '2', '8', ',', '2', '9', ',', '4', '9', ',', '8', '2', ',', '9', '4'};
-  char pattern = ',';
+  char pattern            = ',';
 
   auto v = std::views::split(range, pattern);
 

``````````

</details>


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


More information about the libcxx-commits mailing list