mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Move diagnostic usings off Context (#5007)
There aren't remaining uses on `Context` other than `DiagnosticEmitter` itself. I'm adding `SemIRLoc` because I feel odd about having both `Carbon::Check::DiagnosticBuilder` and `Carbon::DiagnosticEmitter<T>::DiagnosticBuilder`, but it seems relatively little additional typing outside the handful of `DiagnosticEmitter` uses on `Context` itself: ``` Context::DiagnosticEmitter DiagnosticEmitter<SemIRLoc> Context::DiagnosticBuilder SemIRLocDiagnosticBuilder Context::BuildDiagnosticFn BuildSemIRLocDiagnosticFn ``` Also clean up #include's while I'm finishing here.
This commit is contained in:
@@ -25,8 +25,7 @@
|
||||
namespace Carbon::Check {
|
||||
|
||||
// Adds the location of the associated function to a diagnostic.
|
||||
static auto NoteAssociatedFunction(Context& context,
|
||||
Context::DiagnosticBuilder& builder,
|
||||
static auto NoteAssociatedFunction(Context& context, DiagnosticBuilder& builder,
|
||||
SemIR::FunctionId function_id) -> void {
|
||||
CARBON_DIAGNOSTIC(AssociatedFunctionHere, Note,
|
||||
"associated function {0} declared here", SemIR::NameId);
|
||||
|
||||
Reference in New Issue
Block a user