Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread Richard Smith via cfe-commits
On Sun, 5 Apr 2020 at 15:41, David Zarzycki via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Subjectively speaking, using char8_t instead of char shouldn’t feel like a > regression. So yes, making the builtin mem* functions work with char8_t > again seems right. As for strlen, I can see argu

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread David Zarzycki via cfe-commits
Subjectively speaking, using char8_t instead of char shouldn’t feel like a regression. So yes, making the builtin mem* functions work with char8_t again seems right. As for strlen, I can see arguments either way. Personally, if you’re concerned about clever macros, then I’d make the overload onl

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread Richard Smith via cfe-commits
On Sun, 5 Apr 2020 at 15:17, Richard Smith wrote: > On Sun, 5 Apr 2020 at 14:44, David Zarzycki via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> We have overloaded builtins. Can that not solve __builtin_strlen? >> > > I suppose it could, but we generally want __builtin_ to behave > the

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread Richard Smith via cfe-commits
On Sun, 5 Apr 2020 at 14:44, David Zarzycki via cfe-commits < cfe-commits@lists.llvm.org> wrote: > We have overloaded builtins. Can that not solve __builtin_strlen? > I suppose it could, but we generally want __builtin_ to behave the same as . (The difference would not be visible most of the time

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread David Zarzycki via cfe-commits
We have overloaded builtins. Can that not solve __builtin_strlen? -- Sent from my iPhone > On Apr 5, 2020, at 14:53, Richard Smith wrote: > >  > Thanks. We need to figure out what the right way to support char8_t with > string builtins is. These ones could work in principle, whereas things l

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread Richard Smith via cfe-commits
Thanks. We need to figure out what the right way to support char8_t with string builtins is. These ones could work in principle, whereas things like __builtin_strlen would never work because they take operands of the wrong types (and we can't cast const char8_t* -> const char* in a constant express

Re: [libcxx-dev] [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-05 Thread David Zarzycki via cfe-commits
Hi Richard, I'm going to commit a narrow fix to clang to make the libcxx test suite pass again by allowing char8_t again. If you feel that this is the wrong long-term solution, please help the libcxx folks with whatever adjustments they need. Thanks! Dave On Sat, Apr 4, 2020, at 9:55 AM, Dav

Re: [clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-04 Thread David Zarzycki via cfe-commits
Hi Richard, This breaks libcxx. Can we please revert this or is a quick fix to libcxx possible? FAIL: libc++ :: std/strings/char.traits/char.traits.specializations/char.traits.specializations.char8_t/compare.pass.cpp (58624 of 62672) TEST 'libc++ :: std/strings/char.trai

[clang] 4ede887 - PR45402: Make the restrictions on constant evaluation of memcmp and

2020-04-03 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-04-03T18:26:14-07:00 New Revision: 4ede8879924c08ae5b495d3f421c167d822a60be URL: https://github.com/llvm/llvm-project/commit/4ede8879924c08ae5b495d3f421c167d822a60be DIFF: https://github.com/llvm/llvm-project/commit/4ede8879924c08ae5b495d3f421c167d822a60be.diff