Don't create block for imported self param (#7786)

The `self` parameter block is presumably a relic from when `self` was in
the implicit parameter list; now it's just SemIR bloat.

This also factors out some common code between `self` and the other
parameters.
This commit is contained in:
Geoff Romer
2026-09-29 20:40:39 +00:00
committed by GitHub
parent 7134e23f2d
commit 8c86876034
2 changed files with 50 additions and 76 deletions
@@ -109,7 +109,7 @@ import Cpp library "object_param_qualifiers.h";
fn Ref(p: Cpp.HasQualifiers*) {
// TODO: This should eventually be accepted if we support `volatile`.
// CHECK:STDERR: fail_todo_bad_object_param_qualifiers_by_ref.carbon:[[@LINE+4]]:3: error: semantics TODO: `Unsupported: object parameter type: volatile struct HasQualifiers &` [SemanticsTodo]
// CHECK:STDERR: fail_todo_bad_object_param_qualifiers_by_ref.carbon:[[@LINE+4]]:3: error: semantics TODO: `Unsupported: parameter type: volatile struct HasQualifiers &` [SemanticsTodo]
// CHECK:STDERR: p->volatile_this();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: