mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add fields for extern to EntityWithParamsBase (#4206)
This adds fields to `EntityWithParamsBase` to reflect the intention with `extern library` design. I'm renaming `decl_id` because it shouldn't be expected to be assigned anymore. import_ref.cpp I'm deliberately keeping on `first_owning_decl_id` (which will break when importing `extern library` declarations). Most other cases are for diagnostics, and I'm using `latest_decl_id` to try and get the closest declaration to the error. Note I'm partly splitting out this PR to show the test effect, which apparently we don't test related cases.
This commit is contained in:
@@ -25,7 +25,8 @@ static auto NoteAssociatedFunction(Context& context,
|
||||
CARBON_DIAGNOSTIC(ImplAssociatedFunctionHere, Note,
|
||||
"Associated function {0} declared here.", SemIR::NameId);
|
||||
const auto& function = context.functions().Get(function_id);
|
||||
builder.Note(function.decl_id, ImplAssociatedFunctionHere, function.name_id);
|
||||
builder.Note(function.latest_decl_id(), ImplAssociatedFunctionHere,
|
||||
function.name_id);
|
||||
}
|
||||
|
||||
// Gets the self specific of a generic declaration that is an interface member,
|
||||
|
||||
Reference in New Issue
Block a user