mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 22:02:23 +01:00
People seemed receptive [on #toolchain](https://discord.com/channels/655572317891461132/655578254970716160/1379196447827689553), so proceeding. For the two name conflicts, I've set it up so that there's a "foo.carbon" and "foo_with_prelude.carbon", to indicate that the no-prelude approach is preferred (with a shorter name). Note min_prelude will require a little more work/thought, I want to avoid adding `--custom-core` etc.
526 lines
18 KiB
Plaintext
526 lines
18 KiB
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// EXTRA-ARGS: --no-prelude-import
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/function/struct.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/function/struct.carbon
|
|
|
|
// ============================================================================
|
|
// Forward-declared struct as parameter type
|
|
// ============================================================================
|
|
|
|
// --- decl_value_param_type.h
|
|
|
|
struct S;
|
|
|
|
auto foo(S) -> void;
|
|
|
|
// --- fail_todo_import_decl_value_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "decl_value_param_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// TODO: This should fail on the fact `S` is declared and not defined.
|
|
// CHECK:STDERR: fail_todo_import_decl_value_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_decl_value_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo({});
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Defined struct without data members as parameter type
|
|
// ============================================================================
|
|
|
|
// --- definition_no_data_members_value_param_type.h
|
|
|
|
struct S {};
|
|
|
|
auto foo(S) -> void;
|
|
|
|
// --- fail_todo_import_definition_no_data_members_value_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_no_data_members_value_param_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_no_data_members_value_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_no_data_members_value_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo({});
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Defined struct with a single data member as parameter type
|
|
// ============================================================================
|
|
|
|
// --- definition_single_data_member_value_param_type.h
|
|
|
|
struct D {};
|
|
|
|
struct S {
|
|
D d;
|
|
};
|
|
|
|
auto foo(S) -> void;
|
|
|
|
// --- fail_todo_import_definition_single_data_member_value_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_single_data_member_value_param_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_single_data_member_value_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_single_data_member_value_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo({});
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Defined struct with multiple data members as parameter type
|
|
// ============================================================================
|
|
|
|
// --- definition_multiple_data_members_value_param_type.h
|
|
|
|
struct D {};
|
|
|
|
struct S {
|
|
D d1;
|
|
D d2;
|
|
D d3;
|
|
};
|
|
|
|
auto foo(S) -> void;
|
|
|
|
// --- fail_todo_import_definition_multiple_data_members_value_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_multiple_data_members_value_param_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_multiple_data_members_value_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_multiple_data_members_value_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo({});
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo({});
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Pointer to forward-declared struct as parameter type
|
|
// ============================================================================
|
|
|
|
// --- decl_pointer_param_type.h
|
|
|
|
struct S;
|
|
|
|
auto foo(S*) -> void;
|
|
|
|
// --- fail_todo_import_decl_pointer_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "decl_pointer_param_type.h";
|
|
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_param_type.carbon:[[@LINE+7]]:9: error: semantics TODO: `Unsupported: Record declarations without a definition` [SemanticsTodo]
|
|
// CHECK:STDERR: fn F(s: Cpp.S*) {
|
|
// CHECK:STDERR: ^~~~~
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_param_type.carbon:[[@LINE+4]]:9: note: in `Cpp` name lookup for `S` [InCppNameLookup]
|
|
// CHECK:STDERR: fn F(s: Cpp.S*) {
|
|
// CHECK:STDERR: ^~~~~
|
|
// CHECK:STDERR:
|
|
fn F(s: Cpp.S*) {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S *` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo(s);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo(s);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo(s);
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Pointer to defined struct as parameter type
|
|
// ============================================================================
|
|
|
|
// --- definition_pointer_param_type.h
|
|
|
|
struct S {};
|
|
|
|
auto foo(S*) -> void;
|
|
|
|
// --- fail_todo_import_definition_pointer_param_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_pointer_param_type.h";
|
|
|
|
fn F(s: Cpp.S*) {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_pointer_param_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: parameter type: struct S *` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo(s);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_pointer_param_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo(s);
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo(s);
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Forward-declared struct as return type
|
|
// ============================================================================
|
|
|
|
// --- decl_value_return_type.h
|
|
|
|
struct S;
|
|
|
|
auto foo() -> S;
|
|
|
|
// --- fail_todo_import_decl_value_return_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "decl_value_return_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// TODO: This should fail on the fact `S` is declared and not defined.
|
|
// CHECK:STDERR: fail_todo_import_decl_value_return_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: return type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_decl_value_return_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Defined struct as return type
|
|
// ============================================================================
|
|
|
|
// --- definition_value_return_type.h
|
|
|
|
struct S {};
|
|
|
|
auto foo() -> S;
|
|
|
|
// --- fail_todo_import_definition_value_return_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_value_return_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_value_return_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: return type: struct S` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_value_return_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Pointer to forward-declared struct as return type
|
|
// ============================================================================
|
|
|
|
// --- decl_pointer_return_type.h
|
|
|
|
struct S;
|
|
|
|
auto foo() -> S*;
|
|
|
|
// --- fail_todo_import_decl_pointer_return_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "decl_pointer_return_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_return_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: return type: struct S *` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_decl_pointer_return_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// ============================================================================
|
|
// Pointer to defined struct as return type
|
|
// ============================================================================
|
|
|
|
// --- definition_pointer_return_type.h
|
|
|
|
struct S {};
|
|
|
|
auto foo() -> S*;
|
|
|
|
// --- fail_todo_import_definition_pointer_return_type.carbon
|
|
|
|
library "[[@TEST_NAME]]";
|
|
|
|
import Cpp library "definition_pointer_return_type.h";
|
|
|
|
fn F() {
|
|
//@dump-sem-ir-begin
|
|
// CHECK:STDERR: fail_todo_import_definition_pointer_return_type.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: return type: struct S *` [SemanticsTodo]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR: fail_todo_import_definition_pointer_return_type.carbon:[[@LINE+4]]:3: note: in `Cpp` name lookup for `foo` [InCppNameLookup]
|
|
// CHECK:STDERR: Cpp.foo();
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
Cpp.foo();
|
|
//@dump-sem-ir-end
|
|
}
|
|
|
|
// CHECK:STDOUT: --- fail_todo_import_decl_value_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %.loc16: %empty_struct_type = struct_literal ()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_no_data_members_value_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal ()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_single_data_member_value_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal ()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_multiple_data_members_value_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal ()
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_decl_pointer_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .S = <error>
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F(%s.param: <error>) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref.loc22: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %s.ref: <error> = name_ref s, %s [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_pointer_param_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: %S: type = class_type @S [concrete]
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %S [concrete]
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .S = @F.%S.decl
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F(%s.param: %ptr) {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref.loc15: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: %s.ref: %ptr = name_ref s, %s
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_decl_value_return_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_value_return_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_decl_pointer_return_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_todo_import_definition_pointer_return_type.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: constants {
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: imports {
|
|
// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
// CHECK:STDOUT: .foo = <error>
|
|
// CHECK:STDOUT: import Cpp//...
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: fn @F() {
|
|
// CHECK:STDOUT: !entry:
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
// CHECK:STDOUT: <elided>
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|