[PATCH] D53693: [ASTImporter] Typedef import brings in the complete type
Aleksei Sidorin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 26 08:46:35 PDT 2018
a_sidorin added a comment.
Hi Gabor,
Thank you for the patch. I looks reasonable but I have some questions.
================
Comment at: lib/AST/ASTImporter.cpp:2310
+ D->getUnderlyingType(), FoundTypedef->getUnderlyingType())) {
+ QualType FromUT = D->getUnderlyingType();
+ QualType FoundUT = FoundTypedef->getUnderlyingType();
----------------
We can move these two vars upper and use them in the condition.
================
Comment at: lib/AST/ASTImporter.cpp:2314
+ // already have a complete underlying type then return with that.
+ if (!FromUT->isIncompleteType() && !FoundUT->isIncompleteType())
return Importer.MapImported(D, FoundTypedef);
----------------
This condition omits the case where both types are complete. Should we use `FromUT->isIncompleteType == FoundUT-isIncompleteType()` instead?
Repository:
rC Clang
https://reviews.llvm.org/D53693
More information about the cfe-commits
mailing list