mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 07:12:44 +00: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:
1 parent
4ea5ef45dd
commit
2784f33221
4 files changed
+22
-17
No files matched your search
@@ -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