Add range flag settings to class files (#5556)

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:
Jon Ross-Perkins
2025-05-29 18:32:57 +00:00
committed by GitHub
parent 6318987343
commit 3fb4d9a468
123 changed files with 2111 additions and 1754 deletions
+6 -3
View File
@@ -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/class/static_method.carbon
@@ -98,8 +101,8 @@ fn Run() -> i32 {
// CHECK:STDOUT: %c.ref: ref %Class = name_ref c, %c
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, @Class.%F.decl [concrete = constants.%F]
// CHECK:STDOUT: %F.call: init %i32 = call %F.ref()
// CHECK:STDOUT: %.loc17_15.1: %i32 = value_of_initializer %F.call
// CHECK:STDOUT: %.loc17_15.2: %i32 = converted %F.call, %.loc17_15.1
// CHECK:STDOUT: return %.loc17_15.2
// CHECK:STDOUT: %.loc20_15.1: %i32 = value_of_initializer %F.call
// CHECK:STDOUT: %.loc20_15.2: %i32 = converted %F.call, %.loc20_15.1
// CHECK:STDOUT: return %.loc20_15.2
// CHECK:STDOUT: }
// CHECK:STDOUT: