mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Fix clang_decls InstId for generic class export (#7633)
The exported class was being inserted with a type inst ID as the key (and looked up that way elsewhere), but when checking if the generic class was already exported, the `first_decl_id` was being used. Make it consistent, and opt for `first_decl_id` everywhere since it provides a better location for diagnostics.
This commit is contained in:
@@ -238,7 +238,7 @@ auto CarbonExternalASTSource::MapInstIdToClangDeclOrType(LookupResult lookup)
|
||||
} else if (auto generic_class =
|
||||
context_->insts().TryGetAs<SemIR::GenericClassType>(
|
||||
type_inst_id)) {
|
||||
return ExportGenericClassToCpp(*context_, type_inst_id, *generic_class);
|
||||
return ExportGenericClassToCpp(*context_, *generic_class);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user