|
|
@@ -41,12 +41,12 @@ class C {}
|
|
|
library "fail_decl_fn_in_extern" api;
|
|
|
|
|
|
extern class C;
|
|
|
-// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE+7]]:4: ERROR: Cannot declare a member of incomplete class `C`.
|
|
|
+// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE+7]]:6: ERROR: Name qualifiers are only allowed for entities that provide a scope.
|
|
|
+// CHECK:STDERR: fn C.F();
|
|
|
+// CHECK:STDERR: ^
|
|
|
+// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE+4]]:4: Non-scope entity referenced here.
|
|
|
// CHECK:STDERR: fn C.F();
|
|
|
// CHECK:STDERR: ^
|
|
|
-// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE-4]]:1: Class was forward declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
// CHECK:STDERR:
|
|
|
fn C.F();
|
|
|
|
|
|
@@ -100,11 +100,18 @@ class C {
|
|
|
extern class D;
|
|
|
}
|
|
|
|
|
|
-// --- todo_fail_def_after_extern_decl.carbon
|
|
|
+// --- fail_def_after_extern_decl.carbon
|
|
|
|
|
|
library "fail_def_after_extern_decl" api;
|
|
|
|
|
|
extern class C;
|
|
|
+// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE+7]]:1: ERROR: Redeclarations of `class C` in the same library must match use of `extern`.
|
|
|
+// CHECK:STDERR: class C {}
|
|
|
+// CHECK:STDERR: ^~~~~~~~~
|
|
|
+// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE-4]]:1: Previously declared here.
|
|
|
+// CHECK:STDERR: extern class C;
|
|
|
+// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
+// CHECK:STDERR:
|
|
|
class C {}
|
|
|
|
|
|
// --- fail_extern_decl_after_decl.carbon
|
|
|
@@ -121,64 +128,25 @@ class C;
|
|
|
// CHECK:STDERR:
|
|
|
extern class C;
|
|
|
|
|
|
-// --- fail_todo_import_extern_decl_then_decl.carbon
|
|
|
+// --- import_extern_decl_then_decl.carbon
|
|
|
|
|
|
library "import_extern_decl_then_decl" api;
|
|
|
|
|
|
import library "extern_decl";
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_then_decl.carbon:[[@LINE+13]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: decl.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
-// CHECK:STDERR: class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_then_decl.carbon:[[@LINE-7]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
import library "decl";
|
|
|
|
|
|
-// --- fail_todo_import_decl_then_extern_decl.carbon
|
|
|
+// --- import_decl_then_extern_decl.carbon
|
|
|
|
|
|
library "import_decl_then_extern_decl" api;
|
|
|
|
|
|
import library "decl";
|
|
|
-// CHECK:STDERR: fail_todo_import_decl_then_extern_decl.carbon:[[@LINE+13]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_import_decl_then_extern_decl.carbon:[[@LINE-7]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
import library "extern_decl";
|
|
|
|
|
|
-// --- fail_todo_import_extern_decl_then_def.carbon
|
|
|
+// --- import_extern_decl_then_def.carbon
|
|
|
|
|
|
library "import_extern_decl_then_def" api;
|
|
|
|
|
|
import library "extern_decl";
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_then_def.carbon:[[@LINE+13]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "def";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: def.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
-// CHECK:STDERR: class C {}
|
|
|
-// CHECK:STDERR: ^~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_then_def.carbon:[[@LINE-7]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
import library "def";
|
|
|
|
|
|
// --- fail_import_ownership_conflict.carbon
|
|
|
@@ -186,124 +154,58 @@ import library "def";
|
|
|
library "fail_import_ownership_conflict" api;
|
|
|
|
|
|
import library "extern_decl";
|
|
|
-// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+13]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: decl.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
-// CHECK:STDERR: class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~
|
|
|
-// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE-7]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
import library "decl";
|
|
|
-// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+13]]:1: In import.
|
|
|
+// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+12]]:1: In import.
|
|
|
// CHECK:STDERR: import library "def";
|
|
|
// CHECK:STDERR: ^~~~~~
|
|
|
// CHECK:STDERR: def.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
// CHECK:STDERR: class C {}
|
|
|
// CHECK:STDERR: ^~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE-21]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
+// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE-7]]:1: In import.
|
|
|
+// CHECK:STDERR: import library "decl";
|
|
|
// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
+// CHECK:STDERR: decl.carbon:4:1: Previously declared here.
|
|
|
+// CHECK:STDERR: class C;
|
|
|
+// CHECK:STDERR: ^~~~~~~~
|
|
|
import library "def";
|
|
|
|
|
|
-// --- fail_todo_import_extern_decl_copy.carbon
|
|
|
+// --- import_extern_decl_copy.carbon
|
|
|
|
|
|
library "import_extern_decl_copy" api;
|
|
|
|
|
|
import library "extern_decl";
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+13]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl_copy";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl_copy.carbon:4:1: ERROR: Only one library can declare `class C` without `extern`.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE-7]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
import library "extern_decl_copy";
|
|
|
|
|
|
-// --- fail_todo_extern_decl_after_import_extern_decl.carbon
|
|
|
+// --- extern_decl_after_import_extern_decl.carbon
|
|
|
|
|
|
library "extern_decl_after_import_extern_decl" api;
|
|
|
|
|
|
import library "extern_decl";
|
|
|
|
|
|
-// CHECK:STDERR: fail_todo_extern_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_extern_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "extern_decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
extern class C;
|
|
|
|
|
|
-// --- fail_todo_decl_after_import_extern_decl.carbon
|
|
|
+// --- decl_after_import_extern_decl.carbon
|
|
|
|
|
|
library "decl_after_import_extern_decl" api;
|
|
|
|
|
|
import library "decl";
|
|
|
|
|
|
-// CHECK:STDERR: fail_todo_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "decl";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: decl.carbon:4:1: Name is previously declared here.
|
|
|
-// CHECK:STDERR: class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
extern class C;
|
|
|
|
|
|
-// --- fail_todo_def_after_import_extern_decl.carbon
|
|
|
+// --- def_after_import_extern_decl.carbon
|
|
|
|
|
|
library "def_after_import_extern_decl" api;
|
|
|
|
|
|
import library "def";
|
|
|
|
|
|
-// CHECK:STDERR: fail_todo_def_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_def_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "def";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: def.carbon:4:1: Name is previously declared here.
|
|
|
-// CHECK:STDERR: class C {}
|
|
|
-// CHECK:STDERR: ^~~~~~~~~
|
|
|
-// CHECK:STDERR:
|
|
|
extern class C;
|
|
|
|
|
|
-// --- fail_todo_extern_decl_after_import_def.carbon
|
|
|
+// --- extern_decl_after_import_def.carbon
|
|
|
|
|
|
library "extern_decl_after_import_def" api;
|
|
|
|
|
|
import library "def";
|
|
|
|
|
|
-// CHECK:STDERR: fail_todo_extern_decl_after_import_def.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope.
|
|
|
-// CHECK:STDERR: extern class C;
|
|
|
-// CHECK:STDERR: ^~~~~~~~~~~~~~~
|
|
|
-// CHECK:STDERR: fail_todo_extern_decl_after_import_def.carbon:[[@LINE-5]]:1: In import.
|
|
|
-// CHECK:STDERR: import library "def";
|
|
|
-// CHECK:STDERR: ^~~~~~
|
|
|
-// CHECK:STDERR: def.carbon:4:1: Name is previously declared here.
|
|
|
-// CHECK:STDERR: class C {}
|
|
|
-// CHECK:STDERR: ^~~~~~~~~
|
|
|
extern class C;
|
|
|
|
|
|
// CHECK:STDOUT: --- decl.carbon
|
|
|
@@ -327,15 +229,17 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl
|
|
|
+// CHECK:STDOUT: .C = %.loc4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
@@ -344,15 +248,17 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl
|
|
|
+// CHECK:STDOUT: .C = %.loc4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
@@ -382,15 +288,17 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl
|
|
|
+// CHECK:STDOUT: .C = %.loc4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %.loc12: <function> = fn_decl @.1 [template] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -423,16 +331,19 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl.loc4
|
|
|
+// CHECK:STDOUT: .C = %.loc4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl.loc4 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %C.decl.loc12: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc12: type = extern_decl %C.decl.loc12 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
@@ -441,15 +352,17 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl.loc4
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc12
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl.loc4 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %C.decl.loc12: type = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -482,21 +395,23 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @D;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- todo_fail_def_after_extern_decl.carbon
|
|
|
+// CHECK:STDOUT: --- fail_def_after_extern_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
-// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
+// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
-// CHECK:STDOUT: .C = %C.decl.loc4
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc12
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C [template = constants.%C] {}
|
|
|
-// CHECK:STDOUT: %C.decl.loc5: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc4: type = extern_decl %C.decl.loc4 [template = constants.%.1]
|
|
|
+// CHECK:STDOUT: %C.decl.loc12: type = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C {
|
|
|
@@ -508,6 +423,7 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
@@ -518,23 +434,25 @@ extern class C;
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %C.decl.loc4: type = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: %C.decl.loc12: type = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %.loc12: type = extern_decl %C.decl.loc12 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_import_extern_decl_then_decl.carbon
|
|
|
+// CHECK:STDOUT: --- import_extern_decl_then_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
|
|
|
// CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref.1
|
|
|
+// CHECK:STDOUT: .C = %import_ref.2
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
|
|
|
+// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
|
|
|
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
|
|
|
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
|
|
|
@@ -545,10 +463,11 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C.2;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_import_decl_then_extern_decl.carbon
|
|
|
+// CHECK:STDOUT: --- import_decl_then_extern_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
@@ -558,7 +477,7 @@ extern class C;
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
|
|
|
-// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
|
|
|
+// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+3, loaded [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
|
|
|
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
@@ -568,20 +487,21 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C.2;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_import_extern_decl_then_def.carbon
|
|
|
+// CHECK:STDOUT: --- import_extern_decl_then_def.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
|
|
|
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
// CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
|
|
|
+// CHECK:STDOUT: %.2: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref.1
|
|
|
+// CHECK:STDOUT: .C = %import_ref.2
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
|
|
|
+// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.2]
|
|
|
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
|
|
|
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
|
|
|
// CHECK:STDOUT: %import_ref.3 = import_ref ir3, inst+3, unloaded
|
|
|
@@ -604,16 +524,17 @@ extern class C;
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
|
|
|
// CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: %C.3: type = class_type @C.3 [template]
|
|
|
-// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
+// CHECK:STDOUT: %.2: type = struct_type {} [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref.1
|
|
|
+// CHECK:STDOUT: .C = %import_ref.2
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
|
|
|
+// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
|
|
|
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
|
|
|
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
|
|
|
@@ -623,23 +544,25 @@ extern class C;
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @C.1;
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @C.2 {
|
|
|
+// CHECK:STDOUT: class @C.1 {
|
|
|
// CHECK:STDOUT: !members:
|
|
|
// CHECK:STDOUT: .Self = file.%import_ref.4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
+// CHECK:STDOUT: class @C.2;
|
|
|
+// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C.3 {
|
|
|
// CHECK:STDOUT: !members:
|
|
|
// CHECK:STDOUT: .Self = file.%import_ref.4
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_import_extern_decl_copy.carbon
|
|
|
+// CHECK:STDOUT: --- import_extern_decl_copy.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C.1: type = class_type @C.1 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: %C.2: type = class_type @C.2 [template]
|
|
|
+// CHECK:STDOUT: %.2: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
@@ -647,8 +570,8 @@ extern class C;
|
|
|
// CHECK:STDOUT: .C = %import_ref.1
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C.2]
|
|
|
-// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+2, loaded [template = constants.%C.1]
|
|
|
+// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+3, loaded [template = constants.%.2]
|
|
|
+// CHECK:STDOUT: %import_ref.2: type = import_ref ir3, inst+3, loaded [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C.1 [template = constants.%C.1] {}
|
|
|
// CHECK:STDOUT: %C.decl.2: invalid = class_decl @C.2 [template = constants.%C.2] {}
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
@@ -658,71 +581,70 @@ extern class C;
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C.2;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_extern_decl_after_import_extern_decl.carbon
|
|
|
+// CHECK:STDOUT: --- extern_decl_after_import_extern_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
-// CHECK:STDOUT: %.1: type = class_type @.1 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc6
|
|
|
// CHECK:STDOUT: }
|
|
|
-// CHECK:STDOUT: %import_ref: type = import_ref ir2, inst+2, loaded [template = constants.%C]
|
|
|
+// CHECK:STDOUT: %import_ref: type = import_ref ir2, inst+3, loaded [template = constants.%.1]
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
-// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {
|
|
|
-// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
|
|
|
+// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @.1;
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_decl_after_import_extern_decl.carbon
|
|
|
+// CHECK:STDOUT: --- decl_after_import_extern_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
-// CHECK:STDOUT: %.1: type = class_type @.1 [template]
|
|
|
+// CHECK:STDOUT: %.1: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc6
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %import_ref: type = import_ref ir2, inst+2, loaded [template = constants.%C]
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
-// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.1] {
|
|
|
-// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
|
|
|
+// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.1]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C;
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @.1;
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_def_after_import_extern_decl.carbon
|
|
|
+// CHECK:STDOUT: --- def_after_import_extern_decl.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
-// CHECK:STDOUT: %.2: type = class_type @.1 [template]
|
|
|
+// CHECK:STDOUT: %.2: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref.1
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc6
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C]
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded
|
|
|
-// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.2] {
|
|
|
-// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
|
|
|
+// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.2]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C {
|
|
|
@@ -730,27 +652,26 @@ extern class C;
|
|
|
// CHECK:STDOUT: .Self = file.%import_ref.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @.1;
|
|
|
-// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: --- fail_todo_extern_decl_after_import_def.carbon
|
|
|
+// CHECK:STDOUT: --- extern_decl_after_import_def.carbon
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: constants {
|
|
|
// CHECK:STDOUT: %C: type = class_type @C [template]
|
|
|
// CHECK:STDOUT: %.1: type = struct_type {} [template]
|
|
|
-// CHECK:STDOUT: %.2: type = class_type @.1 [template]
|
|
|
+// CHECK:STDOUT: %.2: type = extern_type C [template]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: file {
|
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
|
-// CHECK:STDOUT: .C = %import_ref.1
|
|
|
// CHECK:STDOUT: .Core = %Core
|
|
|
+// CHECK:STDOUT: .C = %C.decl.loc6
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT: %import_ref.1: type = import_ref ir2, inst+2, loaded [template = constants.%C]
|
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
|
// CHECK:STDOUT: %import_ref.2 = import_ref ir2, inst+3, unloaded
|
|
|
-// CHECK:STDOUT: %.decl: type = class_decl @.1 [template = constants.%.2] {
|
|
|
-// CHECK:STDOUT: %C.decl: invalid = class_decl @C [template = constants.%C] {}
|
|
|
+// CHECK:STDOUT: %C.decl.loc6: type = class_decl @C [template = constants.%C] {
|
|
|
+// CHECK:STDOUT: %C.decl.1: invalid = class_decl @C [template = constants.%C] {}
|
|
|
// CHECK:STDOUT: }
|
|
|
+// CHECK:STDOUT: %.loc6: type = extern_decl %C.decl.loc6 [template = constants.%.2]
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
// CHECK:STDOUT: class @C {
|
|
|
@@ -758,5 +679,3 @@ extern class C;
|
|
|
// CHECK:STDOUT: .Self = file.%import_ref.2
|
|
|
// CHECK:STDOUT: }
|
|
|
// CHECK:STDOUT:
|
|
|
-// CHECK:STDOUT: class @.1;
|
|
|
-// CHECK:STDOUT:
|