[libcxx-commits] [libcxx] [libc++][test] Fix zero-length arrays and copy-pasted lambdas in `ranges.contains.pass.cpp` (PR #79792)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Jan 28 23:25:39 PST 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 4118082f651a05cca258c684ab1199578b57afac f3c60eddf687df9b69905c40d32f57b9ccfa2fda -- libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp
index 7b792bb3ac..f710ca2c31 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.contains/ranges.contains.pass.cpp
@@ -91,7 +91,7 @@ constexpr void test_iterators() {
{ // check that an empty range works
std::array<ValueT, 0> a = {};
- auto whole = std::ranges::subrange(Iter(a.data()), Sent(Iter(a.data())));
+ auto whole = std::ranges::subrange(Iter(a.data()), Sent(Iter(a.data())));
{
bool ret = std::ranges::contains(whole.begin(), whole.end(), 1);
assert(!ret);
``````````
</details>
https://github.com/llvm/llvm-project/pull/79792
More information about the libcxx-commits
mailing list