[PATCH] D145868: [clang][ASTImporter] Fix import of typedef with unnamed structures

DonĂ¡t Nagy via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 11 01:25:13 PDT 2023


donat.nagy accepted this revision.
donat.nagy added a comment.
This revision is now accepted and ready to land.

This commit eliminates crashes caused by a rare corner case (typedefs to types derived from unnamed structs) of the AST import procedure; but introduces some incorrect behavior in a rare sub-case of of this corner case (which is explored by the testcases added by this commit). I think this is a good trade (one surprising behavior is less bad than 10 crashes) and it's worth to merge this simple change in its current state. However, it would be important to continue this project and create a separate followup commit that fixes the remaining little issues in this area, because if we don't handle them now, they might cause unpleasant surprises later.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145868/new/

https://reviews.llvm.org/D145868



More information about the cfe-commits mailing list