Index: lib/AST/ASTImporter.cpp =================================================================== --- lib/AST/ASTImporter.cpp +++ lib/AST/ASTImporter.cpp @@ -1959,7 +1959,7 @@ // but this particular declaration is not that definition, import the // definition and map to that. TagDecl *Definition = D->getDefinition(); - if (Definition && Definition != D) { + if (!D->isImplicit() && Definition && Definition != D) { Decl *ImportedDef = Importer.Import(Definition); if (!ImportedDef) return nullptr; Index: unittests/AST/ASTImporterTest.cpp =================================================================== --- unittests/AST/ASTImporterTest.cpp +++ unittests/AST/ASTImporterTest.cpp @@ -1367,7 +1367,7 @@ TEST_P( ASTImporterTestBase, - DISABLED_ShouldImportImplicitCXXRecordDeclOfClassTemplateSpecializationDecl) { + ShouldImportImplicitCXXRecordDeclOfClassTemplateSpecializationDecl) { Decl *From, *To; std::tie(From, To) = getImportedDecl( R"(