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:
@@ -33,7 +33,7 @@ static auto NoteNoReturnTypeProvided(Context::DiagnosticBuilder& diag,
|
||||
const SemIR::Function& function) {
|
||||
CARBON_DIAGNOSTIC(ReturnTypeOmittedNote, Note,
|
||||
"There was no return type provided.");
|
||||
diag.Note(function.decl_id, ReturnTypeOmittedNote);
|
||||
diag.Note(function.latest_decl_id(), ReturnTypeOmittedNote);
|
||||
}
|
||||
|
||||
// Produces a note describing the return type of the given function.
|
||||
|
||||
Reference in New Issue
Block a user