================
@@ -10038,6 +10038,13 @@ Expected<Decl *> ASTImporter::Import(Decl *FromD) {
auto *ToD = CreatedToD;
ImportedDecls.erase(Pos);
+ // Also scrub the imported type mapping, if applicable. Import(Type*) can
+ // cache a type mapping to a declaration that ultimately fails.
+ if (const auto *FromTD = dyn_cast<TagDecl>(FromD))
+ if (const Type *FromTy =
+ getFromContext().getCanonicalTagType(FromTD).getTypePtr())
+ ImportedTypes.erase(FromTy);
----------------
guillem-bartrina-sonarsource wrote:
No longer applies with the changes applies in
5243a5c8e90d0ee4a697e092fe81253a67d3f0ae. But thanks for pointing it out.
https://github.com/llvm/llvm-project/pull/214008
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits