erichkeane abandoned this revision.
erichkeane added a comment.

In https://reviews.llvm.org/D23692#520081, @rsmith wrote:

> This is not a conforming extension. We are explicitly not allowed to make 
> standard library functions `constexpr` if the standard doesn't say they are; 
> see [constexpr.functions] (17.6.5.6) in the C++ standard. Clang previously 
> used to allow constant-folding `strlen` calls, but we removed that support 
> intentionally for this reason.
>
> It would seem reasonable for this constant-folding to be enabled for `strlen` 
> if the callee was explicitly marked as `constexpr` in the source code. That 
> way, if the standard library chooses to mark it as `constexpr` as a 
> (currently) non-conforming extension, we would provide an optimized 
> implementation.


Ok, thank you for your prompt response.  I'll see if that is a viable solution 
for this case.

Thanks!


Repository:
  rL LLVM

https://reviews.llvm.org/D23692



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to