[clang] Fix codegen of consteval functions returning an empty class. (PR #93115)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 22 23:53:26 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
----------------
serge-sans-paille wrote:
Candide question: Empty record still need one byte when their address is taken (thus this comment about `no_unique_address` I guess), why don't we see that in the diff?
https://github.com/llvm/llvm-project/pull/93115
More information about the cfe-commits
mailing list