carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
http://docs.carbon-lang.dev/
Other
32.35k stars 1.48k forks source link

Add fields for extern to EntityWithParamsBase #4206

Closed jonmeow closed 3 months ago

jonmeow commented 3 months ago

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.