Remove the SemIRLoc typedef (#5299)

Replace SemIRLoc typedef uses with explicitly SemIR::LocId, loc ->
loc_id for consistency.
This commit is contained in:
Jon Ross-Perkins
2025-04-14 14:28:15 +00:00
committed by GitHub
parent 77cbcd0aa8
commit 55da026a46
27 changed files with 253 additions and 236 deletions
+5 -4
View File
@@ -25,17 +25,18 @@ Context::Context(DiagnosticEmitterBase* emitter,
scope_stack_(sem_ir_),
vtable_stack_("vtable_stack_", *sem_ir, vlog_stream),
global_init_(this),
region_stack_(
[this](SemIRLoc loc, std::string label) { TODO(loc, label); }) {
region_stack_([this](SemIR::LocId loc_id, std::string label) {
TODO(loc_id, label);
}) {
// Prepare fields which relate to the number of IRs available for import.
import_irs().Reserve(imported_ir_count);
import_ir_constant_values_.reserve(imported_ir_count);
check_ir_map_.resize(total_ir_count, SemIR::ImportIRId::None);
}
auto Context::TODO(SemIRLoc loc, std::string label) -> bool {
auto Context::TODO(SemIR::LocId loc_id, std::string label) -> bool {
CARBON_DIAGNOSTIC(SemanticsTodo, Error, "semantics TODO: `{0}`", std::string);
emitter_->Emit(loc, SemanticsTodo, std::move(label));
emitter_->Emit(loc_id, SemanticsTodo, std::move(label));
return false;
}