[PATCH] D145868: [clang][ASTImporter] Fix import of anonymous structures

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 13 04:59:12 PDT 2023


balazske commandeered this revision.
balazske edited reviewers, added: vabridgers; removed: balazske.
balazske added a comment.
Herald added subscribers: steakhal, Szelethus, dkrupp.

My opinion is that we can not omit importing the "underlying type". The `TypedefType` has the type of the declaration (type of `getDecl()`) and the "underlying type" that may be different (this is the thing that comes from commit D133468 <https://reviews.llvm.org/D133468>). This is exactly different if `TypedefType::typeMatchesDecl()` (returns a stored value in `TypedefDecl`) returns true. In this case the type object is stored in the `TypedefDecl` node and is not the same as the type of declaration `getDecl()`. If function `getTypeDeclType` is used it creates the typedef type always with the type of `getDecl()` and the `typeMatchesDecl` will always return true for this type even if at the to-be-imported type it was false.


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