diff --git a/toolchain/check/testdata/namespace/add_to_import.carbon b/toolchain/check/testdata/namespace/add_to_import.carbon index bd7b0fbd19e5..a73cab1f5a83 100644 --- a/toolchain/check/testdata/namespace/add_to_import.carbon +++ b/toolchain/check/testdata/namespace/add_to_import.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/add_to_import.carbon diff --git a/toolchain/check/testdata/namespace/alias.carbon b/toolchain/check/testdata/namespace/alias.carbon index 7020b172578a..8759e363348a 100644 --- a/toolchain/check/testdata/namespace/alias.carbon +++ b/toolchain/check/testdata/namespace/alias.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/alias.carbon @@ -79,7 +82,7 @@ fn D() -> i32 { return C(); } // CHECK:STDOUT: %NS: = namespace [concrete] { // CHECK:STDOUT: .A = %A.decl // CHECK:STDOUT: } -// CHECK:STDOUT: %NS.ref.loc13: = name_ref NS, %NS [concrete = %NS] +// CHECK:STDOUT: %NS.ref.loc16: = name_ref NS, %NS [concrete = %NS] // CHECK:STDOUT: %ns: = 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: = name_ref NS, %NS [concrete = %NS] +// CHECK:STDOUT: %NS.ref.loc22: = 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 %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %bound_method.loc18_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc15_28.2: = 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 %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: = 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: diff --git a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon index 9aec4590a411..51e40e86c7f5 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.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_conflict_after_merge.carbon diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon index bfc375bd9337..5600c80b4b65 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.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_conflict_imported_namespace_first.carbon diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon index 280b2305ad4c..d8538d08acc4 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.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_conflict_imported_namespace_nested.carbon diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon index 59c6722b7507..c302e735d49c 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_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_conflict_imported_namespace_second.carbon diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon index 966418676c2e..673a45619244 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.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_conflict_in_imports_namespace_first.carbon diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon index a5d43d292980..92ef02be63e0 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon +++ b/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_conflict_in_imports_namespace_second.carbon diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 92d5d1da2c0d..6a63ece587a9 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.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 %int_0, %impl.elem0 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %bound_method.loc26_28.1: = bound_method %int_0, %impl.elem0 [concrete = constants.%Convert.bound] // CHECK:STDOUT: %specific_fn: = specific_function %impl.elem0, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc23_28.2: = 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 %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: diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index 9a0f5f3ec81a..b3103d94b94a 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.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_duplicate.carbon @@ -46,10 +49,10 @@ fn Foo.Baz() { // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %Foo: = 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() { diff --git a/toolchain/check/testdata/namespace/fail_modifiers.carbon b/toolchain/check/testdata/namespace/fail_modifiers.carbon index 4e92ab09eb98..4406dcf596cc 100644 --- a/toolchain/check/testdata/namespace/fail_modifiers.carbon +++ b/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_modifiers.carbon diff --git a/toolchain/check/testdata/namespace/fail_not_top_level.carbon b/toolchain/check/testdata/namespace/fail_not_top_level.carbon index 874f28cc844c..0ae4eca67fcc 100644 --- a/toolchain/check/testdata/namespace/fail_not_top_level.carbon +++ b/toolchain/check/testdata/namespace/fail_not_top_level.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 diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index cdbf6d08f6ad..70a18fb63128 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.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_params.carbon @@ -72,11 +75,11 @@ fn D(T:! type).F() {} // CHECK:STDOUT: } // CHECK:STDOUT: %Core.import = import Core // CHECK:STDOUT: %A: = 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 [concrete] {} // CHECK:STDOUT: %D: = 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: diff --git a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon index 35e0782f63d4..f93de0cb1ba2 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.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_unresolved_scope.carbon diff --git a/toolchain/check/testdata/namespace/function.carbon b/toolchain/check/testdata/namespace/function.carbon index 417aee2e59a2..001fc9748b2e 100644 --- a/toolchain/check/testdata/namespace/function.carbon +++ b/toolchain/check/testdata/namespace/function.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/function.carbon @@ -44,15 +47,15 @@ fn Bar() { // CHECK:STDOUT: package: = 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 [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: = 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: } diff --git a/toolchain/check/testdata/namespace/imported.carbon b/toolchain/check/testdata/namespace/imported.carbon index cfa39743081a..ba68ed1c6108 100644 --- a/toolchain/check/testdata/namespace/imported.carbon +++ b/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.carbon diff --git a/toolchain/check/testdata/namespace/imported_indirect.carbon b/toolchain/check/testdata/namespace/imported_indirect.carbon index ec652a87b7d0..6605f4949549 100644 --- a/toolchain/check/testdata/namespace/imported_indirect.carbon +++ b/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/imported_indirect.carbon diff --git a/toolchain/check/testdata/namespace/merging.carbon b/toolchain/check/testdata/namespace/merging.carbon index 0f4f2e77cd9c..4bdf1bc168b1 100644 --- a/toolchain/check/testdata/namespace/merging.carbon +++ b/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.carbon diff --git a/toolchain/check/testdata/namespace/merging_with_indirections.carbon b/toolchain/check/testdata/namespace/merging_with_indirections.carbon index 2a47ef0a972e..a8154ebe4d2c 100644 --- a/toolchain/check/testdata/namespace/merging_with_indirections.carbon +++ b/toolchain/check/testdata/namespace/merging_with_indirections.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 diff --git a/toolchain/check/testdata/namespace/min_prelude/name_poisoning.carbon b/toolchain/check/testdata/namespace/min_prelude/name_poisoning.carbon index 4a3e7d95697e..7ecb2f0e7494 100644 --- a/toolchain/check/testdata/namespace/min_prelude/name_poisoning.carbon +++ b/toolchain/check/testdata/namespace/min_prelude/name_poisoning.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: diff --git a/toolchain/check/testdata/namespace/nested.carbon b/toolchain/check/testdata/namespace/nested.carbon index 1b50c849403c..92eae8f56ba6 100644 --- a/toolchain/check/testdata/namespace/nested.carbon +++ b/toolchain/check/testdata/namespace/nested.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/nested.carbon diff --git a/toolchain/check/testdata/namespace/shadow.carbon b/toolchain/check/testdata/namespace/shadow.carbon index 4e645b3e4053..9ad09110ead3 100644 --- a/toolchain/check/testdata/namespace/shadow.carbon +++ b/toolchain/check/testdata/namespace/shadow.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/shadow.carbon @@ -78,16 +81,16 @@ fn N.M.B() -> i32 { // CHECK:STDOUT: file { // CHECK:STDOUT: package: = 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 [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 [concrete] { // CHECK:STDOUT: .B = %B.decl // CHECK:STDOUT: .A = @@ -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 %int_0.loc22, %impl.elem0.loc22 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc22: = specific_function %impl.elem0.loc22, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc22_5.2: = 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 %int_0.loc25, %impl.elem0.loc25 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn.loc25: = specific_function %impl.elem0.loc25, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc25_5.2: = 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 %int_0.loc27, %impl.elem0.loc27 [concrete = constants.%Convert.bound] -// CHECK:STDOUT: %specific_fn.loc27: = specific_function %impl.elem0.loc27, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] -// CHECK:STDOUT: %bound_method.loc27_11.2: = 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 %int_0.loc30, %impl.elem0.loc30 [concrete = constants.%Convert.bound] +// CHECK:STDOUT: %specific_fn.loc30: = specific_function %impl.elem0.loc30, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn] +// CHECK:STDOUT: %bound_method.loc30_11.2: = 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: diff --git a/toolchain/check/testdata/namespace/unqualified_lookup.carbon b/toolchain/check/testdata/namespace/unqualified_lookup.carbon index 7d9e7edb1258..2ff9a6911183 100644 --- a/toolchain/check/testdata/namespace/unqualified_lookup.carbon +++ b/toolchain/check/testdata/namespace/unqualified_lookup.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/unqualified_lookup.carbon