mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Format the call parameters of a function, not the patterns. (#5342)
This makes the parameters printed in a SemIR `fn` declaration match the arguments printed in a SemIR `call` instruction.
This commit is contained in:
+2
-2
@@ -89,9 +89,9 @@ fn Foo(ptr: C*) {
|
||||
// CHECK:STDOUT: .field = %.loc13
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Member[%self.param_patt: %C]();
|
||||
// CHECK:STDOUT: fn @Member(%self.param: %C);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Foo(%ptr.param_patt: %ptr.019) {
|
||||
// CHECK:STDOUT: fn @Foo(%ptr.param: %ptr.019) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ptr.ref.loc17: %ptr.019 = name_ref ptr, %ptr.loc16_8
|
||||
// CHECK:STDOUT: %.loc17_4.1: ref %C = deref %ptr.ref.loc17
|
||||
|
||||
@@ -286,7 +286,7 @@ fn AddressOfParam(param: i32) {
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @AddressOfParam(%param.param_patt: %i32) {
|
||||
// CHECK:STDOUT: fn @AddressOfParam(%param.param: %i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %param_addr.patt: %ptr.235 = binding_pattern param_addr
|
||||
|
||||
@@ -81,7 +81,7 @@ fn Deref(n: i32) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Deref(%n.param_patt: %i32) {
|
||||
// CHECK:STDOUT: fn @Deref(%n.param: %i32) {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref.loc16: %i32 = name_ref n, %n
|
||||
// CHECK:STDOUT: %.loc16: ref <error> = deref %n.ref.loc16 [concrete = <error>]
|
||||
|
||||
@@ -68,7 +68,7 @@ fn ConstMismatch(p: const {}*) -> const ({}*) {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ConstMismatch(%p.param_patt: %ptr.bf9) -> %const.987 {
|
||||
// CHECK:STDOUT: fn @ConstMismatch(%p.param: %ptr.bf9) -> %const.987 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %ptr.bf9 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc19: %const.987 = converted %p.ref, <error> [concrete = <error>]
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ fn F(p: const (const (const i32*)*)) -> const i32 {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%p.param_patt: %const.fa2) -> %const.20a {
|
||||
// CHECK:STDOUT: fn @F(%p.param: %const.fa2) -> %const.20a {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %const.fa2 = name_ref p, %p
|
||||
// CHECK:STDOUT: %.loc13_11.1: ref %const.58f = deref %p.ref
|
||||
|
||||
+2
-2
@@ -87,13 +87,13 @@ fn ConstPtr(p: const i32*) -> (const i32)* {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Ptr(%p.param_patt: %ptr.235) -> %ptr.235 {
|
||||
// CHECK:STDOUT: fn @Ptr(%p.param: %ptr.235) -> %ptr.235 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %ptr.235 = name_ref p, %p
|
||||
// CHECK:STDOUT: return %p.ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @ConstPtr(%p.param_patt: %ptr.36b) -> %ptr.36b {
|
||||
// CHECK:STDOUT: fn @ConstPtr(%p.param: %ptr.36b) -> %ptr.36b {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %p.ref: %ptr.36b = name_ref p, %p
|
||||
// CHECK:STDOUT: return %p.ref
|
||||
|
||||
Reference in New Issue
Block a user