mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:24:42 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user