|
|
@@ -2,8 +2,7 @@
|
|
|
// Exceptions. See /LICENSE for license information.
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
//
|
|
|
-// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
|
|
-// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=if-present
|
|
|
+// EXTRA-ARGS: --no-prelude-import --dump-sem-ir-ranges=only
|
|
|
//
|
|
|
// AUTOUPDATE
|
|
|
// TIP: To test this file alone, run:
|
|
|
@@ -25,6 +24,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "declaration.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
// CHECK:STDERR: fail_todo_import_declaration.carbon:[[@LINE+7]]:13: error: semantics TODO: `Unsupported: Record declarations without a definition` [SemanticsTodo]
|
|
|
// CHECK:STDERR: fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
@@ -33,6 +33,7 @@ import Cpp library "declaration.h";
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
fn MyF(bar: Cpp.Bar*);
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Definition
|
|
|
@@ -48,7 +49,9 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "definition.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn MyF(bar: Cpp.Bar*);
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Declaration and definition
|
|
|
@@ -65,7 +68,9 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "declaration_and_definition.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn MyF(bar: Cpp.Bar*);
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Public static member function
|
|
|
@@ -85,7 +90,9 @@ library "[[@TEST_NAME]]";
|
|
|
import Cpp library "public_static_member_function.h";
|
|
|
|
|
|
fn MyF() {
|
|
|
+ //@dump-sem-ir-begin
|
|
|
Cpp.Bar.foo();
|
|
|
+ //@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -126,6 +133,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "public_member_function.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn MyF(bar : Cpp.Bar*) {
|
|
|
// CHECK:STDERR: fail_todo_import_public_member_function.carbon:[[@LINE+7]]:3: error: semantics TODO: `Unsupported: Non-global function` [SemanticsTodo]
|
|
|
// CHECK:STDERR: bar->foo();
|
|
|
@@ -136,6 +144,7 @@ fn MyF(bar : Cpp.Bar*) {
|
|
|
// CHECK:STDERR:
|
|
|
bar->foo();
|
|
|
}
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Public static data member
|
|
|
@@ -155,6 +164,7 @@ library "[[@TEST_NAME]]";
|
|
|
import Cpp library "public_static_data_member.h";
|
|
|
|
|
|
fn MyF() {
|
|
|
+ //@dump-sem-ir-begin
|
|
|
// CHECK:STDERR: fail_todo_import_public_static_data_member.carbon:[[@LINE+11]]:23: error: semantics TODO: `Unsupported: Declaration type Var` [SemanticsTodo]
|
|
|
// CHECK:STDERR: let bar: Cpp.Bar* = Cpp.Bar.foo();
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~
|
|
|
@@ -167,6 +177,7 @@ fn MyF() {
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
let bar: Cpp.Bar* = Cpp.Bar.foo();
|
|
|
+ //@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -186,6 +197,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "public_static_data_member.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn MyF(bar : Cpp.Bar*) {
|
|
|
// CHECK:STDERR: fail_todo_import_public_data_member.carbon:[[@LINE+11]]:27: error: semantics TODO: `Unsupported: Declaration type Var` [SemanticsTodo]
|
|
|
// CHECK:STDERR: let foo_bar: Cpp.Bar* = bar->foo;
|
|
|
@@ -200,6 +212,7 @@ fn MyF(bar : Cpp.Bar*) {
|
|
|
// CHECK:STDERR:
|
|
|
let foo_bar: Cpp.Bar* = bar->foo;
|
|
|
}
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Inheritance static
|
|
|
@@ -224,9 +237,11 @@ library "[[@TEST_NAME]]";
|
|
|
import Cpp library "inheritance_static.h";
|
|
|
|
|
|
fn MyF() {
|
|
|
+ //@dump-sem-ir-begin
|
|
|
Cpp.Bar1.foo1();
|
|
|
Cpp.Bar2.foo1();
|
|
|
Cpp.Bar2.foo2();
|
|
|
+ //@dump-sem-ir-end
|
|
|
}
|
|
|
|
|
|
// ============================================================================
|
|
|
@@ -244,6 +259,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "inheritance_pointers.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
fn MyF1(bar : Cpp.Bar1*);
|
|
|
// TODO: Support C++ inheritance.
|
|
|
// CHECK:STDERR: fail_todo_import_inheritance_pointers.carbon:[[@LINE+7]]:33: error: `Core.ImplicitAs` implicitly referenced here, but package `Core` not found [CoreNotFound]
|
|
|
@@ -254,6 +270,7 @@ fn MyF1(bar : Cpp.Bar1*);
|
|
|
// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
fn MyF2(bar : Cpp.Bar2*) { MyF1(bar); }
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// Dynamic
|
|
|
@@ -272,6 +289,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "dynamic.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
// CHECK:STDERR: fail_todo_import_dynamic.carbon:[[@LINE+7]]:14: error: semantics TODO: `Unsupported: Dynamic Class` [SemanticsTodo]
|
|
|
// CHECK:STDERR: fn MyF(bar : Cpp.Bar*);
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
@@ -280,6 +298,7 @@ import Cpp library "dynamic.h";
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
fn MyF(bar : Cpp.Bar*);
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// To inherit public
|
|
|
@@ -298,6 +317,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "to_inherit_public.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
class Derived {
|
|
|
extend base: Cpp.Bar;
|
|
|
}
|
|
|
@@ -305,6 +325,7 @@ class Derived {
|
|
|
fn MyF() {
|
|
|
Derived.foo();
|
|
|
}
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// ============================================================================
|
|
|
// To inherit private
|
|
|
@@ -346,6 +367,7 @@ library "[[@TEST_NAME]]";
|
|
|
|
|
|
import Cpp library "template.h";
|
|
|
|
|
|
+//@dump-sem-ir-begin
|
|
|
// CHECK:STDERR: fail_todo_import_template.carbon:[[@LINE+11]]:13: error: semantics TODO: `Unsupported: Declaration type ClassTemplate` [SemanticsTodo]
|
|
|
// CHECK:STDERR: fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
@@ -358,6 +380,7 @@ import Cpp library "template.h";
|
|
|
// CHECK:STDERR: ^~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
fn MyF(bar: Cpp.Bar*);
|
|
|
+//@dump-sem-ir-end
|
|
|
|
|
|
// CHECK:STDOUT: --- fail_todo_import_declaration.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -374,19 +397,12 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "declaration.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: <error> = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: <error> = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: <error> = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc13: type = splice_block %ptr [concrete = <error>] {
|
|
|
+// CHECK:STDOUT: %.loc14: type = splice_block %ptr [concrete = <error>] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
// CHECK:STDOUT: %Bar.ref: <error> = name_ref Bar, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type <error> [concrete = <error>]
|
|
|
@@ -401,8 +417,6 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
|
|
|
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
@@ -418,22 +432,14 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "definition.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc6: type = splice_block %ptr [concrete = constants.%ptr] {
|
|
|
+// CHECK:STDOUT: %.loc7: type = splice_block %ptr [concrete = constants.%ptr] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref [concrete = constants.%ptr]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -441,22 +447,12 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF(%bar.param: %ptr);
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- import_declaration_and_definition.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr [concrete]
|
|
|
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
@@ -472,22 +468,14 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "declaration_and_definition.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc6: type = splice_block %ptr [concrete = constants.%ptr] {
|
|
|
+// CHECK:STDOUT: %.loc7: type = splice_block %ptr [concrete = constants.%ptr] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref [concrete = constants.%ptr]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -495,80 +483,13 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF(%bar.param: %ptr);
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- import_public_static_member_function.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %MyF: %MyF.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
-// CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
|
|
|
-// CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bar = %Bar.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Bar.decl: type = class_decl @Bar [concrete = constants.%Bar] {} {}
|
|
|
-// CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "public_static_member_function.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = imports.%foo.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @MyF() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo]
|
|
|
-// CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref()
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo();
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_fail_import_private_static_member_function.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %MyF: %MyF.type = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
|
|
|
// CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -582,45 +503,20 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "private_static_member_function.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = imports.%foo.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
// CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo]
|
|
|
// CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref()
|
|
|
-// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo();
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_todo_import_public_member_function.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr.f68: type = ptr_type %Bar [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.f68 [concrete]
|
|
|
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
@@ -636,22 +532,14 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "public_member_function.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr.f68 = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc6: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
+// CHECK:STDOUT: %.loc7: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref [concrete = constants.%ptr.f68]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -659,19 +547,10 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = <error>
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF(%bar.param: %ptr.f68) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %bar.ref: %ptr.f68 = name_ref bar, %bar
|
|
|
-// CHECK:STDOUT: %.loc14: ref %Bar = deref %bar.ref
|
|
|
+// CHECK:STDOUT: %.loc15: ref %Bar = deref %bar.ref
|
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -679,11 +558,7 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: --- fail_todo_import_public_static_data_member.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
-// CHECK:STDOUT: %MyF: %MyF.type = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr.f68: type = ptr_type %Bar [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.f68 [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -696,51 +571,28 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: %Bar.decl: type = class_decl @Bar [concrete = constants.%Bar] {} {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "public_static_data_member.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = <poisoned>
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc18_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %Bar.ref.loc18_26: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc19_23: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %Bar.ref.loc19_26: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: %.loc18: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc18_12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %Bar.ref.loc18_15: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc18_15 [concrete = constants.%ptr.f68]
|
|
|
+// CHECK:STDOUT: %.loc19: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc19_12: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %Bar.ref.loc19_15: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
+// CHECK:STDOUT: %ptr: type = ptr_type %Bar.ref.loc19_15 [concrete = constants.%ptr.f68]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %bar: %ptr.f68 = bind_name bar, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_todo_import_public_data_member.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr.f68: type = ptr_type %Bar [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type: type = pattern_type %ptr.f68 [concrete]
|
|
|
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
@@ -756,50 +608,33 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "public_static_data_member.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr.f68 = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc6: type = splice_block %ptr.loc6 [concrete = constants.%ptr.f68] {
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc6: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %Bar.ref.loc6: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %ptr.loc6: type = ptr_type %Bar.ref.loc6 [concrete = constants.%ptr.f68]
|
|
|
+// CHECK:STDOUT: %.loc7: type = splice_block %ptr.loc7 [concrete = constants.%ptr.f68] {
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc7: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %Bar.ref.loc7: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
+// CHECK:STDOUT: %ptr.loc7: type = ptr_type %Bar.ref.loc7 [concrete = constants.%ptr.f68]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %bar: %ptr.f68 = bind_name bar, %bar.param
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = <poisoned>
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF(%bar.param: %ptr.f68) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: name_binding_decl {
|
|
|
// CHECK:STDOUT: %foo_bar.patt: %pattern_type = binding_pattern foo_bar [concrete]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %bar.ref: %ptr.f68 = name_ref bar, %bar
|
|
|
-// CHECK:STDOUT: %.loc18_30: ref %Bar = deref %bar.ref
|
|
|
+// CHECK:STDOUT: %.loc19_30: ref %Bar = deref %bar.ref
|
|
|
// CHECK:STDOUT: %foo.ref: <error> = name_ref foo, <error> [concrete = <error>]
|
|
|
-// CHECK:STDOUT: %.loc18_23: type = splice_block %ptr.loc18 [concrete = constants.%ptr.f68] {
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc18: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %Bar.ref.loc18: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %ptr.loc18: type = ptr_type %Bar.ref.loc18 [concrete = constants.%ptr.f68]
|
|
|
+// CHECK:STDOUT: %.loc19_23: type = splice_block %ptr.loc19 [concrete = constants.%ptr.f68] {
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc19: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %Bar.ref.loc19: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
+// CHECK:STDOUT: %ptr.loc19: type = ptr_type %Bar.ref.loc19 [concrete = constants.%ptr.f68]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %foo_bar: %ptr.f68 = bind_name foo_bar, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: return
|
|
|
@@ -808,12 +643,8 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: --- import_inheritance_static.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %MyF: %MyF.type = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %Bar1: type = class_type @Bar1 [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %foo1.type.148: type = fn_type @foo1.1 [concrete]
|
|
|
// CHECK:STDOUT: %foo1.8cd: %foo1.type.148 = struct_value () [concrete]
|
|
|
// CHECK:STDOUT: %Bar2: type = class_type @Bar2 [concrete]
|
|
|
@@ -836,69 +667,29 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: %foo2.decl: %foo2.type = fn_decl @foo2 [concrete = constants.%foo2] {} {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "inheritance_static.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar1 {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type.1
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar1
|
|
|
-// CHECK:STDOUT: .foo1 = imports.%foo1.decl.c80
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar2 {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF.%complete_type.2
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar2
|
|
|
-// CHECK:STDOUT: .foo1 = imports.%foo1.decl.191
|
|
|
-// CHECK:STDOUT: .foo2 = imports.%foo2.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %Cpp.ref.loc7: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type.1: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %empty_struct_type.1 [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %Bar1.ref: type = name_ref Bar1, imports.%Bar1.decl [concrete = constants.%Bar1]
|
|
|
-// CHECK:STDOUT: %foo1.ref.loc7: %foo1.type.148 = name_ref foo1, imports.%foo1.decl.c80 [concrete = constants.%foo1.8cd]
|
|
|
-// CHECK:STDOUT: %foo1.call.loc7: init %empty_tuple.type = call %foo1.ref.loc7()
|
|
|
// CHECK:STDOUT: %Cpp.ref.loc8: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type.2: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type.2: <witness> = complete_type_witness %empty_struct_type.2 [concrete = constants.%complete_type]
|
|
|
-// CHECK:STDOUT: %Bar2.ref.loc8: type = name_ref Bar2, imports.%Bar2.decl [concrete = constants.%Bar2]
|
|
|
-// CHECK:STDOUT: %foo1.ref.loc8: %foo1.type.0b8 = name_ref foo1, imports.%foo1.decl.191 [concrete = constants.%foo1.ba2]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
+// CHECK:STDOUT: %Bar1.ref: type = name_ref Bar1, imports.%Bar1.decl [concrete = constants.%Bar1]
|
|
|
+// CHECK:STDOUT: %foo1.ref.loc8: %foo1.type.148 = name_ref foo1, imports.%foo1.decl.c80 [concrete = constants.%foo1.8cd]
|
|
|
// CHECK:STDOUT: %foo1.call.loc8: init %empty_tuple.type = call %foo1.ref.loc8()
|
|
|
// CHECK:STDOUT: %Cpp.ref.loc9: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar2.ref.loc9: type = name_ref Bar2, imports.%Bar2.decl [concrete = constants.%Bar2]
|
|
|
+// CHECK:STDOUT: %foo1.ref.loc9: %foo1.type.0b8 = name_ref foo1, imports.%foo1.decl.191 [concrete = constants.%foo1.ba2]
|
|
|
+// CHECK:STDOUT: %foo1.call.loc9: init %empty_tuple.type = call %foo1.ref.loc9()
|
|
|
+// CHECK:STDOUT: %Cpp.ref.loc10: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
+// CHECK:STDOUT: %Bar2.ref.loc10: type = name_ref Bar2, imports.%Bar2.decl [concrete = constants.%Bar2]
|
|
|
// CHECK:STDOUT: %foo2.ref: %foo2.type = name_ref foo2, imports.%foo2.decl [concrete = constants.%foo2]
|
|
|
// CHECK:STDOUT: %foo2.call: init %empty_tuple.type = call %foo2.ref()
|
|
|
-// CHECK:STDOUT: return
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo1.1();
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo1.2();
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo2();
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_todo_import_inheritance_pointers.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Bar1: type = class_type @Bar1 [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %ptr.f68: type = ptr_type %Bar1 [concrete]
|
|
|
// CHECK:STDOUT: %pattern_type.3cc: type = pattern_type %ptr.f68 [concrete]
|
|
|
// CHECK:STDOUT: %MyF1.type: type = fn_type @MyF1 [concrete]
|
|
|
@@ -922,23 +713,14 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF1 = %MyF1.decl
|
|
|
-// CHECK:STDOUT: .MyF2 = %MyF2.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "inheritance_pointers.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF1.decl: %MyF1.type = fn_decl @MyF1 [concrete = constants.%MyF1] {
|
|
|
// CHECK:STDOUT: %bar.patt: %pattern_type.3cc = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type.3cc = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr.f68 = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc6: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
+// CHECK:STDOUT: %.loc7: type = splice_block %ptr [concrete = constants.%ptr.f68] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar1.ref: type = name_ref Bar1, imports.%Bar1.decl [concrete = constants.%Bar1]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar1.ref [concrete = constants.%ptr.f68]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -949,10 +731,9 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: %bar.param_patt: %pattern_type.92a = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: %ptr.eca = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc15_23: type = splice_block %ptr [concrete = constants.%ptr.eca] {
|
|
|
+// CHECK:STDOUT: %.loc16_23: type = splice_block %ptr [concrete = constants.%ptr.eca] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar2.ref: type = name_ref Bar2, imports.%Bar2.decl [concrete = constants.%Bar2]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type %Bar2.ref [concrete = constants.%ptr.eca]
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -960,29 +741,13 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar1 {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF1.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar1
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar2 {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @MyF2.%complete_type
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar2
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF1(%bar.param: %ptr.f68);
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF2(%bar.param: %ptr.eca) {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %MyF1.ref: %MyF1.type = name_ref MyF1, file.%MyF1.decl [concrete = constants.%MyF1]
|
|
|
// CHECK:STDOUT: %bar.ref: %ptr.eca = name_ref bar, %bar
|
|
|
-// CHECK:STDOUT: %.loc15_33: %ptr.f68 = converted %bar.ref, <error> [concrete = <error>]
|
|
|
+// CHECK:STDOUT: %.loc16_33: %ptr.f68 = converted %bar.ref, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: %MyF1.call: init %empty_tuple.type = call %MyF1.ref(<error>)
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
@@ -1002,19 +767,12 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "dynamic.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: <error> = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: <error> = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: <error> = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc13: type = splice_block %ptr [concrete = <error>] {
|
|
|
+// CHECK:STDOUT: %.loc14: type = splice_block %ptr [concrete = <error>] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
// CHECK:STDOUT: %Bar.ref: <error> = name_ref Bar, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type <error> [concrete = <error>]
|
|
|
@@ -1030,84 +788,6 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
|
|
|
// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
-// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
-// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Bar [concrete]
|
|
|
-// CHECK:STDOUT: %struct_type.base.36d: type = struct_type {.base: %Bar} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type.fff: <witness> = complete_type_witness %struct_type.base.36d [concrete]
|
|
|
-// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
|
|
|
-// CHECK:STDOUT: %MyF: %MyF.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: %foo.type: type = fn_type @foo [concrete]
|
|
|
-// CHECK:STDOUT: %foo: %foo.type = struct_value () [concrete]
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: imports {
|
|
|
-// CHECK:STDOUT: %Cpp: <namespace> = namespace file.%Cpp.import_cpp, [concrete] {
|
|
|
-// CHECK:STDOUT: .Bar = %Bar.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Bar.decl: type = class_decl @Bar [concrete = constants.%Bar] {} {}
|
|
|
-// CHECK:STDOUT: %foo.decl: %foo.type = fn_decl @foo [concrete = constants.%foo] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .Derived = %Derived.decl
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "to_inherit_public.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [concrete = constants.%Derived] {} {}
|
|
|
-// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Derived {
|
|
|
-// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
|
|
|
-// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %.loc7: %Derived.elem = base_decl %Bar.ref, element0 [concrete]
|
|
|
-// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Bar} [concrete = constants.%struct_type.base.36d]
|
|
|
-// CHECK:STDOUT: %complete_type.loc8: <witness> = complete_type_witness %struct_type.base [concrete = constants.%complete_type.fff]
|
|
|
-// CHECK:STDOUT: complete_type_witness = %complete_type.loc8
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Derived
|
|
|
-// CHECK:STDOUT: .Cpp = <poisoned>
|
|
|
-// CHECK:STDOUT: .base = %.loc7
|
|
|
-// CHECK:STDOUT: .foo = <poisoned>
|
|
|
-// CHECK:STDOUT: extend %Bar.ref
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @Derived.%complete_type.1
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = imports.%foo.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @MyF() {
|
|
|
-// CHECK:STDOUT: !entry:
|
|
|
-// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
|
|
|
-// CHECK:STDOUT: %foo.ref: %foo.type = name_ref foo, imports.%foo.decl [concrete = constants.%foo]
|
|
|
-// CHECK:STDOUT: %foo.call: init %empty_tuple.type = call %foo.ref()
|
|
|
-// CHECK:STDOUT: return
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo();
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_fail_to_inherit_private.carbon
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: constants {
|
|
|
-// CHECK:STDOUT: %Derived: type = class_type @Derived [concrete]
|
|
|
-// CHECK:STDOUT: %Bar: type = class_type @Bar [concrete]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
|
|
-// CHECK:STDOUT: %complete_type.357: <witness> = complete_type_witness %empty_struct_type [concrete]
|
|
|
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
|
|
// CHECK:STDOUT: %Derived.elem: type = unbound_element_type %Derived, %Bar [concrete]
|
|
|
// CHECK:STDOUT: %struct_type.base.36d: type = struct_type {.base: %Bar} [concrete]
|
|
|
@@ -1128,45 +808,27 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .Derived = %Derived.decl
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "to_inherit_private.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Derived.decl: type = class_decl @Derived [concrete = constants.%Derived] {} {}
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @Derived {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
-// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete = constants.%empty_struct_type]
|
|
|
-// CHECK:STDOUT: %complete_type.1: <witness> = complete_type_witness %empty_struct_type [concrete = constants.%complete_type.357]
|
|
|
+// CHECK:STDOUT: <elided>
|
|
|
// CHECK:STDOUT: %Bar.ref: type = name_ref Bar, imports.%Bar.decl [concrete = constants.%Bar]
|
|
|
-// CHECK:STDOUT: %.loc7: %Derived.elem = base_decl %Bar.ref, element0 [concrete]
|
|
|
+// CHECK:STDOUT: %.loc8: %Derived.elem = base_decl %Bar.ref, element0 [concrete]
|
|
|
// CHECK:STDOUT: %struct_type.base: type = struct_type {.base: %Bar} [concrete = constants.%struct_type.base.36d]
|
|
|
-// CHECK:STDOUT: %complete_type.loc8: <witness> = complete_type_witness %struct_type.base [concrete = constants.%complete_type.fff]
|
|
|
-// CHECK:STDOUT: complete_type_witness = %complete_type.loc8
|
|
|
+// CHECK:STDOUT: %complete_type.loc9: <witness> = complete_type_witness %struct_type.base [concrete = constants.%complete_type.fff]
|
|
|
+// CHECK:STDOUT: complete_type_witness = %complete_type.loc9
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: !members:
|
|
|
// CHECK:STDOUT: .Self = constants.%Derived
|
|
|
// CHECK:STDOUT: .Cpp = <poisoned>
|
|
|
-// CHECK:STDOUT: .base = %.loc7
|
|
|
+// CHECK:STDOUT: .base = %.loc8
|
|
|
// CHECK:STDOUT: .foo = <poisoned>
|
|
|
// CHECK:STDOUT: extend %Bar.ref
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @Bar {
|
|
|
-// CHECK:STDOUT: complete_type_witness = @Derived.%complete_type.1
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: !members:
|
|
|
-// CHECK:STDOUT: .Self = constants.%Bar
|
|
|
-// CHECK:STDOUT: .foo = imports.%foo.decl
|
|
|
-// CHECK:STDOUT: import Cpp//...
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: fn @MyF() {
|
|
|
// CHECK:STDOUT: !entry:
|
|
|
// CHECK:STDOUT: %Derived.ref: type = name_ref Derived, file.%Derived.decl [concrete = constants.%Derived]
|
|
|
@@ -1175,8 +837,6 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: return
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: fn @foo();
|
|
|
-// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: --- fail_todo_import_template.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
@@ -1192,19 +852,12 @@ fn MyF(bar: Cpp.Bar*);
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
-// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
|
|
-// CHECK:STDOUT: .Cpp = imports.%Cpp
|
|
|
-// CHECK:STDOUT: .MyF = %MyF.decl
|
|
|
-// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
|
|
|
-// CHECK:STDOUT: import Cpp "template.h"
|
|
|
-// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {
|
|
|
// CHECK:STDOUT: %bar.patt: <error> = binding_pattern bar [concrete]
|
|
|
// CHECK:STDOUT: %bar.param_patt: <error> = value_param_pattern %bar.patt, call_param0 [concrete]
|
|
|
// CHECK:STDOUT: } {
|
|
|
// CHECK:STDOUT: %bar.param: <error> = value_param call_param0
|
|
|
-// CHECK:STDOUT: %.loc17: type = splice_block %ptr [concrete = <error>] {
|
|
|
+// CHECK:STDOUT: %.loc18: type = splice_block %ptr [concrete = <error>] {
|
|
|
// CHECK:STDOUT: %Cpp.ref: <namespace> = name_ref Cpp, imports.%Cpp [concrete = imports.%Cpp]
|
|
|
// CHECK:STDOUT: %Bar.ref: <error> = name_ref Bar, <error> [concrete = <error>]
|
|
|
// CHECK:STDOUT: %ptr: type = ptr_type <error> [concrete = <error>]
|