Implement unused pattern bindings, continued (#6518)

Implementation of unused pattern bindings #2022, continued.

Whereas previous PR #6460 took care of parsing, and PR #6479 prepared
the stage by using _ in some test cases, this PR has the the actual
implementation, using a simple dataflow analysis.

---------

Co-authored-by: Burak Emir <bqe@google.com>
Co-authored-by: jonmeow <jperkins@google.com>
This commit is contained in:
Burak Emir
2026-02-19 23:33:36 +00:00
committed by GitHub
co-authored by Burak Emir jonmeow
parent bea24a8bee
commit fdb188ccfd
366 changed files with 8453 additions and 7996 deletions
+22 -22
View File
@@ -19,28 +19,28 @@ import Cpp;
fn F() {
//@dump-sem-ir-begin
let cpp_signed_char : Cpp.signed_char = 1 as i8;
let carbon_signed_char: i8 = cpp_signed_char;
let unused carbon_signed_char: i8 = cpp_signed_char;
let cpp_short : Cpp.short = 1 as i16;
let carbon_short: i16 = cpp_short;
let unused carbon_short: i16 = cpp_short;
let cpp_int : Cpp.int = 1 as i32;
let carbon_int: i32 = cpp_int;
let unused carbon_int: i32 = cpp_int;
let cpp_unsigned_char : Cpp.unsigned_char = 1 as u8;
let carbon_unsigned_char: u8 = cpp_unsigned_char;
let unused carbon_unsigned_char: u8 = cpp_unsigned_char;
let cpp_unsigned_short : Cpp.unsigned_short = 1 as u16;
let carbon_unsigned_short: u16 = cpp_unsigned_short;
let unused carbon_unsigned_short: u16 = cpp_unsigned_short;
let cpp_unsigned_int : Cpp.unsigned_int = 1 as u32;
let carbon_unsigned_int: u32 = cpp_unsigned_int;
let unused carbon_unsigned_int: u32 = cpp_unsigned_int;
let cpp_float : Cpp.float = 1.0 as f32;
let carbon_float: f32 = cpp_float;
let unused carbon_float: f32 = cpp_float;
let cpp_double : Cpp.double = 1.0 as f64;
let carbon_double: f64 = cpp_double;
let unused carbon_double: f64 = cpp_double;
//@dump-sem-ir-end
}
@@ -60,7 +60,7 @@ fn F() {
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
let cpp_long_double : Cpp.long_double = 1.0 as f64;
let carbon_long_double: f64 = cpp_long_double;
let unused carbon_long_double: f64 = cpp_long_double;
//@dump-sem-ir-end
}
@@ -71,11 +71,11 @@ library "[[@TEST_NAME]]";
import Cpp;
fn F() {
// CHECK:STDERR: fail_not_builtin.carbon:[[@LINE+4]]:21: error: member name `not_builtin` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let not_builtin : Cpp.not_builtin = 1;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_not_builtin.carbon:[[@LINE+4]]:28: error: member name `not_builtin` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused not_builtin : Cpp.not_builtin = 1;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
let not_builtin : Cpp.not_builtin = 1;
let unused not_builtin : Cpp.not_builtin = 1;
}
// --- fail_lookup_in_other_scopes.carbon
@@ -87,11 +87,11 @@ namespace MyNamespace {}
''';
fn F() {
// CHECK:STDERR: fail_lookup_in_other_scopes.carbon:[[@LINE+4]]:14: error: member name `long` not found in `Cpp.MyNamespace` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let long : Cpp.MyNamespace.long = 1;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_lookup_in_other_scopes.carbon:[[@LINE+4]]:21: error: member name `long` not found in `Cpp.MyNamespace` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused long : Cpp.MyNamespace.long = 1;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let long : Cpp.MyNamespace.long = 1;
let unused long : Cpp.MyNamespace.long = 1;
}
// --- override_builtin.carbon
@@ -107,7 +107,7 @@ struct unsigned_int {
fn F() {
//@dump-sem-ir-begin
var unsigned_int : Cpp.unsigned_int;
let x: u32 = unsigned_int.foo();
let unused x: u32 = unsigned_int.foo();
//@dump-sem-ir-end
}
@@ -595,13 +595,13 @@ fn F() {
// CHECK:STDOUT: %foo.ref: %unsigned_int.foo.cpp_overload_set.type = name_ref foo, imports.%unsigned_int.foo.cpp_overload_set.value [concrete = constants.%unsigned_int.foo.cpp_overload_set.value]
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %unsigned_int.ref.loc13, %foo.ref
// CHECK:STDOUT: %unsigned_int.foo.call: init %u32 = call imports.%unsigned_int.foo.decl(%unsigned_int.ref.loc13)
// CHECK:STDOUT: %.loc13_10: type = splice_block %u32 [concrete = constants.%u32] {
// CHECK:STDOUT: %.loc13_17: type = splice_block %u32 [concrete = constants.%u32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %u32: type = class_type @UInt, @UInt(constants.%int_32) [concrete = constants.%u32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_33.1: %u32 = value_of_initializer %unsigned_int.foo.call
// CHECK:STDOUT: %.loc13_33.2: %u32 = converted %unsigned_int.foo.call, %.loc13_33.1
// CHECK:STDOUT: %x: %u32 = value_binding x, %.loc13_33.2
// CHECK:STDOUT: %.loc13_40.1: %u32 = value_of_initializer %unsigned_int.foo.call
// CHECK:STDOUT: %.loc13_40.2: %u32 = converted %unsigned_int.foo.call, %.loc13_40.1
// CHECK:STDOUT: %x: %u32 = value_binding x, %.loc13_40.2
// CHECK:STDOUT: %unsigned_int.cpp_destructor.bound: <bound method> = bound_method %unsigned_int.var, constants.%unsigned_int.cpp_destructor
// CHECK:STDOUT: %unsigned_int.cpp_destructor.call: init %empty_tuple.type = call %unsigned_int.cpp_destructor.bound(%unsigned_int.var)
// CHECK:STDOUT: <elided>
+241 -241
View File
@@ -20,9 +20,9 @@ import Cpp;
fn F() {
//@dump-sem-ir-begin
let cpp_long_long: Cpp.long_long = 1;
let carbon_long_long: i64 = cpp_long_long;
let unused carbon_long_long: i64 = cpp_long_long;
var a: array(f32, 1 as Cpp.long_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.long_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -35,9 +35,9 @@ import Cpp;
fn F() {
//@dump-sem-ir-begin
let cpp_unsigned_long_long: Cpp.unsigned_long_long = 1;
let carbon_unsigned_long_long: u64 = cpp_unsigned_long_long;
let unused carbon_unsigned_long_long: u64 = cpp_unsigned_long_long;
var a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -57,17 +57,17 @@ auto PassLong(int x) -> IntResult;
fn F() {
//@dump-sem-ir-begin
let cpp_long: Cpp.long = 1;
let cpp_long_result: Cpp.LongResult = Cpp.PassLong(cpp_long);
let unused cpp_long_result: Cpp.LongResult = Cpp.PassLong(cpp_long);
let cpp_compat_long: Core.CppCompat.Long32 = cpp_long;
let cpp_compat_long_result: Cpp.LongResult = Cpp.PassLong(cpp_compat_long);
let unused cpp_compat_long_result: Cpp.LongResult = Cpp.PassLong(cpp_compat_long);
let carbon_i32: i32 = cpp_long as i32;
let carbon_i32_result: Cpp.IntResult = Cpp.PassLong(carbon_i32);
let unused carbon_i32_result: Cpp.IntResult = Cpp.PassLong(carbon_i32);
let carbon_i64: i64 = cpp_long;
let unused carbon_i64: i64 = cpp_long;
var a: array(f32, 1 as Cpp.long) = (1.0,);
var unused a: array(f32, 1 as Cpp.long) = (1.0,);
//@dump-sem-ir-end
}
@@ -79,14 +79,14 @@ import Cpp;
fn F() {
let cpp_long: Cpp.long = 1;
// CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+7]]:25: error: cannot implicitly convert expression of type `Cpp.long` to `i32` [ConversionFailure]
// CHECK:STDERR: let carbon_i32: i32 = cpp_long;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+4]]:25: note: type `Cpp.long` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let carbon_i32: i32 = cpp_long;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+7]]:32: error: cannot implicitly convert expression of type `Cpp.long` to `i32` [ConversionFailure]
// CHECK:STDERR: let unused carbon_i32: i32 = cpp_long;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_to_i32.carbon:[[@LINE+4]]:32: note: type `Cpp.long` does not implement interface `Core.ImplicitAs(i32)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused carbon_i32: i32 = cpp_long;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR:
let carbon_i32: i32 = cpp_long;
let unused carbon_i32: i32 = cpp_long;
}
// --- copy_long.carbon
@@ -98,7 +98,7 @@ import Cpp;
fn CopyLong() {
//@dump-sem-ir-begin
var a: Cpp.long = 1;
var b: Cpp.long = a;
var unused b: Cpp.long = a;
//@dump-sem-ir-end
}
@@ -241,12 +241,12 @@ fn ArithmeticHomogeneousLong() {
let x: Cpp.long = 1;
let y: Cpp.long = 1;
let a: Cpp.long = -x;
let b: Cpp.long = x + y;
let c: Cpp.long = x - y;
let d: Cpp.long = x * y;
let e: Cpp.long = x / y;
let f: Cpp.long = x % y;
let unused a: Cpp.long = -x;
let unused b: Cpp.long = x + y;
let unused c: Cpp.long = x - y;
let unused d: Cpp.long = x * y;
let unused e: Cpp.long = x / y;
let unused f: Cpp.long = x % y;
//@dump-sem-ir-end
}
@@ -256,7 +256,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongLeftSide() {
let b: i32 = 1;
@@ -281,7 +281,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongRightSide() {
let b: i32 = 1;
@@ -305,7 +305,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongAndI64() {
let x: Cpp.long = 1;
@@ -320,7 +320,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongAndI16() {
let x: Cpp.long = 1;
@@ -344,7 +344,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongAndI128() {
let x: Cpp.long = 1;
@@ -368,7 +368,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHomogeneousLong() {
let a: Cpp.long = 1;
@@ -389,7 +389,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongLeftSide() {
let b: i32 = 1;
@@ -414,7 +414,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongRightSide() {
let b: i32 = 1;
@@ -439,7 +439,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongAndI64() {
let a: Cpp.long = 1;
@@ -455,7 +455,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongAndI16() {
let a: Cpp.long = 1;
@@ -479,7 +479,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongAndI128() {
let a: Cpp.long = 1;
@@ -633,15 +633,15 @@ auto PassULong(unsigned int x) -> UIntResult;
fn F() {
//@dump-sem-ir-begin
let cpp_unsigned_long: Cpp.unsigned_long = 1;
let cpp_unsigned_long_result: Cpp.ULongResult = Cpp.PassULong(cpp_unsigned_long);
let unused cpp_unsigned_long_result: Cpp.ULongResult = Cpp.PassULong(cpp_unsigned_long);
let cpp_compat_ulong: Core.CppCompat.ULong32 = cpp_unsigned_long;
let cpp_compat_ulong_result: Cpp.ULongResult = Cpp.PassULong(cpp_compat_ulong);
let unused cpp_compat_ulong_result: Cpp.ULongResult = Cpp.PassULong(cpp_compat_ulong);
let carbon_u32: u32 = cpp_unsigned_long;
let carbon_u32_result: Cpp.UIntResult = Cpp.PassULong(carbon_u32);
let unused carbon_u32_result: Cpp.UIntResult = Cpp.PassULong(carbon_u32);
var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -654,7 +654,7 @@ import Cpp;
fn CopyUnsignedLong() {
//@dump-sem-ir-begin
var a: Cpp.unsigned_long = 1;
var b: Cpp.unsigned_long = a;
var unused b: Cpp.unsigned_long = a;
//@dump-sem-ir-end
}
@@ -781,40 +781,40 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc11_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_48: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_48.1: <bound method> = bound_method %float, %impl.elem0.loc11_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_48: <specific function> = specific_function %impl.elem0.loc11_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_48.2: <bound method> = bound_method %float, %specific_fn.loc11_48 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_48.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_55.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_55: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_55.1: <bound method> = bound_method %float, %impl.elem0.loc11_55 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_55: <specific function> = specific_function %impl.elem0.loc11_55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_55.2: <bound method> = bound_method %float, %specific_fn.loc11_55 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_55.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_55.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc11_48.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_48.4: init %f32.97e to %.loc11_48.3 = in_place_init %.loc11_48.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_48.5: init %array_type to %a.var = array_init (%.loc11_48.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_48.1, %.loc11_48.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_55.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_55.4: init %f32.97e to %.loc11_55.3 = in_place_init %.loc11_55.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_55.5: init %array_type to %a.var = array_init (%.loc11_55.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_55.1, %.loc11_55.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc11_3
// CHECK:STDOUT: %.loc11_39: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc11_46: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long_long.ref.loc11: type = name_ref long_long, %i64.1 [concrete = constants.%i64]
// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535]
// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc11_30.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
// CHECK:STDOUT: %bound_method.loc11_30.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.1: <specific function> = specific_function %impl.elem0.loc11_30.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_30.1 [concrete = constants.%bound_method.41b]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_30.2(%int_1.loc11) [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_30.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_30.2: %i64 = converted %int_1.loc11, %.loc11_30.1 [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %impl.elem0.loc11_30.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535]
// CHECK:STDOUT: %bound_method.loc11_30.3: <bound method> = bound_method %.loc11_30.2, %impl.elem0.loc11_30.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.2: <specific function> = specific_function %impl.elem0.loc11_30.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.4: <bound method> = bound_method %.loc11_30.2, %specific_fn.loc11_30.2 [concrete = constants.%bound_method.d1e]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
@@ -947,40 +947,40 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc11_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_57: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_57.1: <bound method> = bound_method %float, %impl.elem0.loc11_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_57: <specific function> = specific_function %impl.elem0.loc11_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_57.2: <bound method> = bound_method %float, %specific_fn.loc11_57 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_57.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_64.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_64: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_64.1: <bound method> = bound_method %float, %impl.elem0.loc11_64 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_64: <specific function> = specific_function %impl.elem0.loc11_64, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_64.2: <bound method> = bound_method %float, %specific_fn.loc11_64 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_64.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_64.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc11_57.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_57.4: init %f32.97e to %.loc11_57.3 = in_place_init %.loc11_57.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_57.5: init %array_type to %a.var = array_init (%.loc11_57.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_57.1, %.loc11_57.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_64.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_64.4: init %f32.97e to %.loc11_64.3 = in_place_init %.loc11_64.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_64.5: init %array_type to %a.var = array_init (%.loc11_64.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_64.1, %.loc11_64.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc11_3
// CHECK:STDOUT: %.loc11_48: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc11_55: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long_long.ref.loc11: type = name_ref unsigned_long_long, %u64.1 [concrete = constants.%u64]
// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715]
// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309]
// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18]
// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc11_30.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715]
// CHECK:STDOUT: %bound_method.loc11_30.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.1: <specific function> = specific_function %impl.elem0.loc11_30.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_30.1 [concrete = constants.%bound_method.9cf]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_30.2(%int_1.loc11) [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_30.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_30.2: %u64 = converted %int_1.loc11, %.loc11_30.1 [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %impl.elem0.loc11_30.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309]
// CHECK:STDOUT: %bound_method.loc11_30.3: <bound method> = bound_method %.loc11_30.2, %impl.elem0.loc11_30.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.2: <specific function> = specific_function %impl.elem0.loc11_30.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.4: <bound method> = bound_method %.loc11_30.2, %specific_fn.loc11_30.2 [concrete = constants.%bound_method.f18]
// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
@@ -1160,20 +1160,20 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc16_48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLong.ref.loc16: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_long.ref.loc16: %Cpp.long = name_ref cpp_long, %cpp_long
// CHECK:STDOUT: %.loc16_62.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.305 = addr_of %.loc16_62.1
// CHECK:STDOUT: %.loc16_69.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.305 = addr_of %.loc16_69.1
// CHECK:STDOUT: %PassLong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_long.ref.loc16, %addr.loc16)
// CHECK:STDOUT: %.loc16_62.2: init %LongResult to %.loc16_62.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_27: type = splice_block %LongResult.ref.loc16 [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc16_69.2: init %LongResult to %.loc16_69.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_34: type = splice_block %LongResult.ref.loc16 [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %LongResult.ref.loc16: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_62.3: ref %LongResult = temporary %.loc16_62.1, %.loc16_62.2
// CHECK:STDOUT: %.loc16_62.4: %LongResult = acquire_value %.loc16_62.3
// CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc16_62.4
// CHECK:STDOUT: %.loc16_69.3: ref %LongResult = temporary %.loc16_69.1, %.loc16_69.2
// CHECK:STDOUT: %.loc16_69.4: %LongResult = acquire_value %.loc16_69.3
// CHECK:STDOUT: %cpp_long_result: %LongResult = value_binding cpp_long_result, %.loc16_69.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_long.patt: %pattern_type.68c = value_binding_pattern cpp_compat_long [concrete]
// CHECK:STDOUT: }
@@ -1187,20 +1187,20 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_long_result.patt: %pattern_type.cd9 = value_binding_pattern cpp_compat_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc19_48: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_55: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLong.ref.loc19: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_compat_long.ref: %Cpp.long = name_ref cpp_compat_long, %cpp_compat_long
// CHECK:STDOUT: %.loc19_76.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_76.1
// CHECK:STDOUT: %.loc19_83.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.305 = addr_of %.loc19_83.1
// CHECK:STDOUT: %PassLong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.1(%cpp_compat_long.ref, %addr.loc19)
// CHECK:STDOUT: %.loc19_76.2: init %LongResult to %.loc19_76.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_34: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc19_83.2: init %LongResult to %.loc19_83.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_41: type = splice_block %LongResult.ref.loc19 [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %LongResult.ref.loc19: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc19_76.3: ref %LongResult = temporary %.loc19_76.1, %.loc19_76.2
// CHECK:STDOUT: %.loc19_76.4: %LongResult = acquire_value %.loc19_76.3
// CHECK:STDOUT: %cpp_compat_long_result: %LongResult = value_binding cpp_compat_long_result, %.loc19_76.4
// CHECK:STDOUT: %.loc19_83.3: ref %LongResult = temporary %.loc19_83.1, %.loc19_83.2
// CHECK:STDOUT: %.loc19_83.4: %LongResult = acquire_value %.loc19_83.3
// CHECK:STDOUT: %cpp_compat_long_result: %LongResult = value_binding cpp_compat_long_result, %.loc19_83.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_i32.patt: %pattern_type.7ce = value_binding_pattern carbon_i32 [concrete]
// CHECK:STDOUT: }
@@ -1217,80 +1217,80 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_i32_result.patt: %pattern_type.454 = value_binding_pattern carbon_i32_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_49: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLong.ref.loc22: %PassLong.cpp_overload_set.type = name_ref PassLong, imports.%PassLong.cpp_overload_set.value [concrete = constants.%PassLong.cpp_overload_set.value]
// CHECK:STDOUT: %carbon_i32.ref: %i32 = name_ref carbon_i32, %carbon_i32
// CHECK:STDOUT: %.loc22_65.1: ref %IntResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.3cb = addr_of %.loc22_65.1
// CHECK:STDOUT: %.loc22_72.1: ref %IntResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.3cb = addr_of %.loc22_72.1
// CHECK:STDOUT: %PassLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLong__carbon_thunk.decl.d16229.2(%carbon_i32.ref, %addr.loc22)
// CHECK:STDOUT: %.loc22_65.2: init %IntResult to %.loc22_65.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_29: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc22_72.2: init %IntResult to %.loc22_72.1 = mark_in_place_init %PassLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_36: type = splice_block %IntResult.ref [concrete = constants.%IntResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %IntResult.ref: type = name_ref IntResult, imports.%IntResult.decl [concrete = constants.%IntResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc22_65.3: ref %IntResult = temporary %.loc22_65.1, %.loc22_65.2
// CHECK:STDOUT: %.loc22_65.4: %IntResult = acquire_value %.loc22_65.3
// CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc22_65.4
// CHECK:STDOUT: %.loc22_72.3: ref %IntResult = temporary %.loc22_72.1, %.loc22_72.2
// CHECK:STDOUT: %.loc22_72.4: %IntResult = acquire_value %.loc22_72.3
// CHECK:STDOUT: %carbon_i32_result: %IntResult = value_binding carbon_i32_result, %.loc22_72.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_i64.patt: %pattern_type.95b = value_binding_pattern carbon_i64 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %cpp_long.ref.loc24: %Cpp.long = name_ref cpp_long, %cpp_long
// CHECK:STDOUT: %.loc24_19: type = splice_block %i64 [concrete = constants.%i64] {
// CHECK:STDOUT: %.loc24_26: type = splice_block %i64 [concrete = constants.%i64] {
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %i64: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %impl.elem0.loc24: %.12d = impl_witness_access constants.%ImplicitAs.impl_witness.bbc, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bbf]
// CHECK:STDOUT: %bound_method.loc24: <bound method> = bound_method %cpp_long.ref.loc24, %impl.elem0.loc24
// CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24: init %i64 = call %bound_method.loc24(%cpp_long.ref.loc24)
// CHECK:STDOUT: %.loc24_25.1: %i64 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24
// CHECK:STDOUT: %.loc24_25.2: %i64 = converted %cpp_long.ref.loc24, %.loc24_25.1
// CHECK:STDOUT: %carbon_i64: %i64 = value_binding carbon_i64, %.loc24_25.2
// CHECK:STDOUT: %.loc24_32.1: %i64 = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc24
// CHECK:STDOUT: %.loc24_32.2: %i64 = converted %cpp_long.ref.loc24, %.loc24_32.1
// CHECK:STDOUT: %carbon_i64: %i64 = value_binding carbon_i64, %.loc24_32.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc26_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc26_43: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc26_43.1: <bound method> = bound_method %float, %impl.elem0.loc26_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc26_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc26_43.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc26_43.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc26_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc26_50.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc26_50: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc26_50.1: <bound method> = bound_method %float, %impl.elem0.loc26_50 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc26_50, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc26_50.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc26_50.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc26_50.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc26_43.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc26_43.4: init %f32.97e to %.loc26_43.3 = in_place_init %.loc26_43.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc26_43.5: init %array_type to %a.var = array_init (%.loc26_43.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc26_3: init %array_type = converted %.loc26_43.1, %.loc26_43.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc26_50.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc26_50.4: init %f32.97e to %.loc26_50.3 = in_place_init %.loc26_50.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc26_50.5: init %array_type to %a.var = array_init (%.loc26_50.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc26_3: init %array_type = converted %.loc26_50.1, %.loc26_50.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc26_3
// CHECK:STDOUT: %.loc26_34: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc26_41: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32.loc26: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc26: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc26: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: %impl.elem0.loc26_23.1: %.a3d = impl_witness_access constants.%As.impl_witness.60c, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc26_23.1: <bound method> = bound_method %int_1.loc26, %impl.elem0.loc26_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long = call %bound_method.loc26_23.1(%int_1.loc26) [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %.loc26_23.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %.loc26_23.2: %Cpp.long = converted %int_1.loc26, %.loc26_23.1 [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %impl.elem0.loc26_23.2: %.7f4 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49]
// CHECK:STDOUT: %bound_method.loc26_23.2: <bound method> = bound_method %.loc26_23.2, %impl.elem0.loc26_23.2 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26: init Core.IntLiteral = call %bound_method.loc26_23.2(%.loc26_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc26_23.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc26_23.4: Core.IntLiteral = converted %.loc26_23.2, %.loc26_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc26_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc26_30.1: %.a3d = impl_witness_access constants.%As.impl_witness.60c, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc26_30.1: <bound method> = bound_method %int_1.loc26, %impl.elem0.loc26_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long = call %bound_method.loc26_30.1(%int_1.loc26) [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %.loc26_30.1: %Cpp.long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %.loc26_30.2: %Cpp.long = converted %int_1.loc26, %.loc26_30.1 [concrete = constants.%int_1.5a4]
// CHECK:STDOUT: %impl.elem0.loc26_30.2: %.7f4 = impl_witness_access constants.%ImplicitAs.impl_witness.e4d, element0 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.d49]
// CHECK:STDOUT: %bound_method.loc26_30.2: <bound method> = bound_method %.loc26_30.2, %impl.elem0.loc26_30.2 [concrete = constants.%Cpp.long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26: init Core.IntLiteral = call %bound_method.loc26_30.2(%.loc26_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc26_30.3: Core.IntLiteral = value_of_initializer %Cpp.long.as.ImplicitAs.impl.Convert.call.loc26 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc26_30.4: Core.IntLiteral = converted %.loc26_30.2, %.loc26_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc26_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
// CHECK:STDOUT: %IntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_65.3, constants.%IntResult.cpp_destructor
// CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call %IntResult.cpp_destructor.bound(%.loc22_65.3)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_76.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc19(%.loc19_76.3)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_62.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc16(%.loc16_62.3)
// CHECK:STDOUT: %IntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_72.3, constants.%IntResult.cpp_destructor
// CHECK:STDOUT: %IntResult.cpp_destructor.call: init %empty_tuple.type = call %IntResult.cpp_destructor.bound(%.loc22_72.3)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_83.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc19(%.loc19_83.3)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_69.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongResult.cpp_destructor.bound.loc16(%.loc16_69.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1358,12 +1358,12 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %b.var: ref %Cpp.long = var %b.var_patt
// CHECK:STDOUT: %a.ref: ref %Cpp.long = name_ref a, %a
// CHECK:STDOUT: %.loc9_21: %Cpp.long = acquire_value %a.ref
// CHECK:STDOUT: %.loc9_28: %Cpp.long = acquire_value %a.ref
// CHECK:STDOUT: %impl.elem0.loc9: %.539 = impl_witness_access constants.%Copy.impl_witness.e75, element0 [concrete = constants.%Cpp.long.as.Copy.impl.Op]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_21, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.call: init %Cpp.long = call %bound_method.loc9(%.loc9_21)
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_28, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.long.as.Copy.impl.Op.call: init %Cpp.long = call %bound_method.loc9(%.loc9_28)
// CHECK:STDOUT: assign %b.var, %Cpp.long.as.Copy.impl.Op.call
// CHECK:STDOUT: %.loc9_13: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc9_20: type = splice_block %long.ref.loc9 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc9: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
@@ -2571,13 +2571,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc11: %.22b = impl_witness_access constants.%Negate.impl_witness, element1 [concrete = constants.%Cpp.long.as.Negate.impl.Op]
// CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %x.ref.loc11, %impl.elem1.loc11
// CHECK:STDOUT: %Cpp.long.as.Negate.impl.Op.call: init %Cpp.long = call %bound_method.loc11(%x.ref.loc11)
// CHECK:STDOUT: %.loc11_13: type = splice_block %long.ref.loc11 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc11_20: type = splice_block %long.ref.loc11 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc11: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc11_21.1: %Cpp.long = value_of_initializer %Cpp.long.as.Negate.impl.Op.call
// CHECK:STDOUT: %.loc11_21.2: %Cpp.long = converted %Cpp.long.as.Negate.impl.Op.call, %.loc11_21.1
// CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc11_21.2
// CHECK:STDOUT: %.loc11_28.1: %Cpp.long = value_of_initializer %Cpp.long.as.Negate.impl.Op.call
// CHECK:STDOUT: %.loc11_28.2: %Cpp.long = converted %Cpp.long.as.Negate.impl.Op.call, %.loc11_28.1
// CHECK:STDOUT: %a: %Cpp.long = value_binding a, %.loc11_28.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type.68c = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
@@ -2586,13 +2586,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc12: %.165 = impl_witness_access constants.%AddWith.impl_witness.e9f, element1 [concrete = constants.%Cpp.long.as.AddWith.impl.Op.be0]
// CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %x.ref.loc12, %impl.elem1.loc12
// CHECK:STDOUT: %Cpp.long.as.AddWith.impl.Op.call: init %Cpp.long = call %bound_method.loc12(%x.ref.loc12, %y.ref.loc12)
// CHECK:STDOUT: %.loc12_13: type = splice_block %long.ref.loc12 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc12_20: type = splice_block %long.ref.loc12 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc12: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.AddWith.impl.Op.call
// CHECK:STDOUT: %.loc12_23.2: %Cpp.long = converted %Cpp.long.as.AddWith.impl.Op.call, %.loc12_23.1
// CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc12_23.2
// CHECK:STDOUT: %.loc12_30.1: %Cpp.long = value_of_initializer %Cpp.long.as.AddWith.impl.Op.call
// CHECK:STDOUT: %.loc12_30.2: %Cpp.long = converted %Cpp.long.as.AddWith.impl.Op.call, %.loc12_30.1
// CHECK:STDOUT: %b: %Cpp.long = value_binding b, %.loc12_30.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c.patt: %pattern_type.68c = value_binding_pattern c [concrete]
// CHECK:STDOUT: }
@@ -2601,13 +2601,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc13: %.571 = impl_witness_access constants.%SubWith.impl_witness.8a6, element1 [concrete = constants.%Cpp.long.as.SubWith.impl.Op.37d]
// CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %x.ref.loc13, %impl.elem1.loc13
// CHECK:STDOUT: %Cpp.long.as.SubWith.impl.Op.call: init %Cpp.long = call %bound_method.loc13(%x.ref.loc13, %y.ref.loc13)
// CHECK:STDOUT: %.loc13_13: type = splice_block %long.ref.loc13 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc13_20: type = splice_block %long.ref.loc13 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc13: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.SubWith.impl.Op.call
// CHECK:STDOUT: %.loc13_23.2: %Cpp.long = converted %Cpp.long.as.SubWith.impl.Op.call, %.loc13_23.1
// CHECK:STDOUT: %c: %Cpp.long = value_binding c, %.loc13_23.2
// CHECK:STDOUT: %.loc13_30.1: %Cpp.long = value_of_initializer %Cpp.long.as.SubWith.impl.Op.call
// CHECK:STDOUT: %.loc13_30.2: %Cpp.long = converted %Cpp.long.as.SubWith.impl.Op.call, %.loc13_30.1
// CHECK:STDOUT: %c: %Cpp.long = value_binding c, %.loc13_30.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %d.patt: %pattern_type.68c = value_binding_pattern d [concrete]
// CHECK:STDOUT: }
@@ -2616,13 +2616,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc14: %.7d0 = impl_witness_access constants.%MulWith.impl_witness.87c, element1 [concrete = constants.%Cpp.long.as.MulWith.impl.Op.4e5]
// CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %x.ref.loc14, %impl.elem1.loc14
// CHECK:STDOUT: %Cpp.long.as.MulWith.impl.Op.call: init %Cpp.long = call %bound_method.loc14(%x.ref.loc14, %y.ref.loc14)
// CHECK:STDOUT: %.loc14_13: type = splice_block %long.ref.loc14 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc14_20: type = splice_block %long.ref.loc14 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc14: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc14_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.MulWith.impl.Op.call
// CHECK:STDOUT: %.loc14_23.2: %Cpp.long = converted %Cpp.long.as.MulWith.impl.Op.call, %.loc14_23.1
// CHECK:STDOUT: %d: %Cpp.long = value_binding d, %.loc14_23.2
// CHECK:STDOUT: %.loc14_30.1: %Cpp.long = value_of_initializer %Cpp.long.as.MulWith.impl.Op.call
// CHECK:STDOUT: %.loc14_30.2: %Cpp.long = converted %Cpp.long.as.MulWith.impl.Op.call, %.loc14_30.1
// CHECK:STDOUT: %d: %Cpp.long = value_binding d, %.loc14_30.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %e.patt: %pattern_type.68c = value_binding_pattern e [concrete]
// CHECK:STDOUT: }
@@ -2631,13 +2631,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc15: %.aa3 = impl_witness_access constants.%DivWith.impl_witness.4ab, element1 [concrete = constants.%Cpp.long.as.DivWith.impl.Op.33f]
// CHECK:STDOUT: %bound_method.loc15: <bound method> = bound_method %x.ref.loc15, %impl.elem1.loc15
// CHECK:STDOUT: %Cpp.long.as.DivWith.impl.Op.call: init %Cpp.long = call %bound_method.loc15(%x.ref.loc15, %y.ref.loc15)
// CHECK:STDOUT: %.loc15_13: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc15_20: type = splice_block %long.ref.loc15 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc15: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc15_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.DivWith.impl.Op.call
// CHECK:STDOUT: %.loc15_23.2: %Cpp.long = converted %Cpp.long.as.DivWith.impl.Op.call, %.loc15_23.1
// CHECK:STDOUT: %e: %Cpp.long = value_binding e, %.loc15_23.2
// CHECK:STDOUT: %.loc15_30.1: %Cpp.long = value_of_initializer %Cpp.long.as.DivWith.impl.Op.call
// CHECK:STDOUT: %.loc15_30.2: %Cpp.long = converted %Cpp.long.as.DivWith.impl.Op.call, %.loc15_30.1
// CHECK:STDOUT: %e: %Cpp.long = value_binding e, %.loc15_30.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %f.patt: %pattern_type.68c = value_binding_pattern f [concrete]
// CHECK:STDOUT: }
@@ -2646,13 +2646,13 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: %impl.elem1.loc16: %.c19 = impl_witness_access constants.%ModWith.impl_witness.c73, element1 [concrete = constants.%Cpp.long.as.ModWith.impl.Op.06e]
// CHECK:STDOUT: %bound_method.loc16: <bound method> = bound_method %x.ref.loc16, %impl.elem1.loc16
// CHECK:STDOUT: %Cpp.long.as.ModWith.impl.Op.call: init %Cpp.long = call %bound_method.loc16(%x.ref.loc16, %y.ref.loc16)
// CHECK:STDOUT: %.loc16_13: type = splice_block %long.ref.loc16 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %.loc16_20: type = splice_block %long.ref.loc16 [concrete = constants.%Cpp.long] {
// CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc16: type = name_ref long, constants.%Cpp.long [concrete = constants.%Cpp.long]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_23.1: %Cpp.long = value_of_initializer %Cpp.long.as.ModWith.impl.Op.call
// CHECK:STDOUT: %.loc16_23.2: %Cpp.long = converted %Cpp.long.as.ModWith.impl.Op.call, %.loc16_23.1
// CHECK:STDOUT: %f: %Cpp.long = value_binding f, %.loc16_23.2
// CHECK:STDOUT: %.loc16_30.1: %Cpp.long = value_of_initializer %Cpp.long.as.ModWith.impl.Op.call
// CHECK:STDOUT: %.loc16_30.2: %Cpp.long = converted %Cpp.long.as.ModWith.impl.Op.call, %.loc16_30.1
// CHECK:STDOUT: %f: %Cpp.long = value_binding f, %.loc16_30.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -4087,20 +4087,20 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_unsigned_long_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_unsigned_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16_51: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc16_58: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULong.ref.loc16: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_unsigned_long.ref.loc16: %Cpp.unsigned_long = name_ref cpp_unsigned_long, %cpp_unsigned_long
// CHECK:STDOUT: %.loc16_82.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.f5e = addr_of %.loc16_82.1
// CHECK:STDOUT: %.loc16_89.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.f5e = addr_of %.loc16_89.1
// CHECK:STDOUT: %PassULong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.1(%cpp_unsigned_long.ref.loc16, %addr.loc16)
// CHECK:STDOUT: %.loc16_82.2: init %ULongResult to %.loc16_82.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_36: type = splice_block %ULongResult.ref.loc16 [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc16_89.2: init %ULongResult to %.loc16_89.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_43: type = splice_block %ULongResult.ref.loc16 [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_40: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ULongResult.ref.loc16: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_82.3: ref %ULongResult = temporary %.loc16_82.1, %.loc16_82.2
// CHECK:STDOUT: %.loc16_82.4: %ULongResult = acquire_value %.loc16_82.3
// CHECK:STDOUT: %cpp_unsigned_long_result: %ULongResult = value_binding cpp_unsigned_long_result, %.loc16_82.4
// CHECK:STDOUT: %.loc16_89.3: ref %ULongResult = temporary %.loc16_89.1, %.loc16_89.2
// CHECK:STDOUT: %.loc16_89.4: %ULongResult = acquire_value %.loc16_89.3
// CHECK:STDOUT: %cpp_unsigned_long_result: %ULongResult = value_binding cpp_unsigned_long_result, %.loc16_89.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_ulong.patt: %pattern_type.5b7 = value_binding_pattern cpp_compat_ulong [concrete]
// CHECK:STDOUT: }
@@ -4114,20 +4114,20 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_ulong_result.patt: %pattern_type.6f2 = value_binding_pattern cpp_compat_ulong_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc19_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_57: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULong.ref.loc19: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_compat_ulong.ref: %Cpp.unsigned_long = name_ref cpp_compat_ulong, %cpp_compat_ulong
// CHECK:STDOUT: %.loc19_80.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.f5e = addr_of %.loc19_80.1
// CHECK:STDOUT: %.loc19_87.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.f5e = addr_of %.loc19_87.1
// CHECK:STDOUT: %PassULong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.1(%cpp_compat_ulong.ref, %addr.loc19)
// CHECK:STDOUT: %.loc19_80.2: init %ULongResult to %.loc19_80.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_35: type = splice_block %ULongResult.ref.loc19 [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc19_87.2: init %ULongResult to %.loc19_87.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_42: type = splice_block %ULongResult.ref.loc19 [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_39: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ULongResult.ref.loc19: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc19_80.3: ref %ULongResult = temporary %.loc19_80.1, %.loc19_80.2
// CHECK:STDOUT: %.loc19_80.4: %ULongResult = acquire_value %.loc19_80.3
// CHECK:STDOUT: %cpp_compat_ulong_result: %ULongResult = value_binding cpp_compat_ulong_result, %.loc19_80.4
// CHECK:STDOUT: %.loc19_87.3: ref %ULongResult = temporary %.loc19_87.1, %.loc19_87.2
// CHECK:STDOUT: %.loc19_87.4: %ULongResult = acquire_value %.loc19_87.3
// CHECK:STDOUT: %cpp_compat_ulong_result: %ULongResult = value_binding cpp_compat_ulong_result, %.loc19_87.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_u32.patt: %pattern_type.4a9 = value_binding_pattern carbon_u32 [concrete]
// CHECK:STDOUT: }
@@ -4145,66 +4145,66 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_u32_result.patt: %pattern_type.dc7 = value_binding_pattern carbon_u32_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULong.ref.loc22: %PassULong.cpp_overload_set.type = name_ref PassULong, imports.%PassULong.cpp_overload_set.value [concrete = constants.%PassULong.cpp_overload_set.value]
// CHECK:STDOUT: %carbon_u32.ref: %u32 = name_ref carbon_u32, %carbon_u32
// CHECK:STDOUT: %.loc22_67.1: ref %UIntResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.059 = addr_of %.loc22_67.1
// CHECK:STDOUT: %.loc22_74.1: ref %UIntResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.059 = addr_of %.loc22_74.1
// CHECK:STDOUT: %PassULong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassULong__carbon_thunk.decl.108234.2(%carbon_u32.ref, %addr.loc22)
// CHECK:STDOUT: %.loc22_67.2: init %UIntResult to %.loc22_67.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_29: type = splice_block %UIntResult.ref [concrete = constants.%UIntResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc22_74.2: init %UIntResult to %.loc22_74.1 = mark_in_place_init %PassULong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_36: type = splice_block %UIntResult.ref [concrete = constants.%UIntResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %UIntResult.ref: type = name_ref UIntResult, imports.%UIntResult.decl [concrete = constants.%UIntResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc22_67.3: ref %UIntResult = temporary %.loc22_67.1, %.loc22_67.2
// CHECK:STDOUT: %.loc22_67.4: %UIntResult = acquire_value %.loc22_67.3
// CHECK:STDOUT: %carbon_u32_result: %UIntResult = value_binding carbon_u32_result, %.loc22_67.4
// CHECK:STDOUT: %.loc22_74.3: ref %UIntResult = temporary %.loc22_74.1, %.loc22_74.2
// CHECK:STDOUT: %.loc22_74.4: %UIntResult = acquire_value %.loc22_74.3
// CHECK:STDOUT: %carbon_u32_result: %UIntResult = value_binding carbon_u32_result, %.loc22_74.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc24_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_52: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_52.1: <bound method> = bound_method %float, %impl.elem0.loc24_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_52.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_52.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_59: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_59.1: <bound method> = bound_method %float, %impl.elem0.loc24_59 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_59, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_59.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_59.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_59.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc24_52.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_52.4: init %f32.97e to %.loc24_52.3 = in_place_init %.loc24_52.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_52.5: init %array_type to %a.var = array_init (%.loc24_52.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_52.1, %.loc24_52.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_59.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_59.4: init %f32.97e to %.loc24_59.3 = in_place_init %.loc24_59.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_59.5: init %array_type to %a.var = array_init (%.loc24_59.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_59.1, %.loc24_59.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc24_3
// CHECK:STDOUT: %.loc24_43: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc24_50: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32.loc24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long.ref.loc24: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.59b = impl_witness_access constants.%As.impl_witness.d5f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.0db = impl_witness_access constants.%ImplicitAs.impl_witness.a13, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53]
// CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc24_30.1: %.59b = impl_witness_access constants.%As.impl_witness.d5f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_30.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long = call %bound_method.loc24_30.1(%int_1.loc24) [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %.loc24_30.1: %Cpp.unsigned_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %.loc24_30.2: %Cpp.unsigned_long = converted %int_1.loc24, %.loc24_30.1 [concrete = constants.%int_1.0ab]
// CHECK:STDOUT: %impl.elem0.loc24_30.2: %.0db = impl_witness_access constants.%ImplicitAs.impl_witness.a13, element0 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.e53]
// CHECK:STDOUT: %bound_method.loc24_30.2: <bound method> = bound_method %.loc24_30.2, %impl.elem0.loc24_30.2 [concrete = constants.%Cpp.unsigned_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
// CHECK:STDOUT: %UIntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_67.3, constants.%UIntResult.cpp_destructor
// CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call %UIntResult.cpp_destructor.bound(%.loc22_67.3)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_80.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc19(%.loc19_80.3)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_82.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc16(%.loc16_82.3)
// CHECK:STDOUT: %UIntResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_74.3, constants.%UIntResult.cpp_destructor
// CHECK:STDOUT: %UIntResult.cpp_destructor.call: init %empty_tuple.type = call %UIntResult.cpp_destructor.bound(%.loc22_74.3)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_87.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc19(%.loc19_87.3)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_89.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound.loc16(%.loc16_89.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -4272,12 +4272,12 @@ fn CopyUnsignedLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %b.var: ref %Cpp.unsigned_long = var %b.var_patt
// CHECK:STDOUT: %a.ref: ref %Cpp.unsigned_long = name_ref a, %a
// CHECK:STDOUT: %.loc9_30: %Cpp.unsigned_long = acquire_value %a.ref
// CHECK:STDOUT: %.loc9_37: %Cpp.unsigned_long = acquire_value %a.ref
// CHECK:STDOUT: %impl.elem0.loc9: %.f45 = impl_witness_access constants.%Copy.impl_witness.ae3, element0 [concrete = constants.%Cpp.unsigned_long.as.Copy.impl.Op]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_30, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long = call %bound_method.loc9(%.loc9_30)
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_37, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.unsigned_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long = call %bound_method.loc9(%.loc9_37)
// CHECK:STDOUT: assign %b.var, %Cpp.unsigned_long.as.Copy.impl.Op.call
// CHECK:STDOUT: %.loc9_13: type = splice_block %unsigned_long.ref.loc9 [concrete = constants.%Cpp.unsigned_long] {
// CHECK:STDOUT: %.loc9_20: type = splice_block %unsigned_long.ref.loc9 [concrete = constants.%Cpp.unsigned_long] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long.ref.loc9: type = name_ref unsigned_long, constants.%Cpp.unsigned_long [concrete = constants.%Cpp.unsigned_long]
// CHECK:STDOUT: }
+205 -205
View File
@@ -20,9 +20,9 @@ import Cpp;
fn F() {
//@dump-sem-ir-begin
let cpp_long: Cpp.long = 1;
let carbon_long: i64 = cpp_long;
let unused carbon_long: i64 = cpp_long;
var a: array(f32, 1 as Cpp.long) = (1.0,);
var unused a: array(f32, 1 as Cpp.long) = (1.0,);
//@dump-sem-ir-end
}
@@ -35,9 +35,9 @@ import Cpp;
fn F() {
//@dump-sem-ir-begin
let cpp_unsigned_long: Cpp.unsigned_long = 1;
let carbon_unsigned_long: u64 = cpp_unsigned_long;
let unused carbon_unsigned_long: u64 = cpp_unsigned_long;
var a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.unsigned_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -57,15 +57,15 @@ auto PassLongLong(long x) -> LongResult;
fn F() {
//@dump-sem-ir-begin
let cpp_long_long: Cpp.long_long = 1;
let cpp_long_long_result: Cpp.LongLongResult = Cpp.PassLongLong(cpp_long_long);
let unused cpp_long_long_result: Cpp.LongLongResult = Cpp.PassLongLong(cpp_long_long);
let cpp_compat_long_long: Core.CppCompat.LongLong64 = cpp_long_long;
let cpp_compat_long_long_result: Cpp.LongLongResult = Cpp.PassLongLong(cpp_compat_long_long);
let unused cpp_compat_long_long_result: Cpp.LongLongResult = Cpp.PassLongLong(cpp_compat_long_long);
let carbon_i64: i64 = cpp_long_long as i64;
let carbon_i64_result: Cpp.LongResult = Cpp.PassLongLong(carbon_i64);
let unused carbon_i64_result: Cpp.LongResult = Cpp.PassLongLong(carbon_i64);
var a: array(f32, 1 as Cpp.long_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.long_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -78,14 +78,14 @@ import Cpp;
fn F() {
let cpp_long_long: Cpp.long_long = 1;
// CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+7]]:25: error: cannot implicitly convert expression of type `Cpp.long_long` to `i64` [ConversionFailure]
// CHECK:STDERR: let carbon_i64: i64 = cpp_long_long;
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+4]]:25: note: type `Cpp.long_long` does not implement interface `Core.ImplicitAs(i64)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let carbon_i64: i64 = cpp_long_long;
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+7]]:32: error: cannot implicitly convert expression of type `Cpp.long_long` to `i64` [ConversionFailure]
// CHECK:STDERR: let unused carbon_i64: i64 = cpp_long_long;
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR: fail_implicit_conversion_long_long_to_i64.carbon:[[@LINE+4]]:32: note: type `Cpp.long_long` does not implement interface `Core.ImplicitAs(i64)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused carbon_i64: i64 = cpp_long_long;
// CHECK:STDERR: ^~~~~~~~~~~~~
// CHECK:STDERR:
let carbon_i64: i64 = cpp_long_long;
let unused carbon_i64: i64 = cpp_long_long;
}
// --- copy_long_long.carbon
@@ -97,7 +97,7 @@ import Cpp;
fn CopyLongLong() {
//@dump-sem-ir-begin
var a: Cpp.long_long = 1;
var b: Cpp.long_long = a;
var unused b: Cpp.long_long = a;
//@dump-sem-ir-end
}
@@ -233,7 +233,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHomogeneousLongLong() {
let x: Cpp.long_long = 1;
@@ -253,7 +253,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongLongLeftSide() {
let b: i64 = 1;
@@ -278,7 +278,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongLongRightSide() {
let b: i64 = 1;
@@ -302,7 +302,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongLongAndI32() {
let x: Cpp.long_long = 1;
@@ -326,7 +326,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn ArithmeticHeterogeneousLongLongAndI128() {
let x: Cpp.long_long = 1;
@@ -341,7 +341,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHomogeneousLongLong() {
let a: Cpp.long_long = 1;
@@ -361,7 +361,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongLongLeftSide() {
let b: i64 = 1;
@@ -386,7 +386,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongLongRightSide() {
let b: i64 = 1;
@@ -411,7 +411,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongLongAndI32() {
let a: Cpp.long_long = 1;
@@ -435,7 +435,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn AssertSameType[T:! type](a: T, b: T) {}
fn AssertSameType[T:! type](unused a: T, unused b: T) {}
fn BitWiseHeterogeneousLongLongAndI128() {
let a: Cpp.long_long = 1;
@@ -581,15 +581,15 @@ auto PassULongLong(unsigned long x) -> ULongResult;
fn F() {
//@dump-sem-ir-begin
let cpp_unsigned_long_long: Cpp.unsigned_long_long = 1;
let cpp_unsigned_long_long_result: Cpp.ULongLongResult = Cpp.PassULongLong(cpp_unsigned_long_long);
let unused cpp_unsigned_long_long_result: Cpp.ULongLongResult = Cpp.PassULongLong(cpp_unsigned_long_long);
let cpp_compat_ulong_long: Core.CppCompat.ULongLong64 = cpp_unsigned_long_long;
let cpp_compat_ulong_long_result: Cpp.ULongLongResult = Cpp.PassULongLong(cpp_compat_ulong_long);
let unused cpp_compat_ulong_long_result: Cpp.ULongLongResult = Cpp.PassULongLong(cpp_compat_ulong_long);
let carbon_u64: u64 = cpp_unsigned_long_long;
let carbon_u64_result: Cpp.ULongResult = Cpp.PassULongLong(carbon_u64);
let unused carbon_u64_result: Cpp.ULongResult = Cpp.PassULongLong(carbon_u64);
var a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
var unused a: array(f32, 1 as Cpp.unsigned_long_long) = (1.0,);
//@dump-sem-ir-end
}
@@ -602,7 +602,7 @@ import Cpp;
fn CopyUnsignedLongLong() {
//@dump-sem-ir-begin
var a: Cpp.unsigned_long_long = 1;
var b: Cpp.unsigned_long_long = a;
var unused b: Cpp.unsigned_long_long = a;
//@dump-sem-ir-end
}
@@ -729,40 +729,40 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc11_43.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_43: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_43.1: <bound method> = bound_method %float, %impl.elem0.loc11_43 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_43: <specific function> = specific_function %impl.elem0.loc11_43, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_43.2: <bound method> = bound_method %float, %specific_fn.loc11_43 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_43.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_43.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_50.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_50: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_50.1: <bound method> = bound_method %float, %impl.elem0.loc11_50 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_50: <specific function> = specific_function %impl.elem0.loc11_50, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_50.2: <bound method> = bound_method %float, %specific_fn.loc11_50 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_50.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_50.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc11_43.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_43.4: init %f32.97e to %.loc11_43.3 = in_place_init %.loc11_43.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_43.5: init %array_type to %a.var = array_init (%.loc11_43.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_43.1, %.loc11_43.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_50.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_50.4: init %f32.97e to %.loc11_50.3 = in_place_init %.loc11_50.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_50.5: init %array_type to %a.var = array_init (%.loc11_50.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_50.1, %.loc11_50.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc11_3
// CHECK:STDOUT: %.loc11_34: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc11_41: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long.ref.loc11: type = name_ref long, %i64.1 [concrete = constants.%i64]
// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.41b]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_23.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_23.2: %i64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535]
// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.d1e]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc11_30.1: %.fc7 = impl_witness_access constants.%As.impl_witness.c71, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a54]
// CHECK:STDOUT: %bound_method.loc11_30.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.1: <specific function> = specific_function %impl.elem0.loc11_30.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_30.1 [concrete = constants.%bound_method.41b]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i64 = call %bound_method.loc11_30.2(%int_1.loc11) [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_30.1: %i64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %.loc11_30.2: %i64 = converted %int_1.loc11, %.loc11_30.1 [concrete = constants.%int_1.41a]
// CHECK:STDOUT: %impl.elem0.loc11_30.2: %.495 = impl_witness_access constants.%ImplicitAs.impl_witness.e86, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.535]
// CHECK:STDOUT: %bound_method.loc11_30.3: <bound method> = bound_method %.loc11_30.2, %impl.elem0.loc11_30.2 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.2: <specific function> = specific_function %impl.elem0.loc11_30.2, @Int.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.4: <bound method> = bound_method %.loc11_30.2, %specific_fn.loc11_30.2 [concrete = constants.%bound_method.d1e]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
@@ -895,40 +895,40 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc11_52.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_52: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_52.1: <bound method> = bound_method %float, %impl.elem0.loc11_52 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_52: <specific function> = specific_function %impl.elem0.loc11_52, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_52.2: <bound method> = bound_method %float, %specific_fn.loc11_52 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_52.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_52.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_59.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc11_59: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc11_59.1: <bound method> = bound_method %float, %impl.elem0.loc11_59 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_59: <specific function> = specific_function %impl.elem0.loc11_59, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_59.2: <bound method> = bound_method %float, %specific_fn.loc11_59 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc11_59.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_59.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc11_52.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_52.4: init %f32.97e to %.loc11_52.3 = in_place_init %.loc11_52.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_52.5: init %array_type to %a.var = array_init (%.loc11_52.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_52.1, %.loc11_52.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_59.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc11_59.4: init %f32.97e to %.loc11_59.3 = in_place_init %.loc11_59.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc11_59.5: init %array_type to %a.var = array_init (%.loc11_59.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc11_3: init %array_type = converted %.loc11_59.1, %.loc11_59.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc11_3
// CHECK:STDOUT: %.loc11_43: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc11_50: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc11: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long.ref.loc11: type = name_ref unsigned_long, %u64.1 [concrete = constants.%u64]
// CHECK:STDOUT: %impl.elem0.loc11_23.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715]
// CHECK:STDOUT: %bound_method.loc11_23.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.1: <specific function> = specific_function %impl.elem0.loc11_23.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_23.1 [concrete = constants.%bound_method.9cf]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_23.2(%int_1.loc11) [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_23.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_23.2: %u64 = converted %int_1.loc11, %.loc11_23.1 [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %impl.elem0.loc11_23.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309]
// CHECK:STDOUT: %bound_method.loc11_23.3: <bound method> = bound_method %.loc11_23.2, %impl.elem0.loc11_23.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_23.2: <specific function> = specific_function %impl.elem0.loc11_23.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_23.4: <bound method> = bound_method %.loc11_23.2, %specific_fn.loc11_23.2 [concrete = constants.%bound_method.f18]
// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_23.4(%.loc11_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_23.4: Core.IntLiteral = converted %.loc11_23.2, %.loc11_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc11_30.1: %.904 = impl_witness_access constants.%As.impl_witness.f54, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.715]
// CHECK:STDOUT: %bound_method.loc11_30.1: <bound method> = bound_method %int_1.loc11, %impl.elem0.loc11_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.1: <specific function> = specific_function %impl.elem0.loc11_30.1, @Core.IntLiteral.as.As.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.2: <bound method> = bound_method %int_1.loc11, %specific_fn.loc11_30.1 [concrete = constants.%bound_method.9cf]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %u64 = call %bound_method.loc11_30.2(%int_1.loc11) [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_30.1: %u64 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %.loc11_30.2: %u64 = converted %int_1.loc11, %.loc11_30.1 [concrete = constants.%int_1.f23]
// CHECK:STDOUT: %impl.elem0.loc11_30.2: %.74a = impl_witness_access constants.%ImplicitAs.impl_witness.2cc, element0 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.309]
// CHECK:STDOUT: %bound_method.loc11_30.3: <bound method> = bound_method %.loc11_30.2, %impl.elem0.loc11_30.2 [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc11_30.2: <specific function> = specific_function %impl.elem0.loc11_30.2, @UInt.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%UInt.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc11_30.4: <bound method> = bound_method %.loc11_30.2, %specific_fn.loc11_30.2 [concrete = constants.%bound_method.f18]
// CHECK:STDOUT: %UInt.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc11_30.4(%.loc11_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.3: Core.IntLiteral = value_of_initializer %UInt.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc11_30.4: Core.IntLiteral = converted %.loc11_30.2, %.loc11_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc11_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
@@ -1097,20 +1097,20 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_long_long_result.patt: %pattern_type.257 = value_binding_pattern cpp_long_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc16_57: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLongLong.ref.loc16: %PassLongLong.cpp_overload_set.type = name_ref PassLongLong, imports.%PassLongLong.cpp_overload_set.value [concrete = constants.%PassLongLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_long_long.ref.loc16: %Cpp.long_long = name_ref cpp_long_long, %cpp_long_long
// CHECK:STDOUT: %.loc16_80.1: ref %LongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.a95 = addr_of %.loc16_80.1
// CHECK:STDOUT: %.loc16_87.1: ref %LongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.a95 = addr_of %.loc16_87.1
// CHECK:STDOUT: %PassLongLong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassLongLong__carbon_thunk.decl.139b1c.1(%cpp_long_long.ref.loc16, %addr.loc16)
// CHECK:STDOUT: %.loc16_80.2: init %LongLongResult to %.loc16_80.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_32: type = splice_block %LongLongResult.ref.loc16 [concrete = constants.%LongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc16_87.2: init %LongLongResult to %.loc16_87.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_39: type = splice_block %LongLongResult.ref.loc16 [concrete = constants.%LongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %LongLongResult.ref.loc16: type = name_ref LongLongResult, imports.%LongLongResult.decl [concrete = constants.%LongLongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_80.3: ref %LongLongResult = temporary %.loc16_80.1, %.loc16_80.2
// CHECK:STDOUT: %.loc16_80.4: %LongLongResult = acquire_value %.loc16_80.3
// CHECK:STDOUT: %cpp_long_long_result: %LongLongResult = value_binding cpp_long_long_result, %.loc16_80.4
// CHECK:STDOUT: %.loc16_87.3: ref %LongLongResult = temporary %.loc16_87.1, %.loc16_87.2
// CHECK:STDOUT: %.loc16_87.4: %LongLongResult = acquire_value %.loc16_87.3
// CHECK:STDOUT: %cpp_long_long_result: %LongLongResult = value_binding cpp_long_long_result, %.loc16_87.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_long_long.patt: %pattern_type.76e = value_binding_pattern cpp_compat_long_long [concrete]
// CHECK:STDOUT: }
@@ -1124,20 +1124,20 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_long_long_result.patt: %pattern_type.257 = value_binding_pattern cpp_compat_long_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc19_57: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_64: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLongLong.ref.loc19: %PassLongLong.cpp_overload_set.type = name_ref PassLongLong, imports.%PassLongLong.cpp_overload_set.value [concrete = constants.%PassLongLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_compat_long_long.ref: %Cpp.long_long = name_ref cpp_compat_long_long, %cpp_compat_long_long
// CHECK:STDOUT: %.loc19_94.1: ref %LongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.a95 = addr_of %.loc19_94.1
// CHECK:STDOUT: %.loc19_101.1: ref %LongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.a95 = addr_of %.loc19_101.1
// CHECK:STDOUT: %PassLongLong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassLongLong__carbon_thunk.decl.139b1c.1(%cpp_compat_long_long.ref, %addr.loc19)
// CHECK:STDOUT: %.loc19_94.2: init %LongLongResult to %.loc19_94.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_39: type = splice_block %LongLongResult.ref.loc19 [concrete = constants.%LongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc19_101.2: init %LongLongResult to %.loc19_101.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_46: type = splice_block %LongLongResult.ref.loc19 [concrete = constants.%LongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %LongLongResult.ref.loc19: type = name_ref LongLongResult, imports.%LongLongResult.decl [concrete = constants.%LongLongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc19_94.3: ref %LongLongResult = temporary %.loc19_94.1, %.loc19_94.2
// CHECK:STDOUT: %.loc19_94.4: %LongLongResult = acquire_value %.loc19_94.3
// CHECK:STDOUT: %cpp_compat_long_long_result: %LongLongResult = value_binding cpp_compat_long_long_result, %.loc19_94.4
// CHECK:STDOUT: %.loc19_101.3: ref %LongLongResult = temporary %.loc19_101.1, %.loc19_101.2
// CHECK:STDOUT: %.loc19_101.4: %LongLongResult = acquire_value %.loc19_101.3
// CHECK:STDOUT: %cpp_compat_long_long_result: %LongLongResult = value_binding cpp_compat_long_long_result, %.loc19_101.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_i64.patt: %pattern_type.95b = value_binding_pattern carbon_i64 [concrete]
// CHECK:STDOUT: }
@@ -1154,66 +1154,66 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_i64_result.patt: %pattern_type.cd9 = value_binding_pattern carbon_i64_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_50: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassLongLong.ref.loc22: %PassLongLong.cpp_overload_set.type = name_ref PassLongLong, imports.%PassLongLong.cpp_overload_set.value [concrete = constants.%PassLongLong.cpp_overload_set.value]
// CHECK:STDOUT: %carbon_i64.ref: %i64 = name_ref carbon_i64, %carbon_i64
// CHECK:STDOUT: %.loc22_70.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.305 = addr_of %.loc22_70.1
// CHECK:STDOUT: %.loc22_77.1: ref %LongResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.305 = addr_of %.loc22_77.1
// CHECK:STDOUT: %PassLongLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassLongLong__carbon_thunk.decl.139b1c.2(%carbon_i64.ref, %addr.loc22)
// CHECK:STDOUT: %.loc22_70.2: init %LongResult to %.loc22_70.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_29: type = splice_block %LongResult.ref [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc22_77.2: init %LongResult to %.loc22_77.1 = mark_in_place_init %PassLongLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_36: type = splice_block %LongResult.ref [concrete = constants.%LongResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %LongResult.ref: type = name_ref LongResult, imports.%LongResult.decl [concrete = constants.%LongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc22_70.3: ref %LongResult = temporary %.loc22_70.1, %.loc22_70.2
// CHECK:STDOUT: %.loc22_70.4: %LongResult = acquire_value %.loc22_70.3
// CHECK:STDOUT: %carbon_i64_result: %LongResult = value_binding carbon_i64_result, %.loc22_70.4
// CHECK:STDOUT: %.loc22_77.3: ref %LongResult = temporary %.loc22_77.1, %.loc22_77.2
// CHECK:STDOUT: %.loc22_77.4: %LongResult = acquire_value %.loc22_77.3
// CHECK:STDOUT: %carbon_i64_result: %LongResult = value_binding carbon_i64_result, %.loc22_77.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc24_48.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_48: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_48.1: <bound method> = bound_method %float, %impl.elem0.loc24_48 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_48, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_48.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_48.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_48.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_55.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_55: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_55.1: <bound method> = bound_method %float, %impl.elem0.loc24_55 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_55, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_55.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_55.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_55.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc24_48.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_48.4: init %f32.97e to %.loc24_48.3 = in_place_init %.loc24_48.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_48.5: init %array_type to %a.var = array_init (%.loc24_48.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_48.1, %.loc24_48.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_55.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_55.4: init %f32.97e to %.loc24_55.3 = in_place_init %.loc24_55.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_55.5: init %array_type to %a.var = array_init (%.loc24_55.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_55.1, %.loc24_55.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc24_3
// CHECK:STDOUT: %.loc24_39: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc24_46: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long_long.ref.loc24: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long]
// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.c9c = impl_witness_access constants.%As.impl_witness.158, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.092]
// CHECK:STDOUT: %.loc24_23.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.092]
// CHECK:STDOUT: %.loc24_23.2: %Cpp.long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.092]
// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.0a4 = impl_witness_access constants.%ImplicitAs.impl_witness.737, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc24_30.1: %.c9c = impl_witness_access constants.%As.impl_witness.158, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_30.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.long_long = call %bound_method.loc24_30.1(%int_1.loc24) [concrete = constants.%int_1.092]
// CHECK:STDOUT: %.loc24_30.1: %Cpp.long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.092]
// CHECK:STDOUT: %.loc24_30.2: %Cpp.long_long = converted %int_1.loc24, %.loc24_30.1 [concrete = constants.%int_1.092]
// CHECK:STDOUT: %impl.elem0.loc24_30.2: %.0a4 = impl_witness_access constants.%ImplicitAs.impl_witness.737, element0 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_30.2: <bound method> = bound_method %.loc24_30.2, %impl.elem0.loc24_30.2 [concrete = constants.%Cpp.long_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.long_long.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.long_long.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_70.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call: init %empty_tuple.type = call %LongResult.cpp_destructor.bound(%.loc22_70.3)
// CHECK:STDOUT: %LongLongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_94.3, constants.%LongLongResult.cpp_destructor
// CHECK:STDOUT: %LongLongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongLongResult.cpp_destructor.bound.loc19(%.loc19_94.3)
// CHECK:STDOUT: %LongLongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_80.3, constants.%LongLongResult.cpp_destructor
// CHECK:STDOUT: %LongLongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongLongResult.cpp_destructor.bound.loc16(%.loc16_80.3)
// CHECK:STDOUT: %LongResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_77.3, constants.%LongResult.cpp_destructor
// CHECK:STDOUT: %LongResult.cpp_destructor.call: init %empty_tuple.type = call %LongResult.cpp_destructor.bound(%.loc22_77.3)
// CHECK:STDOUT: %LongLongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_101.3, constants.%LongLongResult.cpp_destructor
// CHECK:STDOUT: %LongLongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %LongLongResult.cpp_destructor.bound.loc19(%.loc19_101.3)
// CHECK:STDOUT: %LongLongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_87.3, constants.%LongLongResult.cpp_destructor
// CHECK:STDOUT: %LongLongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %LongLongResult.cpp_destructor.bound.loc16(%.loc16_87.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1281,12 +1281,12 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %b.var: ref %Cpp.long_long = var %b.var_patt
// CHECK:STDOUT: %a.ref: ref %Cpp.long_long = name_ref a, %a
// CHECK:STDOUT: %.loc9_26: %Cpp.long_long = acquire_value %a.ref
// CHECK:STDOUT: %.loc9_33: %Cpp.long_long = acquire_value %a.ref
// CHECK:STDOUT: %impl.elem0.loc9: %.3c6 = impl_witness_access constants.%Copy.impl_witness.6d4, element0 [concrete = constants.%Cpp.long_long.as.Copy.impl.Op]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_26, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.call: init %Cpp.long_long = call %bound_method.loc9(%.loc9_26)
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_33, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.long_long.as.Copy.impl.Op.call: init %Cpp.long_long = call %bound_method.loc9(%.loc9_33)
// CHECK:STDOUT: assign %b.var, %Cpp.long_long.as.Copy.impl.Op.call
// CHECK:STDOUT: %.loc9_13: type = splice_block %long_long.ref.loc9 [concrete = constants.%Cpp.long_long] {
// CHECK:STDOUT: %.loc9_20: type = splice_block %long_long.ref.loc9 [concrete = constants.%Cpp.long_long] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %long_long.ref.loc9: type = name_ref long_long, constants.%Cpp.long_long [concrete = constants.%Cpp.long_long]
// CHECK:STDOUT: }
@@ -3803,20 +3803,20 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_unsigned_long_long_result.patt: %pattern_type.633 = value_binding_pattern cpp_unsigned_long_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16_60: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc16_67: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULongLong.ref.loc16: %PassULongLong.cpp_overload_set.type = name_ref PassULongLong, imports.%PassULongLong.cpp_overload_set.value [concrete = constants.%PassULongLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_unsigned_long_long.ref.loc16: %Cpp.unsigned_long_long = name_ref cpp_unsigned_long_long, %cpp_unsigned_long_long
// CHECK:STDOUT: %.loc16_100.1: ref %ULongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.d19 = addr_of %.loc16_100.1
// CHECK:STDOUT: %.loc16_107.1: ref %ULongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc16: %ptr.d19 = addr_of %.loc16_107.1
// CHECK:STDOUT: %PassULongLong__carbon_thunk.call.loc16: init %empty_tuple.type = call imports.%PassULongLong__carbon_thunk.decl.f0c073.1(%cpp_unsigned_long_long.ref.loc16, %addr.loc16)
// CHECK:STDOUT: %.loc16_100.2: init %ULongLongResult to %.loc16_100.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_41: type = splice_block %ULongLongResult.ref.loc16 [concrete = constants.%ULongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc16_107.2: init %ULongLongResult to %.loc16_107.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc16
// CHECK:STDOUT: %.loc16_48: type = splice_block %ULongLongResult.ref.loc16 [concrete = constants.%ULongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc16_45: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ULongLongResult.ref.loc16: type = name_ref ULongLongResult, imports.%ULongLongResult.decl [concrete = constants.%ULongLongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_100.3: ref %ULongLongResult = temporary %.loc16_100.1, %.loc16_100.2
// CHECK:STDOUT: %.loc16_100.4: %ULongLongResult = acquire_value %.loc16_100.3
// CHECK:STDOUT: %cpp_unsigned_long_long_result: %ULongLongResult = value_binding cpp_unsigned_long_long_result, %.loc16_100.4
// CHECK:STDOUT: %.loc16_107.3: ref %ULongLongResult = temporary %.loc16_107.1, %.loc16_107.2
// CHECK:STDOUT: %.loc16_107.4: %ULongLongResult = acquire_value %.loc16_107.3
// CHECK:STDOUT: %cpp_unsigned_long_long_result: %ULongLongResult = value_binding cpp_unsigned_long_long_result, %.loc16_107.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_ulong_long.patt: %pattern_type.ebd = value_binding_pattern cpp_compat_ulong_long [concrete]
// CHECK:STDOUT: }
@@ -3830,20 +3830,20 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %cpp_compat_ulong_long_result.patt: %pattern_type.633 = value_binding_pattern cpp_compat_ulong_long_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc19_59: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_66: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULongLong.ref.loc19: %PassULongLong.cpp_overload_set.type = name_ref PassULongLong, imports.%PassULongLong.cpp_overload_set.value [concrete = constants.%PassULongLong.cpp_overload_set.value]
// CHECK:STDOUT: %cpp_compat_ulong_long.ref: %Cpp.unsigned_long_long = name_ref cpp_compat_ulong_long, %cpp_compat_ulong_long
// CHECK:STDOUT: %.loc19_98.1: ref %ULongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.d19 = addr_of %.loc19_98.1
// CHECK:STDOUT: %.loc19_105.1: ref %ULongLongResult = temporary_storage
// CHECK:STDOUT: %addr.loc19: %ptr.d19 = addr_of %.loc19_105.1
// CHECK:STDOUT: %PassULongLong__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%PassULongLong__carbon_thunk.decl.f0c073.1(%cpp_compat_ulong_long.ref, %addr.loc19)
// CHECK:STDOUT: %.loc19_98.2: init %ULongLongResult to %.loc19_98.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_40: type = splice_block %ULongLongResult.ref.loc19 [concrete = constants.%ULongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_37: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc19_105.2: init %ULongLongResult to %.loc19_105.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc19
// CHECK:STDOUT: %.loc19_47: type = splice_block %ULongLongResult.ref.loc19 [concrete = constants.%ULongLongResult] {
// CHECK:STDOUT: %Cpp.ref.loc19_44: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ULongLongResult.ref.loc19: type = name_ref ULongLongResult, imports.%ULongLongResult.decl [concrete = constants.%ULongLongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc19_98.3: ref %ULongLongResult = temporary %.loc19_98.1, %.loc19_98.2
// CHECK:STDOUT: %.loc19_98.4: %ULongLongResult = acquire_value %.loc19_98.3
// CHECK:STDOUT: %cpp_compat_ulong_long_result: %ULongLongResult = value_binding cpp_compat_ulong_long_result, %.loc19_98.4
// CHECK:STDOUT: %.loc19_105.3: ref %ULongLongResult = temporary %.loc19_105.1, %.loc19_105.2
// CHECK:STDOUT: %.loc19_105.4: %ULongLongResult = acquire_value %.loc19_105.3
// CHECK:STDOUT: %cpp_compat_ulong_long_result: %ULongLongResult = value_binding cpp_compat_ulong_long_result, %.loc19_105.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_u64.patt: %pattern_type.157 = value_binding_pattern carbon_u64 [concrete]
// CHECK:STDOUT: }
@@ -3861,66 +3861,66 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %carbon_u64_result.patt: %pattern_type.6f2 = value_binding_pattern carbon_u64_result [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22_44: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_51: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PassULongLong.ref.loc22: %PassULongLong.cpp_overload_set.type = name_ref PassULongLong, imports.%PassULongLong.cpp_overload_set.value [concrete = constants.%PassULongLong.cpp_overload_set.value]
// CHECK:STDOUT: %carbon_u64.ref: %u64 = name_ref carbon_u64, %carbon_u64
// CHECK:STDOUT: %.loc22_72.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.f5e = addr_of %.loc22_72.1
// CHECK:STDOUT: %.loc22_79.1: ref %ULongResult = temporary_storage
// CHECK:STDOUT: %addr.loc22: %ptr.f5e = addr_of %.loc22_79.1
// CHECK:STDOUT: %PassULongLong__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%PassULongLong__carbon_thunk.decl.f0c073.2(%carbon_u64.ref, %addr.loc22)
// CHECK:STDOUT: %.loc22_72.2: init %ULongResult to %.loc22_72.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_29: type = splice_block %ULongResult.ref [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc22_79.2: init %ULongResult to %.loc22_79.1 = mark_in_place_init %PassULongLong__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_36: type = splice_block %ULongResult.ref [concrete = constants.%ULongResult] {
// CHECK:STDOUT: %Cpp.ref.loc22_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ULongResult.ref: type = name_ref ULongResult, imports.%ULongResult.decl [concrete = constants.%ULongResult]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc22_72.3: ref %ULongResult = temporary %.loc22_72.1, %.loc22_72.2
// CHECK:STDOUT: %.loc22_72.4: %ULongResult = acquire_value %.loc22_72.3
// CHECK:STDOUT: %carbon_u64_result: %ULongResult = value_binding carbon_u64_result, %.loc22_72.4
// CHECK:STDOUT: %.loc22_79.3: ref %ULongResult = temporary %.loc22_79.1, %.loc22_79.2
// CHECK:STDOUT: %.loc22_79.4: %ULongResult = acquire_value %.loc22_79.3
// CHECK:STDOUT: %carbon_u64_result: %ULongResult = value_binding carbon_u64_result, %.loc22_79.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type.b36 = ref_binding_pattern a [concrete]
// CHECK:STDOUT: %a.var_patt: %pattern_type.b36 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc24_57.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_57: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_57.1: <bound method> = bound_method %float, %impl.elem0.loc24_57 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_57, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_57.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_57.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_57.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_64.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc24_64: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc24_64.1: <bound method> = bound_method %float, %impl.elem0.loc24_64 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0.loc24_64, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc24_64.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc24_64.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_64.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc24_57.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_57.4: init %f32.97e to %.loc24_57.3 = in_place_init %.loc24_57.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_57.5: init %array_type to %a.var = array_init (%.loc24_57.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_57.1, %.loc24_57.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_64.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc24_64.4: init %f32.97e to %.loc24_64.3 = in_place_init %.loc24_64.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc24_64.5: init %array_type to %a.var = array_init (%.loc24_64.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc24_3: init %array_type = converted %.loc24_64.1, %.loc24_64.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc24_3
// CHECK:STDOUT: %.loc24_48: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc24_55: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %int_1.loc24: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %Cpp.ref.loc24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long_long.ref.loc24: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long]
// CHECK:STDOUT: %impl.elem0.loc24_23.1: %.83e = impl_witness_access constants.%As.impl_witness.d1f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_23.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_23.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc24_23.1(%int_1.loc24) [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %.loc24_23.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %.loc24_23.2: %Cpp.unsigned_long_long = converted %int_1.loc24, %.loc24_23.1 [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %impl.elem0.loc24_23.2: %.66f = impl_witness_access constants.%ImplicitAs.impl_witness.7c3, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb]
// CHECK:STDOUT: %bound_method.loc24_23.2: <bound method> = bound_method %.loc24_23.2, %impl.elem0.loc24_23.2 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_23.2(%.loc24_23.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_23.4: Core.IntLiteral = converted %.loc24_23.2, %.loc24_23.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_23.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc24_30.1: %.83e = impl_witness_access constants.%As.impl_witness.d1f, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert]
// CHECK:STDOUT: %bound_method.loc24_30.1: <bound method> = bound_method %int_1.loc24, %impl.elem0.loc24_30.1 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %Cpp.unsigned_long_long = call %bound_method.loc24_30.1(%int_1.loc24) [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %.loc24_30.1: %Cpp.unsigned_long_long = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %.loc24_30.2: %Cpp.unsigned_long_long = converted %int_1.loc24, %.loc24_30.1 [concrete = constants.%int_1.79a]
// CHECK:STDOUT: %impl.elem0.loc24_30.2: %.66f = impl_witness_access constants.%ImplicitAs.impl_witness.7c3, element0 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.ffb]
// CHECK:STDOUT: %bound_method.loc24_30.2: <bound method> = bound_method %.loc24_30.2, %impl.elem0.loc24_30.2 [concrete = constants.%Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24: init Core.IntLiteral = call %bound_method.loc24_30.2(%.loc24_30.2) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.3: Core.IntLiteral = value_of_initializer %Cpp.unsigned_long_long.as.ImplicitAs.impl.Convert.call.loc24 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc24_30.4: Core.IntLiteral = converted %.loc24_30.2, %.loc24_30.3 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc24_30.4, %f32 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_72.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound(%.loc22_72.3)
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_98.3, constants.%ULongLongResult.cpp_destructor
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongLongResult.cpp_destructor.bound.loc19(%.loc19_98.3)
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_100.3, constants.%ULongLongResult.cpp_destructor
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongLongResult.cpp_destructor.bound.loc16(%.loc16_100.3)
// CHECK:STDOUT: %ULongResult.cpp_destructor.bound: <bound method> = bound_method %.loc22_79.3, constants.%ULongResult.cpp_destructor
// CHECK:STDOUT: %ULongResult.cpp_destructor.call: init %empty_tuple.type = call %ULongResult.cpp_destructor.bound(%.loc22_79.3)
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.bound.loc19: <bound method> = bound_method %.loc19_105.3, constants.%ULongLongResult.cpp_destructor
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call.loc19: init %empty_tuple.type = call %ULongLongResult.cpp_destructor.bound.loc19(%.loc19_105.3)
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.bound.loc16: <bound method> = bound_method %.loc16_107.3, constants.%ULongLongResult.cpp_destructor
// CHECK:STDOUT: %ULongLongResult.cpp_destructor.call.loc16: init %empty_tuple.type = call %ULongLongResult.cpp_destructor.bound.loc16(%.loc16_107.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -3988,12 +3988,12 @@ fn CopyUnsignedLongLong() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %b.var: ref %Cpp.unsigned_long_long = var %b.var_patt
// CHECK:STDOUT: %a.ref: ref %Cpp.unsigned_long_long = name_ref a, %a
// CHECK:STDOUT: %.loc9_35: %Cpp.unsigned_long_long = acquire_value %a.ref
// CHECK:STDOUT: %.loc9_42: %Cpp.unsigned_long_long = acquire_value %a.ref
// CHECK:STDOUT: %impl.elem0.loc9: %.d24 = impl_witness_access constants.%Copy.impl_witness.95c, element0 [concrete = constants.%Cpp.unsigned_long_long.as.Copy.impl.Op]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_35, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long_long = call %bound_method.loc9(%.loc9_35)
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_42, %impl.elem0.loc9
// CHECK:STDOUT: %Cpp.unsigned_long_long.as.Copy.impl.Op.call: init %Cpp.unsigned_long_long = call %bound_method.loc9(%.loc9_42)
// CHECK:STDOUT: assign %b.var, %Cpp.unsigned_long_long.as.Copy.impl.Op.call
// CHECK:STDOUT: %.loc9_13: type = splice_block %unsigned_long_long.ref.loc9 [concrete = constants.%Cpp.unsigned_long_long] {
// CHECK:STDOUT: %.loc9_20: type = splice_block %unsigned_long_long.ref.loc9 [concrete = constants.%Cpp.unsigned_long_long] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %unsigned_long_long.ref.loc9: type = name_ref unsigned_long_long, constants.%Cpp.unsigned_long_long [concrete = constants.%Cpp.unsigned_long_long]
// CHECK:STDOUT: }
+3 -3
View File
@@ -47,10 +47,10 @@ import Cpp library "abstract.h";
class C {
extend base: Cpp.A;
// CHECK:STDERR: fail_todo_impl_abstract_member.carbon:[[@LINE+4]]:3: error: override without compatible virtual in base class [OverrideWithoutVirtualInBase]
// CHECK:STDERR: override fn f[ref self: Self]() {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: override fn f[unused ref self: Self]() {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
override fn f[ref self: Self]() {}
override fn f[unused ref self: Self]() {}
}
// --- abstract_final.h
+102 -102
View File
@@ -29,8 +29,8 @@ import Cpp library "non_function_member_public.h";
fn F(s: Cpp.S) {
//@dump-sem-ir-begin
let instance_data: i32 = s.instance_data;
let static_data: i32 = Cpp.S.static_data;
let unused instance_data: i32 = s.instance_data;
let unused static_data: i32 = Cpp.S.static_data;
//@dump-sem-ir-end
}
@@ -46,8 +46,8 @@ class Derived {
fn F(d: Derived) {
//@dump-sem-ir-begin
let instance_data: i32 = d.instance_data;
let static_data: i32 = Derived.static_data;
let unused instance_data: i32 = d.instance_data;
let unused static_data: i32 = Derived.static_data;
//@dump-sem-ir-end
}
@@ -70,23 +70,23 @@ library "[[@TEST_NAME]]";
import Cpp library "non_function_member_protected.h";
fn F(c: Cpp.C) {
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+8]]:28: error: cannot access protected member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let instance_data: i32 = c.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+8]]:35: error: cannot access protected member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused instance_data: i32 = c.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./non_function_member_protected.h:2:7: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: class C {
// CHECK:STDERR: ^
// CHECK:STDERR:
let instance_data: i32 = c.instance_data;
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+7]]:26: error: cannot access protected member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+4]]:26: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
let unused instance_data: i32 = c.instance_data;
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+7]]:33: error: cannot access protected member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected.carbon:[[@LINE+4]]:33: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let static_data: i32 = Cpp.C.static_data;
let unused static_data: i32 = Cpp.C.static_data;
}
// --- fail_import_non_function_member_protected_extend.carbon
@@ -100,23 +100,23 @@ class Derived {
}
fn F(d: Derived) {
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+8]]:28: error: cannot access protected member `instance_data` of type `Derived` [ClassInvalidMemberAccess]
// CHECK:STDERR: let instance_data: i32 = d.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+8]]:35: error: cannot access protected member `instance_data` of type `Derived` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused instance_data: i32 = d.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE-10]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./non_function_member_protected.h:2:7: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: class C {
// CHECK:STDERR: ^
// CHECK:STDERR:
let instance_data: i32 = d.instance_data;
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+7]]:26: error: cannot access protected member `static_data` of type `Derived` [ClassInvalidMemberAccess]
// CHECK:STDERR: let static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+4]]:26: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
let unused instance_data: i32 = d.instance_data;
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+7]]:33: error: cannot access protected member `static_data` of type `Derived` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_protected_extend.carbon:[[@LINE+4]]:33: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let static_data: i32 = Derived.static_data;
let unused static_data: i32 = Derived.static_data;
}
// --- import_non_function_member_protected_extend_call_in_member.carbon
@@ -129,10 +129,10 @@ class Derived {
extend base: Cpp.C;
fn F[self: Self]() {
//@dump-sem-ir-begin
let instance_data: i32 = self.instance_data;
let unqualified_static_data: i32 = static_data;
let derived_static_data: i32 = Derived.static_data;
let base_static_data: i32 = Cpp.C.static_data;
let unused instance_data: i32 = self.instance_data;
let unused unqualified_static_data: i32 = static_data;
let unused derived_static_data: i32 = Derived.static_data;
let unused base_static_data: i32 = Cpp.C.static_data;
//@dump-sem-ir-end
}
}
@@ -155,23 +155,23 @@ library "[[@TEST_NAME]]";
import Cpp library "non_function_member_private.h";
fn F(c: Cpp.C) {
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+8]]:28: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let instance_data: i32 = c.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+8]]:35: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused instance_data: i32 = c.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./non_function_member_private.h:2:7: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: class C {
// CHECK:STDERR: ^
// CHECK:STDERR:
let instance_data: i32 = c.instance_data;
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+7]]:26: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+4]]:26: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
let unused instance_data: i32 = c.instance_data;
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+7]]:33: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private.carbon:[[@LINE+4]]:33: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let static_data: i32 = Cpp.C.static_data;
let unused static_data: i32 = Cpp.C.static_data;
}
// --- fail_import_non_function_member_private_extend.carbon
@@ -183,44 +183,44 @@ import Cpp library "non_function_member_private.h";
class Derived {
extend base: Cpp.C;
fn F[self: Self]() {
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+8]]:30: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let instance_data: i32 = self.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+8]]:37: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused instance_data: i32 = self.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE-8]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./non_function_member_private.h:2:7: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: class C {
// CHECK:STDERR: ^
// CHECK:STDERR:
let instance_data: i32 = self.instance_data;
let unused instance_data: i32 = self.instance_data;
}
}
fn F(d: Derived) {
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+8]]:28: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let instance_data: i32 = d.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+8]]:35: error: cannot access private member `instance_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused instance_data: i32 = d.instance_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE-21]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./non_function_member_private.h:2:7: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: class C {
// CHECK:STDERR: ^
// CHECK:STDERR:
let instance_data: i32 = d.instance_data;
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+7]]:34: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+4]]:34: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
let unused instance_data: i32 = d.instance_data;
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+7]]:41: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+4]]:41: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+7]]:31: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let base_static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE-4]]:34: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
let unused derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE+7]]:38: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused base_static_data: i32 = Cpp.C.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend.carbon:[[@LINE-4]]:41: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused derived_static_data: i32 = Derived.static_data;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let base_static_data: i32 = Cpp.C.static_data;
let unused base_static_data: i32 = Cpp.C.static_data;
}
// --- fail_import_non_function_member_private_extend_static_within_member_function.carbon
@@ -233,14 +233,14 @@ class Derived {
extend base: Cpp.C;
fn F() {
// TODO: `C.static_data` is private, so this should fail.
// CHECK:STDERR: fail_import_non_function_member_private_extend_static_within_member_function.carbon:[[@LINE+7]]:40: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unqualified_static_data: i32 = static_data;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend_static_within_member_function.carbon:[[@LINE+4]]:40: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unqualified_static_data: i32 = static_data;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend_static_within_member_function.carbon:[[@LINE+7]]:47: error: cannot access private member `static_data` of type `Cpp.C` [ClassInvalidMemberAccess]
// CHECK:STDERR: let unused unqualified_static_data: i32 = static_data;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_import_non_function_member_private_extend_static_within_member_function.carbon:[[@LINE+4]]:47: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: let unused unqualified_static_data: i32 = static_data;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR:
let unqualified_static_data: i32 = static_data;
let unused unqualified_static_data: i32 = static_data;
}
}
@@ -333,7 +333,7 @@ import Cpp library "function_member_protected.h";
class Derived {
extend base: Cpp.C;
fn F[self: Self]() {
fn F[unused self: Self]() {
//@dump-sem-ir-begin
static_fn();
Derived.static_fn();
@@ -1643,13 +1643,13 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %s.ref: %S = name_ref s, %s
// CHECK:STDOUT: %instance_data.ref: %S.elem = name_ref instance_data, @S.%.1 [concrete = @S.%.1]
// CHECK:STDOUT: %.loc8_29.1: ref %i32 = class_element_access %s.ref, element0
// CHECK:STDOUT: %.loc8_29.2: %i32 = acquire_value %.loc8_29.1
// CHECK:STDOUT: %.loc8_22: type = splice_block %i32.loc8 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc8_36.1: ref %i32 = class_element_access %s.ref, element0
// CHECK:STDOUT: %.loc8_36.2: %i32 = acquire_value %.loc8_36.1
// CHECK:STDOUT: %.loc8_29: type = splice_block %i32.loc8 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc8: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc8: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc8_29.2
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc8_36.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %static_data.patt: %pattern_type.7ce = value_binding_pattern static_data [concrete]
// CHECK:STDOUT: }
@@ -1657,12 +1657,12 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: %S.ref.loc9: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %static_data.ref: ref %i32 = name_ref static_data, imports.%static_data.var [concrete = imports.%static_data.var]
// CHECK:STDOUT: %.loc9_20: type = splice_block %i32.loc9 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc9_27: type = splice_block %i32.loc9 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_31: %i32 = acquire_value %static_data.ref
// CHECK:STDOUT: %static_data: %i32 = value_binding static_data, %.loc9_31
// CHECK:STDOUT: %.loc9_38: %i32 = acquire_value %static_data.ref
// CHECK:STDOUT: %static_data: %i32 = value_binding static_data, %.loc9_38
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1690,27 +1690,27 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %d.ref: %Derived = name_ref d, %d
// CHECK:STDOUT: %instance_data.ref: %S.elem = name_ref instance_data, @S.%.1 [concrete = @S.%.1]
// CHECK:STDOUT: %.loc12_29.1: ref %S = class_element_access %d.ref, element0
// CHECK:STDOUT: %.loc12_29.2: ref %S = converted %d.ref, %.loc12_29.1
// CHECK:STDOUT: %.loc12_29.3: ref %i32 = class_element_access %.loc12_29.2, element0
// CHECK:STDOUT: %.loc12_22: type = splice_block %i32.loc12 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc12_36.1: ref %S = class_element_access %d.ref, element0
// CHECK:STDOUT: %.loc12_36.2: ref %S = converted %d.ref, %.loc12_36.1
// CHECK:STDOUT: %.loc12_36.3: ref %i32 = class_element_access %.loc12_36.2, element0
// CHECK:STDOUT: %.loc12_29: type = splice_block %i32.loc12 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12_29.4: %i32 = acquire_value %.loc12_29.3
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc12_29.4
// CHECK:STDOUT: %.loc12_36.4: %i32 = acquire_value %.loc12_36.3
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc12_36.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %static_data.patt: %pattern_type.7ce = value_binding_pattern static_data [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.ref.loc13: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %static_data.ref: ref %i32 = name_ref static_data, imports.%static_data.var [concrete = imports.%static_data.var]
// CHECK:STDOUT: %.loc13_20: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc13_27: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_33: %i32 = acquire_value %static_data.ref
// CHECK:STDOUT: %static_data: %i32 = value_binding static_data, %.loc13_33
// CHECK:STDOUT: %.loc13_40: %i32 = acquire_value %static_data.ref
// CHECK:STDOUT: %static_data: %i32 = value_binding static_data, %.loc13_40
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1757,49 +1757,49 @@ fn Call(var instance: Cpp.PublicPrivate) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %self.ref: %Derived = name_ref self, %self
// CHECK:STDOUT: %instance_data.ref: %C.elem = name_ref instance_data, @C.%.1 [concrete = @C.%.1]
// CHECK:STDOUT: %.loc10_34.1: ref %C = class_element_access %self.ref, element0
// CHECK:STDOUT: %.loc10_34.2: ref %C = converted %self.ref, %.loc10_34.1
// CHECK:STDOUT: %.loc10_34.3: ref %i32 = class_element_access %.loc10_34.2, element0
// CHECK:STDOUT: %.loc10_24: type = splice_block %i32.loc10 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc10_41.1: ref %C = class_element_access %self.ref, element0
// CHECK:STDOUT: %.loc10_41.2: ref %C = converted %self.ref, %.loc10_41.1
// CHECK:STDOUT: %.loc10_41.3: ref %i32 = class_element_access %.loc10_41.2, element0
// CHECK:STDOUT: %.loc10_31: type = splice_block %i32.loc10 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc10: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_34.4: %i32 = acquire_value %.loc10_34.3
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc10_34.4
// CHECK:STDOUT: %.loc10_41.4: %i32 = acquire_value %.loc10_41.3
// CHECK:STDOUT: %instance_data: %i32 = value_binding instance_data, %.loc10_41.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %unqualified_static_data.patt: %pattern_type.7ce = value_binding_pattern unqualified_static_data [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %static_data.ref.loc11: ref %i32 = name_ref static_data, imports.%static_data.var [concrete = imports.%static_data.var]
// CHECK:STDOUT: %.loc11_34: type = splice_block %i32.loc11 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc11_41: type = splice_block %i32.loc11 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc11_40: %i32 = acquire_value %static_data.ref.loc11
// CHECK:STDOUT: %unqualified_static_data: %i32 = value_binding unqualified_static_data, %.loc11_40
// CHECK:STDOUT: %.loc11_47: %i32 = acquire_value %static_data.ref.loc11
// CHECK:STDOUT: %unqualified_static_data: %i32 = value_binding unqualified_static_data, %.loc11_47
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %derived_static_data.patt: %pattern_type.7ce = value_binding_pattern derived_static_data [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
// CHECK:STDOUT: %static_data.ref.loc12: ref %i32 = name_ref static_data, imports.%static_data.var [concrete = imports.%static_data.var]
// CHECK:STDOUT: %.loc12_30: type = splice_block %i32.loc12 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc12_37: type = splice_block %i32.loc12 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc12: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12_43: %i32 = acquire_value %static_data.ref.loc12
// CHECK:STDOUT: %derived_static_data: %i32 = value_binding derived_static_data, %.loc12_43
// CHECK:STDOUT: %.loc12_50: %i32 = acquire_value %static_data.ref.loc12
// CHECK:STDOUT: %derived_static_data: %i32 = value_binding derived_static_data, %.loc12_50
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %base_static_data.patt: %pattern_type.7ce = value_binding_pattern base_static_data [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %static_data.ref.loc13: ref %i32 = name_ref static_data, imports.%static_data.var [concrete = imports.%static_data.var]
// CHECK:STDOUT: %.loc13_27: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc13_34: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_38: %i32 = acquire_value %static_data.ref.loc13
// CHECK:STDOUT: %base_static_data: %i32 = value_binding base_static_data, %.loc13_38
// CHECK:STDOUT: %.loc13_45: %i32 = acquire_value %static_data.ref.loc13
// CHECK:STDOUT: %base_static_data: %i32 = value_binding base_static_data, %.loc13_45
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+19 -19
View File
@@ -35,15 +35,15 @@ library "[[@TEST_NAME]]";
import Cpp library "declaration.h";
fn MyF() {
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:12: error: binding pattern has incomplete type `Bar` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var bar: Cpp.Bar;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:19: error: binding pattern has incomplete type `Bar` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var unused bar: Cpp.Bar;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./declaration.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
// CHECK:STDERR: class Bar;
// CHECK:STDERR: ^
// CHECK:STDERR:
var bar: Cpp.Bar;
var unused bar: Cpp.Bar;
}
// ============================================================================
@@ -125,7 +125,7 @@ import Cpp library "static_data_member.h";
fn MyF() {
//@dump-sem-ir-begin
let bar: Cpp.Bar* = Cpp.Bar.foo;
let unused bar: Cpp.Bar* = Cpp.Bar.foo;
//@dump-sem-ir-end
}
@@ -148,7 +148,7 @@ import Cpp library "data_member.h";
//@dump-sem-ir-begin
fn MyF(bar : Cpp.Bar*) {
let foo_bar: Cpp.Bar* = bar->foo;
let unused foo_bar: Cpp.Bar* = bar->foo;
}
//@dump-sem-ir-end
@@ -383,16 +383,16 @@ fn MyF(bar: Cpp.Bar(Cpp.X)*);
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %bar.patt: %pattern_type = value_binding_pattern bar [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_26: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %Cpp.ref.loc8_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_33: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %foo.ref: ref %ptr.f68 = name_ref foo, imports.%foo.var [concrete = imports.%foo.var]
// CHECK:STDOUT: %.loc8_19: type = splice_block %ptr [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8_12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_15: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc8_15 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: %.loc8_26: type = splice_block %ptr [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_22: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc8_22 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30: %ptr.f68 = acquire_value %foo.ref
// CHECK:STDOUT: %bar: %ptr.f68 = value_binding bar, %.loc8_30
// CHECK:STDOUT: %.loc8_37: %ptr.f68 = acquire_value %foo.ref
// CHECK:STDOUT: %bar: %ptr.f68 = value_binding bar, %.loc8_37
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -436,16 +436,16 @@ fn MyF(bar: Cpp.Bar(Cpp.X)*);
// CHECK:STDOUT: %foo_bar.patt: %pattern_type = value_binding_pattern foo_bar [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %bar.ref: %ptr.f68 = name_ref bar, %bar
// CHECK:STDOUT: %.loc8_30.1: ref %Bar = deref %bar.ref
// CHECK:STDOUT: %.loc8_37.1: ref %Bar = deref %bar.ref
// CHECK:STDOUT: %foo.ref: %Bar.elem = name_ref foo, @Bar.%.1 [concrete = @Bar.%.1]
// CHECK:STDOUT: %.loc8_30.2: ref %ptr.f68 = class_element_access %.loc8_30.1, element0
// CHECK:STDOUT: %.loc8_23: type = splice_block %ptr.loc8 [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %.loc8_37.2: ref %ptr.f68 = class_element_access %.loc8_37.1, element0
// CHECK:STDOUT: %.loc8_30: type = splice_block %ptr.loc8 [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr.loc8: type = ptr_type %Bar.ref.loc8 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30.3: %ptr.f68 = acquire_value %.loc8_30.2
// CHECK:STDOUT: %foo_bar: %ptr.f68 = value_binding foo_bar, %.loc8_30.3
// CHECK:STDOUT: %.loc8_37.3: %ptr.f68 = acquire_value %.loc8_37.2
// CHECK:STDOUT: %foo_bar: %ptr.f68 = value_binding foo_bar, %.loc8_37.3
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+283 -283
View File
@@ -29,7 +29,7 @@ import Cpp library "default.h";
fn F() {
//@dump-sem-ir-begin
let c: Cpp.C = Cpp.C.C();
let unused c: Cpp.C = Cpp.C.C();
//@dump-sem-ir-end
}
@@ -52,7 +52,7 @@ import Cpp library "non_default.h";
fn F() {
//@dump-sem-ir-begin
let c: Cpp.C = Cpp.C.C(123, 456);
let unused c: Cpp.C = Cpp.C.C(123, 456);
//@dump-sem-ir-end
}
@@ -76,8 +76,8 @@ import Cpp library "multiple.h";
fn F() {
//@dump-sem-ir-begin
let c1: Cpp.C = Cpp.C.C();
let c2: Cpp.C = Cpp.C.C(123, 456);
let unused c1: Cpp.C = Cpp.C.C();
let unused c2: Cpp.C = Cpp.C.C(123, 456);
//@dump-sem-ir-end
}
@@ -100,8 +100,8 @@ import Cpp library "default_arguments.h";
fn F() {
//@dump-sem-ir-begin
let c1: Cpp.C = Cpp.C.C(8, 9);
let c2: Cpp.C = Cpp.C.C(8);
let unused c1: Cpp.C = Cpp.C.C(8, 9);
let unused c2: Cpp.C = Cpp.C.C(8);
//@dump-sem-ir-end
}
@@ -126,8 +126,8 @@ import Cpp library "template.h";
fn F() {
//@dump-sem-ir-begin
var c1: Cpp.C = Cpp.C.C(123);
var c2: Cpp.C = Cpp.C.C(true);
var c3: Cpp.C = Cpp.C.C(&c1);
var unused c2: Cpp.C = Cpp.C.C(true);
var unused c3: Cpp.C = Cpp.C.C(&c1);
//@dump-sem-ir-end
}
@@ -155,19 +155,19 @@ library "[[@TEST_NAME]]";
import Cpp library "deleted.h";
fn F() {
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE+8]]:26: error: call to deleted function 'C' [CppInteropParseError]
// CHECK:STDERR: 15 | let c: Cpp.C = Cpp.C.C();
// CHECK:STDERR: | ^
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE+8]]:33: error: call to deleted function 'C' [CppInteropParseError]
// CHECK:STDERR: 15 | let unused c: Cpp.C = Cpp.C.C();
// CHECK:STDERR: | ^
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./deleted.h:4:3: note: candidate constructor has been explicitly deleted [CppInteropParseNote]
// CHECK:STDERR: 4 | C() = delete;
// CHECK:STDERR: | ^
// CHECK:STDERR:
let c: Cpp.C = Cpp.C.C();
let unused c: Cpp.C = Cpp.C.C();
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE+12]]:27: error: call to deleted function 'D' [CppInteropParseError]
// CHECK:STDERR: 29 | let d: Cpp.D = Cpp.D.D(0);
// CHECK:STDERR: | ^
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE+12]]:34: error: call to deleted function 'D' [CppInteropParseError]
// CHECK:STDERR: 29 | let unused d: Cpp.D = Cpp.D.D(0);
// CHECK:STDERR: | ^
// CHECK:STDERR: fail_import_deleted.carbon:[[@LINE-16]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./deleted.h:9:3: note: candidate constructor has been explicitly deleted [CppInteropParseNote]
// CHECK:STDERR: 9 | D(int) = delete;
@@ -177,7 +177,7 @@ fn F() {
// CHECK:STDERR: 10 | D(short);
// CHECK:STDERR: | ^
// CHECK:STDERR:
let d: Cpp.D = Cpp.D.D(0);
let unused d: Cpp.D = Cpp.D.D(0);
}
// ============================================================================
@@ -199,8 +199,8 @@ import Cpp library "implicit_single_argument.h";
fn F() {
//@dump-sem-ir-begin
let c1: Cpp.C = Cpp.C.C(8);
let c2: Cpp.C = 8 as i32;
let unused c1: Cpp.C = Cpp.C.C(8);
let unused c2: Cpp.C = 8 as i32;
//@dump-sem-ir-end
}
@@ -223,9 +223,9 @@ import Cpp library "implicit_multi_arguments.h";
fn F() {
//@dump-sem-ir-begin
let c1: Cpp.C = Cpp.C.C(8, 9);
let c2: Cpp.C = Cpp.C.C(8);
let c3: Cpp.C = 8 as i32;
let unused c1: Cpp.C = Cpp.C.C(8, 9);
let unused c2: Cpp.C = Cpp.C.C(8);
let unused c3: Cpp.C = 8 as i32;
//@dump-sem-ir-end
}
@@ -289,22 +289,22 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c.patt: %pattern_type.217 = value_binding_pattern c [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_23: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_26.1: ref %C = temporary_storage
// CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_26.1
// CHECK:STDOUT: %Cpp.ref.loc8_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_30: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_33.1: ref %C = temporary_storage
// CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_33.1
// CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc8_26.2: init %C to %.loc8_26.1 = mark_in_place_init %C__carbon_thunk.call
// CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc8_33.2: init %C to %.loc8_33.1 = mark_in_place_init %C__carbon_thunk.call
// CHECK:STDOUT: %.loc8_20: type = splice_block %C.ref.loc8_20 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_20: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_26.3: ref %C = temporary %.loc8_26.1, %.loc8_26.2
// CHECK:STDOUT: %.loc8_26.4: %C = acquire_value %.loc8_26.3
// CHECK:STDOUT: %c: %C = value_binding c, %.loc8_26.4
// CHECK:STDOUT: %C.cpp_destructor.bound: <bound method> = bound_method %.loc8_26.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call %C.cpp_destructor.bound(%.loc8_26.3)
// CHECK:STDOUT: %.loc8_33.3: ref %C = temporary %.loc8_33.1, %.loc8_33.2
// CHECK:STDOUT: %.loc8_33.4: %C = acquire_value %.loc8_33.3
// CHECK:STDOUT: %c: %C = value_binding c, %.loc8_33.4
// CHECK:STDOUT: %C.cpp_destructor.bound: <bound method> = bound_method %.loc8_33.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call %C.cpp_destructor.bound(%.loc8_33.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -365,38 +365,38 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c.patt: %pattern_type.217 = value_binding_pattern c [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_23: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc8_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_28: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_30: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
// CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010]
// CHECK:STDOUT: %.loc8_34.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_26: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_26.1: <bound method> = bound_method %int_123, %impl.elem0.loc8_26 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c]
// CHECK:STDOUT: %specific_fn.loc8_26: <specific function> = specific_function %impl.elem0.loc8_26, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_26.2: <bound method> = bound_method %int_123, %specific_fn.loc8_26 [concrete = constants.%bound_method.db6]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26: init %i32 = call %bound_method.loc8_26.2(%int_123) [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc8_26.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_26 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc8_26.2: %i32 = converted %int_123, %.loc8_26.1 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %impl.elem0.loc8_31: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_31.1: <bound method> = bound_method %int_456, %impl.elem0.loc8_31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266]
// CHECK:STDOUT: %specific_fn.loc8_31: <specific function> = specific_function %impl.elem0.loc8_31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_31.2: <bound method> = bound_method %int_456, %specific_fn.loc8_31 [concrete = constants.%bound_method.f41]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31: init %i32 = call %bound_method.loc8_31.2(%int_456) [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc8_31.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_31 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc8_31.2: %i32 = converted %int_456, %.loc8_31.1 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_34.1
// CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_26.2, %.loc8_31.2, %addr)
// CHECK:STDOUT: %.loc8_34.2: init %C to %.loc8_34.1 = mark_in_place_init %C__carbon_thunk.call
// CHECK:STDOUT: %.loc8_13: type = splice_block %C.ref.loc8_13 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_13: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc8_41.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_33: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_33.1: <bound method> = bound_method %int_123, %impl.elem0.loc8_33 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c]
// CHECK:STDOUT: %specific_fn.loc8_33: <specific function> = specific_function %impl.elem0.loc8_33, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_33.2: <bound method> = bound_method %int_123, %specific_fn.loc8_33 [concrete = constants.%bound_method.db6]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_33: init %i32 = call %bound_method.loc8_33.2(%int_123) [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc8_33.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_33 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc8_33.2: %i32 = converted %int_123, %.loc8_33.1 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %impl.elem0.loc8_38: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_38.1: <bound method> = bound_method %int_456, %impl.elem0.loc8_38 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266]
// CHECK:STDOUT: %specific_fn.loc8_38: <specific function> = specific_function %impl.elem0.loc8_38, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_38.2: <bound method> = bound_method %int_456, %specific_fn.loc8_38 [concrete = constants.%bound_method.f41]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_38: init %i32 = call %bound_method.loc8_38.2(%int_456) [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc8_38.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_38 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc8_38.2: %i32 = converted %int_456, %.loc8_38.1 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %addr: %ptr.d9e = addr_of %.loc8_41.1
// CHECK:STDOUT: %C__carbon_thunk.call: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_33.2, %.loc8_38.2, %addr)
// CHECK:STDOUT: %.loc8_41.2: init %C to %.loc8_41.1 = mark_in_place_init %C__carbon_thunk.call
// CHECK:STDOUT: %.loc8_20: type = splice_block %C.ref.loc8_20 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_20: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_34.3: ref %C = temporary %.loc8_34.1, %.loc8_34.2
// CHECK:STDOUT: %.loc8_34.4: %C = acquire_value %.loc8_34.3
// CHECK:STDOUT: %c: %C = value_binding c, %.loc8_34.4
// CHECK:STDOUT: %C.cpp_destructor.bound: <bound method> = bound_method %.loc8_34.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call %C.cpp_destructor.bound(%.loc8_34.3)
// CHECK:STDOUT: %.loc8_41.3: ref %C = temporary %.loc8_41.1, %.loc8_41.2
// CHECK:STDOUT: %.loc8_41.4: %C = acquire_value %.loc8_41.3
// CHECK:STDOUT: %c: %C = value_binding c, %.loc8_41.4
// CHECK:STDOUT: %C.cpp_destructor.bound: <bound method> = bound_method %.loc8_41.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call: init %empty_tuple.type = call %C.cpp_destructor.bound(%.loc8_41.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -464,57 +464,57 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c1.patt: %pattern_type.217 = value_binding_pattern c1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_27.1: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_27.1
// CHECK:STDOUT: %Cpp.ref.loc8_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_34.1: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_34.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%addr.loc8)
// CHECK:STDOUT: %.loc8_27.2: init %C to %.loc8_27.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc8_34.2: init %C to %.loc8_34.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_21: type = splice_block %C.ref.loc8_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_27.3: ref %C = temporary %.loc8_27.1, %.loc8_27.2
// CHECK:STDOUT: %.loc8_27.4: %C = acquire_value %.loc8_27.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_27.4
// CHECK:STDOUT: %.loc8_34.3: ref %C = temporary %.loc8_34.1, %.loc8_34.2
// CHECK:STDOUT: %.loc8_34.4: %C = acquire_value %.loc8_34.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_34.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c2.patt: %pattern_type.217 = value_binding_pattern c2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc9_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
// CHECK:STDOUT: %int_456: Core.IntLiteral = int_value 456 [concrete = constants.%int_456.010]
// CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc9_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_27.1: <bound method> = bound_method %int_123, %impl.elem0.loc9_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c]
// CHECK:STDOUT: %specific_fn.loc9_27: <specific function> = specific_function %impl.elem0.loc9_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_27.2: <bound method> = bound_method %int_123, %specific_fn.loc9_27 [concrete = constants.%bound_method.db6]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27: init %i32 = call %bound_method.loc9_27.2(%int_123) [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_27 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_123, %.loc9_27.1 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %impl.elem0.loc9_32: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_32.1: <bound method> = bound_method %int_456, %impl.elem0.loc9_32 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266]
// CHECK:STDOUT: %specific_fn.loc9_32: <specific function> = specific_function %impl.elem0.loc9_32, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_32.2: <bound method> = bound_method %int_456, %specific_fn.loc9_32 [concrete = constants.%bound_method.f41]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_32: init %i32 = call %bound_method.loc9_32.2(%int_456) [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc9_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_32 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc9_32.2: %i32 = converted %int_456, %.loc9_32.1 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_35.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_27.2, %.loc9_32.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_35.2: init %C to %.loc9_35.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc9_42.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc9_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_34.1: <bound method> = bound_method %int_123, %impl.elem0.loc9_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f5c]
// CHECK:STDOUT: %specific_fn.loc9_34: <specific function> = specific_function %impl.elem0.loc9_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_34.2: <bound method> = bound_method %int_123, %specific_fn.loc9_34 [concrete = constants.%bound_method.db6]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_34: init %i32 = call %bound_method.loc9_34.2(%int_123) [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_34 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_123, %.loc9_34.1 [concrete = constants.%int_123.f7f]
// CHECK:STDOUT: %impl.elem0.loc9_39: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_39.1: <bound method> = bound_method %int_456, %impl.elem0.loc9_39 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.266]
// CHECK:STDOUT: %specific_fn.loc9_39: <specific function> = specific_function %impl.elem0.loc9_39, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_39.2: <bound method> = bound_method %int_456, %specific_fn.loc9_39 [concrete = constants.%bound_method.f41]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_39: init %i32 = call %bound_method.loc9_39.2(%int_456) [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc9_39.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_39 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %.loc9_39.2: %i32 = converted %int_456, %.loc9_39.1 [concrete = constants.%int_456.d17]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_42.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_34.2, %.loc9_39.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_42.2: init %C to %.loc9_42.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_21: type = splice_block %C.ref.loc9_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2
// CHECK:STDOUT: %.loc9_35.4: %C = acquire_value %.loc9_35.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_35.4
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_35.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_35.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_27.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_27.3)
// CHECK:STDOUT: %.loc9_42.3: ref %C = temporary %.loc9_42.1, %.loc9_42.2
// CHECK:STDOUT: %.loc9_42.4: %C = acquire_value %.loc9_42.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_42.4
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_42.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_42.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_34.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_34.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -582,65 +582,65 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c1.patt: %pattern_type.217 = value_binding_pattern c1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc8_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988]
// CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc8_27: <specific function> = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %impl.elem0.loc8_30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_30.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d]
// CHECK:STDOUT: %specific_fn.loc8_30: <specific function> = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_30.2: <bound method> = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.661]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30: init %i32 = call %bound_method.loc8_30.2(%int_9) [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_9, %.loc8_30.1 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_31.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%.loc8_27.2, %.loc8_30.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_31.2: init %C to %.loc8_31.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc8_38.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_34.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc8_34: <specific function> = specific_function %impl.elem0.loc8_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_34.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_34 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_34: init %i32 = call %bound_method.loc8_34.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_34 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_8.loc8, %.loc8_34.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %impl.elem0.loc8_37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_37.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d]
// CHECK:STDOUT: %specific_fn.loc8_37: <specific function> = specific_function %impl.elem0.loc8_37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_37.2: <bound method> = bound_method %int_9, %specific_fn.loc8_37 [concrete = constants.%bound_method.661]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_37: init %i32 = call %bound_method.loc8_37.2(%int_9) [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_37.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_37 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_37.2: %i32 = converted %int_9, %.loc8_37.1 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_38.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%.loc8_34.2, %.loc8_37.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_38.2: init %C to %.loc8_38.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_21: type = splice_block %C.ref.loc8_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
// CHECK:STDOUT: %.loc8_31.4: %C = acquire_value %.loc8_31.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_31.4
// CHECK:STDOUT: %.loc8_38.3: ref %C = temporary %.loc8_38.1, %.loc8_38.2
// CHECK:STDOUT: %.loc8_38.4: %C = acquire_value %.loc8_38.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_38.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c2.patt: %pattern_type.217 = value_binding_pattern c2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc9_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_8.loc9: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
// CHECK:STDOUT: %.loc9_28.1: ref %C = temporary_storage
// CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_27.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %bound_method.loc9_34.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_27.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_27.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_8.loc9, %.loc9_27.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_28.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_27.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_28.2: init %C to %.loc9_28.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %bound_method.loc9_34.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_34.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_8.loc9, %.loc9_34.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_35.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_34.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_35.2: init %C to %.loc9_35.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_21: type = splice_block %C.ref.loc9_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_28.3: ref %C = temporary %.loc9_28.1, %.loc9_28.2
// CHECK:STDOUT: %.loc9_28.4: %C = acquire_value %.loc9_28.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_28.4
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_28.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_28.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_31.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_31.3)
// CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2
// CHECK:STDOUT: %.loc9_35.4: %C = acquire_value %.loc9_35.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_35.4
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_35.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_35.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_38.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_38.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -753,24 +753,24 @@ fn F() {
// CHECK:STDOUT: %c2.var_patt: %pattern_type.217 = var_pattern %c2.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c2.var: ref %C = var %c2.var_patt
// CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc9_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
// CHECK:STDOUT: %.loc9_3: ref %C = splice_block %c2.var {}
// CHECK:STDOUT: %.loc9_27.1: ref bool = temporary_storage
// CHECK:STDOUT: %.loc9_34.1: ref bool = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc9: %.86d = impl_witness_access constants.%Copy.impl_witness.348, element0 [concrete = constants.%bool.as.Copy.impl.Op]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %true, %impl.elem0.loc9 [concrete = constants.%bool.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %bool.as.Copy.impl.Op.call: init bool = call %bound_method.loc9(%true) [concrete = constants.%true]
// CHECK:STDOUT: %.loc9_27.2: ref bool = temporary %.loc9_27.1, %bool.as.Copy.impl.Op.call
// CHECK:STDOUT: %addr.loc9_31.1: %ptr.bb2 = addr_of %.loc9_27.2
// CHECK:STDOUT: %addr.loc9_31.2: %ptr.d9e = addr_of %.loc9_3
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%addr.loc9_31.1, %addr.loc9_31.2)
// CHECK:STDOUT: %.loc9_31: init %C to %.loc9_3 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: assign %c2.var, %.loc9_31
// CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc9_34.2: ref bool = temporary %.loc9_34.1, %bool.as.Copy.impl.Op.call
// CHECK:STDOUT: %addr.loc9_38.1: %ptr.bb2 = addr_of %.loc9_34.2
// CHECK:STDOUT: %addr.loc9_38.2: %ptr.d9e = addr_of %.loc9_3
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%addr.loc9_38.1, %addr.loc9_38.2)
// CHECK:STDOUT: %.loc9_38: init %C to %.loc9_3 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: assign %c2.var, %.loc9_38
// CHECK:STDOUT: %.loc9_21: type = splice_block %C.ref.loc9_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c2: ref %C = ref_binding c2, %c2.var
// CHECK:STDOUT: name_binding_decl {
@@ -778,25 +778,25 @@ fn F() {
// CHECK:STDOUT: %c3.var_patt: %pattern_type.217 = var_pattern %c3.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c3.var: ref %C = var %c3.var_patt
// CHECK:STDOUT: %Cpp.ref.loc10_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc10_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc10_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc10_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc10_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc10_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %c1.ref: ref %C = name_ref c1, %c1
// CHECK:STDOUT: %addr.loc10_27: %ptr.d9e = addr_of %c1.ref
// CHECK:STDOUT: %addr.loc10_34: %ptr.d9e = addr_of %c1.ref
// CHECK:STDOUT: %.loc10_3: ref %C = splice_block %c3.var {}
// CHECK:STDOUT: %addr.loc10_30: %ptr.d9e = addr_of %.loc10_3
// CHECK:STDOUT: %C__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.3(%addr.loc10_27, %addr.loc10_30)
// CHECK:STDOUT: %.loc10_30: init %C to %.loc10_3 = mark_in_place_init %C__carbon_thunk.call.loc10
// CHECK:STDOUT: assign %c3.var, %.loc10_30
// CHECK:STDOUT: %.loc10_14: type = splice_block %C.ref.loc10_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc10_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc10_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %addr.loc10_37: %ptr.d9e = addr_of %.loc10_3
// CHECK:STDOUT: %C__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.3(%addr.loc10_34, %addr.loc10_37)
// CHECK:STDOUT: %.loc10_37: init %C to %.loc10_3 = mark_in_place_init %C__carbon_thunk.call.loc10
// CHECK:STDOUT: assign %c3.var, %.loc10_37
// CHECK:STDOUT: %.loc10_21: type = splice_block %C.ref.loc10_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc10_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc10_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c3: ref %C = ref_binding c3, %c3.var
// CHECK:STDOUT: %C.cpp_destructor.bound.loc10: <bound method> = bound_method %c3.var, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc10: init %empty_tuple.type = call %C.cpp_destructor.bound.loc10(%c3.var)
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc9_27.2, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc9_27.2)
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc9_34.2, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc9_34.2)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %c2.var, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%c2.var)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %c1.var, constants.%C.cpp_destructor
@@ -873,28 +873,28 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c1.patt: %pattern_type.217 = value_binding_pattern c1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc8_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
// CHECK:STDOUT: %.loc8_28.1: ref %C = temporary_storage
// CHECK:STDOUT: %.loc8_35.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc8_34.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_28.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_27.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_28.2: init %C to %.loc8_28.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %bound_method.loc8_34.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc8_34.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_8.loc8, %.loc8_34.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_35.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc8_34.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_35.2: init %C to %.loc8_35.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_21: type = splice_block %C.ref.loc8_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_28.3: ref %C = temporary %.loc8_28.1, %.loc8_28.2
// CHECK:STDOUT: %.loc8_28.4: %C = acquire_value %.loc8_28.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_28.4
// CHECK:STDOUT: %.loc8_35.3: ref %C = temporary %.loc8_35.1, %.loc8_35.2
// CHECK:STDOUT: %.loc8_35.4: %C = acquire_value %.loc8_35.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_35.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c2.patt: %pattern_type.217 = value_binding_pattern c2 [concrete]
// CHECK:STDOUT: }
@@ -902,28 +902,28 @@ fn F() {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %impl.elem0.loc9: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
// CHECK:STDOUT: %bound_method.loc9_21.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc9_28.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_21.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.530]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc9_21.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_21.2: %i32 = converted %int_8.loc9, %.loc9_21.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9 [concrete = constants.%C] {
// CHECK:STDOUT: %bound_method.loc9_28.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.530]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc9_28.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_28.2: %i32 = converted %int_8.loc9, %.loc9_28.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_21: type = splice_block %C.ref.loc9 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_21.3: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_21.3
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc9_21.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_21.4: init %C to %.loc9_21.3 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_21.5: init %C = converted %.loc9_21.2, %.loc9_21.4
// CHECK:STDOUT: %.loc9_21.6: ref %C = temporary %.loc9_21.3, %.loc9_21.5
// CHECK:STDOUT: %.loc9_21.7: %C = acquire_value %.loc9_21.6
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_21.7
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_21.6, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_21.6)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_28.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_28.3)
// CHECK:STDOUT: %.loc9_28.3: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_28.3
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl(%.loc9_28.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_28.4: init %C to %.loc9_28.3 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_28.5: init %C = converted %.loc9_28.2, %.loc9_28.4
// CHECK:STDOUT: %.loc9_28.6: ref %C = temporary %.loc9_28.3, %.loc9_28.5
// CHECK:STDOUT: %.loc9_28.7: %C = acquire_value %.loc9_28.6
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_28.7
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_28.6, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_28.6)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_35.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_35.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -1005,61 +1005,61 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c1.patt: %pattern_type.217 = value_binding_pattern c1 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc8_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc8_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
// CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9.988]
// CHECK:STDOUT: %.loc8_31.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_27: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_27 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc8_27: <specific function> = specific_function %impl.elem0.loc8_27, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_27 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27: init %i32 = call %bound_method.loc8_27.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_27 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_27.2: %i32 = converted %int_8.loc8, %.loc8_27.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %impl.elem0.loc8_30: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_30.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_30 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d]
// CHECK:STDOUT: %specific_fn.loc8_30: <specific function> = specific_function %impl.elem0.loc8_30, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_30.2: <bound method> = bound_method %int_9, %specific_fn.loc8_30 [concrete = constants.%bound_method.661]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30: init %i32 = call %bound_method.loc8_30.2(%int_9) [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_30 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_30.2: %i32 = converted %int_9, %.loc8_30.1 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_31.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%.loc8_27.2, %.loc8_30.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_31.2: init %C to %.loc8_31.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_14: type = splice_block %C.ref.loc8_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %.loc8_38.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc8_34: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_34.1: <bound method> = bound_method %int_8.loc8, %impl.elem0.loc8_34 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc8_34: <specific function> = specific_function %impl.elem0.loc8_34, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_34.2: <bound method> = bound_method %int_8.loc8, %specific_fn.loc8_34 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_34: init %i32 = call %bound_method.loc8_34.2(%int_8.loc8) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_34 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_8.loc8, %.loc8_34.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %impl.elem0.loc8_37: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_37.1: <bound method> = bound_method %int_9, %impl.elem0.loc8_37 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.87d]
// CHECK:STDOUT: %specific_fn.loc8_37: <specific function> = specific_function %impl.elem0.loc8_37, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc8_37.2: <bound method> = bound_method %int_9, %specific_fn.loc8_37 [concrete = constants.%bound_method.661]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_37: init %i32 = call %bound_method.loc8_37.2(%int_9) [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_37.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8_37 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %.loc8_37.2: %i32 = converted %int_9, %.loc8_37.1 [concrete = constants.%int_9.f88]
// CHECK:STDOUT: %addr.loc8: %ptr.d9e = addr_of %.loc8_38.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.1(%.loc8_34.2, %.loc8_37.2, %addr.loc8)
// CHECK:STDOUT: %.loc8_38.2: init %C to %.loc8_38.1 = mark_in_place_init %C__carbon_thunk.call.loc8
// CHECK:STDOUT: %.loc8_21: type = splice_block %C.ref.loc8_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_31.3: ref %C = temporary %.loc8_31.1, %.loc8_31.2
// CHECK:STDOUT: %.loc8_31.4: %C = acquire_value %.loc8_31.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_31.4
// CHECK:STDOUT: %.loc8_38.3: ref %C = temporary %.loc8_38.1, %.loc8_38.2
// CHECK:STDOUT: %.loc8_38.4: %C = acquire_value %.loc8_38.3
// CHECK:STDOUT: %c1: %C = value_binding c1, %.loc8_38.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c2.patt: %pattern_type.217 = value_binding_pattern c2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_22: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_24: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %Cpp.ref.loc9_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_29: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %C.ref.loc9_31: %C.C.cpp_overload_set.type = name_ref C, imports.%C.C.cpp_overload_set.value [concrete = constants.%C.C.cpp_overload_set.value]
// CHECK:STDOUT: %int_8.loc9: Core.IntLiteral = int_value 8 [concrete = constants.%int_8.b85]
// CHECK:STDOUT: %.loc9_28.1: ref %C = temporary_storage
// CHECK:STDOUT: %.loc9_35.1: ref %C = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc9: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_27.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %bound_method.loc9_34.1: <bound method> = bound_method %int_8.loc9, %impl.elem0.loc9 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.62f]
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_27.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_27.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_27.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_27.2: %i32 = converted %int_8.loc9, %.loc9_27.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_28.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_27.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_28.2: init %C to %.loc9_28.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_14: type = splice_block %C.ref.loc9_14 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_14: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %bound_method.loc9_34.2: <bound method> = bound_method %int_8.loc9, %specific_fn.loc9 [concrete = constants.%bound_method.e07]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9: init %i32 = call %bound_method.loc9_34.2(%int_8.loc9) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc9_34.2: %i32 = converted %int_8.loc9, %.loc9_34.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %.loc9_35.1
// CHECK:STDOUT: %C__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc9_34.2, %addr.loc9)
// CHECK:STDOUT: %.loc9_35.2: init %C to %.loc9_35.1 = mark_in_place_init %C__carbon_thunk.call.loc9
// CHECK:STDOUT: %.loc9_21: type = splice_block %C.ref.loc9_21 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc9_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9_21: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_28.3: ref %C = temporary %.loc9_28.1, %.loc9_28.2
// CHECK:STDOUT: %.loc9_28.4: %C = acquire_value %.loc9_28.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_28.4
// CHECK:STDOUT: %.loc9_35.3: ref %C = temporary %.loc9_35.1, %.loc9_35.2
// CHECK:STDOUT: %.loc9_35.4: %C = acquire_value %.loc9_35.3
// CHECK:STDOUT: %c2: %C = value_binding c2, %.loc9_35.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c3.patt: %pattern_type.217 = value_binding_pattern c3 [concrete]
// CHECK:STDOUT: }
@@ -1067,30 +1067,30 @@ fn F() {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %impl.elem0.loc10: %.9ed = impl_witness_access constants.%As.impl_witness.ab6, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.29b]
// CHECK:STDOUT: %bound_method.loc10_21.1: <bound method> = bound_method %int_8.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %int_8.loc10, %impl.elem0.loc10 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @Core.IntLiteral.as.As.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_21.2: <bound method> = bound_method %int_8.loc10, %specific_fn.loc10 [concrete = constants.%bound_method.530]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc10_21.2(%int_8.loc10) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_21.2: %i32 = converted %int_8.loc10, %.loc10_21.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_14: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
// CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %int_8.loc10, %specific_fn.loc10 [concrete = constants.%bound_method.530]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i32 = call %bound_method.loc10_28.2(%int_8.loc10) [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_28.2: %i32 = converted %int_8.loc10, %.loc10_28.1 [concrete = constants.%int_8.98c]
// CHECK:STDOUT: %.loc10_21: type = splice_block %C.ref.loc10 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc10: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_21.3: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc10: %ptr.d9e = addr_of %.loc10_21.3
// CHECK:STDOUT: %C__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc10_21.2, %addr.loc10)
// CHECK:STDOUT: %.loc10_21.4: init %C to %.loc10_21.3 = mark_in_place_init %C__carbon_thunk.call.loc10
// CHECK:STDOUT: %.loc10_21.5: init %C = converted %.loc10_21.2, %.loc10_21.4
// CHECK:STDOUT: %.loc10_21.6: ref %C = temporary %.loc10_21.3, %.loc10_21.5
// CHECK:STDOUT: %.loc10_21.7: %C = acquire_value %.loc10_21.6
// CHECK:STDOUT: %c3: %C = value_binding c3, %.loc10_21.7
// CHECK:STDOUT: %C.cpp_destructor.bound.loc10: <bound method> = bound_method %.loc10_21.6, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc10: init %empty_tuple.type = call %C.cpp_destructor.bound.loc10(%.loc10_21.6)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_28.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_28.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_31.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_31.3)
// CHECK:STDOUT: %.loc10_28.3: ref %C = temporary_storage
// CHECK:STDOUT: %addr.loc10: %ptr.d9e = addr_of %.loc10_28.3
// CHECK:STDOUT: %C__carbon_thunk.call.loc10: init %empty_tuple.type = call imports.%C__carbon_thunk.decl.8acdfe.2(%.loc10_28.2, %addr.loc10)
// CHECK:STDOUT: %.loc10_28.4: init %C to %.loc10_28.3 = mark_in_place_init %C__carbon_thunk.call.loc10
// CHECK:STDOUT: %.loc10_28.5: init %C = converted %.loc10_28.2, %.loc10_28.4
// CHECK:STDOUT: %.loc10_28.6: ref %C = temporary %.loc10_28.3, %.loc10_28.5
// CHECK:STDOUT: %.loc10_28.7: %C = acquire_value %.loc10_28.6
// CHECK:STDOUT: %c3: %C = value_binding c3, %.loc10_28.7
// CHECK:STDOUT: %C.cpp_destructor.bound.loc10: <bound method> = bound_method %.loc10_28.6, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc10: init %empty_tuple.type = call %C.cpp_destructor.bound.loc10(%.loc10_28.6)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc9: <bound method> = bound_method %.loc9_35.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc9: init %empty_tuple.type = call %C.cpp_destructor.bound.loc9(%.loc9_35.3)
// CHECK:STDOUT: %C.cpp_destructor.bound.loc8: <bound method> = bound_method %.loc8_38.3, constants.%C.cpp_destructor
// CHECK:STDOUT: %C.cpp_destructor.call.loc8: init %empty_tuple.type = call %C.cpp_destructor.bound.loc8(%.loc8_38.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+4 -4
View File
@@ -190,11 +190,11 @@ library "[[@TEST_NAME]]";
import Cpp library "unsupported_members.h";
fn Test(m: Cpp.UnsupportedMembers*) {
// CHECK:STDERR: fail_use_unsupported_members.carbon:[[@LINE+4]]:16: note: in `Cpp` name lookup for `is_volatile` [InCppNameLookup]
// CHECK:STDERR: let a: i32 = m->is_volatile;
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_use_unsupported_members.carbon:[[@LINE+4]]:23: note: in `Cpp` name lookup for `is_volatile` [InCppNameLookup]
// CHECK:STDERR: let unused a: i32 = m->is_volatile;
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR:
let a: i32 = m->is_volatile;
let unused a: i32 = m->is_volatile;
}
// CHECK:STDOUT: --- use_struct_fields.carbon
+6 -132
View File
@@ -164,26 +164,8 @@ import Cpp library "object_param_qualifiers_overloaded.h";
fn CallF(v: Cpp.HasQualifiers, p: Cpp.HasQualifiers*) {
//@dump-sem-ir-begin
var a: i32 = v.F();
var b: i32* = p->F();
//@dump-sem-ir-end
}
// --- use_object_param_qualifiers_qualified.carbon
library "[[@TEST_NAME]]";
import Cpp library "object_param_qualifiers.h";
fn F(v: Cpp.HasQualifiers, p: Cpp.HasQualifiers*) {
//@dump-sem-ir-begin
v.(Cpp.HasQualifiers.const_this)();
v.(Cpp.HasQualifiers.const_ref_this)();
p->(Cpp.HasQualifiers.plain)();
p->(Cpp.HasQualifiers.ref_this)();
p->(Cpp.HasQualifiers.const_this)();
p->(Cpp.HasQualifiers.const_ref_this)();
var unused a: i32 = v.F();
var unused b: i32* = p->F();
//@dump-sem-ir-end
}
@@ -412,12 +394,12 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
// CHECK:STDOUT: }
// CHECK:STDOUT: %b.var: ref %ptr.235 = var %b.var_patt
// CHECK:STDOUT: %p.ref: %ptr.ec3 = name_ref p, %p
// CHECK:STDOUT: %.loc9_18: ref %HasQualifiers = deref %p.ref
// CHECK:STDOUT: %.loc9_25: ref %HasQualifiers = deref %p.ref
// CHECK:STDOUT: %F.ref.loc9: %HasQualifiers.F.cpp_overload_set.type = name_ref F, imports.%HasQualifiers.F.cpp_overload_set.value [concrete = constants.%HasQualifiers.F.cpp_overload_set.value]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_18, %F.ref.loc9
// CHECK:STDOUT: %HasQualifiers.F.call: init %ptr.235 = call imports.%HasQualifiers.F.decl.f862ea.2(%.loc9_18)
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %.loc9_25, %F.ref.loc9
// CHECK:STDOUT: %HasQualifiers.F.call: init %ptr.235 = call imports.%HasQualifiers.F.decl.f862ea.2(%.loc9_25)
// CHECK:STDOUT: assign %b.var, %HasQualifiers.F.call
// CHECK:STDOUT: %.loc9_13: type = splice_block %ptr.loc9 [concrete = constants.%ptr.235] {
// CHECK:STDOUT: %.loc9_20: type = splice_block %ptr.loc9 [concrete = constants.%ptr.235] {
// CHECK:STDOUT: %int_32.loc9: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc9: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: %ptr.loc9: type = ptr_type %i32.loc9 [concrete = constants.%ptr.235]
@@ -434,114 +416,6 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @DestroyOp.loc8(%self.param: ref %i32) = "no_op";
// CHECK:STDOUT:
// CHECK:STDOUT: --- use_object_param_qualifiers_qualified.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
// CHECK:STDOUT: %HasQualifiers: type = class_type @HasQualifiers [concrete]
// CHECK:STDOUT: %pattern_type.e15: type = pattern_type %HasQualifiers [concrete]
// CHECK:STDOUT: %ptr.ec3: type = ptr_type %HasQualifiers [concrete]
// CHECK:STDOUT: %HasQualifiers.const_this.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.const_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.const_this.cpp_overload_set.value: %HasQualifiers.const_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.const_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %const_this__carbon_thunk.type: type = fn_type @const_this__carbon_thunk [concrete]
// CHECK:STDOUT: %const_this__carbon_thunk: %const_this__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: %HasQualifiers.const_ref_this.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.const_ref_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.const_ref_this.cpp_overload_set.value: %HasQualifiers.const_ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.const_ref_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %const_ref_this__carbon_thunk.type: type = fn_type @const_ref_this__carbon_thunk [concrete]
// CHECK:STDOUT: %const_ref_this__carbon_thunk: %const_ref_this__carbon_thunk.type = struct_value () [concrete]
// CHECK:STDOUT: %HasQualifiers.plain.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.plain.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.plain.cpp_overload_set.value: %HasQualifiers.plain.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.plain.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.plain.type: type = fn_type @HasQualifiers.plain [concrete]
// CHECK:STDOUT: %HasQualifiers.plain: %HasQualifiers.plain.type = struct_value () [concrete]
// CHECK:STDOUT: %HasQualifiers.ref_this.cpp_overload_set.type: type = cpp_overload_set_type @HasQualifiers.ref_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.ref_this.cpp_overload_set.value: %HasQualifiers.ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.ref_this.cpp_overload_set [concrete]
// CHECK:STDOUT: %HasQualifiers.ref_this.type: type = fn_type @HasQualifiers.ref_this [concrete]
// CHECK:STDOUT: %HasQualifiers.ref_this: %HasQualifiers.ref_this.type = struct_value () [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: imports {
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
// CHECK:STDOUT: .HasQualifiers = %HasQualifiers.decl
// CHECK:STDOUT: import Cpp//...
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasQualifiers.decl: type = class_decl @HasQualifiers [concrete = constants.%HasQualifiers] {} {}
// CHECK:STDOUT: %HasQualifiers.const_this.cpp_overload_set.value: %HasQualifiers.const_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.const_this.cpp_overload_set [concrete = constants.%HasQualifiers.const_this.cpp_overload_set.value]
// CHECK:STDOUT: %const_this__carbon_thunk.decl: %const_this__carbon_thunk.type = fn_decl @const_this__carbon_thunk [concrete = constants.%const_this__carbon_thunk] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasQualifiers.const_ref_this.cpp_overload_set.value: %HasQualifiers.const_ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.const_ref_this.cpp_overload_set [concrete = constants.%HasQualifiers.const_ref_this.cpp_overload_set.value]
// CHECK:STDOUT: %const_ref_this__carbon_thunk.decl: %const_ref_this__carbon_thunk.type = fn_decl @const_ref_this__carbon_thunk [concrete = constants.%const_ref_this__carbon_thunk] {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: } {
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasQualifiers.plain.cpp_overload_set.value: %HasQualifiers.plain.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.plain.cpp_overload_set [concrete = constants.%HasQualifiers.plain.cpp_overload_set.value]
// CHECK:STDOUT: %HasQualifiers.plain.decl: %HasQualifiers.plain.type = fn_decl @HasQualifiers.plain [concrete = constants.%HasQualifiers.plain] {
// CHECK:STDOUT: %self.patt: %pattern_type.e15 = ref_binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.e15 = ref_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: ref %HasQualifiers = ref_param call_param0
// CHECK:STDOUT: %self: ref %HasQualifiers = ref_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: %HasQualifiers.ref_this.cpp_overload_set.value: %HasQualifiers.ref_this.cpp_overload_set.type = cpp_overload_set_value @HasQualifiers.ref_this.cpp_overload_set [concrete = constants.%HasQualifiers.ref_this.cpp_overload_set.value]
// CHECK:STDOUT: %HasQualifiers.ref_this.decl: %HasQualifiers.ref_this.type = fn_decl @HasQualifiers.ref_this [concrete = constants.%HasQualifiers.ref_this] {
// CHECK:STDOUT: %self.patt: %pattern_type.e15 = ref_binding_pattern self [concrete]
// CHECK:STDOUT: %self.param_patt: %pattern_type.e15 = ref_param_pattern %self.patt, call_param0 [concrete]
// CHECK:STDOUT: } {
// CHECK:STDOUT: %self.param: ref %HasQualifiers = ref_param call_param0
// CHECK:STDOUT: %self: ref %HasQualifiers = ref_binding self, %self.param
// CHECK:STDOUT: }
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @F(%v.param: %HasQualifiers, %p.param: %ptr.ec3) {
// CHECK:STDOUT: !entry:
// CHECK:STDOUT: %v.ref.loc8: %HasQualifiers = name_ref v, %v
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc8: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %const_this.ref.loc8: %HasQualifiers.const_this.cpp_overload_set.type = name_ref const_this, imports.%HasQualifiers.const_this.cpp_overload_set.value [concrete = constants.%HasQualifiers.const_this.cpp_overload_set.value]
// CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %v.ref.loc8, %const_this.ref.loc8
// CHECK:STDOUT: %const_this__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%v.ref.loc8)
// CHECK:STDOUT: %v.ref.loc9: %HasQualifiers = name_ref v, %v
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc9: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %const_ref_this.ref.loc9: %HasQualifiers.const_ref_this.cpp_overload_set.type = name_ref const_ref_this, imports.%HasQualifiers.const_ref_this.cpp_overload_set.value [concrete = constants.%HasQualifiers.const_ref_this.cpp_overload_set.value]
// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %v.ref.loc9, %const_ref_this.ref.loc9
// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%v.ref.loc9)
// CHECK:STDOUT: %p.ref.loc11: %ptr.ec3 = name_ref p, %p
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc11: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %plain.ref: %HasQualifiers.plain.cpp_overload_set.type = name_ref plain, imports.%HasQualifiers.plain.cpp_overload_set.value [concrete = constants.%HasQualifiers.plain.cpp_overload_set.value]
// CHECK:STDOUT: %.loc11: ref %HasQualifiers = deref %p.ref.loc11
// CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %.loc11, %plain.ref
// CHECK:STDOUT: %HasQualifiers.plain.call: init %empty_tuple.type = call imports.%HasQualifiers.plain.decl(%.loc11)
// CHECK:STDOUT: %p.ref.loc12: %ptr.ec3 = name_ref p, %p
// CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc12: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %ref_this.ref: %HasQualifiers.ref_this.cpp_overload_set.type = name_ref ref_this, imports.%HasQualifiers.ref_this.cpp_overload_set.value [concrete = constants.%HasQualifiers.ref_this.cpp_overload_set.value]
// CHECK:STDOUT: %.loc12: ref %HasQualifiers = deref %p.ref.loc12
// CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %.loc12, %ref_this.ref
// CHECK:STDOUT: %HasQualifiers.ref_this.call: init %empty_tuple.type = call imports.%HasQualifiers.ref_this.decl(%.loc12)
// CHECK:STDOUT: %p.ref.loc13: %ptr.ec3 = name_ref p, %p
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc13: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %const_this.ref.loc13: %HasQualifiers.const_this.cpp_overload_set.type = name_ref const_this, imports.%HasQualifiers.const_this.cpp_overload_set.value [concrete = constants.%HasQualifiers.const_this.cpp_overload_set.value]
// CHECK:STDOUT: %.loc13_4.1: ref %HasQualifiers = deref %p.ref.loc13
// CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %.loc13_4.1, %const_this.ref.loc13
// CHECK:STDOUT: %.loc13_4.2: %HasQualifiers = acquire_value %.loc13_4.1
// CHECK:STDOUT: %const_this__carbon_thunk.call.loc13: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc13_4.2)
// CHECK:STDOUT: %p.ref.loc14: %ptr.ec3 = name_ref p, %p
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %HasQualifiers.ref.loc14: type = name_ref HasQualifiers, imports.%HasQualifiers.decl [concrete = constants.%HasQualifiers]
// CHECK:STDOUT: %const_ref_this.ref.loc14: %HasQualifiers.const_ref_this.cpp_overload_set.type = name_ref const_ref_this, imports.%HasQualifiers.const_ref_this.cpp_overload_set.value [concrete = constants.%HasQualifiers.const_ref_this.cpp_overload_set.value]
// CHECK:STDOUT: %.loc14_4.1: ref %HasQualifiers = deref %p.ref.loc14
// CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %.loc14_4.1, %const_ref_this.ref.loc14
// CHECK:STDOUT: %.loc14_4.2: %HasQualifiers = acquire_value %.loc14_4.1
// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc14: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc14_4.2)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- call_explicit_object_param.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
+19 -19
View File
@@ -35,15 +35,15 @@ library "[[@TEST_NAME]]";
import Cpp library "declaration.h";
fn MyF() {
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:12: error: binding pattern has incomplete type `Bar` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var bar: Cpp.Bar;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:19: error: binding pattern has incomplete type `Bar` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var unused bar: Cpp.Bar;
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE-6]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./declaration.h:2:7: note: class was forward declared here [ClassForwardDeclaredHere]
// CHECK:STDERR: union Bar;
// CHECK:STDERR: ^
// CHECK:STDERR:
var bar: Cpp.Bar;
var unused bar: Cpp.Bar;
}
// ============================================================================
@@ -125,7 +125,7 @@ import Cpp library "static_data_member.h";
fn MyF() {
//@dump-sem-ir-begin
let bar: Cpp.Bar* = Cpp.Bar.foo;
let unused bar: Cpp.Bar* = Cpp.Bar.foo;
//@dump-sem-ir-end
}
@@ -148,7 +148,7 @@ import Cpp library "data_member.h";
//@dump-sem-ir-begin
fn MyF(bar : Cpp.Bar*) {
let foo_bar: Cpp.Bar* = bar->foo;
let unused foo_bar: Cpp.Bar* = bar->foo;
}
//@dump-sem-ir-end
@@ -332,16 +332,16 @@ fn MyF(bar: Cpp.Bar(Cpp.X)*);
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %bar.patt: %pattern_type = value_binding_pattern bar [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_26: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %Cpp.ref.loc8_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_33: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %foo.ref: ref %ptr.f68 = name_ref foo, imports.%foo.var [concrete = imports.%foo.var]
// CHECK:STDOUT: %.loc8_19: type = splice_block %ptr [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8_12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_15: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc8_15 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: %.loc8_26: type = splice_block %ptr [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8_22: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc8_22 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30: %ptr.f68 = acquire_value %foo.ref
// CHECK:STDOUT: %bar: %ptr.f68 = value_binding bar, %.loc8_30
// CHECK:STDOUT: %.loc8_37: %ptr.f68 = acquire_value %foo.ref
// CHECK:STDOUT: %bar: %ptr.f68 = value_binding bar, %.loc8_37
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -385,16 +385,16 @@ fn MyF(bar: Cpp.Bar(Cpp.X)*);
// CHECK:STDOUT: %foo_bar.patt: %pattern_type = value_binding_pattern foo_bar [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %bar.ref: %ptr.f68 = name_ref bar, %bar
// CHECK:STDOUT: %.loc8_30.1: ref %Bar = deref %bar.ref
// CHECK:STDOUT: %.loc8_37.1: ref %Bar = deref %bar.ref
// CHECK:STDOUT: %foo.ref: %Bar.elem = name_ref foo, @Bar.%.1 [concrete = @Bar.%.1]
// CHECK:STDOUT: %.loc8_30.2: ref %ptr.f68 = class_element_access %.loc8_30.1, element0
// CHECK:STDOUT: %.loc8_23: type = splice_block %ptr.loc8 [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %.loc8_37.2: ref %ptr.f68 = class_element_access %.loc8_37.1, element0
// CHECK:STDOUT: %.loc8_30: type = splice_block %ptr.loc8 [concrete = constants.%ptr.f68] {
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Bar.ref.loc8: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
// CHECK:STDOUT: %ptr.loc8: type = ptr_type %Bar.ref.loc8 [concrete = constants.%ptr.f68]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30.3: %ptr.f68 = acquire_value %.loc8_30.2
// CHECK:STDOUT: %foo_bar: %ptr.f68 = value_binding foo_bar, %.loc8_30.3
// CHECK:STDOUT: %.loc8_37.3: %ptr.f68 = acquire_value %.loc8_37.2
// CHECK:STDOUT: %foo_bar: %ptr.f68 = value_binding foo_bar, %.loc8_37.3
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+33 -33
View File
@@ -26,9 +26,9 @@ import Cpp library "enum.h";
//@dump-sem-ir-begin
fn F() {
let a: i16 = Cpp.Enum.a as i16;
let b: Cpp.Enum = (42 as i16) as Cpp.Enum;
let c: Cpp.Other = Cpp.a as Cpp.Other;
let unused a: i16 = Cpp.Enum.a as i16;
let unused b: Cpp.Enum = (42 as i16) as Cpp.Enum;
let unused c: Cpp.Other = Cpp.a as Cpp.Other;
}
//@dump-sem-ir-end
@@ -144,15 +144,15 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %a.ref.loc8: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0.420]
// CHECK:STDOUT: %int_16.loc8_30: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc8_30: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: %.loc8_27.1: %i16 = as_compatible %a.ref.loc8 [concrete = constants.%int_0.320]
// CHECK:STDOUT: %.loc8_27.2: %i16 = converted %a.ref.loc8, %.loc8_27.1 [concrete = constants.%int_0.320]
// CHECK:STDOUT: %.loc8_10: type = splice_block %i16.loc8_10 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16.loc8_10: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc8_10: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: %int_16.loc8_37: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc8_37: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: %.loc8_34.1: %i16 = as_compatible %a.ref.loc8 [concrete = constants.%int_0.320]
// CHECK:STDOUT: %.loc8_34.2: %i16 = converted %a.ref.loc8, %.loc8_34.1 [concrete = constants.%int_0.320]
// CHECK:STDOUT: %.loc8_17: type = splice_block %i16.loc8_17 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16.loc8_17: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc8_17: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %i16 = value_binding a, %.loc8_27.2
// CHECK:STDOUT: %a: %i16 = value_binding a, %.loc8_34.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type.ebf = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
@@ -160,35 +160,35 @@ fn F() {
// CHECK:STDOUT: %int_16.loc9: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc9: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: %impl.elem0: %.70c = impl_witness_access constants.%As.impl_witness.b61, element0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.a42]
// CHECK:STDOUT: %bound_method.loc9_25.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %bound_method.loc9_32.1: <bound method> = bound_method %int_42, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.As.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_25.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i16 = call %bound_method.loc9_25.2(%int_42) [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %.loc9_25.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %.loc9_25.2: %i16 = converted %int_42, %.loc9_25.1 [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %Cpp.ref.loc9_36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9_39: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %.loc9_33.1: %Enum = as_compatible %.loc9_25.2 [concrete = constants.%int_42.c3a]
// CHECK:STDOUT: %.loc9_33.2: %Enum = converted %.loc9_25.2, %.loc9_33.1 [concrete = constants.%int_42.c3a]
// CHECK:STDOUT: %.loc9_13: type = splice_block %Enum.ref.loc9_13 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc9_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %bound_method.loc9_32.2: <bound method> = bound_method %int_42, %specific_fn [concrete = constants.%bound_method]
// CHECK:STDOUT: %Core.IntLiteral.as.As.impl.Convert.call: init %i16 = call %bound_method.loc9_32.2(%int_42) [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %.loc9_32.1: %i16 = value_of_initializer %Core.IntLiteral.as.As.impl.Convert.call [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %.loc9_32.2: %i16 = converted %int_42, %.loc9_32.1 [concrete = constants.%int_42.a0e]
// CHECK:STDOUT: %Cpp.ref.loc9_43: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9_46: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %.loc9_40.1: %Enum = as_compatible %.loc9_32.2 [concrete = constants.%int_42.c3a]
// CHECK:STDOUT: %.loc9_40.2: %Enum = converted %.loc9_32.2, %.loc9_40.1 [concrete = constants.%int_42.c3a]
// CHECK:STDOUT: %.loc9_20: type = splice_block %Enum.ref.loc9_20 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc9_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9_20: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %Enum = value_binding b, %.loc9_33.2
// CHECK:STDOUT: %b: %Enum = value_binding b, %.loc9_40.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c.patt: %pattern_type.c06 = value_binding_pattern c [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc10_22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc10_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %a.ref.loc10: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0.420]
// CHECK:STDOUT: %Cpp.ref.loc10_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Other.ref.loc10_34: type = name_ref Other, imports.%Other.decl [concrete = constants.%Other]
// CHECK:STDOUT: %.loc10_28.1: %Other = as_compatible %a.ref.loc10 [concrete = constants.%int_0.fa2]
// CHECK:STDOUT: %.loc10_28.2: %Other = converted %a.ref.loc10, %.loc10_28.1 [concrete = constants.%int_0.fa2]
// CHECK:STDOUT: %.loc10_13: type = splice_block %Other.ref.loc10_13 [concrete = constants.%Other] {
// CHECK:STDOUT: %Cpp.ref.loc10_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Other.ref.loc10_13: type = name_ref Other, imports.%Other.decl [concrete = constants.%Other]
// CHECK:STDOUT: %Cpp.ref.loc10_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Other.ref.loc10_41: type = name_ref Other, imports.%Other.decl [concrete = constants.%Other]
// CHECK:STDOUT: %.loc10_35.1: %Other = as_compatible %a.ref.loc10 [concrete = constants.%int_0.fa2]
// CHECK:STDOUT: %.loc10_35.2: %Other = converted %a.ref.loc10, %.loc10_35.1 [concrete = constants.%int_0.fa2]
// CHECK:STDOUT: %.loc10_20: type = splice_block %Other.ref.loc10_20 [concrete = constants.%Other] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Other.ref.loc10_20: type = name_ref Other, imports.%Other.decl [concrete = constants.%Other]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: %Other = value_binding c, %.loc10_28.2
// CHECK:STDOUT: %c: %Other = value_binding c, %.loc10_35.2
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+9 -9
View File
@@ -22,8 +22,8 @@ import Cpp library "enum.h";
//@dump-sem-ir-begin
fn F() {
let a: Cpp.Enum = Cpp.Enum.a;
let b: Cpp.Enum = Cpp.b;
let unused a: Cpp.Enum = Cpp.Enum.a;
let unused b: Cpp.Enum = Cpp.b;
}
//@dump-sem-ir-end
@@ -58,21 +58,21 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_24: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %Cpp.ref.loc8_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_31: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %a.ref: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_20 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_20: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %Enum = value_binding a, %a.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc9_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %b.ref: %Enum = name_ref b, imports.%int_1 [concrete = constants.%int_1]
// CHECK:STDOUT: %.loc9: type = splice_block %Enum.ref.loc9 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc9_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc9_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %Enum = value_binding b, %b.ref
@@ -46,15 +46,15 @@ import Cpp library "declaration.h";
fn MyF() {
// TODO: It's a bit surprising to refer to this type as a class, even though
// we model it as a class in Carbon. Consider customizing the diagnostic.
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:10: error: binding pattern has incomplete type `UnsizedEnum` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var e: Cpp.UnsizedEnum;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE+8]]:17: error: binding pattern has incomplete type `UnsizedEnum` in name binding declaration [IncompleteTypeInBindingDecl]
// CHECK:STDERR: var unused e: Cpp.UnsizedEnum;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_use_declaration_as_definition.carbon:[[@LINE-8]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./declaration.h:4:6: note: class was forward declared here [ClassForwardDeclaredHere]
// CHECK:STDERR: enum UnsizedEnum;
// CHECK:STDERR: ^
// CHECK:STDERR:
var e: Cpp.UnsizedEnum;
var unused e: Cpp.UnsizedEnum;
}
// CHECK:STDOUT: --- import_declaration.carbon
+13 -13
View File
@@ -25,8 +25,8 @@ import Cpp library "enum_member.h";
//@dump-sem-ir-begin
fn F() {
let a: Cpp.A.E = Cpp.A.a;
let b: Cpp.A.E = Cpp.A.E.b;
let unused a: Cpp.A.E = Cpp.A.a;
let unused b: Cpp.A.E = Cpp.A.E.b;
}
//@dump-sem-ir-end
@@ -62,26 +62,26 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc8_23: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %Cpp.ref.loc8_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc8_30: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %a.ref: %E = name_ref a, imports.%int_0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc8: type = splice_block %E.ref.loc8 [concrete = constants.%E] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc8_13: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc8_20: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %E.ref.loc8: type = name_ref E, imports.%E.decl [concrete = constants.%E]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %E = value_binding a, %a.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc9_23: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %E.ref.loc9_25: type = name_ref E, imports.%E.decl [concrete = constants.%E]
// CHECK:STDOUT: %Cpp.ref.loc9_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc9_30: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %E.ref.loc9_32: type = name_ref E, imports.%E.decl [concrete = constants.%E]
// CHECK:STDOUT: %b.ref: %E = name_ref b, imports.%int_1 [concrete = constants.%int_1]
// CHECK:STDOUT: %.loc9: type = splice_block %E.ref.loc9_15 [concrete = constants.%E] {
// CHECK:STDOUT: %Cpp.ref.loc9_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc9_13: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %E.ref.loc9_15: type = name_ref E, imports.%E.decl [concrete = constants.%E]
// CHECK:STDOUT: %.loc9: type = splice_block %E.ref.loc9_22 [concrete = constants.%E] {
// CHECK:STDOUT: %Cpp.ref.loc9_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref.loc9_20: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: %E.ref.loc9_22: type = name_ref E, imports.%E.decl [concrete = constants.%E]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %E = value_binding b, %b.ref
// CHECK:STDOUT: return
+10 -10
View File
@@ -22,7 +22,7 @@ import Cpp library "enum.h";
//@dump-sem-ir-begin
fn F() {
let a: Cpp.Enum = Cpp.Enum.a;
let unused a: Cpp.Enum = Cpp.Enum.a;
}
//@dump-sem-ir-end
@@ -33,11 +33,11 @@ library "[[@TEST_NAME]]";
import Cpp library "enum.h";
fn F() {
// CHECK:STDERR: fail_name_without_scope.carbon:[[@LINE+4]]:21: error: member name `b` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let b: Cpp.Enum = Cpp.b;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_name_without_scope.carbon:[[@LINE+4]]:28: error: member name `b` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused b: Cpp.Enum = Cpp.b;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR:
let b: Cpp.Enum = Cpp.b;
let unused b: Cpp.Enum = Cpp.b;
}
// CHECK:STDOUT: --- import_enum.carbon
@@ -68,12 +68,12 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_24: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %Cpp.ref.loc8_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_31: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %a.ref: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_20 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_20: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %Enum = value_binding a, %a.ref
// CHECK:STDOUT: return
+27 -27
View File
@@ -24,8 +24,8 @@ import Cpp library "enum.h";
//@dump-sem-ir-begin
fn F() {
let a: Cpp.Enum = Cpp.Enum.a;
let b: Cpp.Enum = Cpp.b;
let unused a: Cpp.Enum = Cpp.Enum.a;
let unused b: Cpp.Enum = Cpp.b;
}
//@dump-sem-ir-end
@@ -36,23 +36,23 @@ library "[[@TEST_NAME]]";
import Cpp library "enum.h";
fn F() {
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:22: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
// CHECK:STDERR: let c: Cpp.Other = Cpp.Enum.c;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:22: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let c: Cpp.Other = Cpp.Enum.c;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:29: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
// CHECK:STDERR: let unused c: Cpp.Other = Cpp.Enum.c;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:29: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused c: Cpp.Other = Cpp.Enum.c;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR:
let c: Cpp.Other = Cpp.Enum.c;
let unused c: Cpp.Other = Cpp.Enum.c;
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:23: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
// CHECK:STDERR: let c2: Cpp.Other = Cpp.c;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:23: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let c2: Cpp.Other = Cpp.c;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+7]]:30: error: cannot implicitly convert expression of type `Cpp.Enum` to `Cpp.Other` [ConversionFailure]
// CHECK:STDERR: let unused c2: Cpp.Other = Cpp.c;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_wrong_enum.carbon:[[@LINE+4]]:30: note: type `Cpp.Enum` does not implement interface `Core.ImplicitAs(Cpp.Other)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused c2: Cpp.Other = Cpp.c;
// CHECK:STDERR: ^~~~~
// CHECK:STDERR:
let c2: Cpp.Other = Cpp.c;
let unused c2: Cpp.Other = Cpp.c;
}
// --- fail_non_enum_member.carbon
@@ -62,11 +62,11 @@ library "[[@TEST_NAME]]";
import Cpp library "enum.h";
fn F() {
// CHECK:STDERR: fail_non_enum_member.carbon:[[@LINE+4]]:22: error: member name `d` not found in `Cpp.Enum` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let c: Cpp.Other = Cpp.Enum.d;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_non_enum_member.carbon:[[@LINE+4]]:29: error: member name `d` not found in `Cpp.Enum` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused c: Cpp.Other = Cpp.Enum.d;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR:
let c: Cpp.Other = Cpp.Enum.d;
let unused c: Cpp.Other = Cpp.Enum.d;
}
// CHECK:STDOUT: --- import_enum.carbon
@@ -100,21 +100,21 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_24: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %Cpp.ref.loc8_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_31: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %a.ref: %Enum = name_ref a, imports.%int_0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_13 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_13: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: %.loc8: type = splice_block %Enum.ref.loc8_20 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc8_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc8_20: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %Enum = value_binding a, %a.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc9_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %b.ref: %Enum = name_ref b, imports.%int_1 [concrete = constants.%int_1]
// CHECK:STDOUT: %.loc9: type = splice_block %Enum.ref.loc9 [concrete = constants.%Enum] {
// CHECK:STDOUT: %Cpp.ref.loc9_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc9_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Enum.ref.loc9: type = name_ref Enum, imports.%Enum.decl [concrete = constants.%Enum]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: %Enum = value_binding b, %b.ref
+20 -20
View File
@@ -42,10 +42,10 @@ import Cpp library "enum.h";
//@dump-sem-ir-begin
fn F() {
let col : Cpp.Color = Cpp.Color.Red;
let colb : Cpp.Color = Cpp.Blue;
let pet : Cpp.Zoo.Animal = Cpp.Zoo.Animal.Cat;
let pet2 : Cpp.Zoo.Animal = Cpp.Dog;
let unused col : Cpp.Color = Cpp.Color.Red;
let unused colb : Cpp.Color = Cpp.Blue;
let unused pet : Cpp.Zoo.Animal = Cpp.Zoo.Animal.Cat;
let unused pet2 : Cpp.Zoo.Animal = Cpp.Dog;
}
//@dump-sem-ir-end
@@ -91,44 +91,44 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %col.patt: %pattern_type.839 = value_binding_pattern col [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc18_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Color.ref.loc18_28: type = name_ref Color, imports.%Color.decl [concrete = constants.%Color]
// CHECK:STDOUT: %Cpp.ref.loc18_32: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Color.ref.loc18_35: type = name_ref Color, imports.%Color.decl [concrete = constants.%Color]
// CHECK:STDOUT: %Red.ref: %Color = name_ref Red, imports.%int_0.40a [concrete = constants.%int_0.40a]
// CHECK:STDOUT: %.loc18: type = splice_block %Color.ref.loc18_16 [concrete = constants.%Color] {
// CHECK:STDOUT: %Cpp.ref.loc18_13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Color.ref.loc18_16: type = name_ref Color, imports.%Color.decl [concrete = constants.%Color]
// CHECK:STDOUT: %.loc18: type = splice_block %Color.ref.loc18_23 [concrete = constants.%Color] {
// CHECK:STDOUT: %Cpp.ref.loc18_20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Color.ref.loc18_23: type = name_ref Color, imports.%Color.decl [concrete = constants.%Color]
// CHECK:STDOUT: }
// CHECK:STDOUT: %col: %Color = value_binding col, %Red.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %colb.patt: %pattern_type.839 = value_binding_pattern colb [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc19_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Blue.ref: %Color = name_ref Blue, imports.%int_1.a8e [concrete = constants.%int_1.a8e]
// CHECK:STDOUT: %.loc19: type = splice_block %Color.ref.loc19 [concrete = constants.%Color] {
// CHECK:STDOUT: %Cpp.ref.loc19_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc19_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Color.ref.loc19: type = name_ref Color, imports.%Color.decl [concrete = constants.%Color]
// CHECK:STDOUT: }
// CHECK:STDOUT: %colb: %Color = value_binding colb, %Blue.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %pet.patt: %pattern_type.d9d = value_binding_pattern pet [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc20_30: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Zoo.ref.loc20_33: type = name_ref Zoo, imports.%Zoo.decl [concrete = constants.%Zoo]
// CHECK:STDOUT: %Animal.ref.loc20_37: type = name_ref Animal, imports.%Animal.decl [concrete = constants.%Animal]
// CHECK:STDOUT: %Cpp.ref.loc20_37: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Zoo.ref.loc20_40: type = name_ref Zoo, imports.%Zoo.decl [concrete = constants.%Zoo]
// CHECK:STDOUT: %Animal.ref.loc20_44: type = name_ref Animal, imports.%Animal.decl [concrete = constants.%Animal]
// CHECK:STDOUT: %Cat.ref: %Animal = name_ref Cat, imports.%int_0.83f [concrete = constants.%int_0.83f]
// CHECK:STDOUT: %.loc20: type = splice_block %Animal.ref.loc20_20 [concrete = constants.%Animal] {
// CHECK:STDOUT: %Cpp.ref.loc20_13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Zoo.ref.loc20_16: type = name_ref Zoo, imports.%Zoo.decl [concrete = constants.%Zoo]
// CHECK:STDOUT: %Animal.ref.loc20_20: type = name_ref Animal, imports.%Animal.decl [concrete = constants.%Animal]
// CHECK:STDOUT: %.loc20: type = splice_block %Animal.ref.loc20_27 [concrete = constants.%Animal] {
// CHECK:STDOUT: %Cpp.ref.loc20_20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Zoo.ref.loc20_23: type = name_ref Zoo, imports.%Zoo.decl [concrete = constants.%Zoo]
// CHECK:STDOUT: %Animal.ref.loc20_27: type = name_ref Animal, imports.%Animal.decl [concrete = constants.%Animal]
// CHECK:STDOUT: }
// CHECK:STDOUT: %pet: %Animal = value_binding pet, %Cat.ref
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %pet2.patt: %pattern_type.d9d = value_binding_pattern pet2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc21_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc21_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Dog.ref: %Animal = name_ref Dog, imports.%int_1.afa [concrete = constants.%int_1.afa]
// CHECK:STDOUT: %.loc21: type = splice_block %Animal.ref.loc21 [concrete = constants.%Animal] {
// CHECK:STDOUT: %Cpp.ref.loc21_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc21_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Zoo.ref.loc21: type = name_ref Zoo, imports.%Zoo.decl [concrete = constants.%Zoo]
// CHECK:STDOUT: %Animal.ref.loc21: type = name_ref Animal, imports.%Animal.decl [concrete = constants.%Animal]
// CHECK:STDOUT: }
@@ -485,7 +485,7 @@ import Cpp library "bool_return.h";
fn F() {
//@dump-sem-ir-begin
let x: bool = Cpp.foo_bool();
let unused x: bool = Cpp.foo_bool();
//@dump-sem-ir-end
}
@@ -505,7 +505,7 @@ import Cpp library "short_return.h";
fn F() {
//@dump-sem-ir-begin
let x: i16 = Cpp.foo_short();
let unused x: i16 = Cpp.foo_short();
//@dump-sem-ir-end
}
@@ -551,7 +551,7 @@ import Cpp library "double_return.h";
fn F() {
//@dump-sem-ir-begin
let x: f64 = Cpp.foo_double();
let unused x: f64 = Cpp.foo_double();
//@dump-sem-ir-end
}
@@ -2099,20 +2099,20 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo_bool.ref: %foo_bool.cpp_overload_set.type = name_ref foo_bool, imports.%foo_bool.cpp_overload_set.value [concrete = constants.%foo_bool.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_30.1: ref bool = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_30.1
// CHECK:STDOUT: %.loc8_37.1: ref bool = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_37.1
// CHECK:STDOUT: %foo_bool__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_bool__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc8_30.2: init bool to %.loc8_30.1 = mark_in_place_init %foo_bool__carbon_thunk.call
// CHECK:STDOUT: %.loc8_10.1: type = splice_block %.loc8_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc8_37.2: init bool to %.loc8_37.1 = mark_in_place_init %foo_bool__carbon_thunk.call
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %Bool.call [concrete = bool]
// CHECK:STDOUT: %.loc8_10.3: type = converted %Bool.call, %.loc8_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc8_17.2: type = value_of_initializer %Bool.call [concrete = bool]
// CHECK:STDOUT: %.loc8_17.3: type = converted %Bool.call, %.loc8_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30.3: ref bool = temporary %.loc8_30.1, %.loc8_30.2
// CHECK:STDOUT: %.loc8_30.4: bool = acquire_value %.loc8_30.3
// CHECK:STDOUT: %x: bool = value_binding x, %.loc8_30.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_30.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_30.3)
// CHECK:STDOUT: %.loc8_37.3: ref bool = temporary %.loc8_37.1, %.loc8_37.2
// CHECK:STDOUT: %.loc8_37.4: bool = acquire_value %.loc8_37.3
// CHECK:STDOUT: %x: bool = value_binding x, %.loc8_37.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_37.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_37.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2154,19 +2154,19 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo_short.ref: %foo_short.cpp_overload_set.type = name_ref foo_short, imports.%foo_short.cpp_overload_set.value [concrete = constants.%foo_short.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_30.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_30.1
// CHECK:STDOUT: %.loc8_37.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_37.1
// CHECK:STDOUT: %foo_short__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_short__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc8_30.2: init %i16 to %.loc8_30.1 = mark_in_place_init %foo_short__carbon_thunk.call
// CHECK:STDOUT: %.loc8_10: type = splice_block %i16 [concrete = constants.%i16] {
// CHECK:STDOUT: %.loc8_37.2: init %i16 to %.loc8_37.1 = mark_in_place_init %foo_short__carbon_thunk.call
// CHECK:STDOUT: %.loc8_17: type = splice_block %i16 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30.3: ref %i16 = temporary %.loc8_30.1, %.loc8_30.2
// CHECK:STDOUT: %.loc8_30.4: %i16 = acquire_value %.loc8_30.3
// CHECK:STDOUT: %x: %i16 = value_binding x, %.loc8_30.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_30.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_30.3)
// CHECK:STDOUT: %.loc8_37.3: ref %i16 = temporary %.loc8_37.1, %.loc8_37.2
// CHECK:STDOUT: %.loc8_37.4: %i16 = acquire_value %.loc8_37.3
// CHECK:STDOUT: %x: %i16 = value_binding x, %.loc8_37.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_37.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_37.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2232,19 +2232,19 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo_double.ref: %foo_double.cpp_overload_set.type = name_ref foo_double, imports.%foo_double.cpp_overload_set.value [concrete = constants.%foo_double.cpp_overload_set.value]
// CHECK:STDOUT: %.loc8_31.1: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_31.1
// CHECK:STDOUT: %.loc8_38.1: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc8_38.1
// CHECK:STDOUT: %foo_double__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_double__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc8_31.2: init %f64.d77 to %.loc8_31.1 = mark_in_place_init %foo_double__carbon_thunk.call
// CHECK:STDOUT: %.loc8_10: type = splice_block %f64 [concrete = constants.%f64.d77] {
// CHECK:STDOUT: %.loc8_38.2: init %f64.d77 to %.loc8_38.1 = mark_in_place_init %foo_double__carbon_thunk.call
// CHECK:STDOUT: %.loc8_17: type = splice_block %f64 [concrete = constants.%f64.d77] {
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %f64: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_31.3: ref %f64.d77 = temporary %.loc8_31.1, %.loc8_31.2
// CHECK:STDOUT: %.loc8_31.4: %f64.d77 = acquire_value %.loc8_31.3
// CHECK:STDOUT: %x: %f64.d77 = value_binding x, %.loc8_31.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_31.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_31.3)
// CHECK:STDOUT: %.loc8_38.3: ref %f64.d77 = temporary %.loc8_38.1, %.loc8_38.2
// CHECK:STDOUT: %.loc8_38.4: %f64.d77 = acquire_value %.loc8_38.3
// CHECK:STDOUT: %x: %f64.d77 = value_binding x, %.loc8_38.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc8_38.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc8_38.3)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+2 -2
View File
@@ -216,7 +216,7 @@ fn F(c: Cpp.N.C) {
//@dump-sem-ir-begin
Cpp.foo(c);
// Check that the parameter type was imported correctly.
var x: Cpp.N.C;
var unused x: Cpp.N.C;
//@dump-sem-ir-end
}
@@ -265,7 +265,7 @@ import Cpp library "definition_in_outer_definition.h";
fn F(c: Cpp.O.C) {
//@dump-sem-ir-begin
Cpp.foo(c);
var x: Cpp.O;
var unused x: Cpp.O;
//@dump-sem-ir-end
}
@@ -31,7 +31,7 @@ import Cpp library "functions.h";
fn Call() {
//@dump-sem-ir-begin
Cpp.GlobalNoReturn(1, 2, 3, 4);
let value: i32 = Cpp.GlobalReturnInt(1, 2, 3, 4);
let unused value: i32 = Cpp.GlobalReturnInt(1, 2, 3, 4);
({} as Cpp.X).B(1, 2);
Cpp.X.C(1, 2);
({} as Cpp.X).D(1, 2);
@@ -47,7 +47,7 @@ import Cpp library "functions.h";
fn Call() {
// //@dump-sem-ir-begin
Cpp.GlobalNoReturn(1, 2);
let value: i32 = Cpp.GlobalReturnInt(1, 2);
let unused value: i32 = Cpp.GlobalReturnInt(1, 2);
Cpp.GlobalNoReturn(1, 2, 3);
({} as Cpp.X).B(1);
Cpp.X.C(1);
@@ -291,42 +291,42 @@ fn Call() {
// CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %int_3.loc9: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
// CHECK:STDOUT: %int_4.loc9: Core.IntLiteral = int_value 4 [concrete = constants.%int_4.0c1]
// CHECK:STDOUT: %impl.elem0.loc9_40: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_40.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc9_40: <specific function> = specific_function %impl.elem0.loc9_40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_40.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_40 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40: init %i32 = call %bound_method.loc9_40.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_40.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_40.2: %i32 = converted %int_1.loc9, %.loc9_40.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %impl.elem0.loc9_43: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_43.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_43 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
// CHECK:STDOUT: %specific_fn.loc9_43: <specific function> = specific_function %impl.elem0.loc9_43, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_43.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_43 [concrete = constants.%bound_method.646]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43: init %i32 = call %bound_method.loc9_43.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int_2.loc9, %.loc9_43.1 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %impl.elem0.loc9_46: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_46.1: <bound method> = bound_method %int_3.loc9, %impl.elem0.loc9_46 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
// CHECK:STDOUT: %specific_fn.loc9_46: <specific function> = specific_function %impl.elem0.loc9_46, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_46.2: <bound method> = bound_method %int_3.loc9, %specific_fn.loc9_46 [concrete = constants.%bound_method.fa7]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_46: init %i32 = call %bound_method.loc9_46.2(%int_3.loc9) [concrete = constants.%int_3.822]
// CHECK:STDOUT: %.loc9_46.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_46 [concrete = constants.%int_3.822]
// CHECK:STDOUT: %.loc9_46.2: %i32 = converted %int_3.loc9, %.loc9_46.1 [concrete = constants.%int_3.822]
// CHECK:STDOUT: %impl.elem0.loc9_49: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_49.1: <bound method> = bound_method %int_4.loc9, %impl.elem0.loc9_49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c]
// CHECK:STDOUT: %specific_fn.loc9_49: <specific function> = specific_function %impl.elem0.loc9_49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_49.2: <bound method> = bound_method %int_4.loc9, %specific_fn.loc9_49 [concrete = constants.%bound_method.6d7]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_49: init %i32 = call %bound_method.loc9_49.2(%int_4.loc9) [concrete = constants.%int_4.940]
// CHECK:STDOUT: %.loc9_49.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_49 [concrete = constants.%int_4.940]
// CHECK:STDOUT: %.loc9_49.2: %i32 = converted %int_4.loc9, %.loc9_49.1 [concrete = constants.%int_4.940]
// CHECK:STDOUT: %GlobalReturnInt.call: init %i32 = call imports.%GlobalReturnInt.decl(%.loc9_40.2, %.loc9_43.2, %.loc9_46.2, %.loc9_49.2)
// CHECK:STDOUT: %.loc9_14: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %impl.elem0.loc9_47: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_47.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_47 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc9_47: <specific function> = specific_function %impl.elem0.loc9_47, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_47.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_47 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47: init %i32 = call %bound_method.loc9_47.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int_1.loc9, %.loc9_47.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %impl.elem0.loc9_50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_50.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
// CHECK:STDOUT: %specific_fn.loc9_50: <specific function> = specific_function %impl.elem0.loc9_50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_50.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_50 [concrete = constants.%bound_method.646]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50: init %i32 = call %bound_method.loc9_50.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_2.loc9, %.loc9_50.1 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %impl.elem0.loc9_53: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_53.1: <bound method> = bound_method %int_3.loc9, %impl.elem0.loc9_53 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.061]
// CHECK:STDOUT: %specific_fn.loc9_53: <specific function> = specific_function %impl.elem0.loc9_53, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_53.2: <bound method> = bound_method %int_3.loc9, %specific_fn.loc9_53 [concrete = constants.%bound_method.fa7]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_53: init %i32 = call %bound_method.loc9_53.2(%int_3.loc9) [concrete = constants.%int_3.822]
// CHECK:STDOUT: %.loc9_53.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_53 [concrete = constants.%int_3.822]
// CHECK:STDOUT: %.loc9_53.2: %i32 = converted %int_3.loc9, %.loc9_53.1 [concrete = constants.%int_3.822]
// CHECK:STDOUT: %impl.elem0.loc9_56: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_56.1: <bound method> = bound_method %int_4.loc9, %impl.elem0.loc9_56 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.f0c]
// CHECK:STDOUT: %specific_fn.loc9_56: <specific function> = specific_function %impl.elem0.loc9_56, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_56.2: <bound method> = bound_method %int_4.loc9, %specific_fn.loc9_56 [concrete = constants.%bound_method.6d7]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_56: init %i32 = call %bound_method.loc9_56.2(%int_4.loc9) [concrete = constants.%int_4.940]
// CHECK:STDOUT: %.loc9_56.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_56 [concrete = constants.%int_4.940]
// CHECK:STDOUT: %.loc9_56.2: %i32 = converted %int_4.loc9, %.loc9_56.1 [concrete = constants.%int_4.940]
// CHECK:STDOUT: %GlobalReturnInt.call: init %i32 = call imports.%GlobalReturnInt.decl(%.loc9_47.2, %.loc9_50.2, %.loc9_53.2, %.loc9_56.2)
// CHECK:STDOUT: %.loc9_21: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %GlobalReturnInt.call
// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %GlobalReturnInt.call, %.loc9_50.1
// CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_50.2
// CHECK:STDOUT: %.loc9_57.1: %i32 = value_of_initializer %GlobalReturnInt.call
// CHECK:STDOUT: %.loc9_57.2: %i32 = converted %GlobalReturnInt.call, %.loc9_57.1
// CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_57.2
// CHECK:STDOUT: %.loc10_5.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %X.ref.loc10: type = name_ref X, imports.%X.decl [concrete = constants.%X]
@@ -672,28 +672,28 @@ fn Call() {
// CHECK:STDOUT: %GlobalReturnInt.ref: %GlobalReturnInt.cpp_overload_set.type = name_ref GlobalReturnInt, imports.%GlobalReturnInt.cpp_overload_set.value [concrete = constants.%GlobalReturnInt.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc9: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %int_2.loc9: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
// CHECK:STDOUT: %impl.elem0.loc9_40: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_40.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc9_40: <specific function> = specific_function %impl.elem0.loc9_40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_40.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_40 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40: init %i32 = call %bound_method.loc9_40.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_40.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_40 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_40.2: %i32 = converted %int_1.loc9, %.loc9_40.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %impl.elem0.loc9_43: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_43.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_43 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
// CHECK:STDOUT: %specific_fn.loc9_43: <specific function> = specific_function %impl.elem0.loc9_43, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_43.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_43 [concrete = constants.%bound_method.646]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43: init %i32 = call %bound_method.loc9_43.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_43.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_43 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_43.2: %i32 = converted %int_2.loc9, %.loc9_43.1 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %GlobalReturnInt__carbon_thunk.call: init %i32 = call imports.%GlobalReturnInt__carbon_thunk.decl(%.loc9_40.2, %.loc9_43.2)
// CHECK:STDOUT: %.loc9_14: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %impl.elem0.loc9_47: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_47.1: <bound method> = bound_method %int_1.loc9, %impl.elem0.loc9_47 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc9_47: <specific function> = specific_function %impl.elem0.loc9_47, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_47.2: <bound method> = bound_method %int_1.loc9, %specific_fn.loc9_47 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47: init %i32 = call %bound_method.loc9_47.2(%int_1.loc9) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_47.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_47 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc9_47.2: %i32 = converted %int_1.loc9, %.loc9_47.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %impl.elem0.loc9_50: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc9_50.1: <bound method> = bound_method %int_2.loc9, %impl.elem0.loc9_50 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.4e5]
// CHECK:STDOUT: %specific_fn.loc9_50: <specific function> = specific_function %impl.elem0.loc9_50, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_50.2: <bound method> = bound_method %int_2.loc9, %specific_fn.loc9_50 [concrete = constants.%bound_method.646]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50: init %i32 = call %bound_method.loc9_50.2(%int_2.loc9) [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_50.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc9_50 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %.loc9_50.2: %i32 = converted %int_2.loc9, %.loc9_50.1 [concrete = constants.%int_2.ef8]
// CHECK:STDOUT: %GlobalReturnInt__carbon_thunk.call: init %i32 = call imports.%GlobalReturnInt__carbon_thunk.decl(%.loc9_47.2, %.loc9_50.2)
// CHECK:STDOUT: %.loc9_21: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_44.1: %i32 = value_of_initializer %GlobalReturnInt__carbon_thunk.call
// CHECK:STDOUT: %.loc9_44.2: %i32 = converted %GlobalReturnInt__carbon_thunk.call, %.loc9_44.1
// CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_44.2
// CHECK:STDOUT: %.loc9_51.1: %i32 = value_of_initializer %GlobalReturnInt__carbon_thunk.call
// CHECK:STDOUT: %.loc9_51.2: %i32 = converted %GlobalReturnInt__carbon_thunk.call, %.loc9_51.1
// CHECK:STDOUT: %value: %i32 = value_binding value, %.loc9_51.2
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %GlobalNoReturn.ref.loc10: %GlobalNoReturn.cpp_overload_set.type = name_ref GlobalNoReturn, imports.%GlobalNoReturn.cpp_overload_set.value [concrete = constants.%GlobalNoReturn.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc10: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
@@ -62,7 +62,7 @@ library "[[@TEST_NAME]]";
import Cpp library "short_return.h";
fn F() {
let x: i16 = Cpp.foo_short();
let unused x: i16 = Cpp.foo_short();
}
// CHECK:STDOUT: --- import_short_param.carbon
@@ -361,19 +361,19 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo_short.ref: %foo_short.cpp_overload_set.type = name_ref foo_short, imports.%foo_short.cpp_overload_set.value [concrete = constants.%foo_short.cpp_overload_set.value]
// CHECK:STDOUT: %.loc7_30.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc7_30.1
// CHECK:STDOUT: %.loc7_37.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr: %ptr = addr_of %.loc7_37.1
// CHECK:STDOUT: %foo_short__carbon_thunk.call: init %empty_tuple.type = call imports.%foo_short__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc7_30.2: init %i16 to %.loc7_30.1 = mark_in_place_init %foo_short__carbon_thunk.call
// CHECK:STDOUT: %.loc7_10: type = splice_block %i16 [concrete = constants.%i16] {
// CHECK:STDOUT: %.loc7_37.2: init %i16 to %.loc7_37.1 = mark_in_place_init %foo_short__carbon_thunk.call
// CHECK:STDOUT: %.loc7_17: type = splice_block %i16 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc7_30.3: ref %i16 = temporary %.loc7_30.1, %.loc7_30.2
// CHECK:STDOUT: %.loc7_30.4: %i16 = acquire_value %.loc7_30.3
// CHECK:STDOUT: %x: %i16 = value_binding x, %.loc7_30.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc7_30.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc7_30.3)
// CHECK:STDOUT: %.loc7_37.3: ref %i16 = temporary %.loc7_37.1, %.loc7_37.2
// CHECK:STDOUT: %.loc7_37.4: %i16 = acquire_value %.loc7_37.3
// CHECK:STDOUT: %x: %i16 = value_binding x, %.loc7_37.4
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc7_37.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc7_37.3)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
+77 -77
View File
@@ -79,10 +79,10 @@ inline auto ThunkOnBoth(short) -> auto { short x = 0; return x; }
fn MyF() {
//@dump-sem-ir-begin
let r1: i32 = Cpp.WithoutThunk(1);
let r2: i32 = Cpp.ThunkOnArg(1);
let r3: i16 = Cpp.ThunkOnReturn(1);
let r4: i16 = Cpp.ThunkOnBoth(1);
let unused r1: i32 = Cpp.WithoutThunk(1);
let unused r2: i32 = Cpp.ThunkOnArg(1);
let unused r3: i16 = Cpp.ThunkOnReturn(1);
let unused r4: i16 = Cpp.ThunkOnBoth(1);
//@dump-sem-ir-end
}
@@ -260,49 +260,49 @@ fn MyF() {
// CHECK:STDOUT: %WithoutThunk.ref: %WithoutThunk.cpp_overload_set.type = name_ref WithoutThunk, imports.%WithoutThunk.cpp_overload_set.value [concrete = constants.%WithoutThunk.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %impl.elem0.loc13: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc13_34.1: <bound method> = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %bound_method.loc13_41.1: <bound method> = bound_method %int_1.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709]
// CHECK:STDOUT: %bound_method.loc13_34.2: <bound method> = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i32 = call %bound_method.loc13_34.2(%int_1.loc13) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc13_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc13_34.2: %i32 = converted %int_1.loc13, %.loc13_34.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %WithoutThunk.call: init %i32 = call imports.%WithoutThunk.decl(%.loc13_34.2)
// CHECK:STDOUT: %.loc13_11: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %bound_method.loc13_41.2: <bound method> = bound_method %int_1.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i32 = call %bound_method.loc13_41.2(%int_1.loc13) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc13_41.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc13_41.2: %i32 = converted %int_1.loc13, %.loc13_41.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %WithoutThunk.call: init %i32 = call imports.%WithoutThunk.decl(%.loc13_41.2)
// CHECK:STDOUT: %.loc13_18: type = splice_block %i32.loc13 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc13: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc13: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_35.1: %i32 = value_of_initializer %WithoutThunk.call
// CHECK:STDOUT: %.loc13_35.2: %i32 = converted %WithoutThunk.call, %.loc13_35.1
// CHECK:STDOUT: %r1: %i32 = value_binding r1, %.loc13_35.2
// CHECK:STDOUT: %.loc13_42.1: %i32 = value_of_initializer %WithoutThunk.call
// CHECK:STDOUT: %.loc13_42.2: %i32 = converted %WithoutThunk.call, %.loc13_42.1
// CHECK:STDOUT: %r1: %i32 = value_binding r1, %.loc13_42.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %r2.patt: %pattern_type.7ce = value_binding_pattern r2 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ThunkOnArg.ref: %ThunkOnArg.cpp_overload_set.type = name_ref ThunkOnArg, imports.%ThunkOnArg.cpp_overload_set.value [concrete = constants.%ThunkOnArg.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc14: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %impl.elem0.loc14_32.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9]
// CHECK:STDOUT: %bound_method.loc14_32.1: <bound method> = bound_method %int_1.loc14, %impl.elem0.loc14_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8]
// CHECK:STDOUT: %specific_fn.loc14_32.1: <specific function> = specific_function %impl.elem0.loc14_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76]
// CHECK:STDOUT: %bound_method.loc14_32.2: <bound method> = bound_method %int_1.loc14, %specific_fn.loc14_32.1 [concrete = constants.%bound_method.576]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14: init %i16 = call %bound_method.loc14_32.2(%int_1.loc14) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_32.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_32.2: %i16 = converted %int_1.loc14, %.loc14_32.1 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_32.3: ref %i16 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc14_32.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
// CHECK:STDOUT: %bound_method.loc14_32.3: <bound method> = bound_method %.loc14_32.2, %impl.elem0.loc14_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc14_32.2: <specific function> = specific_function %impl.elem0.loc14_32.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc14_32.4: <bound method> = bound_method %.loc14_32.2, %specific_fn.loc14_32.2 [concrete = constants.%bound_method.a48]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc14: init %i16 = call %bound_method.loc14_32.4(%.loc14_32.2) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_32.4: ref %i16 = temporary %.loc14_32.3, %Int.as.Copy.impl.Op.call.loc14
// CHECK:STDOUT: %addr.loc14: %ptr.251 = addr_of %.loc14_32.4
// CHECK:STDOUT: %impl.elem0.loc14_39.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9]
// CHECK:STDOUT: %bound_method.loc14_39.1: <bound method> = bound_method %int_1.loc14, %impl.elem0.loc14_39.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8]
// CHECK:STDOUT: %specific_fn.loc14_39.1: <specific function> = specific_function %impl.elem0.loc14_39.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76]
// CHECK:STDOUT: %bound_method.loc14_39.2: <bound method> = bound_method %int_1.loc14, %specific_fn.loc14_39.1 [concrete = constants.%bound_method.576]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14: init %i16 = call %bound_method.loc14_39.2(%int_1.loc14) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_39.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_39.2: %i16 = converted %int_1.loc14, %.loc14_39.1 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_39.3: ref %i16 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc14_39.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
// CHECK:STDOUT: %bound_method.loc14_39.3: <bound method> = bound_method %.loc14_39.2, %impl.elem0.loc14_39.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc14_39.2: <specific function> = specific_function %impl.elem0.loc14_39.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc14_39.4: <bound method> = bound_method %.loc14_39.2, %specific_fn.loc14_39.2 [concrete = constants.%bound_method.a48]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc14: init %i16 = call %bound_method.loc14_39.4(%.loc14_39.2) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc14_39.4: ref %i16 = temporary %.loc14_39.3, %Int.as.Copy.impl.Op.call.loc14
// CHECK:STDOUT: %addr.loc14: %ptr.251 = addr_of %.loc14_39.4
// CHECK:STDOUT: %ThunkOnArg__carbon_thunk.call: init %i32 = call imports.%ThunkOnArg__carbon_thunk.decl(%addr.loc14)
// CHECK:STDOUT: %.loc14_11: type = splice_block %i32.loc14 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc14_18: type = splice_block %i32.loc14 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc14: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc14: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc14_33.1: %i32 = value_of_initializer %ThunkOnArg__carbon_thunk.call
// CHECK:STDOUT: %.loc14_33.2: %i32 = converted %ThunkOnArg__carbon_thunk.call, %.loc14_33.1
// CHECK:STDOUT: %r2: %i32 = value_binding r2, %.loc14_33.2
// CHECK:STDOUT: %.loc14_40.1: %i32 = value_of_initializer %ThunkOnArg__carbon_thunk.call
// CHECK:STDOUT: %.loc14_40.2: %i32 = converted %ThunkOnArg__carbon_thunk.call, %.loc14_40.1
// CHECK:STDOUT: %r2: %i32 = value_binding r2, %.loc14_40.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %r3.patt: %pattern_type.2f8 = value_binding_pattern r3 [concrete]
// CHECK:STDOUT: }
@@ -310,63 +310,63 @@ fn MyF() {
// CHECK:STDOUT: %ThunkOnReturn.ref: %ThunkOnReturn.cpp_overload_set.type = name_ref ThunkOnReturn, imports.%ThunkOnReturn.cpp_overload_set.value [concrete = constants.%ThunkOnReturn.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %impl.elem0.loc15: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc15_35.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %bound_method.loc15_42.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.215]
// CHECK:STDOUT: %specific_fn.loc15: <specific function> = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709]
// CHECK:STDOUT: %bound_method.loc15_35.2: <bound method> = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i32 = call %bound_method.loc15_35.2(%int_1.loc15) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_35.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_35.2: %i32 = converted %int_1.loc15, %.loc15_35.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_36.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr.loc15: %ptr.251 = addr_of %.loc15_36.1
// CHECK:STDOUT: %ThunkOnReturn__carbon_thunk.call: init %empty_tuple.type = call imports.%ThunkOnReturn__carbon_thunk.decl(%.loc15_35.2, %addr.loc15)
// CHECK:STDOUT: %.loc15_36.2: init %i16 to %.loc15_36.1 = mark_in_place_init %ThunkOnReturn__carbon_thunk.call
// CHECK:STDOUT: %.loc15_11: type = splice_block %i16.loc15 [concrete = constants.%i16] {
// CHECK:STDOUT: %bound_method.loc15_42.2: <bound method> = bound_method %int_1.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.38b]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i32 = call %bound_method.loc15_42.2(%int_1.loc15) [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_42.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_42.2: %i32 = converted %int_1.loc15, %.loc15_42.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc15_43.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr.loc15: %ptr.251 = addr_of %.loc15_43.1
// CHECK:STDOUT: %ThunkOnReturn__carbon_thunk.call: init %empty_tuple.type = call imports.%ThunkOnReturn__carbon_thunk.decl(%.loc15_42.2, %addr.loc15)
// CHECK:STDOUT: %.loc15_43.2: init %i16 to %.loc15_43.1 = mark_in_place_init %ThunkOnReturn__carbon_thunk.call
// CHECK:STDOUT: %.loc15_18: type = splice_block %i16.loc15 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16.loc15: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc15: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc15_36.3: ref %i16 = temporary %.loc15_36.1, %.loc15_36.2
// CHECK:STDOUT: %.loc15_36.4: %i16 = acquire_value %.loc15_36.3
// CHECK:STDOUT: %r3: %i16 = value_binding r3, %.loc15_36.4
// CHECK:STDOUT: %.loc15_43.3: ref %i16 = temporary %.loc15_43.1, %.loc15_43.2
// CHECK:STDOUT: %.loc15_43.4: %i16 = acquire_value %.loc15_43.3
// CHECK:STDOUT: %r3: %i16 = value_binding r3, %.loc15_43.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %r4.patt: %pattern_type.2f8 = value_binding_pattern r4 [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ThunkOnBoth.ref: %ThunkOnBoth.cpp_overload_set.type = name_ref ThunkOnBoth, imports.%ThunkOnBoth.cpp_overload_set.value [concrete = constants.%ThunkOnBoth.cpp_overload_set.value]
// CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %impl.elem0.loc16_33.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9]
// CHECK:STDOUT: %bound_method.loc16_33.1: <bound method> = bound_method %int_1.loc16, %impl.elem0.loc16_33.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8]
// CHECK:STDOUT: %specific_fn.loc16_33.1: <specific function> = specific_function %impl.elem0.loc16_33.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76]
// CHECK:STDOUT: %bound_method.loc16_33.2: <bound method> = bound_method %int_1.loc16, %specific_fn.loc16_33.1 [concrete = constants.%bound_method.576]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16: init %i16 = call %bound_method.loc16_33.2(%int_1.loc16) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_33.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_33.2: %i16 = converted %int_1.loc16, %.loc16_33.1 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_33.3: ref %i16 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc16_33.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
// CHECK:STDOUT: %bound_method.loc16_33.3: <bound method> = bound_method %.loc16_33.2, %impl.elem0.loc16_33.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc16_33.2: <specific function> = specific_function %impl.elem0.loc16_33.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc16_33.4: <bound method> = bound_method %.loc16_33.2, %specific_fn.loc16_33.2 [concrete = constants.%bound_method.a48]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc16: init %i16 = call %bound_method.loc16_33.4(%.loc16_33.2) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_33.4: ref %i16 = temporary %.loc16_33.3, %Int.as.Copy.impl.Op.call.loc16
// CHECK:STDOUT: %addr.loc16_34.1: %ptr.251 = addr_of %.loc16_33.4
// CHECK:STDOUT: %.loc16_34.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr.loc16_34.2: %ptr.251 = addr_of %.loc16_34.1
// CHECK:STDOUT: %ThunkOnBoth__carbon_thunk.call: init %empty_tuple.type = call imports.%ThunkOnBoth__carbon_thunk.decl(%addr.loc16_34.1, %addr.loc16_34.2)
// CHECK:STDOUT: %.loc16_34.2: init %i16 to %.loc16_34.1 = mark_in_place_init %ThunkOnBoth__carbon_thunk.call
// CHECK:STDOUT: %.loc16_11: type = splice_block %i16.loc16 [concrete = constants.%i16] {
// CHECK:STDOUT: %impl.elem0.loc16_40.1: %.3ce = impl_witness_access constants.%ImplicitAs.impl_witness.882, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.8d9]
// CHECK:STDOUT: %bound_method.loc16_40.1: <bound method> = bound_method %int_1.loc16, %impl.elem0.loc16_40.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.7e8]
// CHECK:STDOUT: %specific_fn.loc16_40.1: <specific function> = specific_function %impl.elem0.loc16_40.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_16) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.a76]
// CHECK:STDOUT: %bound_method.loc16_40.2: <bound method> = bound_method %int_1.loc16, %specific_fn.loc16_40.1 [concrete = constants.%bound_method.576]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16: init %i16 = call %bound_method.loc16_40.2(%int_1.loc16) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_40.1: %i16 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_40.2: %i16 = converted %int_1.loc16, %.loc16_40.1 [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_40.3: ref %i16 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc16_40.2: %.eb3 = impl_witness_access constants.%Copy.impl_witness.e99, element0 [concrete = constants.%Int.as.Copy.impl.Op.0da]
// CHECK:STDOUT: %bound_method.loc16_40.3: <bound method> = bound_method %.loc16_40.2, %impl.elem0.loc16_40.2 [concrete = constants.%Int.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc16_40.2: <specific function> = specific_function %impl.elem0.loc16_40.2, @Int.as.Copy.impl.Op(constants.%int_16) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc16_40.4: <bound method> = bound_method %.loc16_40.2, %specific_fn.loc16_40.2 [concrete = constants.%bound_method.a48]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc16: init %i16 = call %bound_method.loc16_40.4(%.loc16_40.2) [concrete = constants.%int_1.f90]
// CHECK:STDOUT: %.loc16_40.4: ref %i16 = temporary %.loc16_40.3, %Int.as.Copy.impl.Op.call.loc16
// CHECK:STDOUT: %addr.loc16_41.1: %ptr.251 = addr_of %.loc16_40.4
// CHECK:STDOUT: %.loc16_41.1: ref %i16 = temporary_storage
// CHECK:STDOUT: %addr.loc16_41.2: %ptr.251 = addr_of %.loc16_41.1
// CHECK:STDOUT: %ThunkOnBoth__carbon_thunk.call: init %empty_tuple.type = call imports.%ThunkOnBoth__carbon_thunk.decl(%addr.loc16_41.1, %addr.loc16_41.2)
// CHECK:STDOUT: %.loc16_41.2: init %i16 to %.loc16_41.1 = mark_in_place_init %ThunkOnBoth__carbon_thunk.call
// CHECK:STDOUT: %.loc16_18: type = splice_block %i16.loc16 [concrete = constants.%i16] {
// CHECK:STDOUT: %int_16.loc16: Core.IntLiteral = int_value 16 [concrete = constants.%int_16]
// CHECK:STDOUT: %i16.loc16: type = class_type @Int, @Int(constants.%int_16) [concrete = constants.%i16]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc16_34.3: ref %i16 = temporary %.loc16_34.1, %.loc16_34.2
// CHECK:STDOUT: %.loc16_34.4: %i16 = acquire_value %.loc16_34.3
// CHECK:STDOUT: %r4: %i16 = value_binding r4, %.loc16_34.4
// CHECK:STDOUT: %DestroyOp.bound.loc16_34: <bound method> = bound_method %.loc16_34.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc16_34: init %empty_tuple.type = call %DestroyOp.bound.loc16_34(%.loc16_34.3)
// CHECK:STDOUT: %DestroyOp.bound.loc16_33: <bound method> = bound_method %.loc16_33.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc16_33: init %empty_tuple.type = call %DestroyOp.bound.loc16_33(%.loc16_33.4)
// CHECK:STDOUT: %DestroyOp.bound.loc15: <bound method> = bound_method %.loc15_36.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc15: init %empty_tuple.type = call %DestroyOp.bound.loc15(%.loc15_36.3)
// CHECK:STDOUT: %DestroyOp.bound.loc14: <bound method> = bound_method %.loc14_32.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc14: init %empty_tuple.type = call %DestroyOp.bound.loc14(%.loc14_32.4)
// CHECK:STDOUT: %.loc16_41.3: ref %i16 = temporary %.loc16_41.1, %.loc16_41.2
// CHECK:STDOUT: %.loc16_41.4: %i16 = acquire_value %.loc16_41.3
// CHECK:STDOUT: %r4: %i16 = value_binding r4, %.loc16_41.4
// CHECK:STDOUT: %DestroyOp.bound.loc16_41: <bound method> = bound_method %.loc16_41.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc16_41: init %empty_tuple.type = call %DestroyOp.bound.loc16_41(%.loc16_41.3)
// CHECK:STDOUT: %DestroyOp.bound.loc16_40: <bound method> = bound_method %.loc16_40.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc16_40: init %empty_tuple.type = call %DestroyOp.bound.loc16_40(%.loc16_40.4)
// CHECK:STDOUT: %DestroyOp.bound.loc15: <bound method> = bound_method %.loc15_43.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc15: init %empty_tuple.type = call %DestroyOp.bound.loc15(%.loc15_43.3)
// CHECK:STDOUT: %DestroyOp.bound.loc14: <bound method> = bound_method %.loc14_39.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc14: init %empty_tuple.type = call %DestroyOp.bound.loc14(%.loc14_39.4)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
File diff suppressed because it is too large Load Diff
+211 -211
View File
@@ -106,30 +106,30 @@ import Cpp library "int_literal.h";
fn F() {
// i32_max
let a: i32 = Cpp.foo(2147483647);
let unused a: i32 = Cpp.foo(2147483647);
// i32_max + 1
// It could fit to unsigned int, but only signed integers are considered, so assigned to long.
// Decimal, hexadecimal and binary integer literals are treated the same when assigning a C++ type.
let b: i64 = Cpp.foo(2147483648);
let b_hexa: i64 = Cpp.foo(0x8000_0000);
let b_binary: i64 = Cpp.foo(0b1000_0000_0000_0000_0000_0000_0000_0000);
let unused b: i64 = Cpp.foo(2147483648);
let unused b_hexa: i64 = Cpp.foo(0x8000_0000);
let unused b_binary: i64 = Cpp.foo(0b1000_0000_0000_0000_0000_0000_0000_0000);
// i64_max
let c: i64 = Cpp.foo(9223372036854775807);
let unused c: i64 = Cpp.foo(9223372036854775807);
// i64_max + 1
// Could fit to unsigned long, but only signed integers are considered, so fitted to _int128.
let d: i128 = Cpp.foo(9223372036854775808);
let unused d: i128 = Cpp.foo(9223372036854775808);
// u64_max
let e: i128 = Cpp.foo(18446744073709551615);
let unused e: i128 = Cpp.foo(18446744073709551615);
// u64_max + 1
let f: i128 = Cpp.foo(18446744073709551616);
let unused f: i128 = Cpp.foo(18446744073709551616);
// i128_max
let g: i128 = Cpp.foo(170141183460469231731687303715884105727);
let unused g: i128 = Cpp.foo(170141183460469231731687303715884105727);
}
// --- fail_import_large_int_literal.carbon
@@ -141,15 +141,15 @@ import Cpp library "int_literal.h";
fn F() {
// TODO: get rid of the second error message here.
// i128_max + 1
// CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+8]]:25: error: integer value 170141183460469231731687303715884105728 too large to fit in a signed C++ integer type; requires 129 bits, but max is 128 [IntTooLargeForCppType]
// CHECK:STDERR: let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+8]]:32: error: integer value 170141183460469231731687303715884105728 too large to fit in a signed C++ integer type; requires 129 bits, but max is 128 [IntTooLargeForCppType]
// CHECK:STDERR: let unused h: i128 = Cpp.foo(170141183460469231731687303715884105728);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+4]]:25: error: call argument of type `Core.IntLiteral` is not supported [CppCallArgTypeNotSupported]
// CHECK:STDERR: let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_large_int_literal.carbon:[[@LINE+4]]:32: error: call argument of type `Core.IntLiteral` is not supported [CppCallArgTypeNotSupported]
// CHECK:STDERR: let unused h: i128 = Cpp.foo(170141183460469231731687303715884105728);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let h: i128 = Cpp.foo(170141183460469231731687303715884105728);
let unused h: i128 = Cpp.foo(170141183460469231731687303715884105728);
}
// --- negative_int_literal.h
@@ -202,7 +202,7 @@ library "[[@TEST_NAME]]";
import Cpp library "floating_point_literal.h";
fn F() {
let d: f64 = Cpp.foo(1.0);
let unused d: f64 = Cpp.foo(1.0);
}
// --- fail_import_large_floating_point_literal.carbon
@@ -777,15 +777,15 @@ import Cpp inline '''
interface I {}
fn EchoValue[ValueT:! I](value:! ValueT) {}
fn EchoValue[ValueT:! I](unused value:! ValueT) {}
fn F() {
// CHECK:STDERR: fail_missing_impl.carbon:[[@LINE+7]]:3: error: cannot convert type `<type of Cpp.foo>` into type implementing `I` [ConversionFailureTypeToFacet]
// CHECK:STDERR: EchoValue(Cpp.foo);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_missing_impl.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]
// CHECK:STDERR: fn EchoValue[ValueT:! I](value:! ValueT) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fn EchoValue[ValueT:! I](unused value:! ValueT) {}
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
EchoValue(Cpp.foo);
}
@@ -1529,20 +1529,20 @@ fn F() {
// CHECK:STDOUT: %foo.ref.loc8: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_2147483647: Core.IntLiteral = int_value 2147483647 [concrete = constants.%int_2147483647.d89]
// CHECK:STDOUT: %impl.elem0.loc8: %.545 = impl_witness_access constants.%ImplicitAs.impl_witness.6bc, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.0b5]
// CHECK:STDOUT: %bound_method.loc8_24.1: <bound method> = bound_method %int_2147483647, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6]
// CHECK:STDOUT: %bound_method.loc8_31.1: <bound method> = bound_method %int_2147483647, %impl.elem0.loc8 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5e6]
// CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.709]
// CHECK:STDOUT: %bound_method.loc8_24.2: <bound method> = bound_method %int_2147483647, %specific_fn.loc8 [concrete = constants.%bound_method.076]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_24.2(%int_2147483647) [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %.loc8_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %.loc8_24.2: %i32 = converted %int_2147483647, %.loc8_24.1 [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %foo.call.loc8: init %i32 = call imports.%foo.decl.bd967b.1(%.loc8_24.2)
// CHECK:STDOUT: %.loc8_10: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %bound_method.loc8_31.2: <bound method> = bound_method %int_2147483647, %specific_fn.loc8 [concrete = constants.%bound_method.076]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8: init %i32 = call %bound_method.loc8_31.2(%int_2147483647) [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %.loc8_31.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %.loc8_31.2: %i32 = converted %int_2147483647, %.loc8_31.1 [concrete = constants.%int_2147483647.a74]
// CHECK:STDOUT: %foo.call.loc8: init %i32 = call imports.%foo.decl.bd967b.1(%.loc8_31.2)
// CHECK:STDOUT: %.loc8_17: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %foo.call.loc8
// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %foo.call.loc8, %.loc8_34.1
// CHECK:STDOUT: %a: %i32 = value_binding a, %.loc8_34.2
// CHECK:STDOUT: %.loc8_41.1: %i32 = value_of_initializer %foo.call.loc8
// CHECK:STDOUT: %.loc8_41.2: %i32 = converted %foo.call.loc8, %.loc8_41.1
// CHECK:STDOUT: %a: %i32 = value_binding a, %.loc8_41.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b.patt: %pattern_type.95b = value_binding_pattern b [concrete]
// CHECK:STDOUT: }
@@ -1550,20 +1550,20 @@ fn F() {
// CHECK:STDOUT: %foo.ref.loc13: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_2147483648.loc13: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
// CHECK:STDOUT: %impl.elem0.loc13: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
// CHECK:STDOUT: %bound_method.loc13_24.1: <bound method> = bound_method %int_2147483648.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %bound_method.loc13_31.1: <bound method> = bound_method %int_2147483648.loc13, %impl.elem0.loc13 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %specific_fn.loc13: <specific function> = specific_function %impl.elem0.loc13, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
// CHECK:STDOUT: %bound_method.loc13_24.2: <bound method> = bound_method %int_2147483648.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i64 = call %bound_method.loc13_24.2(%int_2147483648.loc13) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc13_24.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc13_24.2: %i64 = converted %int_2147483648.loc13, %.loc13_24.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc13: init %i64 = call imports.%foo.decl.bd967b.2(%.loc13_24.2)
// CHECK:STDOUT: %.loc13_10: type = splice_block %i64.loc13 [concrete = constants.%i64] {
// CHECK:STDOUT: %bound_method.loc13_31.2: <bound method> = bound_method %int_2147483648.loc13, %specific_fn.loc13 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13: init %i64 = call %bound_method.loc13_31.2(%int_2147483648.loc13) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc13_31.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc13_31.2: %i64 = converted %int_2147483648.loc13, %.loc13_31.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc13: init %i64 = call imports.%foo.decl.bd967b.2(%.loc13_31.2)
// CHECK:STDOUT: %.loc13_17: type = splice_block %i64.loc13 [concrete = constants.%i64] {
// CHECK:STDOUT: %int_64.loc13: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %i64.loc13: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_34.1: %i64 = value_of_initializer %foo.call.loc13
// CHECK:STDOUT: %.loc13_34.2: %i64 = converted %foo.call.loc13, %.loc13_34.1
// CHECK:STDOUT: %b: %i64 = value_binding b, %.loc13_34.2
// CHECK:STDOUT: %.loc13_41.1: %i64 = value_of_initializer %foo.call.loc13
// CHECK:STDOUT: %.loc13_41.2: %i64 = converted %foo.call.loc13, %.loc13_41.1
// CHECK:STDOUT: %b: %i64 = value_binding b, %.loc13_41.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b_hexa.patt: %pattern_type.95b = value_binding_pattern b_hexa [concrete]
// CHECK:STDOUT: }
@@ -1571,20 +1571,20 @@ fn F() {
// CHECK:STDOUT: %foo.ref.loc14: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_2147483648.loc14: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
// CHECK:STDOUT: %impl.elem0.loc14: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
// CHECK:STDOUT: %bound_method.loc14_29.1: <bound method> = bound_method %int_2147483648.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %bound_method.loc14_36.1: <bound method> = bound_method %int_2147483648.loc14, %impl.elem0.loc14 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %specific_fn.loc14: <specific function> = specific_function %impl.elem0.loc14, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
// CHECK:STDOUT: %bound_method.loc14_29.2: <bound method> = bound_method %int_2147483648.loc14, %specific_fn.loc14 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14: init %i64 = call %bound_method.loc14_29.2(%int_2147483648.loc14) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc14_29.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc14_29.2: %i64 = converted %int_2147483648.loc14, %.loc14_29.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc14: init %i64 = call imports.%foo.decl.bd967b.2(%.loc14_29.2)
// CHECK:STDOUT: %.loc14_15: type = splice_block %i64.loc14 [concrete = constants.%i64] {
// CHECK:STDOUT: %bound_method.loc14_36.2: <bound method> = bound_method %int_2147483648.loc14, %specific_fn.loc14 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14: init %i64 = call %bound_method.loc14_36.2(%int_2147483648.loc14) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc14_36.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc14 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc14_36.2: %i64 = converted %int_2147483648.loc14, %.loc14_36.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc14: init %i64 = call imports.%foo.decl.bd967b.2(%.loc14_36.2)
// CHECK:STDOUT: %.loc14_22: type = splice_block %i64.loc14 [concrete = constants.%i64] {
// CHECK:STDOUT: %int_64.loc14: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %i64.loc14: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc14_40.1: %i64 = value_of_initializer %foo.call.loc14
// CHECK:STDOUT: %.loc14_40.2: %i64 = converted %foo.call.loc14, %.loc14_40.1
// CHECK:STDOUT: %b_hexa: %i64 = value_binding b_hexa, %.loc14_40.2
// CHECK:STDOUT: %.loc14_47.1: %i64 = value_of_initializer %foo.call.loc14
// CHECK:STDOUT: %.loc14_47.2: %i64 = converted %foo.call.loc14, %.loc14_47.1
// CHECK:STDOUT: %b_hexa: %i64 = value_binding b_hexa, %.loc14_47.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %b_binary.patt: %pattern_type.95b = value_binding_pattern b_binary [concrete]
// CHECK:STDOUT: }
@@ -1592,20 +1592,20 @@ fn F() {
// CHECK:STDOUT: %foo.ref.loc15: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_2147483648.loc15: Core.IntLiteral = int_value 2147483648 [concrete = constants.%int_2147483648.1db]
// CHECK:STDOUT: %impl.elem0.loc15: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
// CHECK:STDOUT: %bound_method.loc15_31.1: <bound method> = bound_method %int_2147483648.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %bound_method.loc15_38.1: <bound method> = bound_method %int_2147483648.loc15, %impl.elem0.loc15 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a4]
// CHECK:STDOUT: %specific_fn.loc15: <specific function> = specific_function %impl.elem0.loc15, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
// CHECK:STDOUT: %bound_method.loc15_31.2: <bound method> = bound_method %int_2147483648.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i64 = call %bound_method.loc15_31.2(%int_2147483648.loc15) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc15_31.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc15_31.2: %i64 = converted %int_2147483648.loc15, %.loc15_31.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc15: init %i64 = call imports.%foo.decl.bd967b.2(%.loc15_31.2)
// CHECK:STDOUT: %.loc15_17: type = splice_block %i64.loc15 [concrete = constants.%i64] {
// CHECK:STDOUT: %bound_method.loc15_38.2: <bound method> = bound_method %int_2147483648.loc15, %specific_fn.loc15 [concrete = constants.%bound_method.41d]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15: init %i64 = call %bound_method.loc15_38.2(%int_2147483648.loc15) [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc15_38.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %.loc15_38.2: %i64 = converted %int_2147483648.loc15, %.loc15_38.1 [concrete = constants.%int_2147483648.e1f]
// CHECK:STDOUT: %foo.call.loc15: init %i64 = call imports.%foo.decl.bd967b.2(%.loc15_38.2)
// CHECK:STDOUT: %.loc15_24: type = splice_block %i64.loc15 [concrete = constants.%i64] {
// CHECK:STDOUT: %int_64.loc15: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %i64.loc15: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc15_72.1: %i64 = value_of_initializer %foo.call.loc15
// CHECK:STDOUT: %.loc15_72.2: %i64 = converted %foo.call.loc15, %.loc15_72.1
// CHECK:STDOUT: %b_binary: %i64 = value_binding b_binary, %.loc15_72.2
// CHECK:STDOUT: %.loc15_79.1: %i64 = value_of_initializer %foo.call.loc15
// CHECK:STDOUT: %.loc15_79.2: %i64 = converted %foo.call.loc15, %.loc15_79.1
// CHECK:STDOUT: %b_binary: %i64 = value_binding b_binary, %.loc15_79.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %c.patt: %pattern_type.95b = value_binding_pattern c [concrete]
// CHECK:STDOUT: }
@@ -1613,164 +1613,164 @@ fn F() {
// CHECK:STDOUT: %foo.ref.loc18: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_9223372036854775807: Core.IntLiteral = int_value 9223372036854775807 [concrete = constants.%int_9223372036854775807.e6f]
// CHECK:STDOUT: %impl.elem0.loc18: %.a64 = impl_witness_access constants.%ImplicitAs.impl_witness.556, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.57d]
// CHECK:STDOUT: %bound_method.loc18_24.1: <bound method> = bound_method %int_9223372036854775807, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6d9]
// CHECK:STDOUT: %bound_method.loc18_31.1: <bound method> = bound_method %int_9223372036854775807, %impl.elem0.loc18 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6d9]
// CHECK:STDOUT: %specific_fn.loc18: <specific function> = specific_function %impl.elem0.loc18, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.8d7]
// CHECK:STDOUT: %bound_method.loc18_24.2: <bound method> = bound_method %int_9223372036854775807, %specific_fn.loc18 [concrete = constants.%bound_method.ef8]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %i64 = call %bound_method.loc18_24.2(%int_9223372036854775807) [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %.loc18_24.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %.loc18_24.2: %i64 = converted %int_9223372036854775807, %.loc18_24.1 [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %foo.call.loc18: init %i64 = call imports.%foo.decl.bd967b.2(%.loc18_24.2)
// CHECK:STDOUT: %.loc18_10: type = splice_block %i64.loc18 [concrete = constants.%i64] {
// CHECK:STDOUT: %bound_method.loc18_31.2: <bound method> = bound_method %int_9223372036854775807, %specific_fn.loc18 [concrete = constants.%bound_method.ef8]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18: init %i64 = call %bound_method.loc18_31.2(%int_9223372036854775807) [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %.loc18_31.1: %i64 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc18 [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %.loc18_31.2: %i64 = converted %int_9223372036854775807, %.loc18_31.1 [concrete = constants.%int_9223372036854775807.9c2]
// CHECK:STDOUT: %foo.call.loc18: init %i64 = call imports.%foo.decl.bd967b.2(%.loc18_31.2)
// CHECK:STDOUT: %.loc18_17: type = splice_block %i64.loc18 [concrete = constants.%i64] {
// CHECK:STDOUT: %int_64.loc18: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %i64.loc18: type = class_type @Int, @Int(constants.%int_64) [concrete = constants.%i64]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc18_43.1: %i64 = value_of_initializer %foo.call.loc18
// CHECK:STDOUT: %.loc18_43.2: %i64 = converted %foo.call.loc18, %.loc18_43.1
// CHECK:STDOUT: %c: %i64 = value_binding c, %.loc18_43.2
// CHECK:STDOUT: %.loc18_50.1: %i64 = value_of_initializer %foo.call.loc18
// CHECK:STDOUT: %.loc18_50.2: %i64 = converted %foo.call.loc18, %.loc18_50.1
// CHECK:STDOUT: %c: %i64 = value_binding c, %.loc18_50.2
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %d.patt: %pattern_type.57d = value_binding_pattern d [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref.loc22: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_9223372036854775808: Core.IntLiteral = int_value 9223372036854775808 [concrete = constants.%int_9223372036854775808.293]
// CHECK:STDOUT: %impl.elem0.loc22_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc22_25.1: <bound method> = bound_method %int_9223372036854775808, %impl.elem0.loc22_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8]
// CHECK:STDOUT: %specific_fn.loc22_25.1: <specific function> = specific_function %impl.elem0.loc22_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc22_25.2: <bound method> = bound_method %int_9223372036854775808, %specific_fn.loc22_25.1 [concrete = constants.%bound_method.561]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i128 = call %bound_method.loc22_25.2(%int_9223372036854775808) [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_25.2: %i128 = converted %int_9223372036854775808, %.loc22_25.1 [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_25.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc22_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc22_25.3: <bound method> = bound_method %.loc22_25.2, %impl.elem0.loc22_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.def]
// CHECK:STDOUT: %specific_fn.loc22_25.2: <specific function> = specific_function %impl.elem0.loc22_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc22_25.4: <bound method> = bound_method %.loc22_25.2, %specific_fn.loc22_25.2 [concrete = constants.%bound_method.b4e]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc22: init %i128 = call %bound_method.loc22_25.4(%.loc22_25.2) [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_25.4: ref %i128 = temporary %.loc22_25.3, %Int.as.Copy.impl.Op.call.loc22
// CHECK:STDOUT: %addr.loc22_44.1: %ptr.974 = addr_of %.loc22_25.4
// CHECK:STDOUT: %.loc22_44.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc22_44.2: %ptr.974 = addr_of %.loc22_44.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc22_44.1, %addr.loc22_44.2)
// CHECK:STDOUT: %.loc22_44.2: init %i128 to %.loc22_44.1 = mark_in_place_init %foo__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_10: type = splice_block %i128.loc22 [concrete = constants.%i128] {
// CHECK:STDOUT: %impl.elem0.loc22_32.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc22_32.1: <bound method> = bound_method %int_9223372036854775808, %impl.elem0.loc22_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a8]
// CHECK:STDOUT: %specific_fn.loc22_32.1: <specific function> = specific_function %impl.elem0.loc22_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc22_32.2: <bound method> = bound_method %int_9223372036854775808, %specific_fn.loc22_32.1 [concrete = constants.%bound_method.561]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i128 = call %bound_method.loc22_32.2(%int_9223372036854775808) [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_32.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_32.2: %i128 = converted %int_9223372036854775808, %.loc22_32.1 [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_32.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc22_32.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc22_32.3: <bound method> = bound_method %.loc22_32.2, %impl.elem0.loc22_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.def]
// CHECK:STDOUT: %specific_fn.loc22_32.2: <specific function> = specific_function %impl.elem0.loc22_32.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc22_32.4: <bound method> = bound_method %.loc22_32.2, %specific_fn.loc22_32.2 [concrete = constants.%bound_method.b4e]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc22: init %i128 = call %bound_method.loc22_32.4(%.loc22_32.2) [concrete = constants.%int_9223372036854775808.f14]
// CHECK:STDOUT: %.loc22_32.4: ref %i128 = temporary %.loc22_32.3, %Int.as.Copy.impl.Op.call.loc22
// CHECK:STDOUT: %addr.loc22_51.1: %ptr.974 = addr_of %.loc22_32.4
// CHECK:STDOUT: %.loc22_51.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc22_51.2: %ptr.974 = addr_of %.loc22_51.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc22: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc22_51.1, %addr.loc22_51.2)
// CHECK:STDOUT: %.loc22_51.2: init %i128 to %.loc22_51.1 = mark_in_place_init %foo__carbon_thunk.call.loc22
// CHECK:STDOUT: %.loc22_17: type = splice_block %i128.loc22 [concrete = constants.%i128] {
// CHECK:STDOUT: %int_128.loc22: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
// CHECK:STDOUT: %i128.loc22: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc22_44.3: ref %i128 = temporary %.loc22_44.1, %.loc22_44.2
// CHECK:STDOUT: %.loc22_44.4: %i128 = acquire_value %.loc22_44.3
// CHECK:STDOUT: %d: %i128 = value_binding d, %.loc22_44.4
// CHECK:STDOUT: %.loc22_51.3: ref %i128 = temporary %.loc22_51.1, %.loc22_51.2
// CHECK:STDOUT: %.loc22_51.4: %i128 = acquire_value %.loc22_51.3
// CHECK:STDOUT: %d: %i128 = value_binding d, %.loc22_51.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %e.patt: %pattern_type.57d = value_binding_pattern e [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref.loc25: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_18446744073709551615: Core.IntLiteral = int_value 18446744073709551615 [concrete = constants.%int_18446744073709551615.5ec]
// CHECK:STDOUT: %impl.elem0.loc25_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc25_25.1: <bound method> = bound_method %int_18446744073709551615, %impl.elem0.loc25_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9ac]
// CHECK:STDOUT: %specific_fn.loc25_25.1: <specific function> = specific_function %impl.elem0.loc25_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc25_25.2: <bound method> = bound_method %int_18446744073709551615, %specific_fn.loc25_25.1 [concrete = constants.%bound_method.422]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i128 = call %bound_method.loc25_25.2(%int_18446744073709551615) [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_25.2: %i128 = converted %int_18446744073709551615, %.loc25_25.1 [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_25.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc25_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc25_25.3: <bound method> = bound_method %.loc25_25.2, %impl.elem0.loc25_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.cf0]
// CHECK:STDOUT: %specific_fn.loc25_25.2: <specific function> = specific_function %impl.elem0.loc25_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc25_25.4: <bound method> = bound_method %.loc25_25.2, %specific_fn.loc25_25.2 [concrete = constants.%bound_method.2cb]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc25: init %i128 = call %bound_method.loc25_25.4(%.loc25_25.2) [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_25.4: ref %i128 = temporary %.loc25_25.3, %Int.as.Copy.impl.Op.call.loc25
// CHECK:STDOUT: %addr.loc25_45.1: %ptr.974 = addr_of %.loc25_25.4
// CHECK:STDOUT: %.loc25_45.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc25_45.2: %ptr.974 = addr_of %.loc25_45.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc25: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc25_45.1, %addr.loc25_45.2)
// CHECK:STDOUT: %.loc25_45.2: init %i128 to %.loc25_45.1 = mark_in_place_init %foo__carbon_thunk.call.loc25
// CHECK:STDOUT: %.loc25_10: type = splice_block %i128.loc25 [concrete = constants.%i128] {
// CHECK:STDOUT: %impl.elem0.loc25_32.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc25_32.1: <bound method> = bound_method %int_18446744073709551615, %impl.elem0.loc25_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.9ac]
// CHECK:STDOUT: %specific_fn.loc25_32.1: <specific function> = specific_function %impl.elem0.loc25_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc25_32.2: <bound method> = bound_method %int_18446744073709551615, %specific_fn.loc25_32.1 [concrete = constants.%bound_method.422]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25: init %i128 = call %bound_method.loc25_32.2(%int_18446744073709551615) [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_32.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc25 [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_32.2: %i128 = converted %int_18446744073709551615, %.loc25_32.1 [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_32.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc25_32.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc25_32.3: <bound method> = bound_method %.loc25_32.2, %impl.elem0.loc25_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.cf0]
// CHECK:STDOUT: %specific_fn.loc25_32.2: <specific function> = specific_function %impl.elem0.loc25_32.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc25_32.4: <bound method> = bound_method %.loc25_32.2, %specific_fn.loc25_32.2 [concrete = constants.%bound_method.2cb]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc25: init %i128 = call %bound_method.loc25_32.4(%.loc25_32.2) [concrete = constants.%int_18446744073709551615.f56]
// CHECK:STDOUT: %.loc25_32.4: ref %i128 = temporary %.loc25_32.3, %Int.as.Copy.impl.Op.call.loc25
// CHECK:STDOUT: %addr.loc25_52.1: %ptr.974 = addr_of %.loc25_32.4
// CHECK:STDOUT: %.loc25_52.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc25_52.2: %ptr.974 = addr_of %.loc25_52.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc25: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc25_52.1, %addr.loc25_52.2)
// CHECK:STDOUT: %.loc25_52.2: init %i128 to %.loc25_52.1 = mark_in_place_init %foo__carbon_thunk.call.loc25
// CHECK:STDOUT: %.loc25_17: type = splice_block %i128.loc25 [concrete = constants.%i128] {
// CHECK:STDOUT: %int_128.loc25: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
// CHECK:STDOUT: %i128.loc25: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc25_45.3: ref %i128 = temporary %.loc25_45.1, %.loc25_45.2
// CHECK:STDOUT: %.loc25_45.4: %i128 = acquire_value %.loc25_45.3
// CHECK:STDOUT: %e: %i128 = value_binding e, %.loc25_45.4
// CHECK:STDOUT: %.loc25_52.3: ref %i128 = temporary %.loc25_52.1, %.loc25_52.2
// CHECK:STDOUT: %.loc25_52.4: %i128 = acquire_value %.loc25_52.3
// CHECK:STDOUT: %e: %i128 = value_binding e, %.loc25_52.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %f.patt: %pattern_type.57d = value_binding_pattern f [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref.loc28: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_18446744073709551616: Core.IntLiteral = int_value 18446744073709551616 [concrete = constants.%int_18446744073709551616.1ee]
// CHECK:STDOUT: %impl.elem0.loc28_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc28_25.1: <bound method> = bound_method %int_18446744073709551616, %impl.elem0.loc28_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a3]
// CHECK:STDOUT: %specific_fn.loc28_25.1: <specific function> = specific_function %impl.elem0.loc28_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc28_25.2: <bound method> = bound_method %int_18446744073709551616, %specific_fn.loc28_25.1 [concrete = constants.%bound_method.e31]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28: init %i128 = call %bound_method.loc28_25.2(%int_18446744073709551616) [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_25.2: %i128 = converted %int_18446744073709551616, %.loc28_25.1 [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_25.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc28_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc28_25.3: <bound method> = bound_method %.loc28_25.2, %impl.elem0.loc28_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.bcd]
// CHECK:STDOUT: %specific_fn.loc28_25.2: <specific function> = specific_function %impl.elem0.loc28_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc28_25.4: <bound method> = bound_method %.loc28_25.2, %specific_fn.loc28_25.2 [concrete = constants.%bound_method.6a9]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc28: init %i128 = call %bound_method.loc28_25.4(%.loc28_25.2) [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_25.4: ref %i128 = temporary %.loc28_25.3, %Int.as.Copy.impl.Op.call.loc28
// CHECK:STDOUT: %addr.loc28_45.1: %ptr.974 = addr_of %.loc28_25.4
// CHECK:STDOUT: %.loc28_45.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc28_45.2: %ptr.974 = addr_of %.loc28_45.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc28: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc28_45.1, %addr.loc28_45.2)
// CHECK:STDOUT: %.loc28_45.2: init %i128 to %.loc28_45.1 = mark_in_place_init %foo__carbon_thunk.call.loc28
// CHECK:STDOUT: %.loc28_10: type = splice_block %i128.loc28 [concrete = constants.%i128] {
// CHECK:STDOUT: %impl.elem0.loc28_32.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc28_32.1: <bound method> = bound_method %int_18446744073709551616, %impl.elem0.loc28_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.6a3]
// CHECK:STDOUT: %specific_fn.loc28_32.1: <specific function> = specific_function %impl.elem0.loc28_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc28_32.2: <bound method> = bound_method %int_18446744073709551616, %specific_fn.loc28_32.1 [concrete = constants.%bound_method.e31]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28: init %i128 = call %bound_method.loc28_32.2(%int_18446744073709551616) [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_32.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc28 [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_32.2: %i128 = converted %int_18446744073709551616, %.loc28_32.1 [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_32.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc28_32.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc28_32.3: <bound method> = bound_method %.loc28_32.2, %impl.elem0.loc28_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.bcd]
// CHECK:STDOUT: %specific_fn.loc28_32.2: <specific function> = specific_function %impl.elem0.loc28_32.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc28_32.4: <bound method> = bound_method %.loc28_32.2, %specific_fn.loc28_32.2 [concrete = constants.%bound_method.6a9]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc28: init %i128 = call %bound_method.loc28_32.4(%.loc28_32.2) [concrete = constants.%int_18446744073709551616.92b]
// CHECK:STDOUT: %.loc28_32.4: ref %i128 = temporary %.loc28_32.3, %Int.as.Copy.impl.Op.call.loc28
// CHECK:STDOUT: %addr.loc28_52.1: %ptr.974 = addr_of %.loc28_32.4
// CHECK:STDOUT: %.loc28_52.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc28_52.2: %ptr.974 = addr_of %.loc28_52.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc28: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc28_52.1, %addr.loc28_52.2)
// CHECK:STDOUT: %.loc28_52.2: init %i128 to %.loc28_52.1 = mark_in_place_init %foo__carbon_thunk.call.loc28
// CHECK:STDOUT: %.loc28_17: type = splice_block %i128.loc28 [concrete = constants.%i128] {
// CHECK:STDOUT: %int_128.loc28: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
// CHECK:STDOUT: %i128.loc28: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc28_45.3: ref %i128 = temporary %.loc28_45.1, %.loc28_45.2
// CHECK:STDOUT: %.loc28_45.4: %i128 = acquire_value %.loc28_45.3
// CHECK:STDOUT: %f: %i128 = value_binding f, %.loc28_45.4
// CHECK:STDOUT: %.loc28_52.3: ref %i128 = temporary %.loc28_52.1, %.loc28_52.2
// CHECK:STDOUT: %.loc28_52.4: %i128 = acquire_value %.loc28_52.3
// CHECK:STDOUT: %f: %i128 = value_binding f, %.loc28_52.4
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %g.patt: %pattern_type.57d = value_binding_pattern g [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref.loc31: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %int_170141183460469231731687303715884105727: Core.IntLiteral = int_value 170141183460469231731687303715884105727 [concrete = constants.%int_170141183460469231731687303715884105727.fea]
// CHECK:STDOUT: %impl.elem0.loc31_25.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc31_25.1: <bound method> = bound_method %int_170141183460469231731687303715884105727, %impl.elem0.loc31_25.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e8]
// CHECK:STDOUT: %specific_fn.loc31_25.1: <specific function> = specific_function %impl.elem0.loc31_25.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc31_25.2: <bound method> = bound_method %int_170141183460469231731687303715884105727, %specific_fn.loc31_25.1 [concrete = constants.%bound_method.d00]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i128 = call %bound_method.loc31_25.2(%int_170141183460469231731687303715884105727) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_25.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_25.2: %i128 = converted %int_170141183460469231731687303715884105727, %.loc31_25.1 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_25.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc31_25.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc31_25.3: <bound method> = bound_method %.loc31_25.2, %impl.elem0.loc31_25.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.78b]
// CHECK:STDOUT: %specific_fn.loc31_25.2: <specific function> = specific_function %impl.elem0.loc31_25.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc31_25.4: <bound method> = bound_method %.loc31_25.2, %specific_fn.loc31_25.2 [concrete = constants.%bound_method.2fb]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc31: init %i128 = call %bound_method.loc31_25.4(%.loc31_25.2) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_25.4: ref %i128 = temporary %.loc31_25.3, %Int.as.Copy.impl.Op.call.loc31
// CHECK:STDOUT: %addr.loc31_64.1: %ptr.974 = addr_of %.loc31_25.4
// CHECK:STDOUT: %.loc31_64.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc31_64.2: %ptr.974 = addr_of %.loc31_64.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc31: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc31_64.1, %addr.loc31_64.2)
// CHECK:STDOUT: %.loc31_64.2: init %i128 to %.loc31_64.1 = mark_in_place_init %foo__carbon_thunk.call.loc31
// CHECK:STDOUT: %.loc31_10: type = splice_block %i128.loc31 [concrete = constants.%i128] {
// CHECK:STDOUT: %impl.elem0.loc31_32.1: %.44c = impl_witness_access constants.%ImplicitAs.impl_witness.47a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.75a]
// CHECK:STDOUT: %bound_method.loc31_32.1: <bound method> = bound_method %int_170141183460469231731687303715884105727, %impl.elem0.loc31_32.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8e8]
// CHECK:STDOUT: %specific_fn.loc31_32.1: <specific function> = specific_function %impl.elem0.loc31_32.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_128) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn.e59]
// CHECK:STDOUT: %bound_method.loc31_32.2: <bound method> = bound_method %int_170141183460469231731687303715884105727, %specific_fn.loc31_32.1 [concrete = constants.%bound_method.d00]
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i128 = call %bound_method.loc31_32.2(%int_170141183460469231731687303715884105727) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_32.1: %i128 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_32.2: %i128 = converted %int_170141183460469231731687303715884105727, %.loc31_32.1 [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_32.3: ref %i128 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc31_32.2: %.0e6 = impl_witness_access constants.%Copy.impl_witness.a35, element0 [concrete = constants.%Int.as.Copy.impl.Op.bc1]
// CHECK:STDOUT: %bound_method.loc31_32.3: <bound method> = bound_method %.loc31_32.2, %impl.elem0.loc31_32.2 [concrete = constants.%Int.as.Copy.impl.Op.bound.78b]
// CHECK:STDOUT: %specific_fn.loc31_32.2: <specific function> = specific_function %impl.elem0.loc31_32.2, @Int.as.Copy.impl.Op(constants.%int_128) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc31_32.4: <bound method> = bound_method %.loc31_32.2, %specific_fn.loc31_32.2 [concrete = constants.%bound_method.2fb]
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call.loc31: init %i128 = call %bound_method.loc31_32.4(%.loc31_32.2) [concrete = constants.%int_170141183460469231731687303715884105727.ff5]
// CHECK:STDOUT: %.loc31_32.4: ref %i128 = temporary %.loc31_32.3, %Int.as.Copy.impl.Op.call.loc31
// CHECK:STDOUT: %addr.loc31_71.1: %ptr.974 = addr_of %.loc31_32.4
// CHECK:STDOUT: %.loc31_71.1: ref %i128 = temporary_storage
// CHECK:STDOUT: %addr.loc31_71.2: %ptr.974 = addr_of %.loc31_71.1
// CHECK:STDOUT: %foo__carbon_thunk.call.loc31: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc31_71.1, %addr.loc31_71.2)
// CHECK:STDOUT: %.loc31_71.2: init %i128 to %.loc31_71.1 = mark_in_place_init %foo__carbon_thunk.call.loc31
// CHECK:STDOUT: %.loc31_17: type = splice_block %i128.loc31 [concrete = constants.%i128] {
// CHECK:STDOUT: %int_128.loc31: Core.IntLiteral = int_value 128 [concrete = constants.%int_128]
// CHECK:STDOUT: %i128.loc31: type = class_type @Int, @Int(constants.%int_128) [concrete = constants.%i128]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc31_64.3: ref %i128 = temporary %.loc31_64.1, %.loc31_64.2
// CHECK:STDOUT: %.loc31_64.4: %i128 = acquire_value %.loc31_64.3
// CHECK:STDOUT: %g: %i128 = value_binding g, %.loc31_64.4
// CHECK:STDOUT: %DestroyOp.bound.loc31_64: <bound method> = bound_method %.loc31_64.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc31_64: init %empty_tuple.type = call %DestroyOp.bound.loc31_64(%.loc31_64.3)
// CHECK:STDOUT: %DestroyOp.bound.loc31_25: <bound method> = bound_method %.loc31_25.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc31_25: init %empty_tuple.type = call %DestroyOp.bound.loc31_25(%.loc31_25.4)
// CHECK:STDOUT: %DestroyOp.bound.loc28_45: <bound method> = bound_method %.loc28_45.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc28_45: init %empty_tuple.type = call %DestroyOp.bound.loc28_45(%.loc28_45.3)
// CHECK:STDOUT: %DestroyOp.bound.loc28_25: <bound method> = bound_method %.loc28_25.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc28_25: init %empty_tuple.type = call %DestroyOp.bound.loc28_25(%.loc28_25.4)
// CHECK:STDOUT: %DestroyOp.bound.loc25_45: <bound method> = bound_method %.loc25_45.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc25_45: init %empty_tuple.type = call %DestroyOp.bound.loc25_45(%.loc25_45.3)
// CHECK:STDOUT: %DestroyOp.bound.loc25_25: <bound method> = bound_method %.loc25_25.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc25_25: init %empty_tuple.type = call %DestroyOp.bound.loc25_25(%.loc25_25.4)
// CHECK:STDOUT: %DestroyOp.bound.loc22_44: <bound method> = bound_method %.loc22_44.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc22_44: init %empty_tuple.type = call %DestroyOp.bound.loc22_44(%.loc22_44.3)
// CHECK:STDOUT: %DestroyOp.bound.loc22_25: <bound method> = bound_method %.loc22_25.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc22_25: init %empty_tuple.type = call %DestroyOp.bound.loc22_25(%.loc22_25.4)
// CHECK:STDOUT: %.loc31_71.3: ref %i128 = temporary %.loc31_71.1, %.loc31_71.2
// CHECK:STDOUT: %.loc31_71.4: %i128 = acquire_value %.loc31_71.3
// CHECK:STDOUT: %g: %i128 = value_binding g, %.loc31_71.4
// CHECK:STDOUT: %DestroyOp.bound.loc31_71: <bound method> = bound_method %.loc31_71.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc31_71: init %empty_tuple.type = call %DestroyOp.bound.loc31_71(%.loc31_71.3)
// CHECK:STDOUT: %DestroyOp.bound.loc31_32: <bound method> = bound_method %.loc31_32.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc31_32: init %empty_tuple.type = call %DestroyOp.bound.loc31_32(%.loc31_32.4)
// CHECK:STDOUT: %DestroyOp.bound.loc28_52: <bound method> = bound_method %.loc28_52.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc28_52: init %empty_tuple.type = call %DestroyOp.bound.loc28_52(%.loc28_52.3)
// CHECK:STDOUT: %DestroyOp.bound.loc28_32: <bound method> = bound_method %.loc28_32.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc28_32: init %empty_tuple.type = call %DestroyOp.bound.loc28_32(%.loc28_32.4)
// CHECK:STDOUT: %DestroyOp.bound.loc25_52: <bound method> = bound_method %.loc25_52.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc25_52: init %empty_tuple.type = call %DestroyOp.bound.loc25_52(%.loc25_52.3)
// CHECK:STDOUT: %DestroyOp.bound.loc25_32: <bound method> = bound_method %.loc25_32.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc25_32: init %empty_tuple.type = call %DestroyOp.bound.loc25_32(%.loc25_32.4)
// CHECK:STDOUT: %DestroyOp.bound.loc22_51: <bound method> = bound_method %.loc22_51.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc22_51: init %empty_tuple.type = call %DestroyOp.bound.loc22_51(%.loc22_51.3)
// CHECK:STDOUT: %DestroyOp.bound.loc22_32: <bound method> = bound_method %.loc22_32.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc22_32: init %empty_tuple.type = call %DestroyOp.bound.loc22_32(%.loc22_32.4)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -2184,36 +2184,36 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %impl.elem0.loc7_24.1: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239]
// CHECK:STDOUT: %bound_method.loc7_24.1: <bound method> = bound_method %float, %impl.elem0.loc7_24.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc7_24.1: <specific function> = specific_function %impl.elem0.loc7_24.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_24.2: <bound method> = bound_method %float, %specific_fn.loc7_24.1 [concrete = constants.%bound_method.581]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.d77 = call %bound_method.loc7_24.2(%float) [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_24.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_24.2: %f64.d77 = converted %float, %.loc7_24.1 [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_24.3: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc7_24.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05]
// CHECK:STDOUT: %bound_method.loc7_24.3: <bound method> = bound_method %.loc7_24.2, %impl.elem0.loc7_24.2 [concrete = constants.%Float.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc7_24.2: <specific function> = specific_function %impl.elem0.loc7_24.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_24.4: <bound method> = bound_method %.loc7_24.2, %specific_fn.loc7_24.2 [concrete = constants.%bound_method.9b6]
// CHECK:STDOUT: %Float.as.Copy.impl.Op.call: init %f64.d77 = call %bound_method.loc7_24.4(%.loc7_24.2) [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_24.4: ref %f64.d77 = temporary %.loc7_24.3, %Float.as.Copy.impl.Op.call
// CHECK:STDOUT: %addr.loc7_27.1: %ptr.bcc = addr_of %.loc7_24.4
// CHECK:STDOUT: %.loc7_27.1: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %addr.loc7_27.2: %ptr.bcc = addr_of %.loc7_27.1
// CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc7_27.1, %addr.loc7_27.2)
// CHECK:STDOUT: %.loc7_27.2: init %f64.d77 to %.loc7_27.1 = mark_in_place_init %foo__carbon_thunk.call
// CHECK:STDOUT: %.loc7_10: type = splice_block %f64 [concrete = constants.%f64.d77] {
// CHECK:STDOUT: %impl.elem0.loc7_31.1: %.6c5 = impl_witness_access constants.%ImplicitAs.impl_witness.cb2, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.239]
// CHECK:STDOUT: %bound_method.loc7_31.1: <bound method> = bound_method %float, %impl.elem0.loc7_31.1 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc7_31.1: <specific function> = specific_function %impl.elem0.loc7_31.1, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_31.2: <bound method> = bound_method %float, %specific_fn.loc7_31.1 [concrete = constants.%bound_method.581]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.d77 = call %bound_method.loc7_31.2(%float) [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_31.1: %f64.d77 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_31.2: %f64.d77 = converted %float, %.loc7_31.1 [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_31.3: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %impl.elem0.loc7_31.2: %.59b = impl_witness_access constants.%Copy.impl_witness.1e3, element0 [concrete = constants.%Float.as.Copy.impl.Op.f05]
// CHECK:STDOUT: %bound_method.loc7_31.3: <bound method> = bound_method %.loc7_31.2, %impl.elem0.loc7_31.2 [concrete = constants.%Float.as.Copy.impl.Op.bound]
// CHECK:STDOUT: %specific_fn.loc7_31.2: <specific function> = specific_function %impl.elem0.loc7_31.2, @Float.as.Copy.impl.Op(constants.%int_64) [concrete = constants.%Float.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc7_31.4: <bound method> = bound_method %.loc7_31.2, %specific_fn.loc7_31.2 [concrete = constants.%bound_method.9b6]
// CHECK:STDOUT: %Float.as.Copy.impl.Op.call: init %f64.d77 = call %bound_method.loc7_31.4(%.loc7_31.2) [concrete = constants.%float.d20]
// CHECK:STDOUT: %.loc7_31.4: ref %f64.d77 = temporary %.loc7_31.3, %Float.as.Copy.impl.Op.call
// CHECK:STDOUT: %addr.loc7_34.1: %ptr.bcc = addr_of %.loc7_31.4
// CHECK:STDOUT: %.loc7_34.1: ref %f64.d77 = temporary_storage
// CHECK:STDOUT: %addr.loc7_34.2: %ptr.bcc = addr_of %.loc7_34.1
// CHECK:STDOUT: %foo__carbon_thunk.call: init %empty_tuple.type = call imports.%foo__carbon_thunk.decl(%addr.loc7_34.1, %addr.loc7_34.2)
// CHECK:STDOUT: %.loc7_34.2: init %f64.d77 to %.loc7_34.1 = mark_in_place_init %foo__carbon_thunk.call
// CHECK:STDOUT: %.loc7_17: type = splice_block %f64 [concrete = constants.%f64.d77] {
// CHECK:STDOUT: %int_64: Core.IntLiteral = int_value 64 [concrete = constants.%int_64]
// CHECK:STDOUT: %f64: type = class_type @Float, @Float(constants.%int_64) [concrete = constants.%f64.d77]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc7_27.3: ref %f64.d77 = temporary %.loc7_27.1, %.loc7_27.2
// CHECK:STDOUT: %.loc7_27.4: %f64.d77 = acquire_value %.loc7_27.3
// CHECK:STDOUT: %d: %f64.d77 = value_binding d, %.loc7_27.4
// CHECK:STDOUT: %DestroyOp.bound.loc7_27: <bound method> = bound_method %.loc7_27.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc7_27: init %empty_tuple.type = call %DestroyOp.bound.loc7_27(%.loc7_27.3)
// CHECK:STDOUT: %DestroyOp.bound.loc7_24: <bound method> = bound_method %.loc7_24.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc7_24: init %empty_tuple.type = call %DestroyOp.bound.loc7_24(%.loc7_24.4)
// CHECK:STDOUT: %.loc7_34.3: ref %f64.d77 = temporary %.loc7_34.1, %.loc7_34.2
// CHECK:STDOUT: %.loc7_34.4: %f64.d77 = acquire_value %.loc7_34.3
// CHECK:STDOUT: %d: %f64.d77 = value_binding d, %.loc7_34.4
// CHECK:STDOUT: %DestroyOp.bound.loc7_34: <bound method> = bound_method %.loc7_34.3, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc7_34: init %empty_tuple.type = call %DestroyOp.bound.loc7_34(%.loc7_34.3)
// CHECK:STDOUT: %DestroyOp.bound.loc7_31: <bound method> = bound_method %.loc7_31.4, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call.loc7_31: init %empty_tuple.type = call %DestroyOp.bound.loc7_31(%.loc7_31.4)
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -3932,13 +3932,13 @@ fn F() {
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %ValueT.loc10_14.2: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
// CHECK:STDOUT: %.loc10_34.1: type = splice_block %.loc10_34.2 [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)] {
// CHECK:STDOUT: %.loc10_41.1: type = splice_block %.loc10_41.2 [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)] {
// CHECK:STDOUT: %.Self.1: %type = symbolic_binding .Self [symbolic_self = constants.%.Self]
// CHECK:STDOUT: %ValueT.ref: %I.type = name_ref ValueT, %ValueT.loc10_14.2 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
// CHECK:STDOUT: %ValueT.as_type: type = facet_access_type %ValueT.ref [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
// CHECK:STDOUT: %.loc10_34.2: type = converted %ValueT.ref, %ValueT.as_type [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
// CHECK:STDOUT: %.loc10_41.2: type = converted %ValueT.ref, %ValueT.as_type [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %value.loc10_26.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_26.1 (constants.%value)]
// CHECK:STDOUT: %value.loc10_33.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_33.1 (constants.%value)]
// CHECK:STDOUT: }
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
// CHECK:STDOUT: }
@@ -3954,10 +3954,10 @@ fn F() {
// CHECK:STDOUT: !requires:
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: generic fn @EchoValue(%ValueT.loc10_14.2: %I.type, %value.loc10_26.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type)) {
// CHECK:STDOUT: generic fn @EchoValue(%ValueT.loc10_14.2: %I.type, %value.loc10_33.2: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type)) {
// CHECK:STDOUT: %ValueT.loc10_14.1: %I.type = symbolic_binding ValueT, 0 [symbolic = %ValueT.loc10_14.1 (constants.%ValueT)]
// CHECK:STDOUT: %ValueT.binding.as_type: type = symbolic_binding_type ValueT, 0, %ValueT.loc10_14.1 [symbolic = %ValueT.binding.as_type (constants.%ValueT.binding.as_type)]
// CHECK:STDOUT: %value.loc10_26.1: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_26.1 (constants.%value)]
// CHECK:STDOUT: %value.loc10_33.1: @EchoValue.%ValueT.binding.as_type (%ValueT.binding.as_type) = symbolic_binding value, 1 [symbolic = %value.loc10_33.1 (constants.%value)]
// CHECK:STDOUT: %pattern_type: type = pattern_type %ValueT.binding.as_type [symbolic = %pattern_type (constants.%pattern_type.422)]
// CHECK:STDOUT:
// CHECK:STDOUT: !definition:
@@ -3983,7 +3983,7 @@ fn F() {
// CHECK:STDOUT: specific @EchoValue(constants.%ValueT, constants.%value) {
// CHECK:STDOUT: %ValueT.loc10_14.1 => constants.%ValueT
// CHECK:STDOUT: %ValueT.binding.as_type => constants.%ValueT.binding.as_type
// CHECK:STDOUT: %value.loc10_26.1 => constants.%value
// CHECK:STDOUT: %value.loc10_33.1 => constants.%value
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.422
// CHECK:STDOUT: }
// CHECK:STDOUT:
+39 -39
View File
@@ -372,7 +372,7 @@ fn F() {
// We assume that this cannot return a null pointer, because the function is
// generic in the type `T`.
// TODO: This isn't guaranteed; is this the behavior we want?
let p: Cpp.S* = Cpp.foo(&s);
let unused p: Cpp.S* = Cpp.foo(&s);
//@dump-sem-ir-end
}
@@ -405,7 +405,7 @@ fn F() {
var s: Cpp.S = {};
Cpp.Direct(&s);
let a: Core.Optional(Cpp.S*) = Cpp.Indirect({} as Cpp.S);
let unused a: Core.Optional(Cpp.S*) = Cpp.Indirect({} as Cpp.S);
//@dump-sem-ir-end
}
@@ -417,14 +417,14 @@ import Cpp library "deduced_pointer_param.h";
fn F() {
// This could return a null pointer, so should not be given the type `Cpp.S*`.
// CHECK:STDERR: fail_import_deduced_pointer_param_as_optional_pointer.carbon:[[@LINE+7]]:19: error: cannot implicitly convert expression of type `Core.Optional(Cpp.S* as Core.OptionalStorage)` to `Cpp.S*` [ConversionFailure]
// CHECK:STDERR: let a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_deduced_pointer_param_as_optional_pointer.carbon:[[@LINE+4]]:19: note: type `Core.Optional(Cpp.S* as Core.OptionalStorage)` does not implement interface `Core.ImplicitAs(Cpp.S*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_deduced_pointer_param_as_optional_pointer.carbon:[[@LINE+7]]:26: error: cannot implicitly convert expression of type `Core.Optional(Cpp.S* as Core.OptionalStorage)` to `Cpp.S*` [ConversionFailure]
// CHECK:STDERR: let unused a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_deduced_pointer_param_as_optional_pointer.carbon:[[@LINE+4]]:26: note: type `Core.Optional(Cpp.S* as Core.OptionalStorage)` does not implement interface `Core.ImplicitAs(Cpp.S*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
let unused a: Cpp.S* = Cpp.Indirect({} as Cpp.S);
}
// CHECK:STDOUT: --- import_non_nullable_pointer_param.carbon
@@ -1757,19 +1757,19 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %p.patt: %pattern_type.259 = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc13_19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc13_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %s.ref: ref %S = name_ref s, %s
// CHECK:STDOUT: %addr: %ptr.5c7 = addr_of %s.ref
// CHECK:STDOUT: %foo.call: init %ptr.5c7 = call imports.%foo.decl(%addr)
// CHECK:STDOUT: %.loc13_15: type = splice_block %ptr [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc13_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc13_22: type = splice_block %ptr [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc13_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc13: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr: type = ptr_type %S.ref.loc13 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_29.1: %ptr.5c7 = value_of_initializer %foo.call
// CHECK:STDOUT: %.loc13_29.2: %ptr.5c7 = converted %foo.call, %.loc13_29.1
// CHECK:STDOUT: %p: %ptr.5c7 = value_binding p, %.loc13_29.2
// CHECK:STDOUT: %.loc13_36.1: %ptr.5c7 = value_of_initializer %foo.call
// CHECK:STDOUT: %.loc13_36.2: %ptr.5c7 = converted %foo.call, %.loc13_36.1
// CHECK:STDOUT: %p: %ptr.5c7 = value_binding p, %.loc13_36.2
// CHECK:STDOUT: %S.cpp_destructor.bound: <bound method> = bound_method %s.var, constants.%S.cpp_destructor
// CHECK:STDOUT: %S.cpp_destructor.call: init %empty_tuple.type = call %S.cpp_destructor.bound(%s.var)
// CHECK:STDOUT: <elided>
@@ -1921,37 +1921,37 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type.70a = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc13_34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc13_41: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Indirect.ref: %Indirect.cpp_overload_set.type = name_ref Indirect, imports.%Indirect.cpp_overload_set.value [concrete = constants.%Indirect.cpp_overload_set.value]
// CHECK:STDOUT: %.loc13_48.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %Cpp.ref.loc13_53: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc13_56: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %.loc13_48.2: ref %S = temporary_storage
// CHECK:STDOUT: %.loc13_48.3: init %S to %.loc13_48.2 = class_init () [concrete = constants.%S.val]
// CHECK:STDOUT: %.loc13_48.4: ref %S = temporary %.loc13_48.2, %.loc13_48.3
// CHECK:STDOUT: %.loc13_50.1: ref %S = converted %.loc13_48.1, %.loc13_48.4
// CHECK:STDOUT: %.loc13_50.2: %S = acquire_value %.loc13_50.1
// CHECK:STDOUT: %.loc13_50.3: ref %S = value_as_ref %.loc13_50.2
// CHECK:STDOUT: %addr.loc13: %ptr.5c7 = addr_of %.loc13_50.3
// CHECK:STDOUT: %.loc13_55.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %Cpp.ref.loc13_60: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc13_63: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %.loc13_55.2: ref %S = temporary_storage
// CHECK:STDOUT: %.loc13_55.3: init %S to %.loc13_55.2 = class_init () [concrete = constants.%S.val]
// CHECK:STDOUT: %.loc13_55.4: ref %S = temporary %.loc13_55.2, %.loc13_55.3
// CHECK:STDOUT: %.loc13_57.1: ref %S = converted %.loc13_55.1, %.loc13_55.4
// CHECK:STDOUT: %.loc13_57.2: %S = acquire_value %.loc13_57.1
// CHECK:STDOUT: %.loc13_57.3: ref %S = value_as_ref %.loc13_57.2
// CHECK:STDOUT: %addr.loc13: %ptr.5c7 = addr_of %.loc13_57.3
// CHECK:STDOUT: %Indirect__carbon_thunk.call: init %Optional.065 = call imports.%Indirect__carbon_thunk.decl(%addr.loc13)
// CHECK:STDOUT: %.loc13_30.1: type = splice_block %Optional [concrete = constants.%Optional.065] {
// CHECK:STDOUT: %.loc13_37.1: type = splice_block %Optional [concrete = constants.%Optional.065] {
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Optional.ref: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
// CHECK:STDOUT: %Cpp.ref.loc13_24: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc13_27: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr: type = ptr_type %S.ref.loc13_27 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %Cpp.ref.loc13_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc13_34: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr: type = ptr_type %S.ref.loc13_34 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr, (constants.%OptionalStorage.impl_witness.ba1) [concrete = constants.%OptionalStorage.facet.872]
// CHECK:STDOUT: %.loc13_30.2: %OptionalStorage.type = converted %ptr, %OptionalStorage.facet [concrete = constants.%OptionalStorage.facet.872]
// CHECK:STDOUT: %.loc13_37.2: %OptionalStorage.type = converted %ptr, %OptionalStorage.facet [concrete = constants.%OptionalStorage.facet.872]
// CHECK:STDOUT: %Optional: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet.872) [concrete = constants.%Optional.065]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc13_58.1: ref %Optional.065 = temporary_storage
// CHECK:STDOUT: %.loc13_58.2: ref %Optional.065 = temporary %.loc13_58.1, %Indirect__carbon_thunk.call
// CHECK:STDOUT: %.loc13_58.3: %Optional.065 = acquire_value %.loc13_58.2
// CHECK:STDOUT: %a: %Optional.065 = value_binding a, %.loc13_58.3
// CHECK:STDOUT: %DestroyOp.bound.loc13: <bound method> = bound_method %.loc13_58.2, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call.loc13: init %empty_tuple.type = call %DestroyOp.bound.loc13(%.loc13_58.2)
// CHECK:STDOUT: %S.cpp_destructor.bound.loc13: <bound method> = bound_method %.loc13_48.4, constants.%S.cpp_destructor
// CHECK:STDOUT: %S.cpp_destructor.call.loc13: init %empty_tuple.type = call %S.cpp_destructor.bound.loc13(%.loc13_48.4)
// CHECK:STDOUT: %.loc13_65.1: ref %Optional.065 = temporary_storage
// CHECK:STDOUT: %.loc13_65.2: ref %Optional.065 = temporary %.loc13_65.1, %Indirect__carbon_thunk.call
// CHECK:STDOUT: %.loc13_65.3: %Optional.065 = acquire_value %.loc13_65.2
// CHECK:STDOUT: %a: %Optional.065 = value_binding a, %.loc13_65.3
// CHECK:STDOUT: %DestroyOp.bound.loc13: <bound method> = bound_method %.loc13_65.2, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call.loc13: init %empty_tuple.type = call %DestroyOp.bound.loc13(%.loc13_65.2)
// CHECK:STDOUT: %S.cpp_destructor.bound.loc13: <bound method> = bound_method %.loc13_55.4, constants.%S.cpp_destructor
// CHECK:STDOUT: %S.cpp_destructor.call.loc13: init %empty_tuple.type = call %S.cpp_destructor.bound.loc13(%.loc13_55.4)
// CHECK:STDOUT: %DestroyOp.bound.loc11: <bound method> = bound_method %.loc11_14.3, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call.loc11: init %empty_tuple.type = call %DestroyOp.bound.loc11(%.loc11_14.3)
// CHECK:STDOUT: %S.cpp_destructor.bound.loc10: <bound method> = bound_method %s.var, constants.%S.cpp_destructor
@@ -248,7 +248,7 @@ import Cpp library "return_lvalue_ref.h";
fn F() {
//@dump-sem-ir-begin
let ref s: Cpp.S = Cpp.ReturnsLValue();
let unused ref s: Cpp.S = Cpp.ReturnsLValue();
//@dump-sem-ir-end
}
@@ -270,7 +270,7 @@ import Cpp library "return_rvalue_ref.h";
fn F() {
//@dump-sem-ir-begin
let ref s: Cpp.S = Cpp.ReturnsRValue();
let unused ref s: Cpp.S = Cpp.ReturnsRValue();
//@dump-sem-ir-end
}
@@ -292,7 +292,7 @@ import Cpp library "return_const_lvalue_ref.h";
fn F() {
//@dump-sem-ir-begin
let ref s: const Cpp.S = Cpp.ReturnConstLValue();
let unused ref s: const Cpp.S = Cpp.ReturnConstLValue();
//@dump-sem-ir-end
}
@@ -303,14 +303,14 @@ library "[[@TEST_NAME]]";
import Cpp library "return_const_lvalue_ref.h";
fn F() {
// CHECK:STDERR: fail_call_return_const_lvalue_ref_const_correctness.carbon:[[@LINE+7]]:22: error: cannot implicitly convert expression of type `const Cpp.S` to `Cpp.S` [ConversionFailure]
// CHECK:STDERR: let ref s: Cpp.S = Cpp.ReturnConstLValue();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_call_return_const_lvalue_ref_const_correctness.carbon:[[@LINE+4]]:22: note: type `const Cpp.S` does not implement interface `Core.ImplicitAs(Cpp.S)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let ref s: Cpp.S = Cpp.ReturnConstLValue();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_call_return_const_lvalue_ref_const_correctness.carbon:[[@LINE+7]]:29: error: cannot implicitly convert expression of type `const Cpp.S` to `Cpp.S` [ConversionFailure]
// CHECK:STDERR: let unused ref s: Cpp.S = Cpp.ReturnConstLValue();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_call_return_const_lvalue_ref_const_correctness.carbon:[[@LINE+4]]:29: note: type `const Cpp.S` does not implement interface `Core.ImplicitAs(Cpp.S)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused ref s: Cpp.S = Cpp.ReturnConstLValue();
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let ref s: Cpp.S = Cpp.ReturnConstLValue();
let unused ref s: Cpp.S = Cpp.ReturnConstLValue();
}
@@ -856,11 +856,11 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %s.patt: %pattern_type = ref_binding_pattern s [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ReturnsLValue.ref: %ReturnsLValue.cpp_overload_set.type = name_ref ReturnsLValue, imports.%ReturnsLValue.cpp_overload_set.value [concrete = constants.%ReturnsLValue.cpp_overload_set.value]
// CHECK:STDOUT: %ReturnsLValue.call: ref %S = call imports.%ReturnsLValue.decl()
// CHECK:STDOUT: %.loc8: type = splice_block %S.ref [concrete = constants.%S] {
// CHECK:STDOUT: %Cpp.ref.loc8_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: }
// CHECK:STDOUT: %s: ref %S = ref_binding s, %ReturnsLValue.call
@@ -894,11 +894,11 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %s.patt: %pattern_type = ref_binding_pattern s [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ReturnsRValue.ref: %ReturnsRValue.cpp_overload_set.type = name_ref ReturnsRValue, imports.%ReturnsRValue.cpp_overload_set.value [concrete = constants.%ReturnsRValue.cpp_overload_set.value]
// CHECK:STDOUT: %ReturnsRValue.call: ref %S = call imports.%ReturnsRValue.decl()
// CHECK:STDOUT: %.loc8: type = splice_block %S.ref [concrete = constants.%S] {
// CHECK:STDOUT: %Cpp.ref.loc8_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: }
// CHECK:STDOUT: %s: ref %S = ref_binding s, %ReturnsRValue.call
@@ -933,11 +933,11 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %s.patt: %pattern_type = ref_binding_pattern s [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_35: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ReturnConstLValue.ref: %ReturnConstLValue.cpp_overload_set.type = name_ref ReturnConstLValue, imports.%ReturnConstLValue.cpp_overload_set.value [concrete = constants.%ReturnConstLValue.cpp_overload_set.value]
// CHECK:STDOUT: %ReturnConstLValue.call: ref %const = call imports.%ReturnConstLValue.decl()
// CHECK:STDOUT: %.loc8: type = splice_block %const [concrete = constants.%const] {
// CHECK:STDOUT: %Cpp.ref.loc8_20: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %const: type = const_type %S.ref [concrete = constants.%const]
// CHECK:STDOUT: }
@@ -70,7 +70,7 @@ auto ReturnNullPtr() -> nullptr_t;
fn InitializeFromReturn() {
//@dump-sem-ir-begin
var c: Cpp.nullptr_t = Cpp.ReturnNullPtr();
var unused c: Cpp.nullptr_t = Cpp.ReturnNullPtr();
//@dump-sem-ir-end
}
@@ -101,7 +101,7 @@ unsigned int ReturnU32();
''';
fn Var() {
var my_u32: u32 = Cpp.ReturnU32();
var unused my_u32: u32 = Cpp.ReturnU32();
}
// CHECK:STDOUT: --- import_multiple.carbon
@@ -211,15 +211,15 @@ fn Var() {
// CHECK:STDOUT: %c.var_patt: %pattern_type.f05 = var_pattern %c.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c.var: ref %Cpp.nullptr_t = var %c.var_patt
// CHECK:STDOUT: %Cpp.ref.loc11_26: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc11_33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %ReturnNullPtr.ref: %ReturnNullPtr.cpp_overload_set.type = name_ref ReturnNullPtr, imports.%ReturnNullPtr.cpp_overload_set.value [concrete = constants.%ReturnNullPtr.cpp_overload_set.value]
// CHECK:STDOUT: %.loc11_3: ref %Cpp.nullptr_t = splice_block %c.var {}
// CHECK:STDOUT: %addr: %ptr.142 = addr_of %.loc11_3
// CHECK:STDOUT: %ReturnNullPtr__carbon_thunk.call: init %empty_tuple.type = call imports.%ReturnNullPtr__carbon_thunk.decl(%addr)
// CHECK:STDOUT: %.loc11_44: init %Cpp.nullptr_t to %.loc11_3 = mark_in_place_init %ReturnNullPtr__carbon_thunk.call
// CHECK:STDOUT: assign %c.var, %.loc11_44
// CHECK:STDOUT: %.loc11_13: type = splice_block %nullptr_t.ref [concrete = constants.%Cpp.nullptr_t] {
// CHECK:STDOUT: %Cpp.ref.loc11_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc11_51: init %Cpp.nullptr_t to %.loc11_3 = mark_in_place_init %ReturnNullPtr__carbon_thunk.call
// CHECK:STDOUT: assign %c.var, %.loc11_51
// CHECK:STDOUT: %.loc11_20: type = splice_block %nullptr_t.ref [concrete = constants.%Cpp.nullptr_t] {
// CHECK:STDOUT: %Cpp.ref.loc11_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %nullptr_t.ref: type = name_ref nullptr_t, constants.%Cpp.nullptr_t [concrete = constants.%Cpp.nullptr_t]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: ref %Cpp.nullptr_t = ref_binding c, %c.var
@@ -216,7 +216,7 @@ fn F(s: Cpp.N.S) {
//@dump-sem-ir-begin
Cpp.foo(s);
// Check that the parameter type was imported correctly.
var x: Cpp.N.S;
var unused x: Cpp.N.S;
//@dump-sem-ir-end
}
@@ -264,7 +264,7 @@ import Cpp library "definition_in_outer_definition.h";
fn F(s: Cpp.O.S) {
//@dump-sem-ir-begin
Cpp.foo(s);
var x: Cpp.O;
var unused x: Cpp.O;
//@dump-sem-ir-end
}
+2 -2
View File
@@ -176,7 +176,7 @@ fn F(u: Cpp.N.U) {
//@dump-sem-ir-begin
Cpp.foo(u);
// Check that the parameter type was imported correctly.
var x: Cpp.N.U;
var unused x: Cpp.N.U;
//@dump-sem-ir-end
}
@@ -225,7 +225,7 @@ import Cpp library "definition_in_outer_definition.h";
fn F(u: Cpp.O.U) {
//@dump-sem-ir-begin
Cpp.foo(u);
var x: Cpp.O;
var unused x: Cpp.O;
//@dump-sem-ir-end
}
@@ -34,7 +34,7 @@ auto foo() -> void* _Nonnull;
fn F() {
//@dump-sem-ir-begin
let output: Cpp.void* = Cpp.foo();
let unused output: Cpp.void* = Cpp.foo();
//@dump-sem-ir-end
}
@@ -76,7 +76,7 @@ auto foo() -> void*;
fn F() {
//@dump-sem-ir-begin
let output: Core.Optional(Cpp.void*) = Cpp.foo();
let unused output: Core.Optional(Cpp.void*) = Cpp.foo();
//@dump-sem-ir-end
}
@@ -178,17 +178,17 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %output.patt: %pattern_type = value_binding_pattern output [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc10_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc10_34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %foo.call: init %ptr = call imports.%foo.decl()
// CHECK:STDOUT: %.loc10_23: type = splice_block %ptr [concrete = constants.%ptr] {
// CHECK:STDOUT: %Cpp.ref.loc10_15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc10_30: type = splice_block %ptr [concrete = constants.%ptr] {
// CHECK:STDOUT: %Cpp.ref.loc10_22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr: type = ptr_type %void.ref [concrete = constants.%ptr]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_35.1: %ptr = value_of_initializer %foo.call
// CHECK:STDOUT: %.loc10_35.2: %ptr = converted %foo.call, %.loc10_35.1
// CHECK:STDOUT: %output: %ptr = value_binding output, %.loc10_35.2
// CHECK:STDOUT: %.loc10_42.1: %ptr = value_of_initializer %foo.call
// CHECK:STDOUT: %.loc10_42.2: %ptr = converted %foo.call, %.loc10_42.1
// CHECK:STDOUT: %output: %ptr = value_binding output, %.loc10_42.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -463,25 +463,25 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %output.patt: %pattern_type.cec = value_binding_pattern output [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc10_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc10_49: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %foo.ref: %foo.cpp_overload_set.type = name_ref foo, imports.%foo.cpp_overload_set.value [concrete = constants.%foo.cpp_overload_set.value]
// CHECK:STDOUT: %foo.call: init %Optional.bb8 = call imports.%foo.decl()
// CHECK:STDOUT: %.loc10_38.1: type = splice_block %Optional [concrete = constants.%Optional.bb8] {
// CHECK:STDOUT: %.loc10_45.1: type = splice_block %Optional [concrete = constants.%Optional.bb8] {
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
// CHECK:STDOUT: %Optional.ref: %Optional.type = name_ref Optional, imports.%Core.Optional [concrete = constants.%Optional.generic]
// CHECK:STDOUT: %Cpp.ref.loc10_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc10_36: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr: type = ptr_type %void.ref [concrete = constants.%ptr.874]
// CHECK:STDOUT: %OptionalStorage.facet: %OptionalStorage.type = facet_value %ptr, (constants.%OptionalStorage.impl_witness.32c) [concrete = constants.%OptionalStorage.facet]
// CHECK:STDOUT: %.loc10_38.2: %OptionalStorage.type = converted %ptr, %OptionalStorage.facet [concrete = constants.%OptionalStorage.facet]
// CHECK:STDOUT: %.loc10_45.2: %OptionalStorage.type = converted %ptr, %OptionalStorage.facet [concrete = constants.%OptionalStorage.facet]
// CHECK:STDOUT: %Optional: type = class_type @Optional, @Optional(constants.%OptionalStorage.facet) [concrete = constants.%Optional.bb8]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc10_50.1: ref %Optional.bb8 = temporary_storage
// CHECK:STDOUT: %.loc10_50.2: ref %Optional.bb8 = temporary %.loc10_50.1, %foo.call
// CHECK:STDOUT: %.loc10_50.3: %Optional.bb8 = acquire_value %.loc10_50.2
// CHECK:STDOUT: %output: %Optional.bb8 = value_binding output, %.loc10_50.3
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc10_50.2, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc10_50.2)
// CHECK:STDOUT: %.loc10_57.1: ref %Optional.bb8 = temporary_storage
// CHECK:STDOUT: %.loc10_57.2: ref %Optional.bb8 = temporary %.loc10_57.1, %foo.call
// CHECK:STDOUT: %.loc10_57.3: %Optional.bb8 = acquire_value %.loc10_57.2
// CHECK:STDOUT: %output: %Optional.bb8 = value_binding output, %.loc10_57.3
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %.loc10_57.2, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%.loc10_57.2)
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
+39 -39
View File
@@ -58,11 +58,11 @@ import Cpp library "types.h";
//@include-in-dumps
fn PublicDestroy() {
var a: Cpp.PublicDestructor = {};
var unused a: Cpp.PublicDestructor = {};
}
fn TrivialDestroy() {
var a: Cpp.TrivialDestructor = {};
var unused a: Cpp.TrivialDestructor = {};
}
// --- destroy_protected_base_destructor.carbon
@@ -77,7 +77,7 @@ class Derived {
fn DestroyClassWithProtectedBaseDestructor() {
//@dump-sem-ir-begin
var a: Derived = {.base = {}};
var unused a: Derived = {.base = {}};
//@dump-sem-ir-end
}
@@ -94,7 +94,7 @@ class Derived {
fn DestroyClassWithPrivateBaseDestructor() {
//@dump-sem-ir-begin
// TODO: We should not allow this, as the destructor of the base class is private.
var a: Derived = {.base = {}};
var unused a: Derived = {.base = {}};
//@dump-sem-ir-end
}
@@ -121,47 +121,47 @@ library "[[@TEST_NAME]]";
import Cpp library "types.h";
fn AmbiguousDestroy() {
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+4]]:10: note: while completing C++ type `Cpp.AmbiguousDestructorT` [InCppTypeCompletion]
// CHECK:STDERR: var a: Cpp.AmbiguousDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+4]]:17: note: while completing C++ type `Cpp.AmbiguousDestructorT` [InCppTypeCompletion]
// CHECK:STDERR: var unused a: Cpp.AmbiguousDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
var a: Cpp.AmbiguousDestructor = {};
var unused a: Cpp.AmbiguousDestructor = {};
}
fn DeletedDestroy() {
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+8]]:3: error: attempt to use a deleted function [CppInteropParseError]
// CHECK:STDERR: 39 | var a: Cpp.DeletedDestructor = {};
// CHECK:STDERR: 39 | var unused a: Cpp.DeletedDestructor = {};
// CHECK:STDERR: | ^
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE-14]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./types.h:23:3: note: '~DeletedDestructor' has been explicitly marked deleted here [CppInteropParseNote]
// CHECK:STDERR: 23 | ~DeletedDestructor() = delete;
// CHECK:STDERR: | ^
// CHECK:STDERR:
var a: Cpp.DeletedDestructor = {};
var unused a: Cpp.DeletedDestructor = {};
}
fn PrivateDestroy() {
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+8]]:3: error: cannot access private member `<C++ destructor>` of type `Cpp.PrivateDestructor` [ClassInvalidMemberAccess]
// CHECK:STDERR: var a: Cpp.PrivateDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: var unused a: Cpp.PrivateDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE-26]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./types.h:28:3: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: ~PrivateDestructor();
// CHECK:STDERR: ^
// CHECK:STDERR:
var a: Cpp.PrivateDestructor = {};
var unused a: Cpp.PrivateDestructor = {};
}
fn ProtectedDestroy() {
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE+8]]:3: error: cannot access protected member `<C++ destructor>` of type `Cpp.ProtectedDestructor` [ClassInvalidMemberAccess]
// CHECK:STDERR: var a: Cpp.ProtectedDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: var unused a: Cpp.ProtectedDestructor = {};
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_destroy_nondestroyable.carbon:[[@LINE-38]]:10: in file included here [InCppInclude]
// CHECK:STDERR: ./types.h:33:3: note: declared here [ClassMemberDeclaration]
// CHECK:STDERR: ~ProtectedDestructor();
// CHECK:STDERR: ^
// CHECK:STDERR:
var a: Cpp.ProtectedDestructor = {};
var unused a: Cpp.ProtectedDestructor = {};
}
// --- destroy_generically.carbon
@@ -171,7 +171,7 @@ library "[[@TEST_NAME]]";
import Cpp library "types.h";
fn Destroy[T:! Core.Copy & Core.Destroy](c: T) {
var d: T = c;
var unused d: T = c;
}
fn DoDestroy() {
@@ -264,11 +264,11 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
// CHECK:STDOUT: %a.var_patt: %pattern_type.27d = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %PublicDestructor = var %a.var_patt
// CHECK:STDOUT: %.loc11_34.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc11_34.2: init %PublicDestructor to %a.var = class_init () [concrete = constants.%PublicDestructor.val]
// CHECK:STDOUT: %.loc11_3: init %PublicDestructor = converted %.loc11_34.1, %.loc11_34.2 [concrete = constants.%PublicDestructor.val]
// CHECK:STDOUT: %.loc11_41.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc11_41.2: init %PublicDestructor to %a.var = class_init () [concrete = constants.%PublicDestructor.val]
// CHECK:STDOUT: %.loc11_3: init %PublicDestructor = converted %.loc11_41.1, %.loc11_41.2 [concrete = constants.%PublicDestructor.val]
// CHECK:STDOUT: assign %a.var, %.loc11_3
// CHECK:STDOUT: %.loc11_13: type = splice_block %PublicDestructor.ref [concrete = constants.%PublicDestructor] {
// CHECK:STDOUT: %.loc11_20: type = splice_block %PublicDestructor.ref [concrete = constants.%PublicDestructor] {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %PublicDestructor.ref: type = name_ref PublicDestructor, imports.%PublicDestructor.decl [concrete = constants.%PublicDestructor]
// CHECK:STDOUT: }
@@ -287,11 +287,11 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
// CHECK:STDOUT: %a.var_patt: %pattern_type.1b8 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %TrivialDestructor = var %a.var_patt
// CHECK:STDOUT: %.loc15_35.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc15_35.2: init %TrivialDestructor to %a.var = class_init () [concrete = constants.%TrivialDestructor.val]
// CHECK:STDOUT: %.loc15_3: init %TrivialDestructor = converted %.loc15_35.1, %.loc15_35.2 [concrete = constants.%TrivialDestructor.val]
// CHECK:STDOUT: %.loc15_42.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc15_42.2: init %TrivialDestructor to %a.var = class_init () [concrete = constants.%TrivialDestructor.val]
// CHECK:STDOUT: %.loc15_3: init %TrivialDestructor = converted %.loc15_42.1, %.loc15_42.2 [concrete = constants.%TrivialDestructor.val]
// CHECK:STDOUT: assign %a.var, %.loc15_3
// CHECK:STDOUT: %.loc15_13: type = splice_block %TrivialDestructor.ref [concrete = constants.%TrivialDestructor] {
// CHECK:STDOUT: %.loc15_20: type = splice_block %TrivialDestructor.ref [concrete = constants.%TrivialDestructor] {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %TrivialDestructor.ref: type = name_ref TrivialDestructor, imports.%TrivialDestructor.decl [concrete = constants.%TrivialDestructor]
// CHECK:STDOUT: }
@@ -330,13 +330,13 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
// CHECK:STDOUT: %a.var_patt: %pattern_type.9f6 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %Derived = var %a.var_patt
// CHECK:STDOUT: %.loc12_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc12_31.1: %struct_type.base.f5e = struct_literal (%.loc12_30.1) [concrete = constants.%struct]
// CHECK:STDOUT: %.loc12_31.2: ref %ProtectedDestructor = class_element_access %a.var, element0
// CHECK:STDOUT: %.loc12_30.2: init %ProtectedDestructor to %.loc12_31.2 = class_init () [concrete = constants.%ProtectedDestructor.val]
// CHECK:STDOUT: %.loc12_31.3: init %ProtectedDestructor = converted %.loc12_30.1, %.loc12_30.2 [concrete = constants.%ProtectedDestructor.val]
// CHECK:STDOUT: %.loc12_31.4: init %Derived to %a.var = class_init (%.loc12_31.3) [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc12_3: init %Derived = converted %.loc12_31.1, %.loc12_31.4 [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc12_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc12_38.1: %struct_type.base.f5e = struct_literal (%.loc12_37.1) [concrete = constants.%struct]
// CHECK:STDOUT: %.loc12_38.2: ref %ProtectedDestructor = class_element_access %a.var, element0
// CHECK:STDOUT: %.loc12_37.2: init %ProtectedDestructor to %.loc12_38.2 = class_init () [concrete = constants.%ProtectedDestructor.val]
// CHECK:STDOUT: %.loc12_38.3: init %ProtectedDestructor = converted %.loc12_37.1, %.loc12_37.2 [concrete = constants.%ProtectedDestructor.val]
// CHECK:STDOUT: %.loc12_38.4: init %Derived to %a.var = class_init (%.loc12_38.3) [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc12_3: init %Derived = converted %.loc12_38.1, %.loc12_38.4 [concrete = constants.%Derived.val]
// CHECK:STDOUT: assign %a.var, %.loc12_3
// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
// CHECK:STDOUT: %a: ref %Derived = ref_binding a, %a.var
@@ -374,13 +374,13 @@ fn EqualWitnesses(p: Wrap(Cpp.PublicDestructor)*) -> Wrap(Cpp.PublicDestructor)*
// CHECK:STDOUT: %a.var_patt: %pattern_type.9f6 = var_pattern %a.patt [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %Derived = var %a.var_patt
// CHECK:STDOUT: %.loc13_30.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc13_31.1: %struct_type.base.f5e = struct_literal (%.loc13_30.1) [concrete = constants.%struct]
// CHECK:STDOUT: %.loc13_31.2: ref %PrivateDestructor = class_element_access %a.var, element0
// CHECK:STDOUT: %.loc13_30.2: init %PrivateDestructor to %.loc13_31.2 = class_init () [concrete = constants.%PrivateDestructor.val]
// CHECK:STDOUT: %.loc13_31.3: init %PrivateDestructor = converted %.loc13_30.1, %.loc13_30.2 [concrete = constants.%PrivateDestructor.val]
// CHECK:STDOUT: %.loc13_31.4: init %Derived to %a.var = class_init (%.loc13_31.3) [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc13_3: init %Derived = converted %.loc13_31.1, %.loc13_31.4 [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc13_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
// CHECK:STDOUT: %.loc13_38.1: %struct_type.base.f5e = struct_literal (%.loc13_37.1) [concrete = constants.%struct]
// CHECK:STDOUT: %.loc13_38.2: ref %PrivateDestructor = class_element_access %a.var, element0
// CHECK:STDOUT: %.loc13_37.2: init %PrivateDestructor to %.loc13_38.2 = class_init () [concrete = constants.%PrivateDestructor.val]
// CHECK:STDOUT: %.loc13_38.3: init %PrivateDestructor = converted %.loc13_37.1, %.loc13_37.2 [concrete = constants.%PrivateDestructor.val]
// CHECK:STDOUT: %.loc13_38.4: init %Derived to %a.var = class_init (%.loc13_38.3) [concrete = constants.%Derived.val]
// CHECK:STDOUT: %.loc13_3: init %Derived = converted %.loc13_38.1, %.loc13_38.4 [concrete = constants.%Derived.val]
// CHECK:STDOUT: assign %a.var, %.loc13_3
// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
// CHECK:STDOUT: %a: ref %Derived = ref_binding a, %a.var
+5 -5
View File
@@ -38,11 +38,11 @@ import library "namespace_api";
fn F() {
// Imports are not implicitly re-exported, so lookup is expected to fail.
// CHECK:STDERR: fail_import_namespace_api.carbon:[[@LINE+4]]:10: error: member name `MyClass` not found in `Cpp.MyNamespace` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: var x: MyNamespaceAlias.MyClass;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_namespace_api.carbon:[[@LINE+4]]:17: error: member name `MyClass` not found in `Cpp.MyNamespace` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: var unused x: MyNamespaceAlias.MyClass;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
var x: MyNamespaceAlias.MyClass;
var unused x: MyNamespaceAlias.MyClass;
}
// ============================================================================
@@ -126,7 +126,7 @@ library "[[@TEST_NAME]]";
import Cpp;
fn F(input: Cpp.int) {
let output: i32 = input;
let unused output: i32 = input;
}
// ============================================================================
+171 -171
View File
@@ -30,12 +30,12 @@ import Cpp library "integer_literal_replacement_token.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.CONFIG_VALUE;
let b: i64 = Cpp.CONFIG_VALUE_LONG;
let c: u32 = Cpp.CONFIG_VALUE_UNSIGNED;
let d: i32 = Cpp.CONFIG_VALUE_HEXA;
let e: i32 = Cpp.CONFIG_VALUE_OCTAL;
let f: i32 = Cpp.CONFIG_VALUE_BINARY;
let unused a: i32 = Cpp.CONFIG_VALUE;
let unused b: i64 = Cpp.CONFIG_VALUE_LONG;
let unused c: u32 = Cpp.CONFIG_VALUE_UNSIGNED;
let unused d: i32 = Cpp.CONFIG_VALUE_HEXA;
let unused e: i32 = Cpp.CONFIG_VALUE_OCTAL;
let unused f: i32 = Cpp.CONFIG_VALUE_BINARY;
//@dump-sem-ir-end
}
@@ -119,13 +119,13 @@ library "[[@TEST_NAME]]";
import Cpp library "macro_in_nested_scope.h";
fn F() {
let a: i32 = Cpp.CONFIG_VALUE;
let unused a: i32 = Cpp.CONFIG_VALUE;
// CHECK:STDERR: fail_import_macro_in_nested_scope.carbon:[[@LINE+4]]:16: error: member name `CONFIG_VALUE` not found in `Cpp.N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let b: i32 = Cpp.N.CONFIG_VALUE;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_macro_in_nested_scope.carbon:[[@LINE+4]]:23: error: member name `CONFIG_VALUE` not found in `Cpp.N` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused b: i32 = Cpp.N.CONFIG_VALUE;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let b: i32 = Cpp.N.CONFIG_VALUE;
let unused b: i32 = Cpp.N.CONFIG_VALUE;
}
// --- macro_and_non_macro_same_name.h
@@ -146,9 +146,9 @@ fn F() {
//@dump-sem-ir-begin
// When the same macro name and non-macro name exist in the global C++ scope, the macro name is selected.
// Cpp.n is treated as an integer constant with value 1.
var a: array(f32, Cpp.n) = (1.0,);
var unused a: array(f32, Cpp.n) = (1.0,);
let b: f32 = Cpp.X.n;
let unused b: f32 = Cpp.X.n;
//@dump-sem-ir-end
}
@@ -188,7 +188,7 @@ import Cpp library "unary_operator.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.NEGATIVE;
let unused a: i32 = Cpp.NEGATIVE;
//@dump-sem-ir-end
}
@@ -203,7 +203,7 @@ import Cpp library "binary_operator.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.ADDITION;
let unused a: i32 = Cpp.ADDITION;
//@dump-sem-ir-end
}
@@ -221,10 +221,10 @@ import Cpp library "casting.h";
fn F() {
//@dump-sem-ir-begin
let a: u32 = Cpp.CAST_UNSIGNED;
let b: i32 = Cpp.CAST_STATIC;
let c: i32 = Cpp.CAST_FUNCTIONAL;
let d: i32 = Cpp.CAST_BOOL_TO_INT;
let unused a: u32 = Cpp.CAST_UNSIGNED;
let unused b: i32 = Cpp.CAST_STATIC;
let unused c: i32 = Cpp.CAST_FUNCTIONAL;
let unused d: i32 = Cpp.CAST_BOOL_TO_INT;
//@dump-sem-ir-end
}
@@ -240,7 +240,7 @@ import Cpp library "nested_macros.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.INDIRECT_ONE;
let unused a: i32 = Cpp.INDIRECT_ONE;
//@dump-sem-ir-end
}
@@ -264,13 +264,13 @@ import Cpp library "string_literal_object_like_macro.h";
fn F() {
//@dump-sem-ir-begin
let a: str = Cpp.SimpleString;
let b: str = Cpp.EmptyString;
let c: str = Cpp.EscapeCharacter;
let d: str = Cpp.Concatenated;
let e: str = Cpp.RawString;
let f: str = Cpp.Utf8String;
let g: str = Cpp.Indirect;
let unused a: str = Cpp.SimpleString;
let unused b: str = Cpp.EmptyString;
let unused c: str = Cpp.EscapeCharacter;
let unused d: str = Cpp.Concatenated;
let unused e: str = Cpp.RawString;
let unused f: str = Cpp.Utf8String;
let unused g: str = Cpp.Indirect;
//@dump-sem-ir-end
}
@@ -361,9 +361,9 @@ import Cpp library "floating_point_literal_macro.h";
fn F() {
//@dump-sem-ir-begin
let a: f64 = Cpp.MyDouble;
let b: f64 = Cpp.MyDoubleE;
let c: f32 = Cpp.MyFloat;
let unused a: f64 = Cpp.MyDouble;
let unused b: f64 = Cpp.MyDoubleE;
let unused c: f32 = Cpp.MyFloat;
//@dump-sem-ir-end
}
@@ -422,12 +422,12 @@ import Cpp library "character_literals.h";
fn F() {
//@dump-sem-ir-begin
let a: char = Cpp.M_LOWERCASE;
let b: char = Cpp.M_UPPERCASE;
let c: char = Cpp.M_DIGIT;
let d: char = Cpp.M_SPACE;
let e: char = Cpp.M_TAB;
let f: char = Cpp.M_UTF8_CHAR;
let unused a: char = Cpp.M_LOWERCASE;
let unused b: char = Cpp.M_UPPERCASE;
let unused c: char = Cpp.M_DIGIT;
let unused d: char = Cpp.M_SPACE;
let unused e: char = Cpp.M_TAB;
let unused f: char = Cpp.M_UTF8_CHAR;
//@dump-sem-ir-end
}
@@ -445,9 +445,9 @@ import Cpp library "character_literals_operators.h";
fn F() {
//@dump-sem-ir-begin
let a: char = Cpp.M_CONDITIONAL;
let b: i32 = Cpp.M_A_PLUS_ONE;
let c: bool = Cpp.M_A_EQUAL;
let unused a: char = Cpp.M_CONDITIONAL;
let unused b: i32 = Cpp.M_A_PLUS_ONE;
let unused c: bool = Cpp.M_A_EQUAL;
//@dump-sem-ir-end
}
@@ -466,11 +466,11 @@ library "[[@TEST_NAME]]";
import Cpp library "multiple_characters.h";
fn F() {
// CHECK:STDERR: import_multiple_characters.carbon:[[@LINE+4]]:15: note: in `Cpp` name lookup for `MULTIPLE_CHARS` [InCppNameLookup]
// CHECK:STDERR: let a: i32 = Cpp.MULTIPLE_CHARS;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR: import_multiple_characters.carbon:[[@LINE+4]]:22: note: in `Cpp` name lookup for `MULTIPLE_CHARS` [InCppNameLookup]
// CHECK:STDERR: let unused a: i32 = Cpp.MULTIPLE_CHARS;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let a: i32 = Cpp.MULTIPLE_CHARS;
let unused a: i32 = Cpp.MULTIPLE_CHARS;
}
// --- unsupported_character_literal_types.h
@@ -486,42 +486,42 @@ library "[[@TEST_NAME]]";
import Cpp library "unsupported_character_literal_types.h";
fn F() {
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:16: error: semantics TODO: `Unsupported: C++ literal's type `char16_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:16: note: in `Cpp` name lookup for `M_UTF16_CHAR` [InCppNameLookup]
// CHECK:STDERR: let a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:23: error: semantics TODO: `Unsupported: C++ literal's type `char16_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let unused a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:23: note: in `Cpp` name lookup for `M_UTF16_CHAR` [InCppNameLookup]
// CHECK:STDERR: let unused a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:16: error: member name `M_UTF16_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:23: error: member name `M_UTF16_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR:
let a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:16: error: semantics TODO: `Unsupported: C++ literal's type `char32_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:16: note: in `Cpp` name lookup for `M_UTF32_CHAR` [InCppNameLookup]
// CHECK:STDERR: let b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
let unused a: char = Cpp.M_UTF16_CHAR;
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:23: error: semantics TODO: `Unsupported: C++ literal's type `char32_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let unused b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:23: note: in `Cpp` name lookup for `M_UTF32_CHAR` [InCppNameLookup]
// CHECK:STDERR: let unused b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:16: error: member name `M_UTF32_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:23: error: member name `M_UTF32_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
// CHECK:STDERR:
let b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:16: error: semantics TODO: `Unsupported: C++ literal's type `wchar_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:16: note: in `Cpp` name lookup for `M_WIDE_CHAR` [InCppNameLookup]
// CHECK:STDERR: let c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
let unused b: char = Cpp.M_UTF32_CHAR;
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+11]]:23: error: semantics TODO: `Unsupported: C++ literal's type `wchar_t` could not be mapped to a Carbon type` [SemanticsTodo]
// CHECK:STDERR: let unused c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+8]]:23: note: in `Cpp` name lookup for `M_WIDE_CHAR` [InCppNameLookup]
// CHECK:STDERR: let unused c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:16: error: member name `M_WIDE_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_unsupported_character_literal_types.carbon:[[@LINE+4]]:23: error: member name `M_WIDE_CHAR` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused c: char = Cpp.M_WIDE_CHAR;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
let c: char = Cpp.M_WIDE_CHAR;
let unused c: char = Cpp.M_WIDE_CHAR;
}
// --- fail_assign_to_character_literals.carbon
@@ -563,18 +563,18 @@ import Cpp library "boolean_literal_macro.h";
fn F() {
//@dump-sem-ir-begin
let a: bool = Cpp.M_TRUE;
let b: bool = Cpp.M_FALSE;
let c: bool = Cpp.M_NOT_TRUE;
let d: bool = Cpp.M_NOT_ZERO;
let e: bool = Cpp.M_ONE_EQ_ONE;
let f: bool = Cpp.M_ONE_NEQ_ONE;
let g: bool = Cpp.M_AND;
let h: bool = Cpp.M_OR;
let i: bool = Cpp.M_COMPLEX;
let unused a: bool = Cpp.M_TRUE;
let unused b: bool = Cpp.M_FALSE;
let unused c: bool = Cpp.M_NOT_TRUE;
let unused d: bool = Cpp.M_NOT_ZERO;
let unused e: bool = Cpp.M_ONE_EQ_ONE;
let unused f: bool = Cpp.M_ONE_NEQ_ONE;
let unused g: bool = Cpp.M_AND;
let unused h: bool = Cpp.M_OR;
let unused i: bool = Cpp.M_COMPLEX;
let j: i32 = Cpp.M_ONE;
let k: i32 = Cpp.M_ZERO;
let unused j: i32 = Cpp.M_ONE;
let unused k: i32 = Cpp.M_ZERO;
//@dump-sem-ir-end
}
@@ -634,7 +634,7 @@ import Cpp inline '''
fn F() {
//@dump-sem-ir-begin
let a: Cpp.A = Cpp.M_A;
let unused a: Cpp.A = Cpp.M_A;
//@dump-sem-ir-end
}
@@ -662,7 +662,7 @@ import Cpp inline '''
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.M_CONSTEXPR_INT;
let unused a: i32 = Cpp.M_CONSTEXPR_INT;
//@dump-sem-ir-end
}
@@ -676,7 +676,7 @@ import Cpp inline '''
''';
fn F() {
let a: i32 = Cpp.M_CONSTEXPR_NO_SCOPE;
let unused a: i32 = Cpp.M_CONSTEXPR_NO_SCOPE;
}
// --- fail_todo_import_macro_constexpr_float.carbon
@@ -689,18 +689,18 @@ import Cpp inline '''
''';
fn F() {
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+11]]:16: error: semantics TODO: `Unsupported: macro evaluated to a non-integer LValue` [SemanticsTodo]
// CHECK:STDERR: let a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+8]]:16: note: in `Cpp` name lookup for `M_CONSTEXPR_FLOAT` [InCppNameLookup]
// CHECK:STDERR: let a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+11]]:23: error: semantics TODO: `Unsupported: macro evaluated to a non-integer LValue` [SemanticsTodo]
// CHECK:STDERR: let unused a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+8]]:23: note: in `Cpp` name lookup for `M_CONSTEXPR_FLOAT` [InCppNameLookup]
// CHECK:STDERR: let unused a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+4]]:16: error: member name `M_CONSTEXPR_FLOAT` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_todo_import_macro_constexpr_float.carbon:[[@LINE+4]]:23: error: member name `M_CONSTEXPR_FLOAT` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused a: f32 = Cpp.M_CONSTEXPR_FLOAT;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
let a: f32 = Cpp.M_CONSTEXPR_FLOAT;
let unused a: f32 = Cpp.M_CONSTEXPR_FLOAT;
}
// --- lambda.carbon
@@ -713,7 +713,7 @@ import Cpp inline '''
fn F() {
//@dump-sem-ir-begin
let i: i32 = Cpp.MyIntLambda;
let unused i: i32 = Cpp.MyIntLambda;
//@dump-sem-ir-end
}
@@ -729,11 +729,11 @@ library "[[@TEST_NAME]]";
import Cpp library "macro_undefined.h";
fn F() {
// CHECK:STDERR: fail_macro_undefined.carbon:[[@LINE+4]]:16: error: member name `UNDEF_NAME` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let a: i32 = Cpp.UNDEF_NAME;
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_macro_undefined.carbon:[[@LINE+4]]:23: error: member name `UNDEF_VALUE` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused a: i32 = Cpp.UNDEF_VALUE;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
let a: i32 = Cpp.UNDEF_NAME;
let unused a: i32 = Cpp.UNDEF_VALUE;
}
// --- macro_redefined.h
@@ -751,7 +751,7 @@ import Cpp library "macro_redefined.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.REDEF_NAME;
let unused a: i32 = Cpp.REDEF_NAME;
//@dump-sem-ir-end
}
@@ -777,7 +777,7 @@ import Cpp library "macro_defined_twice.h";
fn F() {
//@dump-sem-ir-begin
let a: i32 = Cpp.TWICE_DEF;
let unused a: i32 = Cpp.TWICE_DEF;
//@dump-sem-ir-end
}
@@ -796,11 +796,11 @@ library "[[@TEST_NAME]]";
import Cpp library "function_like_macros.h";
fn F() {
// CHECK:STDERR: fail_todo_import_function_like_macros.carbon:[[@LINE+4]]:16: error: member name `MAX` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let a: i32 = Cpp.MAX(1,2);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_todo_import_function_like_macros.carbon:[[@LINE+4]]:23: error: member name `MAX` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused a: i32 = Cpp.MAX(1,2);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
let a: i32 = Cpp.MAX(1,2);
let unused a: i32 = Cpp.MAX(1,2);
}
// ============================================================================
@@ -818,11 +818,11 @@ library "[[@TEST_NAME]]";
import Cpp library "predefined_macros.h";
fn F() {
// CHECK:STDERR: fail_todo_import_predefined_macros.carbon:[[@LINE+4]]:23: error: member name `__LINE__` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let line_num: i32 = Cpp.__LINE__;
// CHECK:STDERR: ^~~~~~~~~~~~
// CHECK:STDERR: fail_todo_import_predefined_macros.carbon:[[@LINE+4]]:30: error: member name `__LINE__` not found in `Cpp` [MemberNameNotFoundInInstScope]
// CHECK:STDERR: let unused line_num: i32 = Cpp.__LINE__;
// CHECK:STDERR: ^~~~~~~~~~~~
// CHECK:STDERR:
let line_num: i32 = Cpp.__LINE__;
let unused line_num: i32 = Cpp.__LINE__;
}
// ============================================================================
@@ -1036,33 +1036,33 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.674]
// CHECK:STDOUT: %.loc10_35.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc10_35: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc10_35.1: <bound method> = bound_method %float, %impl.elem0.loc10_35 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc10_35: <specific function> = specific_function %impl.elem0.loc10_35, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_35.2: <bound method> = bound_method %float, %specific_fn.loc10_35 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc10_35.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc10_35.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc10_42.1: %tuple.type = tuple_literal (%float) [concrete = constants.%tuple]
// CHECK:STDOUT: %impl.elem0.loc10_42: %.98d = impl_witness_access constants.%ImplicitAs.impl_witness.bc6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.e55]
// CHECK:STDOUT: %bound_method.loc10_42.1: <bound method> = bound_method %float, %impl.elem0.loc10_42 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc10_42: <specific function> = specific_function %impl.elem0.loc10_42, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_42.2: <bound method> = bound_method %float, %specific_fn.loc10_42 [concrete = constants.%bound_method.1e4]
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.97e = call %bound_method.loc10_42.2(%float) [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc10_42.2: init %f32.97e = converted %float, %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.e3b]
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
// CHECK:STDOUT: %.loc10_35.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc10_35.4: init %f32.97e to %.loc10_35.3 = in_place_init %.loc10_35.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc10_35.5: init %array_type to %a.var = array_init (%.loc10_35.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_35.1, %.loc10_35.5 [concrete = constants.%array]
// CHECK:STDOUT: %.loc10_42.3: ref %f32.97e = array_index %a.var, %int_0
// CHECK:STDOUT: %.loc10_42.4: init %f32.97e to %.loc10_42.3 = in_place_init %.loc10_42.2 [concrete = constants.%float.e3b]
// CHECK:STDOUT: %.loc10_42.5: init %array_type to %a.var = array_init (%.loc10_42.4) [concrete = constants.%array]
// CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_42.1, %.loc10_42.5 [concrete = constants.%array]
// CHECK:STDOUT: assign %a.var, %.loc10_3
// CHECK:STDOUT: %.loc10_26: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %.loc10_33: type = splice_block %array_type [concrete = constants.%array_type] {
// CHECK:STDOUT: %int_32.loc10: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32.loc10: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %n.ref.loc10: %i32 = name_ref n, imports.%int_1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %impl.elem0.loc10_24: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4]
// CHECK:STDOUT: %bound_method.loc10_24.1: <bound method> = bound_method %n.ref.loc10, %impl.elem0.loc10_24 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc10_24: <specific function> = specific_function %impl.elem0.loc10_24, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_24.2: <bound method> = bound_method %n.ref.loc10, %specific_fn.loc10_24 [concrete = constants.%bound_method.04c]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc10_24.2(%n.ref.loc10) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc10_24.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc10_24.2: Core.IntLiteral = converted %n.ref.loc10, %.loc10_24.1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc10_24.2, %f32.loc10 [concrete = constants.%array_type]
// CHECK:STDOUT: %impl.elem0.loc10_31: %.0a7 = impl_witness_access constants.%ImplicitAs.impl_witness.640, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.dd4]
// CHECK:STDOUT: %bound_method.loc10_31.1: <bound method> = bound_method %n.ref.loc10, %impl.elem0.loc10_31 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.bound]
// CHECK:STDOUT: %specific_fn.loc10_31: <specific function> = specific_function %impl.elem0.loc10_31, @Int.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Int.as.ImplicitAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_31.2: <bound method> = bound_method %n.ref.loc10, %specific_fn.loc10_31 [concrete = constants.%bound_method.04c]
// CHECK:STDOUT: %Int.as.ImplicitAs.impl.Convert.call: init Core.IntLiteral = call %bound_method.loc10_31.2(%n.ref.loc10) [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc10_31.1: Core.IntLiteral = value_of_initializer %Int.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %.loc10_31.2: Core.IntLiteral = converted %n.ref.loc10, %.loc10_31.1 [concrete = constants.%int_1.5b8]
// CHECK:STDOUT: %array_type: type = array_type %.loc10_31.2, %f32.loc10 [concrete = constants.%array_type]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: ref %array_type = ref_binding a, %a.var
// CHECK:STDOUT: name_binding_decl {
@@ -1072,12 +1072,12 @@ fn F() {
// CHECK:STDOUT: %X.ref: <namespace> = name_ref X, imports.%X [concrete = imports.%X]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %n.ref.loc12: ref %f32.97e = name_ref n, imports.%n.var [concrete = imports.%n.var]
// CHECK:STDOUT: %.loc12_10: type = splice_block %f32.loc12 [concrete = constants.%f32.97e] {
// CHECK:STDOUT: %.loc12_17: type = splice_block %f32.loc12 [concrete = constants.%f32.97e] {
// CHECK:STDOUT: %int_32.loc12: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %f32.loc12: type = class_type @Float, @Float(constants.%int_32) [concrete = constants.%f32.97e]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc12_21: %f32.97e = acquire_value %n.ref.loc12
// CHECK:STDOUT: %b: %f32.97e = value_binding b, %.loc12_21
// CHECK:STDOUT: %.loc12_28: %f32.97e = acquire_value %n.ref.loc12
// CHECK:STDOUT: %b: %f32.97e = value_binding b, %.loc12_28
// CHECK:STDOUT: %DestroyOp.bound: <bound method> = bound_method %a.var, constants.%DestroyOp
// CHECK:STDOUT: %DestroyOp.call: init %empty_tuple.type = call %DestroyOp.bound(%a.var)
// CHECK:STDOUT: <elided>
@@ -1546,10 +1546,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_A_EQUAL.ref: bool = name_ref M_A_EQUAL, imports.%true [concrete = constants.%true]
// CHECK:STDOUT: %.loc10_10.1: type = splice_block %.loc10_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %Bool.call [concrete = bool]
// CHECK:STDOUT: %.loc10_10.3: type = converted %Bool.call, %.loc10_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc10_17.2: type = value_of_initializer %Bool.call [concrete = bool]
// CHECK:STDOUT: %.loc10_17.3: type = converted %Bool.call, %.loc10_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: bool = value_binding c, %M_A_EQUAL.ref
// CHECK:STDOUT: <elided>
@@ -1605,10 +1605,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_TRUE.ref: bool = name_ref M_TRUE, imports.%true.d1048d.1 [concrete = constants.%true]
// CHECK:STDOUT: %.loc8_10.1: type = splice_block %.loc8_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc8_17.1: type = splice_block %.loc8_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc8: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc8_10.2: type = value_of_initializer %Bool.call.loc8 [concrete = bool]
// CHECK:STDOUT: %.loc8_10.3: type = converted %Bool.call.loc8, %.loc8_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc8_17.2: type = value_of_initializer %Bool.call.loc8 [concrete = bool]
// CHECK:STDOUT: %.loc8_17.3: type = converted %Bool.call.loc8, %.loc8_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: bool = value_binding a, %M_TRUE.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1616,10 +1616,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_FALSE.ref: bool = name_ref M_FALSE, imports.%false.505718.1 [concrete = constants.%false]
// CHECK:STDOUT: %.loc9_10.1: type = splice_block %.loc9_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc9_17.1: type = splice_block %.loc9_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc9: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc9_10.2: type = value_of_initializer %Bool.call.loc9 [concrete = bool]
// CHECK:STDOUT: %.loc9_10.3: type = converted %Bool.call.loc9, %.loc9_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc9_17.2: type = value_of_initializer %Bool.call.loc9 [concrete = bool]
// CHECK:STDOUT: %.loc9_17.3: type = converted %Bool.call.loc9, %.loc9_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %b: bool = value_binding b, %M_FALSE.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1627,10 +1627,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_NOT_TRUE.ref: bool = name_ref M_NOT_TRUE, imports.%false.505718.2 [concrete = constants.%false]
// CHECK:STDOUT: %.loc10_10.1: type = splice_block %.loc10_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc10_17.1: type = splice_block %.loc10_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc10: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc10_10.2: type = value_of_initializer %Bool.call.loc10 [concrete = bool]
// CHECK:STDOUT: %.loc10_10.3: type = converted %Bool.call.loc10, %.loc10_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc10_17.2: type = value_of_initializer %Bool.call.loc10 [concrete = bool]
// CHECK:STDOUT: %.loc10_17.3: type = converted %Bool.call.loc10, %.loc10_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %c: bool = value_binding c, %M_NOT_TRUE.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1638,10 +1638,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc11: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_NOT_ZERO.ref: bool = name_ref M_NOT_ZERO, imports.%true.d1048d.2 [concrete = constants.%true]
// CHECK:STDOUT: %.loc11_10.1: type = splice_block %.loc11_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc11_17.1: type = splice_block %.loc11_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc11: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc11_10.2: type = value_of_initializer %Bool.call.loc11 [concrete = bool]
// CHECK:STDOUT: %.loc11_10.3: type = converted %Bool.call.loc11, %.loc11_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc11_17.2: type = value_of_initializer %Bool.call.loc11 [concrete = bool]
// CHECK:STDOUT: %.loc11_17.3: type = converted %Bool.call.loc11, %.loc11_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %d: bool = value_binding d, %M_NOT_ZERO.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1649,10 +1649,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_ONE_EQ_ONE.ref: bool = name_ref M_ONE_EQ_ONE, imports.%true.d1048d.3 [concrete = constants.%true]
// CHECK:STDOUT: %.loc12_10.1: type = splice_block %.loc12_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc12_17.1: type = splice_block %.loc12_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc12: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc12_10.2: type = value_of_initializer %Bool.call.loc12 [concrete = bool]
// CHECK:STDOUT: %.loc12_10.3: type = converted %Bool.call.loc12, %.loc12_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc12_17.2: type = value_of_initializer %Bool.call.loc12 [concrete = bool]
// CHECK:STDOUT: %.loc12_17.3: type = converted %Bool.call.loc12, %.loc12_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %e: bool = value_binding e, %M_ONE_EQ_ONE.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1660,10 +1660,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc13: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_ONE_NEQ_ONE.ref: bool = name_ref M_ONE_NEQ_ONE, imports.%false.505718.3 [concrete = constants.%false]
// CHECK:STDOUT: %.loc13_10.1: type = splice_block %.loc13_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc13_17.1: type = splice_block %.loc13_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc13: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc13_10.2: type = value_of_initializer %Bool.call.loc13 [concrete = bool]
// CHECK:STDOUT: %.loc13_10.3: type = converted %Bool.call.loc13, %.loc13_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc13_17.2: type = value_of_initializer %Bool.call.loc13 [concrete = bool]
// CHECK:STDOUT: %.loc13_17.3: type = converted %Bool.call.loc13, %.loc13_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %f: bool = value_binding f, %M_ONE_NEQ_ONE.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1671,10 +1671,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_AND.ref: bool = name_ref M_AND, imports.%true.d1048d.4 [concrete = constants.%true]
// CHECK:STDOUT: %.loc14_10.1: type = splice_block %.loc14_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc14_17.1: type = splice_block %.loc14_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc14: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc14_10.2: type = value_of_initializer %Bool.call.loc14 [concrete = bool]
// CHECK:STDOUT: %.loc14_10.3: type = converted %Bool.call.loc14, %.loc14_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc14_17.2: type = value_of_initializer %Bool.call.loc14 [concrete = bool]
// CHECK:STDOUT: %.loc14_17.3: type = converted %Bool.call.loc14, %.loc14_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %g: bool = value_binding g, %M_AND.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1682,10 +1682,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_OR.ref: bool = name_ref M_OR, imports.%true.d1048d.5 [concrete = constants.%true]
// CHECK:STDOUT: %.loc15_10.1: type = splice_block %.loc15_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc15_17.1: type = splice_block %.loc15_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc15: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc15_10.2: type = value_of_initializer %Bool.call.loc15 [concrete = bool]
// CHECK:STDOUT: %.loc15_10.3: type = converted %Bool.call.loc15, %.loc15_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc15_17.2: type = value_of_initializer %Bool.call.loc15 [concrete = bool]
// CHECK:STDOUT: %.loc15_17.3: type = converted %Bool.call.loc15, %.loc15_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %h: bool = value_binding h, %M_OR.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1693,10 +1693,10 @@ fn F() {
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc16: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_COMPLEX.ref: bool = name_ref M_COMPLEX, imports.%true.d1048d.6 [concrete = constants.%true]
// CHECK:STDOUT: %.loc16_10.1: type = splice_block %.loc16_10.3 [concrete = bool] {
// CHECK:STDOUT: %.loc16_17.1: type = splice_block %.loc16_17.3 [concrete = bool] {
// CHECK:STDOUT: %Bool.call.loc16: init type = call constants.%Bool() [concrete = bool]
// CHECK:STDOUT: %.loc16_10.2: type = value_of_initializer %Bool.call.loc16 [concrete = bool]
// CHECK:STDOUT: %.loc16_10.3: type = converted %Bool.call.loc16, %.loc16_10.2 [concrete = bool]
// CHECK:STDOUT: %.loc16_17.2: type = value_of_initializer %Bool.call.loc16 [concrete = bool]
// CHECK:STDOUT: %.loc16_17.3: type = converted %Bool.call.loc16, %.loc16_17.2 [concrete = bool]
// CHECK:STDOUT: }
// CHECK:STDOUT: %i: bool = value_binding i, %M_COMPLEX.ref
// CHECK:STDOUT: name_binding_decl {
@@ -1841,10 +1841,10 @@ fn F() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc11_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc11_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %M_A.ref: %A = name_ref M_A, imports.%int_1 [concrete = constants.%int_1]
// CHECK:STDOUT: %.loc11: type = splice_block %A.ref [concrete = constants.%A] {
// CHECK:STDOUT: %Cpp.ref.loc11_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc11_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %A.ref: type = name_ref A, imports.%A.decl [concrete = constants.%A]
// CHECK:STDOUT: }
// CHECK:STDOUT: %a: %A = value_binding a, %M_A.ref
@@ -1878,13 +1878,13 @@ fn F() {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: %M_CONSTEXPR_INT.ref: %const = name_ref M_CONSTEXPR_INT, imports.%int_1 [concrete = constants.%int_1.22e]
// CHECK:STDOUT: %.loc11_10: type = splice_block %i32.loc11 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc11_17: type = splice_block %i32.loc11 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32.loc11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32.loc11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc11_19.1: %i32 = as_compatible %M_CONSTEXPR_INT.ref [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc11_19.2: %i32 = converted %M_CONSTEXPR_INT.ref, %.loc11_19.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %a: %i32 = value_binding a, %.loc11_19.2
// CHECK:STDOUT: %.loc11_26.1: %i32 = as_compatible %M_CONSTEXPR_INT.ref [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %.loc11_26.2: %i32 = converted %M_CONSTEXPR_INT.ref, %.loc11_26.1 [concrete = constants.%int_1.5d2]
// CHECK:STDOUT: %a: %i32 = value_binding a, %.loc11_26.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -23,14 +23,14 @@ library "[[@TEST_NAME]]";
import Cpp library "header.h";
fn F[T:! type](x: T) {
fn F[T:! type](unused x: T) {
// TODO: This should be treated as being template-dependent on T,
// and we should perform the call during monomorphization.
// CHECK:STDERR: fail_todo_generic_call.carbon:[[@LINE+4]]:16: error: semantics TODO: `unsupported type used as template argument` [SemanticsTodo]
// CHECK:STDERR: var v: Cpp.S(T);
// CHECK:STDERR: ^
// CHECK:STDERR: fail_todo_generic_call.carbon:[[@LINE+4]]:23: error: semantics TODO: `unsupported type used as template argument` [SemanticsTodo]
// CHECK:STDERR: var unused v: Cpp.S(T);
// CHECK:STDERR: ^
// CHECK:STDERR:
var v: Cpp.S(T);
var unused v: Cpp.S(T);
}
fn G() {
@@ -59,7 +59,7 @@ import Cpp library "templates.h";
class C { adapt {}; }
impl C as Core.ImplicitAs(i32) {
eval fn Convert[self: Self]() -> i32 { return 123; }
eval fn Convert[unused self: Self]() -> i32 { return 123; }
}
var s: Cpp.Simple({} as C) = Cpp.MakeSimple123();
+12 -12
View File
@@ -26,7 +26,7 @@ fn F() {
//@dump-sem-ir-begin
var n: Cpp.foo = 42;
// Types are equivalent.
var p: Cpp.bar* = &n;
var unused p: Cpp.bar* = &n;
//@dump-sem-ir-end
}
@@ -44,8 +44,8 @@ import Cpp library "class_typedef.h";
fn H(var c: Cpp.C, var d: Cpp.D) {
//@dump-sem-ir-begin
// Types are equivalent.
var pd: Cpp.D* = &c;
var pc: Cpp.C* = &d;
var unused pd: Cpp.D* = &c;
var unused pc: Cpp.C* = &d;
//@dump-sem-ir-end
}
@@ -131,10 +131,10 @@ fn H(var c: Cpp.C, var d: Cpp.D) {
// CHECK:STDOUT: %n.ref: ref %i32 = name_ref n, %n
// CHECK:STDOUT: %addr: %ptr.235 = addr_of %n.ref
// CHECK:STDOUT: %impl.elem0.loc10: %.a62 = impl_witness_access constants.%Copy.impl_witness.843, element0 [concrete = constants.%ptr.as.Copy.impl.Op.011]
// CHECK:STDOUT: %bound_method.loc10_21.1: <bound method> = bound_method %addr, %impl.elem0.loc10
// CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %addr, %impl.elem0.loc10
// CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @ptr.as.Copy.impl.Op(constants.%i32) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_21.2: <bound method> = bound_method %addr, %specific_fn.loc10
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.235 = call %bound_method.loc10_21.2(%addr)
// CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %addr, %specific_fn.loc10
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call: init %ptr.235 = call %bound_method.loc10_28.2(%addr)
// CHECK:STDOUT: assign %p.var, %ptr.as.Copy.impl.Op.call
// CHECK:STDOUT: %.loc10: type = splice_block %ptr [concrete = constants.%ptr.235] {
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
@@ -197,10 +197,10 @@ fn H(var c: Cpp.C, var d: Cpp.D) {
// CHECK:STDOUT: %c.ref: ref %C = name_ref c, %c
// CHECK:STDOUT: %addr.loc9: %ptr.d9e = addr_of %c.ref
// CHECK:STDOUT: %impl.elem0.loc9: %.798 = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d]
// CHECK:STDOUT: %bound_method.loc9_20.1: <bound method> = bound_method %addr.loc9, %impl.elem0.loc9
// CHECK:STDOUT: %bound_method.loc9_27.1: <bound method> = bound_method %addr.loc9, %impl.elem0.loc9
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc9_20.2: <bound method> = bound_method %addr.loc9, %specific_fn.loc9
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc9: init %ptr.d9e = call %bound_method.loc9_20.2(%addr.loc9)
// CHECK:STDOUT: %bound_method.loc9_27.2: <bound method> = bound_method %addr.loc9, %specific_fn.loc9
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc9: init %ptr.d9e = call %bound_method.loc9_27.2(%addr.loc9)
// CHECK:STDOUT: assign %pd.var, %ptr.as.Copy.impl.Op.call.loc9
// CHECK:STDOUT: %.loc9: type = splice_block %ptr.loc9 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
@@ -216,10 +216,10 @@ fn H(var c: Cpp.C, var d: Cpp.D) {
// CHECK:STDOUT: %d.ref: ref %C = name_ref d, %d
// CHECK:STDOUT: %addr.loc10: %ptr.d9e = addr_of %d.ref
// CHECK:STDOUT: %impl.elem0.loc10: %.798 = impl_witness_access constants.%Copy.impl_witness.83a, element0 [concrete = constants.%ptr.as.Copy.impl.Op.f1d]
// CHECK:STDOUT: %bound_method.loc10_20.1: <bound method> = bound_method %addr.loc10, %impl.elem0.loc10
// CHECK:STDOUT: %bound_method.loc10_27.1: <bound method> = bound_method %addr.loc10, %impl.elem0.loc10
// CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @ptr.as.Copy.impl.Op(constants.%C) [concrete = constants.%ptr.as.Copy.impl.Op.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_20.2: <bound method> = bound_method %addr.loc10, %specific_fn.loc10
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc10: init %ptr.d9e = call %bound_method.loc10_20.2(%addr.loc10)
// CHECK:STDOUT: %bound_method.loc10_27.2: <bound method> = bound_method %addr.loc10, %specific_fn.loc10
// CHECK:STDOUT: %ptr.as.Copy.impl.Op.call.loc10: init %ptr.d9e = call %bound_method.loc10_27.2(%addr.loc10)
// CHECK:STDOUT: assign %pc.var, %ptr.as.Copy.impl.Op.call.loc10
// CHECK:STDOUT: %.loc10: type = splice_block %ptr.loc10 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
+32 -32
View File
@@ -30,9 +30,9 @@ library "[[@TEST_NAME]]";
import Cpp library "global_scope.h";
fn MyF() {
let local: Cpp.C = Cpp.global;
let local_ptr: Cpp.C* = Cpp.global_ptr;
let local_ref: Cpp.C* = Cpp.global_ref;
let unused local: Cpp.C = Cpp.global;
let unused local_ptr: Cpp.C* = Cpp.global_ptr;
let unused local_ref: Cpp.C* = Cpp.global_ref;
}
// ============================================================================
@@ -55,18 +55,18 @@ library "[[@TEST_NAME]]";
import Cpp library "unsupported_type.h";
fn MyF() {
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+11]]:14: note: in `Cpp` name lookup for `UnusupportedType` [InCppNameLookup]
// CHECK:STDERR: let local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+11]]:21: note: in `Cpp` name lookup for `UnusupportedType` [InCppNameLookup]
// CHECK:STDERR: let unused local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+7]]:37: error: semantics TODO: `Unsupported: var type: UnusupportedType` [SemanticsTodo]
// CHECK:STDERR: let local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+4]]:37: note: in `Cpp` name lookup for `global` [InCppNameLookup]
// CHECK:STDERR: let local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+7]]:44: error: semantics TODO: `Unsupported: var type: UnusupportedType` [SemanticsTodo]
// CHECK:STDERR: let unused local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_import_unsupported_type.carbon:[[@LINE+4]]:44: note: in `Cpp` name lookup for `global` [InCppNameLookup]
// CHECK:STDERR: let unused local: Cpp.UnusupportedType = Cpp.global;
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR:
let local: Cpp.UnusupportedType = Cpp.global;
let unused local: Cpp.UnusupportedType = Cpp.global;
}
// CHECK:STDOUT: --- import_global_scope.carbon
@@ -136,40 +136,40 @@ fn MyF() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %local.patt: %pattern_type.217 = value_binding_pattern local [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc7_22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc7_29: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %global.ref: ref %C = name_ref global, imports.%global.var [concrete = imports.%global.var]
// CHECK:STDOUT: %.loc7_17: type = splice_block %C.ref.loc7 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc7_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc7_24: type = splice_block %C.ref.loc7 [concrete = constants.%C] {
// CHECK:STDOUT: %Cpp.ref.loc7_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc7: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc7_25: %C = acquire_value %global.ref
// CHECK:STDOUT: %local: %C = value_binding local, %.loc7_25
// CHECK:STDOUT: %.loc7_32: %C = acquire_value %global.ref
// CHECK:STDOUT: %local: %C = value_binding local, %.loc7_32
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %local_ptr.patt: %pattern_type.a31 = value_binding_pattern local_ptr [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc8_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc8_34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %global_ptr.ref: ref %ptr.d9e = name_ref global_ptr, imports.%global_ptr.var [concrete = imports.%global_ptr.var]
// CHECK:STDOUT: %.loc8_23: type = splice_block %ptr.loc8 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc8_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc8_30: type = splice_block %ptr.loc8 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc8_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc8: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc8: type = ptr_type %C.ref.loc8 [concrete = constants.%ptr.d9e]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc8_30: %ptr.d9e = acquire_value %global_ptr.ref
// CHECK:STDOUT: %local_ptr: %ptr.d9e = value_binding local_ptr, %.loc8_30
// CHECK:STDOUT: %.loc8_37: %ptr.d9e = acquire_value %global_ptr.ref
// CHECK:STDOUT: %local_ptr: %ptr.d9e = value_binding local_ptr, %.loc8_37
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %local_ref.patt: %pattern_type.a31 = value_binding_pattern local_ref [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc9_27: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc9_34: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %global_ref.ref: ref %const = name_ref global_ref, imports.%global_ref.var [concrete = imports.%global_ref.var]
// CHECK:STDOUT: %.loc9_23: type = splice_block %ptr.loc9 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc9_18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %.loc9_30: type = splice_block %ptr.loc9 [concrete = constants.%ptr.d9e] {
// CHECK:STDOUT: %Cpp.ref.loc9_25: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %C.ref.loc9: type = name_ref C, imports.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc9: type = ptr_type %C.ref.loc9 [concrete = constants.%ptr.d9e]
// CHECK:STDOUT: }
// CHECK:STDOUT: %.loc9_30.1: ref %ptr.d9e = as_compatible %global_ref.ref [concrete = constants.%global_ref.var]
// CHECK:STDOUT: %.loc9_30.2: ref %ptr.d9e = converted %global_ref.ref, %.loc9_30.1 [concrete = constants.%global_ref.var]
// CHECK:STDOUT: %.loc9_30.3: %ptr.d9e = acquire_value %.loc9_30.2
// CHECK:STDOUT: %local_ref: %ptr.d9e = value_binding local_ref, %.loc9_30.3
// CHECK:STDOUT: %.loc9_37.1: ref %ptr.d9e = as_compatible %global_ref.ref [concrete = constants.%global_ref.var]
// CHECK:STDOUT: %.loc9_37.2: ref %ptr.d9e = converted %global_ref.ref, %.loc9_37.1 [concrete = constants.%global_ref.var]
// CHECK:STDOUT: %.loc9_37.3: %ptr.d9e = acquire_value %.loc9_37.2
// CHECK:STDOUT: %local_ref: %ptr.d9e = value_binding local_ref, %.loc9_37.3
// CHECK:STDOUT: return
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -210,10 +210,10 @@ fn MyF() {
// CHECK:STDOUT: name_binding_decl {
// CHECK:STDOUT: %local.patt: <error> = value_binding_pattern local [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.ref.loc22_37: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_44: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %global.ref: <error> = name_ref global, <error> [concrete = <error>]
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
// CHECK:STDOUT: %Cpp.ref.loc22_14: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %Cpp.ref.loc22_21: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %UnusupportedType.ref: <error> = name_ref UnusupportedType, <error> [concrete = <error>]
// CHECK:STDOUT: }
// CHECK:STDOUT: %local: <error> = value_binding local, <error> [concrete = <error>]
+1 -1
View File
@@ -24,7 +24,7 @@ library "[[@TEST_NAME]]";
import Cpp library "namespace.h";
fn MyF() {
let local: Cpp.N.C = Cpp.N.global;
let unused local: Cpp.N.C = Cpp.N.global;
}
// --- type_in_namespace.carbon
+5 -5
View File
@@ -18,7 +18,7 @@ import Cpp;
// This is valid, unlike in C++, because `Cpp.void` is complete but abstract in
// Carbon. Values of type `Cpp.void` exist, but objects of that type do not.
fn F(x: Cpp.void) {}
fn F(unused x: Cpp.void) {}
// --- fail_void_abstract.carbon
@@ -27,14 +27,14 @@ library "[[@TEST_NAME]]";
import Cpp;
fn G() {
// CHECK:STDERR: fail_void_abstract.carbon:[[@LINE+7]]:10: error: binding pattern has abstract type `Cpp.void` in `var` pattern [AbstractTypeInVarPattern]
// CHECK:STDERR: var x: Cpp.void;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_void_abstract.carbon:[[@LINE+7]]:17: error: binding pattern has abstract type `Cpp.void` in `var` pattern [AbstractTypeInVarPattern]
// CHECK:STDERR: var unused x: Cpp.void;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: {{.*}}/prelude/types/cpp/void.carbon:24:1: note: class was declared abstract here [ClassAbstractHere]
// CHECK:STDERR: abstract class CppCompat.VoidBase {
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
var x: Cpp.void;
var unused x: Cpp.void;
}
// --- fail_void_argument.carbon
+98 -98
View File
@@ -20,7 +20,7 @@ struct S {};
fn F(input: Cpp.S*) {
//@dump-sem-ir-begin
let p: Cpp.void* = input;
let unused p: Cpp.void* = input;
//@dump-sem-ir-end
}
@@ -34,7 +34,7 @@ class C {}
fn F(input: C*) {
//@dump-sem-ir-begin
let p: Cpp.void* = input;
let unused p: Cpp.void* = input;
//@dump-sem-ir-end
}
@@ -48,7 +48,7 @@ struct S {};
fn F(input: Cpp.S*) {
//@dump-sem-ir-begin
let p: Cpp.void* = input as Cpp.void*;
let unused p: Cpp.void* = input as Cpp.void*;
//@dump-sem-ir-end
}
@@ -62,7 +62,7 @@ class C {}
fn F(input: C*) {
//@dump-sem-ir-begin
let p: Cpp.void* = input as Cpp.void*;
let unused p: Cpp.void* = input as Cpp.void*;
//@dump-sem-ir-end
}
@@ -76,14 +76,14 @@ struct S {};
fn F(input: Cpp.void*) {
//@dump-sem-ir-begin
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_cpp_class_pointer.carbon:[[@LINE+7]]:19: error: cannot convert expression of type `Cpp.void*` to `Cpp.S*` with `as` [ConversionFailure]
// CHECK:STDERR: let p: Cpp.S* = input as Cpp.S*;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_cpp_class_pointer.carbon:[[@LINE+4]]:19: note: type `Cpp.void*` does not implement interface `Core.As(Cpp.S*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let p: Cpp.S* = input as Cpp.S*;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_cpp_class_pointer.carbon:[[@LINE+7]]:26: error: cannot convert expression of type `Cpp.void*` to `Cpp.S*` with `as` [ConversionFailure]
// CHECK:STDERR: let unused p: Cpp.S* = input as Cpp.S*;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_cpp_class_pointer.carbon:[[@LINE+4]]:26: note: type `Cpp.void*` does not implement interface `Core.As(Cpp.S*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused p: Cpp.S* = input as Cpp.S*;
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR:
let p: Cpp.S* = input as Cpp.S*;
let unused p: Cpp.S* = input as Cpp.S*;
//@dump-sem-ir-end
}
@@ -97,14 +97,14 @@ class C {}
fn F(input: Cpp.void*) {
//@dump-sem-ir-begin
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_carbon_class_pointer.carbon:[[@LINE+7]]:15: error: cannot convert expression of type `Cpp.void*` to `C*` with `as` [ConversionFailure]
// CHECK:STDERR: let p: C* = input as C*;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_carbon_class_pointer.carbon:[[@LINE+4]]:15: note: type `Cpp.void*` does not implement interface `Core.As(C*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let p: C* = input as C*;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_carbon_class_pointer.carbon:[[@LINE+7]]:22: error: cannot convert expression of type `Cpp.void*` to `C*` with `as` [ConversionFailure]
// CHECK:STDERR: let unused p: C* = input as C*;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR: fail_explicit_as_from_void_pointer_to_carbon_class_pointer.carbon:[[@LINE+4]]:22: note: type `Cpp.void*` does not implement interface `Core.As(C*)` [MissingImplInMemberAccessNote]
// CHECK:STDERR: let unused p: C* = input as C*;
// CHECK:STDERR: ^~~~~~~~~~~
// CHECK:STDERR:
let p: C* = input as C*;
let unused p: C* = input as C*;
//@dump-sem-ir-end
}
@@ -118,7 +118,7 @@ struct S {};
fn F(input: Cpp.void*) {
//@dump-sem-ir-begin
let p: Cpp.S* = input unsafe as Cpp.S*;
let unused p: Cpp.S* = input unsafe as Cpp.S*;
//@dump-sem-ir-end
}
@@ -132,7 +132,7 @@ class C {}
fn F(input: Cpp.void*) {
//@dump-sem-ir-begin
let p: C* = input unsafe as C*;
let unused p: C* = input unsafe as C*;
//@dump-sem-ir-end
}
@@ -174,19 +174,19 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.9fb = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.5c7 = name_ref input, %input
// CHECK:STDOUT: %.loc10_18: type = splice_block %ptr.loc10 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %.loc10_25: type = splice_block %ptr.loc10 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10: type = ptr_type %void.ref [concrete = constants.%ptr.874]
// CHECK:STDOUT: }
// CHECK:STDOUT: %impl.elem0: %.751 = impl_witness_access constants.%ImplicitAs.impl_witness.ffd, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.d8d]
// CHECK:STDOUT: %bound_method.loc10_22.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_29.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.ImplicitAs.impl.Convert.1(constants.%S) [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.specific_fn.ffe]
// CHECK:STDOUT: %bound_method.loc10_22.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_22.2(%input.ref)
// CHECK:STDOUT: %.loc10_22.1: %ptr.874 = value_of_initializer %ptr.as.ImplicitAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_22.2: %ptr.874 = converted %input.ref, %.loc10_22.1
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_22.2
// CHECK:STDOUT: %bound_method.loc10_29.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_29.2(%input.ref)
// CHECK:STDOUT: %.loc10_29.1: %ptr.874 = value_of_initializer %ptr.as.ImplicitAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_29.2: %ptr.874 = converted %input.ref, %.loc10_29.1
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_29.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -226,19 +226,19 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.9fb = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.31e = name_ref input, %input
// CHECK:STDOUT: %.loc10_18: type = splice_block %ptr.loc10 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %.loc10_25: type = splice_block %ptr.loc10 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10: type = ptr_type %void.ref [concrete = constants.%ptr.874]
// CHECK:STDOUT: }
// CHECK:STDOUT: %impl.elem0: %.9d0 = impl_witness_access constants.%ImplicitAs.impl_witness.39c, element0 [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.1f8]
// CHECK:STDOUT: %bound_method.loc10_22.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_29.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.ImplicitAs.impl.Convert.1(constants.%C) [concrete = constants.%ptr.as.ImplicitAs.impl.Convert.specific_fn.384]
// CHECK:STDOUT: %bound_method.loc10_22.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_22.2(%input.ref)
// CHECK:STDOUT: %.loc10_22.1: %ptr.874 = value_of_initializer %ptr.as.ImplicitAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_22.2: %ptr.874 = converted %input.ref, %.loc10_22.1
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_22.2
// CHECK:STDOUT: %bound_method.loc10_29.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.ImplicitAs.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_29.2(%input.ref)
// CHECK:STDOUT: %.loc10_29.1: %ptr.874 = value_of_initializer %ptr.as.ImplicitAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_29.2: %ptr.874 = converted %input.ref, %.loc10_29.1
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_29.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -290,22 +290,22 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.9fb = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.5c7 = name_ref input, %input
// CHECK:STDOUT: %Cpp.ref.loc10_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_34: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_39: type = ptr_type %void.ref.loc10_34 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %Cpp.ref.loc10_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_41: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_46: type = ptr_type %void.ref.loc10_41 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %impl.elem0: %.bb8 = impl_witness_access constants.%As.impl_witness.9e9, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.e7d]
// CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_35.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @T.binding.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.binding.as_type.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_28.2(%input.ref)
// CHECK:STDOUT: %.loc10_28.1: %ptr.874 = value_of_initializer %T.binding.as_type.as.As.impl.Convert.call
// CHECK:STDOUT: %.loc10_28.2: %ptr.874 = converted %input.ref, %.loc10_28.1
// CHECK:STDOUT: %.loc10_18: type = splice_block %ptr.loc10_18 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref.loc10_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_13: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_18: type = ptr_type %void.ref.loc10_13 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %bound_method.loc10_35.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_35.2(%input.ref)
// CHECK:STDOUT: %.loc10_35.1: %ptr.874 = value_of_initializer %T.binding.as_type.as.As.impl.Convert.call
// CHECK:STDOUT: %.loc10_35.2: %ptr.874 = converted %input.ref, %.loc10_35.1
// CHECK:STDOUT: %.loc10_25: type = splice_block %ptr.loc10_25 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_20: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_25: type = ptr_type %void.ref.loc10_20 [concrete = constants.%ptr.874]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_28.2
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_35.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -355,22 +355,22 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.9fb = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.31e = name_ref input, %input
// CHECK:STDOUT: %Cpp.ref.loc10_31: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_34: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_39: type = ptr_type %void.ref.loc10_34 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %Cpp.ref.loc10_38: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_41: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_46: type = ptr_type %void.ref.loc10_41 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %impl.elem0: %.99e = impl_witness_access constants.%As.impl_witness.fa1, element0 [concrete = constants.%T.binding.as_type.as.As.impl.Convert.483]
// CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_35.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @T.binding.as_type.as.As.impl.Convert(constants.%ptr.874, constants.%ImplicitAs.facet) [concrete = constants.%T.binding.as_type.as.As.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_28.2(%input.ref)
// CHECK:STDOUT: %.loc10_28.1: %ptr.874 = value_of_initializer %T.binding.as_type.as.As.impl.Convert.call
// CHECK:STDOUT: %.loc10_28.2: %ptr.874 = converted %input.ref, %.loc10_28.1
// CHECK:STDOUT: %.loc10_18: type = splice_block %ptr.loc10_18 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref.loc10_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_13: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_18: type = ptr_type %void.ref.loc10_13 [concrete = constants.%ptr.874]
// CHECK:STDOUT: %bound_method.loc10_35.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %T.binding.as_type.as.As.impl.Convert.call: init %ptr.874 = call %bound_method.loc10_35.2(%input.ref)
// CHECK:STDOUT: %.loc10_35.1: %ptr.874 = value_of_initializer %T.binding.as_type.as.As.impl.Convert.call
// CHECK:STDOUT: %.loc10_35.2: %ptr.874 = converted %input.ref, %.loc10_35.1
// CHECK:STDOUT: %.loc10_25: type = splice_block %ptr.loc10_25 [concrete = constants.%ptr.874] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %void.ref.loc10_20: type = name_ref void, constants.%Cpp.void [concrete = constants.%Cpp.void]
// CHECK:STDOUT: %ptr.loc10_25: type = ptr_type %void.ref.loc10_20 [concrete = constants.%ptr.874]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_28.2
// CHECK:STDOUT: %p: %ptr.874 = value_binding p, %.loc10_35.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -399,14 +399,14 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.259 = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input
// CHECK:STDOUT: %Cpp.ref.loc17_28: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc17_31: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc17_33: type = ptr_type %S.ref.loc17_31 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %.loc17_25: %ptr.5c7 = converted %input.ref, <error> [concrete = <error>]
// CHECK:STDOUT: %.loc17_15: type = splice_block %ptr.loc17_15 [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc17_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc17_13: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc17_15: type = ptr_type %S.ref.loc17_13 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %Cpp.ref.loc17_35: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc17_38: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc17_40: type = ptr_type %S.ref.loc17_38 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %.loc17_32: %ptr.5c7 = converted %input.ref, <error> [concrete = <error>]
// CHECK:STDOUT: %.loc17_22: type = splice_block %ptr.loc17_22 [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc17_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc17_20: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc17_22: type = ptr_type %S.ref.loc17_20 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.5c7 = value_binding p, <error> [concrete = <error>]
// CHECK:STDOUT: <elided>
@@ -431,12 +431,12 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.506 = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input
// CHECK:STDOUT: %C.ref.loc17_24: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc17_25: type = ptr_type %C.ref.loc17_24 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %.loc17_21: %ptr.31e = converted %input.ref, <error> [concrete = <error>]
// CHECK:STDOUT: %.loc17_11: type = splice_block %ptr.loc17_11 [concrete = constants.%ptr.31e] {
// CHECK:STDOUT: %C.ref.loc17_10: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc17_11: type = ptr_type %C.ref.loc17_10 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %C.ref.loc17_31: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc17_32: type = ptr_type %C.ref.loc17_31 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %.loc17_28: %ptr.31e = converted %input.ref, <error> [concrete = <error>]
// CHECK:STDOUT: %.loc17_18: type = splice_block %ptr.loc17_18 [concrete = constants.%ptr.31e] {
// CHECK:STDOUT: %C.ref.loc17_17: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc17_18: type = ptr_type %C.ref.loc17_17 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.31e = value_binding p, <error> [concrete = <error>]
// CHECK:STDOUT: <elided>
@@ -481,22 +481,22 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.259 = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input
// CHECK:STDOUT: %Cpp.ref.loc10_35: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc10_38: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc10_40: type = ptr_type %S.ref.loc10_38 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %Cpp.ref.loc10_42: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc10_45: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc10_47: type = ptr_type %S.ref.loc10_45 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %impl.elem0: %.fba = impl_witness_access constants.%UnsafeAs.impl_witness.080, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.fe3]
// CHECK:STDOUT: %bound_method.loc10_32.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_39.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.UnsafeAs.impl.Convert(constants.%Cpp.void, constants.%S) [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_32.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.call: init %ptr.5c7 = call %bound_method.loc10_32.2(%input.ref)
// CHECK:STDOUT: %.loc10_32.1: %ptr.5c7 = value_of_initializer %ptr.as.UnsafeAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_32.2: %ptr.5c7 = converted %input.ref, %.loc10_32.1
// CHECK:STDOUT: %.loc10_15: type = splice_block %ptr.loc10_15 [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc10_10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc10_13: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc10_15: type = ptr_type %S.ref.loc10_13 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: %bound_method.loc10_39.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.call: init %ptr.5c7 = call %bound_method.loc10_39.2(%input.ref)
// CHECK:STDOUT: %.loc10_39.1: %ptr.5c7 = value_of_initializer %ptr.as.UnsafeAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_39.2: %ptr.5c7 = converted %input.ref, %.loc10_39.1
// CHECK:STDOUT: %.loc10_22: type = splice_block %ptr.loc10_22 [concrete = constants.%ptr.5c7] {
// CHECK:STDOUT: %Cpp.ref.loc10_17: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
// CHECK:STDOUT: %S.ref.loc10_20: type = name_ref S, imports.%S.decl [concrete = constants.%S]
// CHECK:STDOUT: %ptr.loc10_22: type = ptr_type %S.ref.loc10_20 [concrete = constants.%ptr.5c7]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.5c7 = value_binding p, %.loc10_32.2
// CHECK:STDOUT: %p: %ptr.5c7 = value_binding p, %.loc10_39.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT:
@@ -533,20 +533,20 @@ fn F(input: Cpp.void*) {
// CHECK:STDOUT: %p.patt: %pattern_type.506 = value_binding_pattern p [concrete]
// CHECK:STDOUT: }
// CHECK:STDOUT: %input.ref: %ptr.874 = name_ref input, %input
// CHECK:STDOUT: %C.ref.loc10_31: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc10_32: type = ptr_type %C.ref.loc10_31 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %C.ref.loc10_38: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc10_39: type = ptr_type %C.ref.loc10_38 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %impl.elem0: %.53b = impl_witness_access constants.%UnsafeAs.impl_witness.2f5, element0 [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.409]
// CHECK:STDOUT: %bound_method.loc10_28.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %bound_method.loc10_35.1: <bound method> = bound_method %input.ref, %impl.elem0
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @ptr.as.UnsafeAs.impl.Convert(constants.%Cpp.void, constants.%C) [concrete = constants.%ptr.as.UnsafeAs.impl.Convert.specific_fn]
// CHECK:STDOUT: %bound_method.loc10_28.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.call: init %ptr.31e = call %bound_method.loc10_28.2(%input.ref)
// CHECK:STDOUT: %.loc10_28.1: %ptr.31e = value_of_initializer %ptr.as.UnsafeAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_28.2: %ptr.31e = converted %input.ref, %.loc10_28.1
// CHECK:STDOUT: %.loc10_11: type = splice_block %ptr.loc10_11 [concrete = constants.%ptr.31e] {
// CHECK:STDOUT: %C.ref.loc10_10: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc10_11: type = ptr_type %C.ref.loc10_10 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: %bound_method.loc10_35.2: <bound method> = bound_method %input.ref, %specific_fn
// CHECK:STDOUT: %ptr.as.UnsafeAs.impl.Convert.call: init %ptr.31e = call %bound_method.loc10_35.2(%input.ref)
// CHECK:STDOUT: %.loc10_35.1: %ptr.31e = value_of_initializer %ptr.as.UnsafeAs.impl.Convert.call
// CHECK:STDOUT: %.loc10_35.2: %ptr.31e = converted %input.ref, %.loc10_35.1
// CHECK:STDOUT: %.loc10_18: type = splice_block %ptr.loc10_18 [concrete = constants.%ptr.31e] {
// CHECK:STDOUT: %C.ref.loc10_17: type = name_ref C, file.%C.decl [concrete = constants.%C]
// CHECK:STDOUT: %ptr.loc10_18: type = ptr_type %C.ref.loc10_17 [concrete = constants.%ptr.31e]
// CHECK:STDOUT: }
// CHECK:STDOUT: %p: %ptr.31e = value_binding p, %.loc10_28.2
// CHECK:STDOUT: %p: %ptr.31e = value_binding p, %.loc10_35.2
// CHECK:STDOUT: <elided>
// CHECK:STDOUT: }
// CHECK:STDOUT: