AditiRM wrote: Reworked the fix based on the review feedback and moved away from creating a dummy layout for invalid declarations.
While debugging the failure and tracing the stack, the call path leading to the assertion was identified: `CheckConstructorCall() → CheckArgAlignment() → getTypeAlignInChars() → getASTRecordLayout(X<int>) → ComputeEmptySubobjectSizes() → getASTRecordLayout(X<int>::Y) → assertion` Based on this, the new approach handles the issue at the callers by checking `isInvalidDecl()` before requesting a record layout. Invalid bases/fields are skipped during layout computation, and the relevant alignment/layout checks return early. `getASTRecordLayout()` itself is left unchanged, including the existing assertions. This keeps the error recovery closer to where the invalid declaration is encountered and avoids introducing dummy layout information. CC: @AaronBallman @erichkeane @vgvassilev @tonykuttai @hubert-reinterpretcast @w2yehia https://github.com/llvm/llvm-project/pull/208153 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
