|
@@ -11,8 +11,6 @@
|
|
|
// TIP: To dump output, run:
|
|
// TIP: To dump output, run:
|
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/class/method.carbon
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/class/method.carbon
|
|
|
|
|
|
|
|
-// TODO: Tests marked as `fail_todo_5891_` to fixed as a follow-up of https://github.com/carbon-language/carbon-lang/pull/5891.
|
|
|
|
|
-
|
|
|
|
|
// --- object_param_qualifiers.h
|
|
// --- object_param_qualifiers.h
|
|
|
|
|
|
|
|
struct HasQualifiers {
|
|
struct HasQualifiers {
|
|
@@ -27,7 +25,7 @@ struct HasQualifiers {
|
|
|
void const_ref_ref_this() const&&;
|
|
void const_ref_ref_this() const&&;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// --- fail_todo_5891_use_object_param_qualifiers.carbon
|
|
|
|
|
|
|
+// --- use_object_param_qualifiers.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
|
@@ -35,90 +33,60 @@ import Cpp library "object_param_qualifiers.h";
|
|
|
|
|
|
|
|
fn F(v: Cpp.HasQualifiers, p: Cpp.HasQualifiers*) {
|
|
fn F(v: Cpp.HasQualifiers, p: Cpp.HasQualifiers*) {
|
|
|
//@dump-sem-ir-begin
|
|
//@dump-sem-ir-begin
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: v.const_this();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
v.const_this();
|
|
v.const_this();
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: v.const_ref_this();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
v.const_ref_this();
|
|
v.const_ref_this();
|
|
|
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: p->plain();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
p->plain();
|
|
p->plain();
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: p->ref_this();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
p->ref_this();
|
|
p->ref_this();
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: p->const_this();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
p->const_this();
|
|
p->const_this();
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: p->const_ref_this();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_use_object_param_qualifiers.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
p->const_ref_this();
|
|
p->const_ref_this();
|
|
|
//@dump-sem-ir-end
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// --- fail_bad_5891_object_param_qualifiers_by_value.carbon
|
|
|
|
|
|
|
+// --- fail_bad_object_param_qualifiers_by_value.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
|
|
import Cpp library "object_param_qualifiers.h";
|
|
import Cpp library "object_param_qualifiers.h";
|
|
|
|
|
|
|
|
fn Value(v: Cpp.HasQualifiers) {
|
|
fn Value(v: Cpp.HasQualifiers) {
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+5]]:3: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef]
|
|
|
// CHECK:STDERR: v.plain();
|
|
// CHECK:STDERR: v.plain();
|
|
|
- // CHECK:STDERR: ^~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
|
|
+ // CHECK:STDERR: ^
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon: note: initializing function parameter [InCallToFunctionParam]
|
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR:
|
|
|
v.plain();
|
|
v.plain();
|
|
|
|
|
|
|
|
// TODO: This should remain invalid once we support `volatile`.
|
|
// TODO: This should remain invalid once we support `volatile`.
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: volatile struct HasQualifiers` [SemanticsTodo]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: volatile struct HasQualifiers` [SemanticsTodo]
|
|
|
// CHECK:STDERR: v.volatile_this();
|
|
// CHECK:STDERR: v.volatile_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
// CHECK:STDERR: v.volatile_this();
|
|
// CHECK:STDERR: v.volatile_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR:
|
|
|
v.volatile_this();
|
|
v.volatile_this();
|
|
|
|
|
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+5]]:3: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef]
|
|
|
// CHECK:STDERR: v.ref_this();
|
|
// CHECK:STDERR: v.ref_this();
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
|
|
+ // CHECK:STDERR: ^
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon: note: initializing function parameter [InCallToFunctionParam]
|
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR:
|
|
|
v.ref_this();
|
|
v.ref_this();
|
|
|
|
|
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: struct HasQualifiers &&` [SemanticsTodo]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: struct HasQualifiers &&` [SemanticsTodo]
|
|
|
// CHECK:STDERR: v.ref_ref_this();
|
|
// CHECK:STDERR: v.ref_ref_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
// CHECK:STDERR: v.ref_ref_this();
|
|
// CHECK:STDERR: v.ref_ref_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR:
|
|
|
v.ref_ref_this();
|
|
v.ref_ref_this();
|
|
|
|
|
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: const struct HasQualifiers &&` [SemanticsTodo]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: object parameter type: const struct HasQualifiers &&` [SemanticsTodo]
|
|
|
// CHECK:STDERR: v.const_ref_ref_this();
|
|
// CHECK:STDERR: v.const_ref_ref_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
|
|
- // CHECK:STDERR: fail_bad_5891_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
|
|
|
|
+ // CHECK:STDERR: fail_bad_object_param_qualifiers_by_value.carbon:[[@LINE+4]]:3: note: in call to Cpp function here [InCallToCppFunction]
|
|
|
// CHECK:STDERR: v.const_ref_ref_this();
|
|
// CHECK:STDERR: v.const_ref_ref_this();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
// CHECK:STDERR:
|
|
@@ -180,7 +148,7 @@ struct ExplicitObjectParam {
|
|
|
void H(this Another);
|
|
void H(this Another);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-// --- fail_todo_5891_call_explicit_object_param.carbon
|
|
|
|
|
|
|
+// --- call_explicit_object_param.carbon
|
|
|
|
|
|
|
|
library "[[@TEST_NAME]]";
|
|
library "[[@TEST_NAME]]";
|
|
|
|
|
|
|
@@ -188,36 +156,13 @@ import Cpp library "explicit_object_param.h";
|
|
|
|
|
|
|
|
fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
|
|
fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
|
|
|
//@dump-sem-ir-begin
|
|
//@dump-sem-ir-begin
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: e.F();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
e.F();
|
|
e.F();
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon:[[@LINE+9]]:3: error: member name of type `<type of Cpp.G>` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase]
|
|
|
|
|
- // CHECK:STDERR: n.(Cpp.ExplicitObjectParam.G)();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: n.(Cpp.ExplicitObjectParam.G)();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
n.(Cpp.ExplicitObjectParam.G)();
|
|
n.(Cpp.ExplicitObjectParam.G)();
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon:[[@LINE+9]]:3: error: member name of type `<type of Cpp.H>` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase]
|
|
|
|
|
- // CHECK:STDERR: a.(Cpp.ExplicitObjectParam.H)();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon:[[@LINE+5]]:3: error: missing object argument in method call [MissingObjectInMethodCall]
|
|
|
|
|
- // CHECK:STDERR: a.(Cpp.ExplicitObjectParam.H)();
|
|
|
|
|
- // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
- // CHECK:STDERR: fail_todo_5891_call_explicit_object_param.carbon: note: calling function declared here [InCallToFunction]
|
|
|
|
|
- // CHECK:STDERR:
|
|
|
|
|
a.(Cpp.ExplicitObjectParam.H)();
|
|
a.(Cpp.ExplicitObjectParam.H)();
|
|
|
//@dump-sem-ir-end
|
|
//@dump-sem-ir-end
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// CHECK:STDOUT: --- fail_todo_5891_use_object_param_qualifiers.carbon
|
|
|
|
|
|
|
+// CHECK:STDOUT: --- use_object_param_qualifiers.carbon
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %HasQualifiers: type = class_type @HasQualifiers [concrete]
|
|
// CHECK:STDOUT: %HasQualifiers: type = class_type @HasQualifiers [concrete]
|
|
@@ -272,46 +217,58 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @F(%v.param: %HasQualifiers, %p.param: %ptr.ec3) {
|
|
// CHECK:STDOUT: fn @F(%v.param: %HasQualifiers, %p.param: %ptr.ec3) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %v.ref.loc13: %HasQualifiers = name_ref v, %v
|
|
|
|
|
-// CHECK:STDOUT: %const_this.ref.loc13: %.602 = name_ref const_this, imports.%.ce8 [concrete = constants.%empty_struct.63b]
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc13: %ptr.ec3 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc13_16.1: %ptr.2cb = as_compatible %addr.loc13 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc13_16.2: %ptr.2cb = converted %addr.loc13, %.loc13_16.1 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %const_this__carbon_thunk.call.loc13: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc13_16.2)
|
|
|
|
|
-// CHECK:STDOUT: %v.ref.loc19: %HasQualifiers = name_ref v, %v
|
|
|
|
|
-// CHECK:STDOUT: %const_ref_this.ref.loc19: %.bf0 = name_ref const_ref_this, imports.%.667 [concrete = constants.%empty_struct.4f2]
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc19: %ptr.ec3 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc19_20.1: %ptr.2cb = as_compatible %addr.loc19 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc19_20.2: %ptr.2cb = converted %addr.loc19, %.loc19_20.1 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc19: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc19_20.2)
|
|
|
|
|
-// CHECK:STDOUT: %p.ref.loc26: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
-// CHECK:STDOUT: %.loc26: ref %HasQualifiers = deref %p.ref.loc26
|
|
|
|
|
|
|
+// CHECK:STDOUT: %v.ref.loc8: %HasQualifiers = name_ref v, %v
|
|
|
|
|
+// CHECK:STDOUT: %const_this.ref.loc8: %.602 = name_ref const_this, imports.%.ce8 [concrete = constants.%empty_struct.63b]
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %v.ref.loc8, %const_this.ref.loc8
|
|
|
|
|
+// CHECK:STDOUT: %.loc8_3: ref %HasQualifiers = value_as_ref %v.ref.loc8
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc8: %ptr.ec3 = addr_of %.loc8_3
|
|
|
|
|
+// CHECK:STDOUT: %.loc8_16.1: %ptr.2cb = as_compatible %addr.loc8
|
|
|
|
|
+// CHECK:STDOUT: %.loc8_16.2: %ptr.2cb = converted %addr.loc8, %.loc8_16.1
|
|
|
|
|
+// CHECK:STDOUT: %const_this__carbon_thunk.call.loc8: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc8_16.2)
|
|
|
|
|
+// CHECK:STDOUT: %v.ref.loc9: %HasQualifiers = name_ref v, %v
|
|
|
|
|
+// CHECK:STDOUT: %const_ref_this.ref.loc9: %.bf0 = name_ref const_ref_this, imports.%.667 [concrete = constants.%empty_struct.4f2]
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %v.ref.loc9, %const_ref_this.ref.loc9
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_3: ref %HasQualifiers = value_as_ref %v.ref.loc9
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc9: %ptr.ec3 = addr_of %.loc9_3
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_20.1: %ptr.2cb = as_compatible %addr.loc9
|
|
|
|
|
+// CHECK:STDOUT: %.loc9_20.2: %ptr.2cb = converted %addr.loc9, %.loc9_20.1
|
|
|
|
|
+// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc9: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc9_20.2)
|
|
|
|
|
+// CHECK:STDOUT: %p.ref.loc11: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
+// CHECK:STDOUT: %.loc11: ref %HasQualifiers = deref %p.ref.loc11
|
|
|
// CHECK:STDOUT: %plain.ref: %.64b = name_ref plain, imports.%.646 [concrete = constants.%empty_struct.a83]
|
|
// CHECK:STDOUT: %plain.ref: %.64b = name_ref plain, imports.%.646 [concrete = constants.%empty_struct.a83]
|
|
|
-// CHECK:STDOUT: <elided>
|
|
|
|
|
-// CHECK:STDOUT: %HasQualifiers.plain.call: init %empty_tuple.type = call imports.%HasQualifiers.plain.decl(<error>)
|
|
|
|
|
-// CHECK:STDOUT: %p.ref.loc32: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
-// CHECK:STDOUT: %.loc32: ref %HasQualifiers = deref %p.ref.loc32
|
|
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc11: <bound method> = bound_method %.loc11, %plain.ref
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc11: %ptr.ec3 = addr_of %.loc11
|
|
|
|
|
+// CHECK:STDOUT: %HasQualifiers.plain.call: init %empty_tuple.type = call imports.%HasQualifiers.plain.decl(%addr.loc11)
|
|
|
|
|
+// CHECK:STDOUT: %p.ref.loc12: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
+// CHECK:STDOUT: %.loc12: ref %HasQualifiers = deref %p.ref.loc12
|
|
|
// CHECK:STDOUT: %ref_this.ref: %.352 = name_ref ref_this, imports.%.145 [concrete = constants.%empty_struct.f58]
|
|
// CHECK:STDOUT: %ref_this.ref: %.352 = name_ref ref_this, imports.%.145 [concrete = constants.%empty_struct.f58]
|
|
|
-// CHECK:STDOUT: <elided>
|
|
|
|
|
-// CHECK:STDOUT: %HasQualifiers.ref_this.call: init %empty_tuple.type = call imports.%HasQualifiers.ref_this.decl(<error>)
|
|
|
|
|
-// CHECK:STDOUT: %p.ref.loc38: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
-// CHECK:STDOUT: %.loc38_4: ref %HasQualifiers = deref %p.ref.loc38
|
|
|
|
|
-// CHECK:STDOUT: %const_this.ref.loc38: %.602 = name_ref const_this, imports.%.ce8 [concrete = constants.%empty_struct.63b]
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc38: %ptr.ec3 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc38_17.1: %ptr.2cb = as_compatible %addr.loc38 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc38_17.2: %ptr.2cb = converted %addr.loc38, %.loc38_17.1 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %const_this__carbon_thunk.call.loc38: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc38_17.2)
|
|
|
|
|
-// CHECK:STDOUT: %p.ref.loc44: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
-// CHECK:STDOUT: %.loc44_4: ref %HasQualifiers = deref %p.ref.loc44
|
|
|
|
|
-// CHECK:STDOUT: %const_ref_this.ref.loc44: %.bf0 = name_ref const_ref_this, imports.%.667 [concrete = constants.%empty_struct.4f2]
|
|
|
|
|
-// CHECK:STDOUT: %addr.loc44: %ptr.ec3 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc44_21.1: %ptr.2cb = as_compatible %addr.loc44 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %.loc44_21.2: %ptr.2cb = converted %addr.loc44, %.loc44_21.1 [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc44: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc44_21.2)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc12: <bound method> = bound_method %.loc12, %ref_this.ref
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc12: %ptr.ec3 = addr_of %.loc12
|
|
|
|
|
+// CHECK:STDOUT: %HasQualifiers.ref_this.call: init %empty_tuple.type = call imports.%HasQualifiers.ref_this.decl(%addr.loc12)
|
|
|
|
|
+// CHECK:STDOUT: %p.ref.loc13: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_4.1: ref %HasQualifiers = deref %p.ref.loc13
|
|
|
|
|
+// CHECK:STDOUT: %const_this.ref.loc13: %.602 = name_ref const_this, imports.%.ce8 [concrete = constants.%empty_struct.63b]
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc13: <bound method> = bound_method %.loc13_4.1, %const_this.ref.loc13
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_4.2: %HasQualifiers = bind_value %.loc13_4.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_4.3: ref %HasQualifiers = value_as_ref %.loc13_4.2
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc13: %ptr.ec3 = addr_of %.loc13_4.3
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.1: %ptr.2cb = as_compatible %addr.loc13
|
|
|
|
|
+// CHECK:STDOUT: %.loc13_17.2: %ptr.2cb = converted %addr.loc13, %.loc13_17.1
|
|
|
|
|
+// CHECK:STDOUT: %const_this__carbon_thunk.call.loc13: init %empty_tuple.type = call imports.%const_this__carbon_thunk.decl(%.loc13_17.2)
|
|
|
|
|
+// CHECK:STDOUT: %p.ref.loc14: %ptr.ec3 = name_ref p, %p
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_4.1: ref %HasQualifiers = deref %p.ref.loc14
|
|
|
|
|
+// CHECK:STDOUT: %const_ref_this.ref.loc14: %.bf0 = name_ref const_ref_this, imports.%.667 [concrete = constants.%empty_struct.4f2]
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc14: <bound method> = bound_method %.loc14_4.1, %const_ref_this.ref.loc14
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_4.2: %HasQualifiers = bind_value %.loc14_4.1
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_4.3: ref %HasQualifiers = value_as_ref %.loc14_4.2
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc14: %ptr.ec3 = addr_of %.loc14_4.3
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_21.1: %ptr.2cb = as_compatible %addr.loc14
|
|
|
|
|
+// CHECK:STDOUT: %.loc14_21.2: %ptr.2cb = converted %addr.loc14, %.loc14_21.1
|
|
|
|
|
+// CHECK:STDOUT: %const_ref_this__carbon_thunk.call.loc14: init %empty_tuple.type = call imports.%const_ref_this__carbon_thunk.decl(%.loc14_21.2)
|
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_5891_call_explicit_object_param.carbon
|
|
|
|
|
|
|
+// CHECK:STDOUT: --- call_explicit_object_param.carbon
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %ExplicitObjectParam: type = class_type @ExplicitObjectParam [concrete]
|
|
// CHECK:STDOUT: %ExplicitObjectParam: type = class_type @ExplicitObjectParam [concrete]
|
|
@@ -367,19 +324,24 @@ fn Call(e: Cpp.ExplicitObjectParam, n: i32, a: Cpp.Another) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %e.ref: %ExplicitObjectParam = name_ref e, %e
|
|
// CHECK:STDOUT: %e.ref: %ExplicitObjectParam = name_ref e, %e
|
|
|
// CHECK:STDOUT: %F.ref: %.3e2 = name_ref F, imports.%.037 [concrete = constants.%empty_struct.48d]
|
|
// CHECK:STDOUT: %F.ref: %.3e2 = name_ref F, imports.%.037 [concrete = constants.%empty_struct.48d]
|
|
|
-// CHECK:STDOUT: %addr.loc13: %ptr.7f5 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %F__carbon_thunk.call: init %empty_tuple.type = call imports.%F__carbon_thunk.decl(%addr.loc13)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc8: <bound method> = bound_method %e.ref, %F.ref
|
|
|
|
|
+// CHECK:STDOUT: %.loc8: ref %ExplicitObjectParam = value_as_ref %e.ref
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc8: %ptr.7f5 = addr_of %.loc8
|
|
|
|
|
+// CHECK:STDOUT: %F__carbon_thunk.call: init %empty_tuple.type = call imports.%F__carbon_thunk.decl(%addr.loc8)
|
|
|
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
|
|
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitObjectParam.ref.loc23: type = name_ref ExplicitObjectParam, imports.%ExplicitObjectParam.decl [concrete = constants.%ExplicitObjectParam]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
|
|
+// CHECK:STDOUT: %ExplicitObjectParam.ref.loc9: type = name_ref ExplicitObjectParam, imports.%ExplicitObjectParam.decl [concrete = constants.%ExplicitObjectParam]
|
|
|
// CHECK:STDOUT: %G.ref: %.d44 = name_ref G, imports.%.151 [concrete = constants.%empty_struct.a7c]
|
|
// CHECK:STDOUT: %G.ref: %.d44 = name_ref G, imports.%.151 [concrete = constants.%empty_struct.a7c]
|
|
|
-// CHECK:STDOUT: %ExplicitObjectParam.G.call: init %empty_tuple.type = call imports.%ExplicitObjectParam.G.decl(<error>)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc9: <bound method> = bound_method %n.ref, %G.ref
|
|
|
|
|
+// CHECK:STDOUT: %ExplicitObjectParam.G.call: init %empty_tuple.type = call imports.%ExplicitObjectParam.G.decl(%n.ref)
|
|
|
// CHECK:STDOUT: %a.ref: %Another = name_ref a, %a
|
|
// CHECK:STDOUT: %a.ref: %Another = name_ref a, %a
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc33: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
|
|
-// CHECK:STDOUT: %ExplicitObjectParam.ref.loc33: type = name_ref ExplicitObjectParam, imports.%ExplicitObjectParam.decl [concrete = constants.%ExplicitObjectParam]
|
|
|
|
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
|
|
+// CHECK:STDOUT: %ExplicitObjectParam.ref.loc10: type = name_ref ExplicitObjectParam, imports.%ExplicitObjectParam.decl [concrete = constants.%ExplicitObjectParam]
|
|
|
// CHECK:STDOUT: %H.ref: %.9fb = name_ref H, imports.%.34a [concrete = constants.%empty_struct.b14]
|
|
// CHECK:STDOUT: %H.ref: %.9fb = name_ref H, imports.%.34a [concrete = constants.%empty_struct.b14]
|
|
|
-// CHECK:STDOUT: %addr.loc33: %ptr.289 = addr_of <error> [concrete = <error>]
|
|
|
|
|
-// CHECK:STDOUT: %H__carbon_thunk.call: init %empty_tuple.type = call imports.%H__carbon_thunk.decl(%addr.loc33)
|
|
|
|
|
|
|
+// CHECK:STDOUT: %bound_method.loc10: <bound method> = bound_method %a.ref, %H.ref
|
|
|
|
|
+// CHECK:STDOUT: %.loc10: ref %Another = value_as_ref %a.ref
|
|
|
|
|
+// CHECK:STDOUT: %addr.loc10: %ptr.289 = addr_of %.loc10
|
|
|
|
|
+// CHECK:STDOUT: %H__carbon_thunk.call: init %empty_tuple.type = call imports.%H__carbon_thunk.decl(%addr.loc10)
|
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT:
|