mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add range flag settings to namespace files (#5566)
Where `--no-dump-sem-ir` is used, change to `--dump-sem-ir-ranges=only`. Otherwise, add `--dump-sem-ir-ranges=if-present` with a TODO to change to `only`. Note, SemIR is affected just because the extra comments change line numbers in files where splits aren't in use.
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/add_to_import.carbon
|
||||
|
||||
+17
-14
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/alias.carbon
|
||||
@@ -79,7 +82,7 @@ fn D() -> i32 { return C(); }
|
||||
// CHECK:STDOUT: %NS: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .A = %A.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %NS.ref.loc13: <namespace> = name_ref NS, %NS [concrete = %NS]
|
||||
// CHECK:STDOUT: %NS.ref.loc16: <namespace> = name_ref NS, %NS [concrete = %NS]
|
||||
// CHECK:STDOUT: %ns: <namespace> = bind_alias ns, %NS [concrete = %NS]
|
||||
// CHECK:STDOUT: %A.decl: %A.type = fn_decl @A [concrete = constants.%A] {
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
|
||||
@@ -99,7 +102,7 @@ fn D() -> i32 { return C(); }
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %NS.ref.loc19: <namespace> = name_ref NS, %NS [concrete = %NS]
|
||||
// CHECK:STDOUT: %NS.ref.loc22: <namespace> = name_ref NS, %NS [concrete = %NS]
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, %A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %C: %A.type = bind_alias C, %A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %D.decl: %D.type = fn_decl @D [concrete = constants.%D] {
|
||||
@@ -117,13 +120,13 @@ fn D() -> i32 { return C(); }
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc15_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %bound_method.loc18_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc15_28.2(%int_0) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc15_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc15_28.2: %i32 = converted %int_0, %.loc15_28.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc15_28.2
|
||||
// CHECK:STDOUT: %bound_method.loc18_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc18_28.2(%int_0) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc18_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc18_28.2: %i32 = converted %int_0, %.loc18_28.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc18_28.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B() -> %i32 {
|
||||
@@ -131,17 +134,17 @@ fn D() -> i32 { return C(); }
|
||||
// CHECK:STDOUT: %ns.ref: <namespace> = name_ref ns, file.%ns [concrete = file.%NS]
|
||||
// CHECK:STDOUT: %A.ref: %A.type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %A.call: init %i32 = call %A.ref()
|
||||
// CHECK:STDOUT: %.loc17_30.1: %i32 = value_of_initializer %A.call
|
||||
// CHECK:STDOUT: %.loc17_30.2: %i32 = converted %A.call, %.loc17_30.1
|
||||
// CHECK:STDOUT: return %.loc17_30.2
|
||||
// CHECK:STDOUT: %.loc20_30.1: %i32 = value_of_initializer %A.call
|
||||
// CHECK:STDOUT: %.loc20_30.2: %i32 = converted %A.call, %.loc20_30.1
|
||||
// CHECK:STDOUT: return %.loc20_30.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @D() -> %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %C.ref: %A.type = name_ref C, file.%C [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %A.call: init %i32 = call %C.ref()
|
||||
// CHECK:STDOUT: %.loc21_27.1: %i32 = value_of_initializer %A.call
|
||||
// CHECK:STDOUT: %.loc21_27.2: %i32 = converted %A.call, %.loc21_27.1
|
||||
// CHECK:STDOUT: return %.loc21_27.2
|
||||
// CHECK:STDOUT: %.loc24_27.1: %i32 = value_of_initializer %A.call
|
||||
// CHECK:STDOUT: %.loc24_27.2: %i32 = converted %A.call, %.loc24_27.1
|
||||
// CHECK:STDOUT: return %.loc24_27.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon
|
||||
|
||||
+3
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_decl_in_alias.carbon
|
||||
@@ -89,12 +92,12 @@ fn ns.A() -> i32 { return 0; }
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc23_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %bound_method.loc26_28.1: <bound method> = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc23_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc23_28.2(%int_0) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc23_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc23_28.2: %i32 = converted %int_0, %.loc23_28.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc23_28.2
|
||||
// CHECK:STDOUT: %bound_method.loc26_28.2: <bound method> = bound_method %int_0, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked: init %i32 = call %bound_method.loc26_28.2(%int_0) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc26_28.1: %i32 = value_of_initializer %int.convert_checked [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc26_28.2: %i32 = converted %int_0, %.loc26_28.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc26_28.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_duplicate.carbon
|
||||
@@ -46,10 +49,10 @@ fn Foo.Baz() {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Foo: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc13
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc16
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Baz.decl.loc13: %Baz.type.8987ba.1 = fn_decl @Baz.1 [concrete = constants.%Baz.eb4c34.1] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc23: %Baz.type.8987ba.2 = fn_decl @Baz.2 [concrete = constants.%Baz.eb4c34.2] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc16: %Baz.type.8987ba.1 = fn_decl @Baz.1 [concrete = constants.%Baz.eb4c34.1] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc26: %Baz.type.8987ba.2 = fn_decl @Baz.2 [concrete = constants.%Baz.eb4c34.2] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Baz.1() {
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_modifiers.carbon
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_not_top_level.carbon
|
||||
|
||||
+11
-8
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_params.carbon
|
||||
@@ -72,11 +75,11 @@ fn D(T:! type).F() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %A: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .F = %F.decl.loc18
|
||||
// CHECK:STDOUT: .F = %F.decl.loc21
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %F.decl.loc18: %F.type.bd7 = fn_decl @F.1 [concrete = constants.%F.199] {} {}
|
||||
// CHECK:STDOUT: %F.decl.loc21: %F.type.bd7 = fn_decl @F.1 [concrete = constants.%F.199] {} {}
|
||||
// CHECK:STDOUT: %n.param: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %.loc24: type = splice_block %i32 [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %.loc27: type = splice_block %i32 [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -88,8 +91,8 @@ fn D(T:! type).F() {}
|
||||
// CHECK:STDOUT: %x: %T = bind_name x, %x.param
|
||||
// CHECK:STDOUT: %C: <namespace> = namespace [concrete] {}
|
||||
// CHECK:STDOUT: %D: <namespace> = namespace [concrete] {}
|
||||
// CHECK:STDOUT: %F.decl.loc40: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] {} {
|
||||
// CHECK:STDOUT: %T.loc40_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc40_6.2 (constants.%T)]
|
||||
// CHECK:STDOUT: %F.decl.loc43: %F.type.b25 = fn_decl @F.2 [concrete = constants.%F.c41] {} {
|
||||
// CHECK:STDOUT: %T.loc43_6.1: type = bind_symbolic_name T, 0 [symbolic = %T.loc43_6.2 (constants.%T)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -98,8 +101,8 @@ fn D(T:! type).F() {}
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @F.2(%T.loc40_6.1: type) {
|
||||
// CHECK:STDOUT: %T.loc40_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc40_6.2 (constants.%T)]
|
||||
// CHECK:STDOUT: generic fn @F.2(%T.loc43_6.1: type) {
|
||||
// CHECK:STDOUT: %T.loc43_6.2: type = bind_symbolic_name T, 0 [symbolic = %T.loc43_6.2 (constants.%T)]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT:
|
||||
@@ -110,6 +113,6 @@ fn D(T:! type).F() {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @F.2(constants.%T) {
|
||||
// CHECK:STDOUT: %T.loc40_6.2 => constants.%T
|
||||
// CHECK:STDOUT: %T.loc43_6.2 => constants.%T
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/fail_unresolved_scope.carbon
|
||||
|
||||
+8
-5
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/function.carbon
|
||||
@@ -44,15 +47,15 @@ fn Bar() {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .Foo = %Foo
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc14
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc17
|
||||
// CHECK:STDOUT: .Bar = %Bar.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %Foo: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc17
|
||||
// CHECK:STDOUT: .Baz = %Baz.decl.loc20
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Baz.decl.loc14: %Baz.type.03f = fn_decl @Baz.1 [concrete = constants.%Baz.5ea] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc17: %Baz.type.898 = fn_decl @Baz.2 [concrete = constants.%Baz.eb4] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc17: %Baz.type.03f = fn_decl @Baz.1 [concrete = constants.%Baz.5ea] {} {}
|
||||
// CHECK:STDOUT: %Baz.decl.loc20: %Baz.type.898 = fn_decl @Baz.2 [concrete = constants.%Baz.eb4] {} {}
|
||||
// CHECK:STDOUT: %Bar.decl: %Bar.type = fn_decl @Bar [concrete = constants.%Bar] {} {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -69,7 +72,7 @@ fn Bar() {
|
||||
// CHECK:STDOUT: fn @Bar() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Foo.ref: <namespace> = name_ref Foo, file.%Foo [concrete = file.%Foo]
|
||||
// CHECK:STDOUT: %Baz.ref: %Baz.type.898 = name_ref Baz, file.%Baz.decl.loc17 [concrete = constants.%Baz.eb4]
|
||||
// CHECK:STDOUT: %Baz.ref: %Baz.type.898 = name_ref Baz, file.%Baz.decl.loc20 [concrete = constants.%Baz.eb4]
|
||||
// CHECK:STDOUT: %Baz.call: init %empty_tuple.type = call %Baz.ref()
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/imported.carbon
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/imported_indirect.carbon
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/merging.carbon
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/merging_with_indirections.carbon
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/min_prelude/destroy.carbon
|
||||
// EXTRA-ARGS: --no-dump-sem-ir
|
||||
// EXTRA-ARGS: --dump-sem-ir-ranges=only
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/nested.carbon
|
||||
|
||||
+34
-31
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/shadow.carbon
|
||||
@@ -78,16 +81,16 @@ fn N.M.B() -> i32 {
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .A = %A.decl.loc11
|
||||
// CHECK:STDOUT: .A = %A.decl.loc14
|
||||
// CHECK:STDOUT: .N = %N
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %A.decl.loc11: %A.type.00d = fn_decl @A.1 [concrete = constants.%A.1db] {} {}
|
||||
// CHECK:STDOUT: %A.decl.loc14: %A.type.00d = fn_decl @A.1 [concrete = constants.%A.1db] {} {}
|
||||
// CHECK:STDOUT: %N: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .A = %A.decl.loc14
|
||||
// CHECK:STDOUT: .A = %A.decl.loc17
|
||||
// CHECK:STDOUT: .M = %M
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.decl.loc14: %A.type.0e8 = fn_decl @A.2 [concrete = constants.%A.281] {} {}
|
||||
// CHECK:STDOUT: %A.decl.loc17: %A.type.0e8 = fn_decl @A.2 [concrete = constants.%A.281] {} {}
|
||||
// CHECK:STDOUT: %M: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .B = %B.decl
|
||||
// CHECK:STDOUT: .A = <poisoned>
|
||||
@@ -96,8 +99,8 @@ fn N.M.B() -> i32 {
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.7ce = return_slot_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.7ce = out_param_pattern %return.patt, call_param0 [concrete]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_32.loc18: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc18: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_32.loc21: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc21: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
@@ -109,8 +112,8 @@ fn N.M.B() -> i32 {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @B() -> %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %A.ref.loc20: %A.type.0e8 = name_ref A, file.%A.decl.loc14 [concrete = constants.%A.281]
|
||||
// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref.loc20()
|
||||
// CHECK:STDOUT: %A.ref.loc23: %A.type.0e8 = name_ref A, file.%A.decl.loc17 [concrete = constants.%A.281]
|
||||
// CHECK:STDOUT: %A.call: init %empty_tuple.type = call %A.ref.loc23()
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: if %true br !if.then else br !if.else
|
||||
// CHECK:STDOUT:
|
||||
@@ -120,32 +123,32 @@ fn N.M.B() -> i32 {
|
||||
// CHECK:STDOUT: %A.var_patt: %pattern_type.7ce = var_pattern %A.patt [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A.var: ref %i32 = var %A.var_patt
|
||||
// CHECK:STDOUT: %int_0.loc22: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc22_5.1: <bound method> = bound_method %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_5.2: <bound method> = bound_method %int_0.loc22, %specific_fn.loc22 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc22: init %i32 = call %bound_method.loc22_5.2(%int_0.loc22) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc22_5: init %i32 = converted %int_0.loc22, %int.convert_checked.loc22 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: assign %A.var, %.loc22_5
|
||||
// CHECK:STDOUT: %.loc22_12: type = splice_block %i32.loc22 [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %int_32.loc22: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc22: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %int_0.loc25: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc25: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc25_5.1: <bound method> = bound_method %int_0.loc25, %impl.elem0.loc25 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc25: <specific function> = specific_function %impl.elem0.loc25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc25_5.2: <bound method> = bound_method %int_0.loc25, %specific_fn.loc25 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc25: init %i32 = call %bound_method.loc25_5.2(%int_0.loc25) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc25_5: init %i32 = converted %int_0.loc25, %int.convert_checked.loc25 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: assign %A.var, %.loc25_5
|
||||
// CHECK:STDOUT: %.loc25_12: type = splice_block %i32.loc25 [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %int_32.loc25: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
|
||||
// CHECK:STDOUT: %i32.loc25: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A: ref %i32 = bind_name A, %A.var
|
||||
// CHECK:STDOUT: %A.ref.loc25: ref %i32 = name_ref A, %A
|
||||
// CHECK:STDOUT: %.loc25: %i32 = bind_value %A.ref.loc25
|
||||
// CHECK:STDOUT: return %.loc25
|
||||
// CHECK:STDOUT: %A.ref.loc28: ref %i32 = name_ref A, %A
|
||||
// CHECK:STDOUT: %.loc28: %i32 = bind_value %A.ref.loc28
|
||||
// CHECK:STDOUT: return %.loc28
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else:
|
||||
// CHECK:STDOUT: %int_0.loc27: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc27: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc27_11.1: <bound method> = bound_method %int_0.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc27: <specific function> = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc27_11.2: <bound method> = bound_method %int_0.loc27, %specific_fn.loc27 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc27: init %i32 = call %bound_method.loc27_11.2(%int_0.loc27) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc27_11.1: %i32 = value_of_initializer %int.convert_checked.loc27 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc27_11.2: %i32 = converted %int_0.loc27, %.loc27_11.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc27_11.2
|
||||
// CHECK:STDOUT: %int_0.loc30: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc30: %.9c3 = impl_witness_access constants.%ImplicitAs.impl_witness.c75, element0 [concrete = constants.%Convert.956]
|
||||
// CHECK:STDOUT: %bound_method.loc30_11.1: <bound method> = bound_method %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc30: <specific function> = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc30_11.2: <bound method> = bound_method %int_0.loc30, %specific_fn.loc30 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %int.convert_checked.loc30: init %i32 = call %bound_method.loc30_11.2(%int_0.loc30) [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc30_11.1: %i32 = value_of_initializer %int.convert_checked.loc30 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: %.loc30_11.2: %i32 = converted %int_0.loc30, %.loc30_11.1 [concrete = constants.%int_0.6a9]
|
||||
// CHECK:STDOUT: return %.loc30_11.2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
// 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: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/namespace/unqualified_lookup.carbon
|
||||
|
||||
Reference in New Issue
Block a user