mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
This is really a set of closely related changes: 1) We really shouldn't be creating a Check::Unit for _Lower_. This fixes that by storing the diagnostic converter for reuse. 2) Rather than passing in node converters to Check as their own array, pass diagnostic converters as part of Check::Unit. 3) To support creating the converters early, pass SemIR::File pre-constructed. 4) Since SemIR::File construction was used to track "checked", add `is_checked` for that. 5) Clarifies a subtle edge case around `input_filename_` use with `-`. Note the key consequence of this change, where I actually started, is that `Check` only has one array of `Check::Unit` instead of receiving `NodeLocConverter` as a separate array.
19 lines
746 B
Plaintext
19 lines
746 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// ARGS: compile - --no-prelude-import --phase=check --dump-sem-ir
|
|
//
|
|
// AUTOUPDATE
|
|
// TIP: To test this file alone, run:
|
|
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/stdin.carbon
|
|
// TIP: To dump output, run:
|
|
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/stdin.carbon
|
|
|
|
// CHECK:STDOUT: --- -
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|