[libcxx-commits] [PATCH] D101674: [libc++] [LIBCXX-DEBUG-FIXME] Constexpr char_traits::copy mustn't compare unrelated pointers.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 30 16:50:06 PDT 2021


Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, libc++.
Quuxplusone added a project: libc++.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

  We could arrange to skip the UB-inducing assert in the case where the computation
  might be happening at constexpr time; but we have no existing way to check for
  computation that *might be* happening at constexpr time. We only have a way
  to check for computation that is *definitely* happening at constexpr time
  (versus *might be* happening at runtime). __libcpp_is_constant_evaluated()
  returns true only if we KNOW it's constexpr-time; it returns false both at runtime
  and on compilers that don't support the builtin.
  Come to think of it, maybe this is the wrong default for __libcpp_is_constant_evaluated().


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D101674

Files:
  libcxx/include/__string
  libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/copy.pass.cpp
  libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/copy.pass.cpp
  libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/copy.pass.cpp
  libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/copy.pass.cpp
  libcxx/test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/copy.pass.cpp
  libcxx/test/std/strings/string.view/string.view.ops/copy.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101674.342085.patch
Type: text/x-patch
Size: 5935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210430/398a9a00/attachment-0001.bin>


More information about the libcxx-commits mailing list