[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 15:45:10 PDT 2023
efriedma added a comment.
> Is the idea for the way forward here to ensure (i.e. adding code such) that ConstExprEmitter can constant evaluate such Expr's?
For that exact construct, EvaluateAsRValue will also fail, so there's no real regression. The issue would be for a constant global variable... but if we try to handle that, we get into the exact mess of complicated code for lvalue-to-rvalue conversions in CGExprConstant we were trying to avoid adding.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76096/new/
https://reviews.llvm.org/D76096
More information about the cfe-commits
mailing list