Remove support for addr (#6375)

Every test that used `addr` before #6283 should be using `ref` after
this PR. In most cases that was done in #6283, but this PR transitions a
few that I missed in that first pass. In addition, #6283 cloned the old
`addr` tests from `foo.carbon` to `foo_addr.carbon` in order to maintain
test coverage during the transition; this PR removes those cloned tests.
This commit is contained in:
Geoff Romer
2025-11-18 19:48:58 +00:00
committed by GitHub
parent ee49d65e29
commit 57a2715f10
76 changed files with 397 additions and 6442 deletions
+1 -6
View File
@@ -10,7 +10,7 @@
namespace Carbon::SemIR {
// Returns the pattern instruction corresponding to the given ID, after
// unwrapping any simple pattern operators such as `var` and `addr`.
// unwrapping any simple pattern operators such as `var`.
static auto GetUnwrapped(const File& sem_ir, InstId pattern_id)
-> std::pair<InstId, Inst> {
auto inst_id = pattern_id;
@@ -21,11 +21,6 @@ static auto GetUnwrapped(const File& sem_ir, InstId pattern_id)
inst = sem_ir.insts().Get(inst_id);
}
if (auto addr_pattern = inst.TryAs<AddrPattern>()) {
inst_id = addr_pattern->inner_id;
inst = sem_ir.insts().Get(inst_id);
}
if (auto param_pattern_inst = inst.TryAs<AnyParamPattern>()) {
inst_id = param_pattern_inst->subpattern_id;
inst = sem_ir.insts().Get(inst_id);