This is an archive of the discontinued LLVM Phabricator instance.

[clang] Make variables of undeduced types to have dependent alignment
ClosedPublic

Authored by ArcsinX on Oct 6 2022, 6:25 AM.

Details

Summary

Without this patch VarDecl::hasDependent() checks only undeduced auto types, so can give false negatives result for other undeduced types.
This lead to crashes in sequence !VarDecl::hasDepentent() => getDeclAlign().

It seems this problem appeared since D105380

Diff Detail

Event Timeline

ArcsinX created this revision.Oct 6 2022, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2022, 6:25 AM
ArcsinX requested review of this revision.Oct 6 2022, 6:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 6 2022, 6:25 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
mizvekov accepted this revision.Oct 6 2022, 7:01 AM

LGTM

This revision is now accepted and ready to land.Oct 6 2022, 7:01 AM