Skip to content

Commit c70f234

Browse files
authored
Add range flag settings to where_expr files (#5582)
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.
1 parent 3c49283 commit c70f234

File tree

7 files changed

+89
-71
lines changed

7 files changed

+89
-71
lines changed

toolchain/check/testdata/where_expr/constraints.carbon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
5+
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+
//
58
// AUTOUPDATE
69
// TIP: To test this file alone, run:
710
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/constraints.carbon

toolchain/check/testdata/where_expr/designator.carbon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
5+
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+
//
58
// AUTOUPDATE
69
// TIP: To test this file alone, run:
710
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/designator.carbon

toolchain/check/testdata/where_expr/dot_self_index.carbon

Lines changed: 70 additions & 67 deletions
Large diffs are not rendered by default.

toolchain/check/testdata/where_expr/equal_rewrite.carbon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
5+
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+
//
58
// AUTOUPDATE
69
// TIP: To test this file alone, run:
710
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/equal_rewrite.carbon

toolchain/check/testdata/where_expr/fail_not_facet.carbon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
5+
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+
//
58
// AUTOUPDATE
69
// TIP: To test this file alone, run:
710
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/fail_not_facet.carbon

toolchain/check/testdata/where_expr/min_prelude/dot_self_impls.carbon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
55
// INCLUDE-FILE: toolchain/testing/min_prelude/facet_types.carbon
6-
// EXTRA-ARGS: --no-dump-sem-ir
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=only
77
//
88
// AUTOUPDATE
99
// TIP: To test this file alone, run:

toolchain/check/testdata/where_expr/non_generic.carbon

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// Exceptions. See /LICENSE for license information.
33
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
//
5+
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
6+
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
7+
//
58
// AUTOUPDATE
69
// TIP: To test this file alone, run:
710
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/where_expr/non_generic.carbon
@@ -57,17 +60,17 @@ fn NotGenericF(U: I where .T == i32) {}
5760
// CHECK:STDOUT: %U.param_patt: %pattern_type.f03 = value_param_pattern %U.patt, call_param0 [concrete]
5861
// CHECK:STDOUT: } {
5962
// CHECK:STDOUT: %U.param: %I_where.type = value_param call_param0
60-
// CHECK:STDOUT: %.loc14_21.1: type = splice_block %.loc14_21.2 [concrete = constants.%I_where.type] {
63+
// CHECK:STDOUT: %.loc17_21.1: type = splice_block %.loc17_21.2 [concrete = constants.%I_where.type] {
6164
// CHECK:STDOUT: %I.ref: type = name_ref I, file.%I.decl [concrete = constants.%I.type]
6265
// CHECK:STDOUT: %.Self: %I.type = bind_symbolic_name .Self [symbolic_self = constants.%.Self]
6366
// CHECK:STDOUT: %.Self.ref: %I.type = name_ref .Self, %.Self [symbolic_self = constants.%.Self]
6467
// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
6568
// CHECK:STDOUT: %.Self.as_type: type = facet_access_type %.Self.ref [symbolic_self = constants.%.Self.as_type]
66-
// CHECK:STDOUT: %.loc14_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
69+
// CHECK:STDOUT: %.loc17_27: type = converted %.Self.ref, %.Self.as_type [symbolic_self = constants.%.Self.as_type]
6770
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.lookup_impl_witness, element0 [symbolic_self = constants.%impl.elem0]
6871
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
6972
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
70-
// CHECK:STDOUT: %.loc14_21.2: type = where_expr %.Self [concrete = constants.%I_where.type] {
73+
// CHECK:STDOUT: %.loc17_21.2: type = where_expr %.Self [concrete = constants.%I_where.type] {
7174
// CHECK:STDOUT: requirement_equivalent %impl.elem0, %i32
7275
// CHECK:STDOUT: }
7376
// CHECK:STDOUT: }

0 commit comments

Comments
 (0)