[PATCH] D152003: [clang] Fix `static_cast` to array of unknown bound

Mariya Podchishchaeva via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 02:20:08 PDT 2023


Fznamznon added a comment.

> 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++.


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