[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu May 23 10:43:51 PDT 2024
================
@@ -135,6 +135,17 @@ class AggExprEmitter : public StmtVisitor<AggExprEmitter> {
EnsureDest(E->getType());
if (llvm::Value *Result = ConstantEmitter(CGF).tryEmitConstantExpr(E)) {
+ // An empty record can overlap other data (if declared with
+ // no_unique_address); omit the store for such types - as there is no
----------------
efriedma-quic wrote:
See what, exactly? Given the derived class, computing the address of the base class doesn't take any instructions, because it's the same address.
https://github.com/llvm/llvm-project/pull/93115
More information about the cfe-commits
mailing list