[clang] [clang][ASTImporter] Invalidate ImportedTypes cache on Decl import failure (PR #214008)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 7 06:44:29 PDT 2026
balazske wrote:
I think that the problem is that types of `Decl`'s which failed to import are not removed. When a failed import happens, the failed `Decl` (and other) objects that were already imported remain in the 'To' AST (this is not avoidable), additionally the import is marked as failed. It is possible to reach the partially imported objects through the connected type. When the connected type is removed from `ImportedTypes` and is encountered a next time for import (happens at `ASTImporter::IsStructurallyEquivalent`) this next import will rather fail (instead of continuing the structural equivalence check with probably corrupted decl objects).
https://github.com/llvm/llvm-project/pull/214008
More information about the cfe-commits
mailing list