Skip to content

Conversation

@kinke
Copy link
Member

@kinke kinke commented Dec 16, 2025

After comparing this with DMD's Dsymbol_toElem(), incl. checking the VarDeclaration overloads of the codegen visitors.

@kinke kinke force-pushed the rm_DtoDeclarationExp branch from e7cb7d4 to adeb138 Compare December 16, 2025 12:26
@kinke kinke changed the title Refactor away DtoDeclarationExp() Revise DtoDeclarationExp() Dec 16, 2025
@kinke kinke force-pushed the rm_DtoDeclarationExp branch from adeb138 to ecc0364 Compare December 16, 2025 12:29
After comparing this with DMD's `Dsymbol_toElem()`, incl. checking
the VarDeclaration overloads of the codegen visitors.
@kinke kinke force-pushed the rm_DtoDeclarationExp branch from ecc0364 to 8768a50 Compare December 16, 2025 12:34

if (auto vd = e->declaration->isVarDeclaration()) {
if (!vd->isDataseg() && vd->needsScopeDtor()) {
pushVarDtorCleanup(p, vd);
Copy link
Member Author

@kinke kinke Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check was insufficient, as it turned out during intermediate refactorings - IIRC, missing temporaries inside an outer align(N) declaration (as e->declaration).

@kinke kinke merged commit 6241b2b into ldc-developers:master Dec 16, 2025
21 checks passed
@kinke kinke deleted the rm_DtoDeclarationExp branch December 16, 2025 13:43
@kinke kinke mentioned this pull request Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant