[PATCH] D156185: [clang][ConstExprEmitter] handle ArrayToPointerDecay ImplicitCastExpr of StringLiterals

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 13:29:32 PDT 2023


nickdesaulniers added a comment.

In D156185#4530163 <https://reviews.llvm.org/D156185#4530163>, @efriedma wrote:

>> so if you were concerned with arrays of string literals, we need this patch.
>
> Ohhh.... that's not what I meant by StringLiterals.  I meant cases where the string literal is an rvalue, like `char foo[100000] = "x";`.  If it's an lvalue, we go through ConstantLValueEmitter, which is still reasonably fast.

This patch //is// addressing the case of the string literal rvalue; see the commit description:

>>> const char* foo = "foo";


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156185/new/

https://reviews.llvm.org/D156185



More information about the cfe-commits mailing list