[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound
Nikolas Klauser via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 25 08:16:13 PDT 2023
philnik added a comment.
In D152003#4531732 <https://reviews.llvm.org/D152003#4531732>, @aaron.ballman wrote:
> In D152003#4531404 <https://reviews.llvm.org/D152003#4531404>, @Fznamznon wrote:
>
>>> should we try to land that today?
>>
>> I'm not sure. It causes failures in libc++ testing:
>>
>> Failed Tests (3):
>> llvm-libc++-shared.cfg.in :: std/ranges/range.access/end.pass.cpp
>> llvm-libc++-shared.cfg.in :: std/ranges/range.access/rbegin.pass.cpp
>> llvm-libc++-shared.cfg.in :: std/ranges/range.access/rend.pass.cpp
>>
>> I haven't figured out why. Trying to compile:
>>
>> #include <ranges>
>>
>> using RangeCREndT = decltype(std::ranges::crend);
>> static_assert(!std::is_invocable_v<RangeCREndT, int (&)[]>);
>>
>> fails with this patch only using libc++, libstdc++ is fine. I'm not sure it is my misunderstanding, bug in the patch or bug in libc++.
>
> CC @ldionne @philnik @Mordante for libc++ opinions
Thanks for the heads-up! From what I can tell, this could be a problem in the compiler, in `is_invocable`, in `cend` or in `end`. Unfortunately, I don't have the time right now to make a smaller reproducer and Louis isn't available. @Mordante do you have time to take a look at this? I will probably only have time to get to it by the end of the week or early next week.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152003/new/
https://reviews.llvm.org/D152003
More information about the cfe-commits
mailing list