[clang] [CGExprConstant] stop evaluating StringLiterals for non-ConstantArrayTypes (PR #70366)
Nick Desaulniers via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 26 11:47:16 PDT 2023
================
@@ -1358,6 +1359,8 @@ class ConstExprEmitter :
}
llvm::Constant *VisitStringLiteral(StringLiteral *E, QualType T) {
+ if (!isa<ConstantArrayType>(T.getDesugaredType(CGM.getContext())))
----------------
nickdesaulniers wrote:
Alternatively this could be:
`if (isa<LValueReferenceType>)`
any preference/thoughts @efriedma-quic ?
https://github.com/llvm/llvm-project/pull/70366
More information about the cfe-commits
mailing list