mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Use DiagnosticEmitter for phase-specific types (#5188)
Given the namespacing of `Diagnostics` in #5173, now we can use `DiagnosticEmitter` for phase-specific emitters. This is consistent with how we do `Context`, and also check had started this with `DiagnosticBuilder` in anticipation of the namespacing. Also renames `Emitter::DiagnosticBuilder` to `Emitter::Builder` for consistency with other `Diagnostics` entities. In check, I'm still splitting `DiagnosticEmitterBase` and `DiagnosticEmitter` just to keep the emitter definition separate from the context. Also cleans up some incorrect check diagnostic emitter dependencies in lower.
This commit is contained in:
@@ -187,9 +187,7 @@ class EvalContext {
|
||||
|
||||
auto sem_ir() -> SemIR::File& { return context().sem_ir(); }
|
||||
|
||||
auto emitter() -> Diagnostics::Emitter<SemIRLoc>& {
|
||||
return context().emitter();
|
||||
}
|
||||
auto emitter() -> DiagnosticEmitterBase& { return context().emitter(); }
|
||||
|
||||
private:
|
||||
// The type-checking context in which we're performing evaluation.
|
||||
|
||||
Reference in New Issue
Block a user