https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/22] [libc++] Prevent calling the projection more than three
ldionne wrote:
This seems to be a bit stuck. I checked out the patch locally and that was
helpful to understand some of the issues. I think the final patch should be:
```
commit c667f036c4228b9cf0172c311537ab96ef61fcf5
Author: PandaNinjas
Date: Wed Sep 13 17:38:17 2023 -0700
[libc++]
https://github.com/ldionne resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff c60ccfbb898148449946f82cbac6140f1e01cb12
f97313eadac98e753155b5e05ac0eef16f7fb82d --
frederick-vs-ja wrote:
It seems that we should remove this block because it turns out that
`ranges::clamp` needs double moves under some circumstances.
pandaninjas wrote:
It seems like tests are still failing because there is a double move.
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/18] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/17] [libc++] Prevent calling the projection more than three
https://github.com/ldionne edited
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
https://github.com/ldionne requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -108,7 +108,34 @@ constexpr bool test() {
auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove {
return x; };
assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) ==
);
}
+ { // Make sure we don't call the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/16] [libc++] Prevent calling the projection more than three
@@ -108,7 +108,34 @@ constexpr bool test() {
auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove {
return x; };
assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) ==
);
}
+ { // Make sure we don't call the projection more than three
ldionne wrote:
> Any idea why the CI is failing? It mentions line 86 not being constexpr
> because of assert, but it doesn't seem like I've done anything which should
> affect that...
I looked into it a bit and I think the CI is failing because of the
`std::forward` problem. The assertion on
https://github.com/ldionne resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
pandaninjas wrote:
Any idea why the CI is failing? It mentions line 86 not being constexpr because
of assert, but it doesn't seem like I've done anything which should affect
that...
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/15] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/14] [libc++] Prevent calling the projection more than three
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
@@ -108,7 +108,33 @@ constexpr bool test() {
auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove {
return x; };
assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) ==
);
}
+ { // Make sure we don't call the projection more than three
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
https://github.com/EricWF requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/13] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pandaninjas resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pandaninjas resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ldionne wrote:
What a tricky change! The ones that seem simple are sometimes the ones that end
up being the most involved :)
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
@@ -108,7 +108,33 @@ constexpr bool test() {
auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove {
return x; };
assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) ==
);
}
+ { // Make sure we don't call the projection more than three
https://github.com/ldionne edited
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
@@ -108,7 +108,33 @@ constexpr bool test() {
auto prvalue_proj = [](const CheckDoubleMove& x) -> CheckDoubleMove {
return x; };
assert(::ranges::clamp(val, low, high, moving_comp, prvalue_proj) ==
);
}
+ { // Make sure we don't call the projection more than three
https://github.com/ldionne requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/12] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/11] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 01/10] [libc++] Prevent calling the projection more than three
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 1/9] [libc++] Prevent calling the projection more than three
https://github.com/ldionne resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
"Bad bounds passed to std::ranges::clamp");
-if (std::invoke(__comp,
https://github.com/ldionne requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ldionne edited
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ldionne resolved
https://github.com/llvm/llvm-project/pull/66315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
ldionne wrote:
You're right, sorry for the noise. It supports a custom comparator, not a
custom projection.
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 1/9] [libc++] Prevent calling the projection more than three
@@ -37,9 +37,10 @@ struct __fn {
_LIBCPP_ASSERT_UNCATEGORIZED(!bool(std::invoke(__comp, std::invoke(__proj,
__high), std::invoke(__proj, __low))),
pandaninjas wrote:
I think we don't need a similar fix in `std::clamp` because `std::clamp`
doesn't support
https://github.com/pandaninjas updated
https://github.com/llvm/llvm-project/pull/66315
>From ead65bfcb70be46788bc9e88c891e7ae7f91b8d7 Mon Sep 17 00:00:00 2001
From: PandaNinjas
Date: Wed, 13 Sep 2023 17:38:17 -0700
Subject: [PATCH 1/8] [libc++] Prevent calling the projection more than three
49 matches
Mail list logo