From 7899154a215a2458ad1e12ed59e593933de3a957 Mon Sep 17 00:00:00 2001 From: Geoff Romer Date: Tue, 26 Sep 2023 09:52:49 -0700 Subject: [PATCH] Add "ERROR" to all error diagnostics (#3251) This makes the difference between errors and lower-level diagnostics visible to users, and aligns the toolchain's behavior with the expectations in `driver_fuzzer.cpp`. --- .../testdata/array/fail_bound_overflow.carbon | 2 +- .../testdata/array/fail_invalid_type.carbon | 2 +- .../testdata/array/fail_out_of_bound.carbon | 2 +- .../testdata/array/fail_type_mismatch.carbon | 8 +++--- .../array/fail_undefined_bound.carbon | 2 +- .../testdata/basics/fail_name_lookup.carbon | 2 +- .../basics/fail_non_type_as_type.carbon | 2 +- .../basics/fail_qualifier_unsupported.carbon | 2 +- .../check/testdata/const/fail_collapse.carbon | 2 +- .../function/call/fail_not_callable.carbon | 4 +-- .../function/call/fail_param_count.carbon | 12 ++++---- .../function/call/fail_param_type.carbon | 2 +- .../call/fail_return_type_mismatch.carbon | 2 +- .../fail_param_name_conflict.carbon | 2 +- .../if/fail_reachable_fallthrough.carbon | 6 ++-- toolchain/check/testdata/if/fail_scope.carbon | 2 +- .../index/fail_array_large_index.carbon | 2 +- .../index/fail_array_non_int_indexing.carbon | 2 +- .../fail_array_out_of_bound_access.carbon | 2 +- .../index/fail_empty_tuple_access.carbon | 2 +- .../testdata/index/fail_invalid_base.carbon | 8 +++--- .../testdata/index/fail_name_not_found.carbon | 2 +- .../index/fail_negative_indexing.carbon | 2 +- .../index/fail_non_deterministic_type.carbon | 2 +- .../index/fail_non_tuple_access.carbon | 2 +- .../index/fail_tuple_large_index.carbon | 2 +- .../index/fail_tuple_non_int_indexing.carbon | 2 +- .../fail_tuple_out_of_bound_access.carbon | 2 +- .../testdata/namespace/fail_duplicate.carbon | 2 +- .../namespace/fail_unresolved_scope.carbon | 2 +- .../fail_assigment_to_non_assignable.carbon | 16 +++++------ .../operators/fail_type_mismatch.carbon | 2 +- .../fail_type_mismatch_assignment.carbon | 2 +- .../operators/fail_type_mismatch_once.carbon | 2 +- .../pointer/fail_address_of_value.carbon | 28 +++++++++---------- .../fail_dereference_not_pointer.carbon | 6 ++-- .../pointer/fail_dereference_type.carbon | 2 +- .../pointer/fail_type_mismatch.carbon | 2 +- .../return/fail_missing_return.carbon | 2 +- .../fail_missing_return_empty_tuple.carbon | 2 +- .../testdata/return/fail_type_mismatch.carbon | 2 +- .../return/fail_value_disallowed.carbon | 2 +- .../testdata/return/fail_value_missing.carbon | 2 +- .../struct/fail_access_into_invalid.carbon | 2 +- .../testdata/struct/fail_assign_empty.carbon | 2 +- .../testdata/struct/fail_assign_nested.carbon | 2 +- .../struct/fail_assign_to_empty.carbon | 2 +- .../struct/fail_field_name_mismatch.carbon | 2 +- .../struct/fail_field_type_mismatch.carbon | 2 +- .../struct/fail_member_access_type.carbon | 2 +- .../struct/fail_non_member_access.carbon | 2 +- .../struct/fail_too_few_values.carbon | 2 +- .../testdata/struct/fail_type_assign.carbon | 2 +- .../testdata/struct/fail_value_as_type.carbon | 2 +- .../testdata/tuples/fail_assign_empty.carbon | 2 +- .../testdata/tuples/fail_assign_nested.carbon | 2 +- .../tuples/fail_assign_to_empty.carbon | 2 +- .../tuples/fail_element_type_mismatch.carbon | 2 +- .../tuples/fail_too_few_element.carbon | 2 +- .../testdata/tuples/fail_type_assign.carbon | 2 +- .../testdata/tuples/fail_value_as_type.carbon | 2 +- .../testdata/var/fail_duplicate_decl.carbon | 2 +- .../var/fail_init_type_mismatch.carbon | 2 +- .../testdata/var/fail_init_with_self.carbon | 2 +- .../var/fail_lookup_outside_scope.carbon | 2 +- .../var/fail_storage_is_literal.carbon | 2 +- toolchain/diagnostics/diagnostic_emitter.h | 11 ++++++-- .../testdata/fail_errors_in_two_files.carbon | 4 +-- .../driver/testdata/fail_errors_sorted.carbon | 4 +-- .../testdata/fail_errors_streamed.carbon | 4 +-- .../driver/testdata/fail_flush_errors.carbon | 6 ++-- .../driver/testdata/fail_missing_file.carbon | 2 +- .../fail_block_string_second_line.carbon | 2 +- toolchain/lex/testdata/fail_multifile.carbon | 4 +-- .../basics/fail_before_lowering.carbon | 2 +- .../array/fail_require_close_bracket.carbon | 8 +++--- .../testdata/array/fail_require_semi.carbon | 2 +- .../basics/fail_invalid_designators.carbon | 6 ++-- .../basics/fail_no_intro_with_semi.carbon | 2 +- .../basics/fail_no_intro_without_semi.carbon | 2 +- .../basics/fail_paren_match_regression.carbon | 6 ++-- .../for/fail_colon_instead_of_in.carbon | 2 +- .../testdata/for/fail_missing_cond.carbon | 8 +++--- .../parse/testdata/for/fail_missing_in.carbon | 2 +- .../testdata/for/fail_missing_var.carbon | 2 +- .../testdata/for/fail_square_brackets.carbon | 8 +++--- .../fail_identifier_instead_of_sig.carbon | 2 +- .../fail_missing_deduced_close.carbon | 6 ++-- .../declaration/fail_missing_name.carbon | 2 +- .../declaration/fail_no_sig_or_semi.carbon | 2 +- .../declaration/fail_only_fn_and_semi.carbon | 2 +- .../fail_repeated_fn_and_semi.carbon | 2 +- ...skip_indented_newline_until_outdent.carbon | 2 +- ...ail_skip_indented_newline_with_semi.carbon | 2 +- ..._skip_indented_newline_without_semi.carbon | 2 +- .../fail_skip_to_newline_without_semi.carbon | 2 +- .../fail_skip_without_semi_to_curly.carbon | 2 +- .../fail_with_identifier_as_param.carbon | 2 +- ...hout_name_and_many_tokens_in_params.carbon | 2 +- .../fail_identifier_in_statements.carbon | 2 +- .../deduced_params/fail_no_parens.carbon | 8 +++--- .../interface/fail_missing_name.carbon | 2 +- .../interface/fail_missing_open_curly.carbon | 4 +-- .../interface/fail_no_impl_allowed.carbon | 2 +- .../interface/fail_self_param_syntax.carbon | 4 +-- .../fail_no_impl_allowed.carbon | 2 +- .../testdata/if/fail_else_unbraced.carbon | 8 +++--- .../parse/testdata/if/fail_errors.carbon | 10 +++---- .../testdata/if/fail_missing_cond.carbon | 2 +- .../testdata/if/fail_square_brackets.carbon | 6 ++-- .../parse/testdata/if/fail_unbraced.carbon | 6 ++-- .../fail_condition_missing.carbon | 2 +- .../fail_else_expr_missing.carbon | 2 +- .../if_expression/fail_else_missing.carbon | 2 +- .../fail_then_expr_missing.carbon | 2 +- .../if_expression/fail_then_missing.carbon | 2 +- .../if_expression/fail_top_level_if.carbon | 6 ++-- .../testdata/index/fail_empty_expr.carbon | 2 +- .../testdata/index/fail_malformed_expr.carbon | 2 +- .../parse/testdata/namespace/fail_args.carbon | 2 +- .../testdata/namespace/fail_arrow.carbon | 2 +- .../namespace/fail_incomplete_name.carbon | 2 +- .../testdata/namespace/fail_no_name.carbon | 2 +- .../operators/fail_chained_assign.carbon | 2 +- .../fail_infix_uneven_space_after.carbon | 2 +- .../operators/fail_invalid_infix.carbon | 8 +++--- .../operators/fail_postincrement.carbon | 4 +-- .../operators/fail_precedence_and_or.carbon | 2 +- .../operators/fail_precedence_as.carbon | 6 ++-- .../operators/fail_precedence_assign.carbon | 10 +++---- .../operators/fail_precedence_or_and.carbon | 2 +- .../fail_precedence_star_minus.carbon | 2 +- .../fail_precedence_star_star.carbon | 2 +- .../operators/fail_star_star_no_space.carbon | 2 +- .../testdata/operators/fail_variety.carbon | 10 +++---- .../recover_infix_uneven_space_before.carbon | 2 +- .../operators/recover_postfix_space.carbon | 2 +- .../recover_postfix_space_before_comma.carbon | 2 +- .../recover_postfix_space_in_call.carbon | 2 +- .../recover_postfix_space_surrounding.carbon | 2 +- .../operators/recover_prefix_repeat.carbon | 2 +- .../operators/recover_prefix_space.carbon | 2 +- ...ver_prefix_uneven_space_with_assign.carbon | 2 +- .../testdata/package/fail_extra_string.carbon | 2 +- .../package/fail_library_is_identifier.carbon | 2 +- .../package/fail_library_skips_name.carbon | 2 +- .../package/fail_name_is_keyword.carbon | 2 +- .../testdata/package/fail_no_name.carbon | 2 +- .../testdata/package/fail_no_semi.carbon | 2 +- .../testdata/package/fail_no_type.carbon | 2 +- .../package/fail_omit_library_keyword.carbon | 2 +- .../fail_pointer_type_in_expression.carbon | 8 +++--- .../testdata/return/fail_expr_no_semi.carbon | 2 +- .../parse/testdata/return/fail_no_semi.carbon | 4 +-- .../testdata/struct/fail_comma_only.carbon | 2 +- .../struct/fail_comma_repeat_in_type.carbon | 2 +- .../struct/fail_comma_repeat_in_value.carbon | 2 +- .../testdata/struct/fail_dot_only.carbon | 2 +- .../struct/fail_dot_string_colon.carbon | 2 +- .../struct/fail_dot_string_equals.carbon | 2 +- .../struct/fail_extra_token_in_type.carbon | 2 +- .../struct/fail_extra_token_in_value.carbon | 2 +- .../struct/fail_identifier_colon.carbon | 2 +- .../struct/fail_identifier_equals.carbon | 2 +- .../struct/fail_identifier_only.carbon | 2 +- .../testdata/struct/fail_missing_type.carbon | 2 +- .../testdata/struct/fail_missing_value.carbon | 2 +- .../struct/fail_mix_type_and_value.carbon | 2 +- .../struct/fail_mix_value_and_type.carbon | 2 +- .../struct/fail_mix_with_unknown.carbon | 8 +++--- .../struct/fail_no_colon_or_equals.carbon | 2 +- .../struct/fail_type_no_designator.carbon | 2 +- .../parse/testdata/var/fail_bad_name.carbon | 2 +- .../parse/testdata/var/fail_empty.carbon | 2 +- .../parse/testdata/while/fail_no_semi.carbon | 4 +-- .../parse/testdata/while/fail_unbraced.carbon | 2 +- 176 files changed, 280 insertions(+), 275 deletions(-) diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 008bce790096..48fe97db992b 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+3]]:32: Invalid array expression. +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+3]]:32: ERROR: Invalid array expression. // CHECK:STDERR: var a: [1; 39999999999999999993]; // CHECK:STDERR: ^ var a: [1; 39999999999999999993]; diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 91dded1147e5..c4c905e32776 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:13: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:13: ERROR: Cannot implicitly convert from `i32` to `type`. // CHECK:STDERR: var a: [1; 1]; // CHECK:STDERR: ^ var a: [1; 1]; diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index f73c383a9c4c..538d6f8381ca 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:27: Cannot initialize array of 1 element(s) from 3 initializer(s). +// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:27: ERROR: Cannot initialize array of 1 element(s) from 3 initializer(s). // CHECK:STDERR: var a: [i32; 1] = (1, 2, 3); // CHECK:STDERR: ^ var a: [i32; 1] = (1, 2, 3); diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index 4876cce99685..921c135c3d63 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -4,23 +4,23 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:39: Cannot implicitly convert from `String` to `i32`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:39: ERROR: Cannot implicitly convert from `String` to `i32`. // CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World"); // CHECK:STDERR: ^ var a: [i32; 3] = (1, "Hello", "World"); -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:5: Cannot implicitly convert from `String` to `i32`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:5: ERROR: Cannot implicitly convert from `String` to `i32`. // CHECK:STDERR: var t1: (i32, String, String); // CHECK:STDERR: ^ var t1: (i32, String, String); var b: [i32; 3] = t1; -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:24: Cannot initialize array of 3 element(s) from 2 initializer(s). +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:24: ERROR: Cannot initialize array of 3 element(s) from 2 initializer(s). // CHECK:STDERR: var c: [i32; 3] = (1, 2); // CHECK:STDERR: ^ var c: [i32; 3] = (1, 2); -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:5: Cannot initialize array of 3 element(s) from tuple with 2 element(s). +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:5: ERROR: Cannot initialize array of 3 element(s) from tuple with 2 element(s). // CHECK:STDERR: var t2: (i32, i32); // CHECK:STDERR: ^ var t2: (i32, i32); diff --git a/toolchain/check/testdata/array/fail_undefined_bound.carbon b/toolchain/check/testdata/array/fail_undefined_bound.carbon index 8c69f8ffee36..45383e114449 100644 --- a/toolchain/check/testdata/array/fail_undefined_bound.carbon +++ b/toolchain/check/testdata/array/fail_undefined_bound.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_undefined_bound.carbon:[[@LINE+3]]:14: Semantics TODO: `HandleArrayExpressionWithoutBounds`. +// CHECK:STDERR: fail_undefined_bound.carbon:[[@LINE+3]]:14: ERROR: Semantics TODO: `HandleArrayExpressionWithoutBounds`. // CHECK:STDERR: var a: [i32; ]; // CHECK:STDERR: ^ var a: [i32; ]; diff --git a/toolchain/check/testdata/basics/fail_name_lookup.carbon b/toolchain/check/testdata/basics/fail_name_lookup.carbon index 02bf48b350f9..82eaf341c956 100644 --- a/toolchain/check/testdata/basics/fail_name_lookup.carbon +++ b/toolchain/check/testdata/basics/fail_name_lookup.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_name_lookup.carbon:[[@LINE+3]]:3: Name `x` not found. + // CHECK:STDERR: fail_name_lookup.carbon:[[@LINE+3]]:3: ERROR: Name `x` not found. // CHECK:STDERR: x; // CHECK:STDERR: ^ x; diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index 03440b1b75e6..eebe4bf9285a 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:17: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:17: ERROR: Cannot implicitly convert from `i32` to `type`. // CHECK:STDERR: var x: type = 42; // CHECK:STDERR: ^ var x: type = 42; diff --git a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon index b5ccbabfd693..44dd88151dd8 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var x: i32; -// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:15: Type `i32` does not support qualified expressions. +// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:15: ERROR: Type `i32` does not support qualified expressions. // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^ var y: i32 = x.b; diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index 338adb2a0351..7db5475eb171 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -8,7 +8,7 @@ // CHECK:STDERR: fn G(p: const (const i32)**) -> i32** { // CHECK:STDERR: ^ fn G(p: const (const i32)**) -> i32** { - // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:11: Cannot implicitly convert from `const i32**` to `i32**`. + // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:11: ERROR: Cannot implicitly convert from `const i32**` to `i32**`. // CHECK:STDERR: return p; // CHECK:STDERR: ^ return p; diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index c0511f5abf95..d7d2c623ccbc 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -5,10 +5,10 @@ // AUTOUPDATE fn Run() { - // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+6]]:24: Semantics TODO: `Not a callable name`. + // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+6]]:24: ERROR: Semantics TODO: `Not a callable name`. // CHECK:STDERR: var x: i32 = "hello"(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:25: Cannot implicitly convert from `String` to `i32`. + // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:25: ERROR: Cannot implicitly convert from `String` to `i32`. // CHECK:STDERR: var x: i32 = "hello"(); // CHECK:STDERR: ^ var x: i32 = "hello"(); diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 61027de7eb6d..ec860b99a9b1 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -9,14 +9,14 @@ fn Run1(a: i32) {} fn Run2(a: i32, b: i32) {} fn Main() { - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: Run0(1); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: Calling function declared here. // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^ Run0(1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 2 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 2 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: Run0(0, 1); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-15]]:1: Calling function declared here. @@ -24,14 +24,14 @@ fn Main() { // CHECK:STDERR: ^ Run0(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 0 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 0 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: Run1(); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-22]]:1: Calling function declared here. // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^ Run1(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 2 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: Run1(0, 1); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-29]]:1: Calling function declared here. @@ -39,14 +39,14 @@ fn Main() { // CHECK:STDERR: ^ Run1(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 0 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 0 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: Run2(); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-36]]:1: Calling function declared here. // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^ Run2(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: 1 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:7: ERROR: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: Run2(0); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_count.carbon:[[@LINE-43]]:1: Calling function declared here. diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index ee177c289015..2b463626461e 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -7,7 +7,7 @@ fn Run(a: i32) {} fn Main() { - // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:6: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:6: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: Run(1.0); // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_type.carbon:[[@LINE-6]]:1: Initializing parameter 1 of function declared here. diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index fd2934ee4324..862745836350 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -7,7 +7,7 @@ fn Foo() -> f64 { return 1.0; } fn Run() { - // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:21: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:21: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: var x: i32 = Foo(); // CHECK:STDERR: ^ var x: i32 = Foo(); diff --git a/toolchain/check/testdata/function/definition/fail_param_name_conflict.carbon b/toolchain/check/testdata/function/definition/fail_param_name_conflict.carbon index 332d1e36f063..b60e763ee3c8 100644 --- a/toolchain/check/testdata/function/definition/fail_param_name_conflict.carbon +++ b/toolchain/check/testdata/function/definition/fail_param_name_conflict.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_param_name_conflict.carbon:[[@LINE+6]]:16: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_param_name_conflict.carbon:[[@LINE+6]]:16: ERROR: Duplicate name being declared in the same scope. // CHECK:STDERR: fn Bar(a: i32, a: i32) {} // CHECK:STDERR: ^ // CHECK:STDERR: fail_param_name_conflict.carbon:[[@LINE+3]]:8: Name is previously declared here. diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index a6b7d9925bf3..986e4aeaeb24 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -9,7 +9,7 @@ fn If1(b: bool) -> i32 { return 1; } else { } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: Missing `return` at end of function with declared return type. +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: ERROR: Missing `return` at end of function with declared return type. // CHECK:STDERR: } // CHECK:STDERR: ^ } @@ -19,7 +19,7 @@ fn If2(b: bool) -> i32 { } else { return 2; } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: Missing `return` at end of function with declared return type. +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: ERROR: Missing `return` at end of function with declared return type. // CHECK:STDERR: } // CHECK:STDERR: ^ } @@ -28,7 +28,7 @@ fn If3(b: bool) -> i32 { if (b) { return 1; } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: Missing `return` at end of function with declared return type. +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: ERROR: Missing `return` at end of function with declared return type. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 38b960541a25..48de82da72c6 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -9,7 +9,7 @@ fn VarScope(b: bool) -> i32 { var n: i32 = 2; return n; } - // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: Name `n` not found. + // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: ERROR: Name `n` not found. // CHECK:STDERR: return n; // CHECK:STDERR: ^ return n; diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index 78c52fa12c31..6d435afb44a8 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+3]]:35: Index `295147905179352825855` is past the end of `[i32; 1]`. +// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+3]]:35: ERROR: Index `295147905179352825855` is past the end of `[i32; 1]`. // CHECK:STDERR: var b: i32 = a[0xFFFFFFFFFFFFFFFFF]; // CHECK:STDERR: ^ var b: i32 = a[0xFFFFFFFFFFFFFFFFF]; diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 03b96d7de6bf..23124d73adeb 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: Cannot implicitly convert from `f64` to `i32`. +// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: var b: i32 = a[2.6]; // CHECK:STDERR: ^ var b: i32 = a[2.6]; diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index 633d6a1aa270..48cfdd0266e8 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_out_of_bound_access.carbon:[[@LINE+3]]:17: Index `2` is past the end of `[i32; 1]`. +// CHECK:STDERR: fail_array_out_of_bound_access.carbon:[[@LINE+3]]:17: ERROR: Index `2` is past the end of `[i32; 1]`. // CHECK:STDERR: var b: i32 = a[2]; // CHECK:STDERR: ^ var b: i32 = a[2]; diff --git a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon index 486edca7295c..f866455c821f 100644 --- a/toolchain/check/testdata/index/fail_empty_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_empty_tuple_access.carbon @@ -7,7 +7,7 @@ fn F() {} fn Run() { - // CHECK:STDERR: fail_empty_tuple_access.carbon:[[@LINE+3]]:8: Index `0` is past the end of `() as type`. + // CHECK:STDERR: fail_empty_tuple_access.carbon:[[@LINE+3]]:8: ERROR: Index `0` is past the end of `() as type`. // CHECK:STDERR: F()[0]; // CHECK:STDERR: ^ F()[0]; diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index f22d84c32b70..f86ead4e2486 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -8,24 +8,24 @@ // representation for a reference to a name so that we can track the location // properly. -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:12: Expression cannot be used as a value. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:12: ERROR: Expression cannot be used as a value. // CHECK:STDERR: namespace N; // CHECK:STDERR: ^ namespace N; var a: i32 = N[0]; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:1: Expression cannot be used as a value. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:1: ERROR: Expression cannot be used as a value. // CHECK:STDERR: fn F(); // CHECK:STDERR: ^ fn F(); var b: i32 = F[1]; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:32: `{.a: i32, .b: i32}` does not support indexing. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:32: ERROR: `{.a: i32, .b: i32}` does not support indexing. // CHECK:STDERR: var c: i32 = {.a = 1, .b = 2}[0]; // CHECK:STDERR: ^ var c: i32 = {.a = 1, .b = 2}[0]; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:34: `type` does not support indexing. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:34: ERROR: `type` does not support indexing. // CHECK:STDERR: var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDERR: ^ var d: i32 = {.a: i32, .b: i32}[0]; diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index 7a1fcbbfc6b5..86de6eeaeb12 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_name_not_found.carbon:[[@LINE+3]]:16: Name `a` not found. + // CHECK:STDERR: fail_name_not_found.carbon:[[@LINE+3]]:16: ERROR: Name `a` not found. // CHECK:STDERR: var b: i32 = a[0]; // CHECK:STDERR: ^ var b: i32 = a[0]; diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index 5cd92f90865a..ec519e534934 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:16: Semantics TODO: `Handle -`. +// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:16: ERROR: Semantics TODO: `Handle -`. // CHECK:STDERR: var b: i32 = a[-10]; // CHECK:STDERR: ^ var b: i32 = a[-10]; diff --git a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon index f38cd50e22a2..c459f2c211c5 100644 --- a/toolchain/check/testdata/index/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/index/fail_non_deterministic_type.carbon @@ -6,7 +6,7 @@ var a: (i32, i32) = (2, 3); var b: i32 = 0; -// CHECK:STDERR: fail_non_deterministic_type.carbon:[[@LINE+3]]:17: Tuples indices must be integer literals. +// CHECK:STDERR: fail_non_deterministic_type.carbon:[[@LINE+3]]:17: ERROR: Tuples indices must be integer literals. // CHECK:STDERR: var c: i32 = a[b]; // CHECK:STDERR: ^ var c: i32 = a[b]; diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 954fb55efc29..3d69df461fff 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:6: `i32` does not support indexing. + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:6: ERROR: `i32` does not support indexing. // CHECK:STDERR: 0[1]; // CHECK:STDERR: ^ 0[1]; diff --git a/toolchain/check/testdata/index/fail_tuple_large_index.carbon b/toolchain/check/testdata/index/fail_tuple_large_index.carbon index a2ef0201c35d..b8ba3e955b17 100644 --- a/toolchain/check/testdata/index/fail_tuple_large_index.carbon +++ b/toolchain/check/testdata/index/fail_tuple_large_index.carbon @@ -6,7 +6,7 @@ var a: (i32,) = (12,); var b: (i32,) = a; -// CHECK:STDERR: fail_tuple_large_index.carbon:[[@LINE+3]]:35: Index `295147905179352825855` is past the end of `(i32,) as type`. +// CHECK:STDERR: fail_tuple_large_index.carbon:[[@LINE+3]]:35: ERROR: Index `295147905179352825855` is past the end of `(i32,) as type`. // CHECK:STDERR: var c: i32 = b[0xFFFFFFFFFFFFFFFFF]; // CHECK:STDERR: ^ var c: i32 = b[0xFFFFFFFFFFFFFFFFF]; diff --git a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon index 1f8e3d11aa0d..9d98bdea87fc 100644 --- a/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_tuple_non_int_indexing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_tuple_non_int_indexing.carbon:[[@LINE+3]]:19: Tuples indices must be integer literals. +// CHECK:STDERR: fail_tuple_non_int_indexing.carbon:[[@LINE+3]]:19: ERROR: Tuples indices must be integer literals. // CHECK:STDERR: var b: i32 = a[2.6]; // CHECK:STDERR: ^ var b: i32 = a[2.6]; diff --git a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon index e3d302f2bc00..d10b8c6bc32c 100644 --- a/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_tuple_out_of_bound_access.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_tuple_out_of_bound_access.carbon:[[@LINE+3]]:17: Index `2` is past the end of `(i32, i32) as type`. +// CHECK:STDERR: fail_tuple_out_of_bound_access.carbon:[[@LINE+3]]:17: ERROR: Index `2` is past the end of `(i32, i32) as type`. // CHECK:STDERR: var b: i32 = a[2]; // CHECK:STDERR: ^ var b: i32 = a[2]; diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index 3afb75d4f554..3e0935bea38a 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -9,7 +9,7 @@ namespace Foo; fn Foo.Baz() { } -// CHECK:STDERR: fail_duplicate.carbon:[[@LINE+6]]:8: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_duplicate.carbon:[[@LINE+6]]:8: ERROR: Duplicate name being declared in the same scope. // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^ // CHECK:STDERR: fail_duplicate.carbon:[[@LINE-6]]:1: Name is previously declared here. diff --git a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon index afe1064ac0ad..873e98664319 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_unresolved_scope.carbon:[[@LINE+3]]:4: Name `Foo` not found. +// CHECK:STDERR: fail_unresolved_scope.carbon:[[@LINE+3]]:4: ERROR: Name `Foo` not found. // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^ fn Foo.Baz() { diff --git a/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon b/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon index 6c484bdc3fd2..814b33d782e1 100644 --- a/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/fail_assigment_to_non_assignable.carbon @@ -7,39 +7,39 @@ fn F() -> i32; fn Main() { - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:3: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:3: ERROR: Expression is not assignable. // CHECK:STDERR: 1 = 2; // CHECK:STDERR: ^ 1 = 2; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:5: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:5: ERROR: Expression is not assignable. // CHECK:STDERR: F() = 1; // CHECK:STDERR: ^ F() = 1; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:8: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:8: ERROR: Expression is not assignable. // CHECK:STDERR: (1, 2) = (3, 4); // CHECK:STDERR: ^ (1, 2) = (3, 4); var n: i32 = 0; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:8: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:8: ERROR: Expression is not assignable. // CHECK:STDERR: (n, n) = (1, 2); // CHECK:STDERR: ^ (n, n) = (1, 2); - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:3: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:3: ERROR: Expression is not assignable. // CHECK:STDERR: i32 = i32*; // CHECK:STDERR: ^ i32 = i32*; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:18: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:18: ERROR: Expression is not assignable. // CHECK:STDERR: {.x = 1, .y = 2} = {.x = 3, .y = 4}; // CHECK:STDERR: ^ {.x = 1, .y = 2} = {.x = 3, .y = 4}; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:25: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:25: ERROR: Expression is not assignable. // CHECK:STDERR: (if true then 1 else 2) = 3; // CHECK:STDERR: ^ (if true then 1 else 2) = 3; // Under #911, if expressions are never reference expressions. var a: i32; - // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:25: Expression is not assignable. + // CHECK:STDERR: fail_assigment_to_non_assignable.carbon:[[@LINE+3]]:25: ERROR: Expression is not assignable. // CHECK:STDERR: (if true then a else a) = 10; // CHECK:STDERR: ^ (if true then a else a) = 10; diff --git a/toolchain/check/testdata/operators/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/fail_type_mismatch.carbon index d32a761c3296..66fbdbd11f35 100644 --- a/toolchain/check/testdata/operators/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/fail_type_mismatch.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() -> i32 { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:13: Cannot implicitly convert from `i32` to `f64`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:13: ERROR: Cannot implicitly convert from `i32` to `f64`. // CHECK:STDERR: return 12 + 3.4; // CHECK:STDERR: ^ return 12 + 3.4; diff --git a/toolchain/check/testdata/operators/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/fail_type_mismatch_assignment.carbon index 4b33cdda593b..be7a16c774fb 100644 --- a/toolchain/check/testdata/operators/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/fail_type_mismatch_assignment.carbon @@ -6,7 +6,7 @@ fn Main() { var a: i32 = 3; - // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:5: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:5: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: a = 5.6; // CHECK:STDERR: ^ a = 5.6; diff --git a/toolchain/check/testdata/operators/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/fail_type_mismatch_once.carbon index eb72a331a13d..da7fcb2c9520 100644 --- a/toolchain/check/testdata/operators/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/fail_type_mismatch_once.carbon @@ -7,7 +7,7 @@ fn Main() -> i32 { // The following line has two mismatches, but after the first, it shouldn't // keep erroring. - // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+3]]:13: Cannot implicitly convert from `i32` to `f64`. + // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+3]]:13: ERROR: Cannot implicitly convert from `i32` to `f64`. // CHECK:STDERR: return 12 + 3.4 + 12; // CHECK:STDERR: ^ return 12 + 3.4 + 12; diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index ed86bdb3efb8..05606ca6253c 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -9,74 +9,74 @@ fn G() -> i32; fn H() -> {.a: i32}; fn AddressOfLiteral() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &0; // CHECK:STDERR: ^ &0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &true; // CHECK:STDERR: ^ &true; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &1.0; // CHECK:STDERR: ^ &1.0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &"Hello"; // CHECK:STDERR: ^ &"Hello"; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &(1, 2); // CHECK:STDERR: ^ &(1, 2); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &{.a = 5}; // CHECK:STDERR: ^ &{.a = 5}; } fn AddressOfOperator() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &(1 + 1); // CHECK:STDERR: ^ &(1 + 1); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of a temporary object. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of a temporary object. // CHECK:STDERR: &H().a; // CHECK:STDERR: ^ &H().a; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &(not true); // CHECK:STDERR: ^ &(not true); } fn AddressOfCall() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &G(); // CHECK:STDERR: ^ &G(); } fn AddressOfType() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &i32; // CHECK:STDERR: ^ &i32; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &(const i32*); // CHECK:STDERR: ^ &(const i32*); } fn AddressOfTupleElementValue() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:3: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: &((1, 2)[0]); // CHECK:STDERR: ^ &((1, 2)[0]); } fn AddressOfParameter(param: i32) { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:26: Cannot take the address of non-reference expression. + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:26: ERROR: Cannot take the address of non-reference expression. // CHECK:STDERR: var param_addr: i32* = ¶m; // CHECK:STDERR: ^ var param_addr: i32* = ¶m; diff --git a/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon index 1c03cc541aa6..665034a11655 100644 --- a/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_dereference_not_pointer.carbon @@ -5,15 +5,15 @@ // AUTOUPDATE fn Deref(n: i32) { - // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: Cannot dereference operand of non-pointer type `i32`. + // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `i32`. // CHECK:STDERR: *n; // CHECK:STDERR: ^ *n; - // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: Cannot dereference operand of non-pointer type `() as type`. + // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `() as type`. // CHECK:STDERR: *(); // CHECK:STDERR: ^ *(); - // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: Cannot dereference operand of non-pointer type `{} as type`. + // CHECK:STDERR: fail_dereference_not_pointer.carbon:[[@LINE+3]]:3: ERROR: Cannot dereference operand of non-pointer type `{} as type`. // CHECK:STDERR: *{}; // CHECK:STDERR: ^ *{}; diff --git a/toolchain/check/testdata/pointer/fail_dereference_type.carbon b/toolchain/check/testdata/pointer/fail_dereference_type.carbon index ee8b55fb4bd1..c19220cdbb7d 100644 --- a/toolchain/check/testdata/pointer/fail_dereference_type.carbon +++ b/toolchain/check/testdata/pointer/fail_dereference_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+6]]:8: Cannot dereference operand of non-pointer type `type`. +// CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+6]]:8: ERROR: Cannot dereference operand of non-pointer type `type`. // CHECK:STDERR: var p: *i32; // CHECK:STDERR: ^ // CHECK:STDERR: fail_dereference_type.carbon:[[@LINE+3]]:8: To form a pointer type, write the `*` after the pointee type. diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index 39f51e1ad85a..9230d0e23321 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn ConstMismatch(p: const {}*) -> const ({}*) { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:11: Cannot implicitly convert from `const {}*` to `const ({}*)`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:11: ERROR: Cannot implicitly convert from `const {}*` to `const ({}*)`. // CHECK:STDERR: return p; // CHECK:STDERR: ^ return p; diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index 94d4a4757e8e..6d283dda4d9a 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() -> i32 { -// CHECK:STDERR: fail_missing_return.carbon:[[@LINE+3]]:1: Missing `return` at end of function with declared return type. +// CHECK:STDERR: fail_missing_return.carbon:[[@LINE+3]]:1: ERROR: Missing `return` at end of function with declared return type. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon index 95a7fe65a730..4cd994def2a3 100644 --- a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon +++ b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() -> () { -// CHECK:STDERR: fail_missing_return_empty_tuple.carbon:[[@LINE+3]]:1: Missing `return` at end of function with declared return type. +// CHECK:STDERR: fail_missing_return_empty_tuple.carbon:[[@LINE+3]]:1: ERROR: Missing `return` at end of function with declared return type. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 02279b92e55c..57ae3a243b6c 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() -> i32 { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:13: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:13: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: return 1.0; // CHECK:STDERR: ^ return 1.0; diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index 2d4a7ee9021a..33c656599f9c 100644 --- a/toolchain/check/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/check/testdata/return/fail_value_disallowed.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE+6]]:11: No return expression should be provided in this context. + // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE+6]]:11: ERROR: No return expression should be provided in this context. // CHECK:STDERR: return 0; // CHECK:STDERR: ^ // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE-4]]:1: There was no return type provided. diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index f09e4651a4ea..6d53be28cda4 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() -> i32 { - // CHECK:STDERR: fail_value_missing.carbon:[[@LINE+3]]:9: Must return a i32. + // CHECK:STDERR: fail_value_missing.carbon:[[@LINE+3]]:9: ERROR: Must return a i32. // CHECK:STDERR: return; // CHECK:STDERR: ^ return; diff --git a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon index c23a96ca4a33..23b0a5abb93c 100644 --- a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon +++ b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE -// CHECK:STDERR: fail_access_into_invalid.carbon:[[@LINE+3]]:10: Name `a` not found. +// CHECK:STDERR: fail_access_into_invalid.carbon:[[@LINE+3]]:10: ERROR: Name `a` not found. // CHECK:STDERR: fn F() { a.b; } // CHECK:STDERR: ^ fn F() { a.b; } diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 67bd42a9e708..621afcf8dd37 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:22: Cannot implicitly convert from `{} as type` to `{.a: i32}`. +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:22: ERROR: Cannot implicitly convert from `{} as type` to `{.a: i32}`. // CHECK:STDERR: var x: {.a: i32} = {}; // CHECK:STDERR: ^ var x: {.a: i32} = {}; diff --git a/toolchain/check/testdata/struct/fail_assign_nested.carbon b/toolchain/check/testdata/struct/fail_assign_nested.carbon index d371052d1ace..ec418f488663 100644 --- a/toolchain/check/testdata/struct/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/fail_assign_nested.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:28: Cannot implicitly convert from `{.b: {}}` to `{.a: {}}`. +// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:28: ERROR: Cannot implicitly convert from `{.b: {}}` to `{.a: {}}`. // CHECK:STDERR: var x: {.a: {}} = {.b = {}}; // CHECK:STDERR: ^ var x: {.a: {}} = {.b = {}}; diff --git a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon index 62d96bdee7a5..b2537ac4d190 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:21: Cannot implicitly convert from `{.a: i32}` to `{} as type`. +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:21: ERROR: Cannot implicitly convert from `{.a: i32}` to `{} as type`. // CHECK:STDERR: var x: {} = {.a = 1}; // CHECK:STDERR: ^ var x: {} = {.a = 1}; diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 301c0ab63ab4..781b0f3b0568 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+3]]:28: Cannot implicitly convert from `{.b: i32}` to `{.a: i32}`. +// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+3]]:28: ERROR: Cannot implicitly convert from `{.b: i32}` to `{.a: i32}`. // CHECK:STDERR: var x: {.a: i32} = {.b = 1}; // CHECK:STDERR: ^ var x: {.a: i32} = {.b = 1}; diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 2d11714c7e97..41f727524016 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_field_type_mismatch.carbon:[[@LINE+3]]:30: Cannot implicitly convert from `{.b: f64}` to `{.a: i32}`. +// CHECK:STDERR: fail_field_type_mismatch.carbon:[[@LINE+3]]:30: ERROR: Cannot implicitly convert from `{.b: f64}` to `{.a: i32}`. // CHECK:STDERR: var x: {.a: i32} = {.b = 1.0}; // CHECK:STDERR: ^ var x: {.a: i32} = {.b = 1.0}; diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 0208a71641f3..b7473830a149 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var x: {.a: f64} = {.a = 4.0}; -// CHECK:STDERR: fail_member_access_type.carbon:[[@LINE+3]]:15: Type `{.a: f64}` does not have a member `b`. +// CHECK:STDERR: fail_member_access_type.carbon:[[@LINE+3]]:15: ERROR: Type `{.a: f64}` does not have a member `b`. // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^ var y: i32 = x.b; diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 0ffc2bb6dbe1..8ec6c7b338a7 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE var x: {.a: i32} = {.a = 4}; -// CHECK:STDERR: fail_non_member_access.carbon:[[@LINE+3]]:15: Type `{.a: i32}` does not have a member `b`. +// CHECK:STDERR: fail_non_member_access.carbon:[[@LINE+3]]:15: ERROR: Type `{.a: i32}` does not have a member `b`. // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^ var y: i32 = x.b; diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index 48357aadd497..07a4eba80507 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_too_few_values.carbon:[[@LINE+3]]:37: Cannot implicitly convert from `{.a: i32}` to `{.a: i32, .b: i32}`. +// CHECK:STDERR: fail_too_few_values.carbon:[[@LINE+3]]:37: ERROR: Cannot implicitly convert from `{.a: i32}` to `{.a: i32, .b: i32}`. // CHECK:STDERR: var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDERR: ^ var x: {.a: i32, .b: i32} = {.a = 1}; diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index ec12c10ec674..0468d4e03813 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:29: Cannot implicitly convert from `type` to `{.a: i32}`. +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:29: ERROR: Cannot implicitly convert from `type` to `{.a: i32}`. // CHECK:STDERR: var x: {.a: i32} = {.a: i32}; // CHECK:STDERR: ^ var x: {.a: i32} = {.a: i32}; diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 4465ea91bd38..18f2f0b93853 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:15: Cannot implicitly convert from `{.a: i32}` to `type`. +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:15: ERROR: Cannot implicitly convert from `{.a: i32}` to `type`. // CHECK:STDERR: var x: {.a = 1}; // CHECK:STDERR: ^ var x: {.a = 1}; diff --git a/toolchain/check/testdata/tuples/fail_assign_empty.carbon b/toolchain/check/testdata/tuples/fail_assign_empty.carbon index 29b9b12a2ed8..29fd977a5698 100644 --- a/toolchain/check/testdata/tuples/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_empty.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:19: Cannot implicitly convert from `() as type` to `(i32,) as type`. +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:19: ERROR: Cannot implicitly convert from `() as type` to `(i32,) as type`. // CHECK:STDERR: var x: (i32,) = (); // CHECK:STDERR: ^ var x: (i32,) = (); diff --git a/toolchain/check/testdata/tuples/fail_assign_nested.carbon b/toolchain/check/testdata/tuples/fail_assign_nested.carbon index b7c809589e93..390855153697 100644 --- a/toolchain/check/testdata/tuples/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_nested.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:57: Cannot implicitly convert from `((i32, i32, i32), (i32, i32, i32)) as type` to `((i32, i32), (i32, i32)) as type`. +// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:57: ERROR: Cannot implicitly convert from `((i32, i32, i32), (i32, i32, i32)) as type` to `((i32, i32), (i32, i32)) as type`. // CHECK:STDERR: var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDERR: ^ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); diff --git a/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon index d214f92cb98e..1a65235c81c5 100644 --- a/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuples/fail_assign_to_empty.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:17: Cannot implicitly convert from `i32` to `() as type`. +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:17: ERROR: Cannot implicitly convert from `i32` to `() as type`. // CHECK:STDERR: var x: () = (66); // CHECK:STDERR: ^ var x: () = (66); diff --git a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon index cf52153d8c92..cc91ac1e5ff8 100644 --- a/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuples/fail_element_type_mismatch.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:31: Cannot implicitly convert from `(i32, f64) as type` to `(i32, i32) as type`. +// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:31: ERROR: Cannot implicitly convert from `(i32, f64) as type` to `(i32, i32) as type`. // CHECK:STDERR: var x: (i32, i32) = (2, 65.89); // CHECK:STDERR: ^ var x: (i32, i32) = (2, 65.89); diff --git a/toolchain/check/testdata/tuples/fail_too_few_element.carbon b/toolchain/check/testdata/tuples/fail_too_few_element.carbon index 781304908c7c..7b8d6b375893 100644 --- a/toolchain/check/testdata/tuples/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuples/fail_too_few_element.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_too_few_element.carbon:[[@LINE+3]]:26: Cannot implicitly convert from `(i32,) as type` to `(i32, i32) as type`. +// CHECK:STDERR: fail_too_few_element.carbon:[[@LINE+3]]:26: ERROR: Cannot implicitly convert from `(i32,) as type` to `(i32, i32) as type`. // CHECK:STDERR: var x: (i32, i32) = (2, ); // CHECK:STDERR: ^ var x: (i32, i32) = (2, ); diff --git a/toolchain/check/testdata/tuples/fail_type_assign.carbon b/toolchain/check/testdata/tuples/fail_type_assign.carbon index 02aaeebb4325..152b9b3d3120 100644 --- a/toolchain/check/testdata/tuples/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuples/fail_type_assign.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:25: Cannot implicitly convert from `(type,) as type` to `(i32,) as type`. +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:25: ERROR: Cannot implicitly convert from `(type,) as type` to `(i32,) as type`. // CHECK:STDERR: var x: (i32, ) = (i32, ); // CHECK:STDERR: ^ var x: (i32, ) = (i32, ); diff --git a/toolchain/check/testdata/tuples/fail_value_as_type.carbon b/toolchain/check/testdata/tuples/fail_value_as_type.carbon index 56763f89e5d8..8e0a1af1ac55 100644 --- a/toolchain/check/testdata/tuples/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuples/fail_value_as_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:12: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:12: ERROR: Cannot implicitly convert from `i32` to `type`. // CHECK:STDERR: var x: (1, ); // CHECK:STDERR: ^ var x: (1, ); diff --git a/toolchain/check/testdata/var/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/fail_duplicate_decl.carbon index 1c0373a0d193..a9cbbb5f30b5 100644 --- a/toolchain/check/testdata/var/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/fail_duplicate_decl.carbon @@ -7,7 +7,7 @@ fn Main() { var x: i32 = 0; - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: Duplicate name being declared in the same scope. + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: ERROR: Duplicate name being declared in the same scope. // CHECK:STDERR: var x: i32 = 0; // CHECK:STDERR: ^ // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: Name is previously declared here. diff --git a/toolchain/check/testdata/var/fail_init_type_mismatch.carbon b/toolchain/check/testdata/var/fail_init_type_mismatch.carbon index 3344b7b45c22..060ea122b6db 100644 --- a/toolchain/check/testdata/var/fail_init_type_mismatch.carbon +++ b/toolchain/check/testdata/var/fail_init_type_mismatch.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_init_type_mismatch.carbon:[[@LINE+3]]:19: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_init_type_mismatch.carbon:[[@LINE+3]]:19: ERROR: Cannot implicitly convert from `f64` to `i32`. // CHECK:STDERR: var x: i32 = 1.0; // CHECK:STDERR: ^ var x: i32 = 1.0; diff --git a/toolchain/check/testdata/var/fail_init_with_self.carbon b/toolchain/check/testdata/var/fail_init_with_self.carbon index 713b7f860919..ad93a98c61e6 100644 --- a/toolchain/check/testdata/var/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/fail_init_with_self.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_init_with_self.carbon:[[@LINE+3]]:16: Name `x` not found. + // CHECK:STDERR: fail_init_with_self.carbon:[[@LINE+3]]:16: ERROR: Name `x` not found. // CHECK:STDERR: var x: i32 = x; // CHECK:STDERR: ^ var x: i32 = x; diff --git a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon index 51e99e3882ef..24b885b7e85c 100644 --- a/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/fail_lookup_outside_scope.carbon @@ -8,7 +8,7 @@ fn Main() { var x: i32; } -// CHECK:STDERR: fail_lookup_outside_scope.carbon:[[@LINE+3]]:14: Name `x` not found. +// CHECK:STDERR: fail_lookup_outside_scope.carbon:[[@LINE+3]]:14: ERROR: Name `x` not found. // CHECK:STDERR: var y: i32 = x; // CHECK:STDERR: ^ var y: i32 = x; diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index da245209241e..011c079a742a 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn Main() { - // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: Cannot implicitly convert from `i32` to `type`. + // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: ERROR: Cannot implicitly convert from `i32` to `type`. // CHECK:STDERR: var x: 1 = 1; // CHECK:STDERR: ^ var x: 1 = 1; diff --git a/toolchain/diagnostics/diagnostic_emitter.h b/toolchain/diagnostics/diagnostic_emitter.h index ca1ca37454a4..87eb6c607743 100644 --- a/toolchain/diagnostics/diagnostic_emitter.h +++ b/toolchain/diagnostics/diagnostic_emitter.h @@ -345,12 +345,17 @@ class StreamDiagnosticConsumer : public DiagnosticConsumer { : stream_(&stream) {} auto HandleDiagnostic(Diagnostic diagnostic) -> void override { - Print(diagnostic.message); + std::string prefix = ""; + if (diagnostic.level == DiagnosticLevel::Error) { + prefix = "ERROR: "; + } + Print(diagnostic.message, prefix); for (const auto& note : diagnostic.notes) { Print(note); } } - auto Print(const DiagnosticMessage& message) -> void { + auto Print(const DiagnosticMessage& message, llvm::StringRef prefix = "") + -> void { *stream_ << message.location.file_name; if (message.location.line_number > 0) { *stream_ << ":" << message.location.line_number; @@ -358,7 +363,7 @@ class StreamDiagnosticConsumer : public DiagnosticConsumer { *stream_ << ":" << message.location.column_number; } } - *stream_ << ": " << message.format_fn(message) << "\n"; + *stream_ << ": " << prefix << message.format_fn(message) << "\n"; if (message.location.column_number > 0) { *stream_ << message.location.line << "\n"; stream_->indent(message.location.column_number - 1); diff --git a/toolchain/driver/testdata/fail_errors_in_two_files.carbon b/toolchain/driver/testdata/fail_errors_in_two_files.carbon index d440b0c1d0f5..30fa2525d13a 100644 --- a/toolchain/driver/testdata/fail_errors_in_two_files.carbon +++ b/toolchain/driver/testdata/fail_errors_in_two_files.carbon @@ -8,7 +8,7 @@ // --- file1.carbon -// CHECK:STDERR: file1.carbon:[[@LINE+3]]:24: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: file1.carbon:[[@LINE+3]]:24: ERROR: Closing symbol does not match most recent opening symbol. // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ fn run(String program) { @@ -16,7 +16,7 @@ fn run(String program) { // --- file2.carbon -// CHECK:STDERR: file2.carbon:[[@LINE+3]]:10: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: file2.carbon:[[@LINE+3]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_errors_sorted.carbon b/toolchain/driver/testdata/fail_errors_sorted.carbon index 43d58520c1df..6bb12784fcd0 100644 --- a/toolchain/driver/testdata/fail_errors_sorted.carbon +++ b/toolchain/driver/testdata/fail_errors_sorted.carbon @@ -6,13 +6,13 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:24: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:24: ERROR: Closing symbol does not match most recent opening symbol. // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ fn run(String program) { return True; -// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:10: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_errors_streamed.carbon b/toolchain/driver/testdata/fail_errors_streamed.carbon index a04dc6adf7d2..c06b4577e229 100644 --- a/toolchain/driver/testdata/fail_errors_streamed.carbon +++ b/toolchain/driver/testdata/fail_errors_streamed.carbon @@ -9,10 +9,10 @@ fn run(String program) { return True; -// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+6]]:10: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+6]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-6]]:24: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-6]]:24: ERROR: Closing symbol does not match most recent opening symbol. // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_flush_errors.carbon b/toolchain/driver/testdata/fail_flush_errors.carbon index 6c13f1e1fe14..04539ab6e041 100644 --- a/toolchain/driver/testdata/fail_flush_errors.carbon +++ b/toolchain/driver/testdata/fail_flush_errors.carbon @@ -9,7 +9,7 @@ fn F() { // Create diagnostics containing string references, and trigger reallocation // of the string table. - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: Name `undeclared1` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: ERROR: Name `undeclared1` not found. // CHECK:STDERR: undeclared1; // CHECK:STDERR: ^ undeclared1; @@ -18,14 +18,14 @@ fn F() { // literal storage. Use a hex escape to ensure that the tokenized buffer // allocates separate storage for the result. "undec\x6Cared2"; - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: Name `undeclared2` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: ERROR: Name `undeclared2` not found. // CHECK:STDERR: undeclared2; // CHECK:STDERR: ^ undeclared2; // Add the name into the string table via a declaration rather than an expression. if (true) { var undeclared3: i32 = 0; } - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: Name `undeclared3` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: ERROR: Name `undeclared3` not found. // CHECK:STDERR: undeclared3; // CHECK:STDERR: ^ undeclared3; diff --git a/toolchain/driver/testdata/fail_missing_file.carbon b/toolchain/driver/testdata/fail_missing_file.carbon index f526de9ee047..21770fbfc30c 100644 --- a/toolchain/driver/testdata/fail_missing_file.carbon +++ b/toolchain/driver/testdata/fail_missing_file.carbon @@ -5,4 +5,4 @@ // ARGS: compile nonexistent.carbon // // AUTOUPDATE -// CHECK:STDERR: nonexistent.carbon: Error opening file for read: No such file or directory +// CHECK:STDERR: nonexistent.carbon: ERROR: Error opening file for read: No such file or directory diff --git a/toolchain/lex/testdata/fail_block_string_second_line.carbon b/toolchain/lex/testdata/fail_block_string_second_line.carbon index c95b7e289def..22cadfe7e6df 100644 --- a/toolchain/lex/testdata/fail_block_string_second_line.carbon +++ b/toolchain/lex/testdata/fail_block_string_second_line.carbon @@ -7,7 +7,7 @@ // CHECK:STDOUT: - filename: fail_block_string_second_line.carbon // CHECK:STDOUT: tokens: [ -// CHECK:STDERR: fail_block_string_second_line.carbon:[[@LINE+4]]:3: Only whitespace is permitted before the closing `'''` of a multi-line string. +// CHECK:STDERR: fail_block_string_second_line.carbon:[[@LINE+4]]:3: ERROR: Only whitespace is permitted before the closing `'''` of a multi-line string. // CHECK:STDERR: error here: ''' // CHECK:STDERR: ^ var s: String = ''' diff --git a/toolchain/lex/testdata/fail_multifile.carbon b/toolchain/lex/testdata/fail_multifile.carbon index d7c978167869..f7c71391170a 100644 --- a/toolchain/lex/testdata/fail_multifile.carbon +++ b/toolchain/lex/testdata/fail_multifile.carbon @@ -7,7 +7,7 @@ // --- a.carbon // CHECK:STDOUT: - filename: a.carbon // CHECK:STDOUT: tokens: [ -// CHECK:STDERR: a.carbon:[[@LINE+3]]:3: Empty digit sequence in numeric literal. +// CHECK:STDERR: a.carbon:[[@LINE+3]]:3: ERROR: Empty digit sequence in numeric literal. // CHECK:STDERR: 1.a // CHECK:STDERR: ^ 1.a @@ -18,7 +18,7 @@ // --- b.carbon // CHECK:STDOUT: - filename: b.carbon // CHECK:STDOUT: tokens: [ -// CHECK:STDERR: b.carbon:[[@LINE+3]]:3: Empty digit sequence in numeric literal. +// CHECK:STDERR: b.carbon:[[@LINE+3]]:3: ERROR: Empty digit sequence in numeric literal. // CHECK:STDERR: 2.b // CHECK:STDERR: ^ 2.b diff --git a/toolchain/lower/testdata/basics/fail_before_lowering.carbon b/toolchain/lower/testdata/basics/fail_before_lowering.carbon index bd544aa8816a..526c69e443b7 100644 --- a/toolchain/lower/testdata/basics/fail_before_lowering.carbon +++ b/toolchain/lower/testdata/basics/fail_before_lowering.carbon @@ -5,7 +5,7 @@ // This validates that earlier errors prevent lowering, without crashing. // AUTOUPDATE -// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. // CHECK:STDERR: a; // CHECK:STDERR: ^ a; diff --git a/toolchain/parse/testdata/array/fail_require_close_bracket.carbon b/toolchain/parse/testdata/array/fail_require_close_bracket.carbon index d7d8b3d1bff9..03ca4762c9ff 100644 --- a/toolchain/parse/testdata/array/fail_require_close_bracket.carbon +++ b/toolchain/parse/testdata/array/fail_require_close_bracket.carbon @@ -5,18 +5,18 @@ // AUTOUPDATE // TODO: It should emit only one error message. -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+9]]:8: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+9]]:8: ERROR: Closing symbol does not match most recent opening symbol. // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+6]]:13: Expected expression. +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+6]]:13: ERROR: Expected expression. // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:13: Unexpected tokens before `]`. +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:13: ERROR: Unexpected tokens before `]`. // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ var x: [i32;; -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+15]]:21: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+15]]:21: ERROR: `var` declarations must end with a `;`. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_require_close_bracket.carbon diff --git a/toolchain/parse/testdata/array/fail_require_semi.carbon b/toolchain/parse/testdata/array/fail_require_semi.carbon index 5747f81c166f..285a507aa79c 100644 --- a/toolchain/parse/testdata/array/fail_require_semi.carbon +++ b/toolchain/parse/testdata/array/fail_require_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_require_semi.carbon:[[@LINE+3]]:12: Expected `;` in array type. +// CHECK:STDERR: fail_require_semi.carbon:[[@LINE+3]]:12: ERROR: Expected `;` in array type. // CHECK:STDERR: var x: [i32]; // CHECK:STDERR: ^ var x: [i32]; diff --git a/toolchain/parse/testdata/basics/fail_invalid_designators.carbon b/toolchain/parse/testdata/basics/fail_invalid_designators.carbon index ea40fea62c8e..e1790096f701 100644 --- a/toolchain/parse/testdata/basics/fail_invalid_designators.carbon +++ b/toolchain/parse/testdata/basics/fail_invalid_designators.carbon @@ -6,15 +6,15 @@ // NOTE: Move to its own directory when more tests are added. fn F() { - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: Expected identifier after `.`. + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: ERROR: Expected identifier after `.`. // CHECK:STDERR: a.; // CHECK:STDERR: ^ a.; - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: Expected identifier after `.`. + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: ERROR: Expected identifier after `.`. // CHECK:STDERR: a.fn; // CHECK:STDERR: ^ a.fn; - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: Expected identifier after `.`. + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: ERROR: Expected identifier after `.`. // CHECK:STDERR: a.42; // CHECK:STDERR: ^ a.42; diff --git a/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon b/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon index 6e3879b4babd..2a1f28d01265 100644 --- a/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon +++ b/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_intro_with_semi.carbon:[[@LINE+3]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: fail_no_intro_with_semi.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. // CHECK:STDERR: foo; // CHECK:STDERR: ^ foo; diff --git a/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon b/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon index 3da7ed50f657..644d665525fd 100644 --- a/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon +++ b/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_intro_without_semi.carbon:[[@LINE+3]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: fail_no_intro_without_semi.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. // CHECK:STDERR: foo bar baz // CHECK:STDERR: ^ foo bar baz diff --git a/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon b/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon index 39a169f5da77..3bee32871f7c 100644 --- a/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon +++ b/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon @@ -4,15 +4,15 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+6]]:5: Expected pattern in `var` declaration. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+6]]:5: ERROR: Expected pattern in `var` declaration. // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+3]]:12: Expected `,` or `)`. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+3]]:12: ERROR: Expected `,` or `)`. // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ var = (foo {}) -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+15]]:21: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+15]]:21: ERROR: `var` declarations must end with a `;`. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_paren_match_regression.carbon diff --git a/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon b/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon index 7fb658202f5d..cf2ca651a448 100644 --- a/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon +++ b/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn foo() { - // CHECK:STDERR: fail_colon_instead_of_in.carbon:[[@LINE+3]]:19: `:` should be replaced by `in`. + // CHECK:STDERR: fail_colon_instead_of_in.carbon:[[@LINE+3]]:19: ERROR: `:` should be replaced by `in`. // CHECK:STDERR: for (var x: i32 : y) { // CHECK:STDERR: ^ for (var x: i32 : y) { diff --git a/toolchain/parse/testdata/for/fail_missing_cond.carbon b/toolchain/parse/testdata/for/fail_missing_cond.carbon index 9bf911e6b1be..5d63e87d8d5f 100644 --- a/toolchain/parse/testdata/for/fail_missing_cond.carbon +++ b/toolchain/parse/testdata/for/fail_missing_cond.carbon @@ -5,18 +5,18 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+6]]:7: Expected `(` after `for`. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+6]]:7: ERROR: Expected `(` after `for`. // CHECK:STDERR: for { // CHECK:STDERR: ^ - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:7: Expected `var` declaration. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:7: ERROR: Expected `var` declaration. // CHECK:STDERR: for { // CHECK:STDERR: ^ for { } -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+6]]:1: Expected braced code block. +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+6]]:1: ERROR: Expected braced code block. // CHECK:STDERR: } // CHECK:STDERR: ^ -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: Expected expression. +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: ERROR: Expected expression. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/for/fail_missing_in.carbon b/toolchain/parse/testdata/for/fail_missing_in.carbon index 0c60ff4bd561..a4762676e4b4 100644 --- a/toolchain/parse/testdata/for/fail_missing_in.carbon +++ b/toolchain/parse/testdata/for/fail_missing_in.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn foo() { - // CHECK:STDERR: fail_missing_in.carbon:[[@LINE+3]]:19: Expected `in` after loop `var` declaration. + // CHECK:STDERR: fail_missing_in.carbon:[[@LINE+3]]:19: ERROR: Expected `in` after loop `var` declaration. // CHECK:STDERR: for (var x: i32 y) { // CHECK:STDERR: ^ for (var x: i32 y) { diff --git a/toolchain/parse/testdata/for/fail_missing_var.carbon b/toolchain/parse/testdata/for/fail_missing_var.carbon index cf5ef07c593d..d09cac5cfd85 100644 --- a/toolchain/parse/testdata/for/fail_missing_var.carbon +++ b/toolchain/parse/testdata/for/fail_missing_var.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn foo() { - // CHECK:STDERR: fail_missing_var.carbon:[[@LINE+3]]:8: Expected `var` declaration. + // CHECK:STDERR: fail_missing_var.carbon:[[@LINE+3]]:8: ERROR: Expected `var` declaration. // CHECK:STDERR: for (x: i32 in y) { // CHECK:STDERR: ^ for (x: i32 in y) { diff --git a/toolchain/parse/testdata/for/fail_square_brackets.carbon b/toolchain/parse/testdata/for/fail_square_brackets.carbon index f92fa06db8d2..4d37eca88400 100644 --- a/toolchain/parse/testdata/for/fail_square_brackets.carbon +++ b/toolchain/parse/testdata/for/fail_square_brackets.carbon @@ -5,16 +5,16 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+12]]:7: Expected `(` after `for`. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+12]]:7: ERROR: Expected `(` after `for`. // CHECK:STDERR: for [] { // CHECK:STDERR: ^ - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+9]]:7: Expected `var` declaration. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+9]]:7: ERROR: Expected `var` declaration. // CHECK:STDERR: for [] { // CHECK:STDERR: ^ - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+6]]:8: Expected expression. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+6]]:8: ERROR: Expected expression. // CHECK:STDERR: for [] { // CHECK:STDERR: ^ - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: Expected `;` in array type. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: ERROR: Expected `;` in array type. // CHECK:STDERR: for [] { // CHECK:STDERR: ^ for [] { diff --git a/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon b/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon index c5327f08058d..a96ee02db3cb 100644 --- a/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_identifier_instead_of_sig.carbon:[[@LINE+3]]:8: `fn` requires a `(` for parameters. +// CHECK:STDERR: fail_identifier_instead_of_sig.carbon:[[@LINE+3]]:8: ERROR: `fn` requires a `(` for parameters. // CHECK:STDERR: fn foo bar; // CHECK:STDERR: ^ fn foo bar; diff --git a/toolchain/parse/testdata/function/declaration/fail_missing_deduced_close.carbon b/toolchain/parse/testdata/function/declaration/fail_missing_deduced_close.carbon index 2123e49b235d..fbc8911e2336 100644 --- a/toolchain/parse/testdata/function/declaration/fail_missing_deduced_close.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_missing_deduced_close.carbon @@ -5,15 +5,15 @@ // AUTOUPDATE // Fix and uncomment this to test error handling. -// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+6]]:7: Closing symbol does not match most recent opening symbol. +// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+6]]:7: ERROR: Closing symbol does not match most recent opening symbol. // CHECK:STDERR: fn Div[(); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+3]]:8: Expected parameter declaration. +// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+3]]:8: ERROR: Expected parameter declaration. // CHECK:STDERR: fn Div[(); // CHECK:STDERR: ^ fn Div[(); -// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+14]]:21: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: fail_missing_deduced_close.carbon:[[@LINE+14]]:21: ERROR: A `(` for parameters is required after deduced parameters. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_missing_deduced_close.carbon diff --git a/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon b/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon index a8c08c685e8f..2b0a3afcce4e 100644 --- a/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn (); // CHECK:STDERR: ^ fn (); diff --git a/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon index 7edc8f27fff0..9776e0ea3e45 100644 --- a/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon @@ -6,7 +6,7 @@ fn foo -// CHECK:STDERR: fail_no_sig_or_semi.carbon:[[@LINE+9]]:21: `fn` requires a `(` for parameters. +// CHECK:STDERR: fail_no_sig_or_semi.carbon:[[@LINE+9]]:21: ERROR: `fn` requires a `(` for parameters. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_sig_or_semi.carbon diff --git a/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon index 56c5de11819b..66b9022848ea 100644 --- a/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_only_fn_and_semi.carbon:[[@LINE+3]]:3: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_only_fn_and_semi.carbon:[[@LINE+3]]:3: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn; // CHECK:STDERR: ^ fn; diff --git a/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon index 8cda8fefbd73..0b9813b1945b 100644 --- a/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_repeated_fn_and_semi.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_repeated_fn_and_semi.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn fn; // CHECK:STDERR: ^ fn fn; diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon index 0dbd14b97f1f..f99a01867429 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE - // CHECK:STDERR: fail_skip_indented_newline_until_outdent.carbon:[[@LINE+3]]:6: `fn` introducer should be followed by a name. + // CHECK:STDERR: fail_skip_indented_newline_until_outdent.carbon:[[@LINE+3]]:6: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon index 1ad4e28a87f2..a209832a4750 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_skip_indented_newline_with_semi.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_skip_indented_newline_with_semi.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon index 282c8f3ae6c8..c4bd0febd00d 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_skip_indented_newline_without_semi.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_skip_indented_newline_without_semi.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon index 306bbc4d57e2..08df140ebde4 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_skip_to_newline_without_semi.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_skip_to_newline_without_semi.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn () // CHECK:STDERR: ^ fn () diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon index 90a26e4cec97..972129f1b449 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: Unrecognized declaration introducer. +// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. // CHECK:STDERR: struct X { fn () } // CHECK:STDERR: ^ struct X { fn () } diff --git a/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon b/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon index 0d6f123c87aa..53cf9897a752 100644 --- a/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_with_identifier_as_param.carbon:[[@LINE+3]]:11: Expected parameter declaration. +// CHECK:STDERR: fail_with_identifier_as_param.carbon:[[@LINE+3]]:11: ERROR: Expected parameter declaration. // CHECK:STDERR: fn foo(bar); // CHECK:STDERR: ^ fn foo(bar); diff --git a/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon b/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon index e18c28c65a6a..f970fc0cac3a 100644 --- a/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+3]]:4: `fn` introducer should be followed by a name. +// CHECK:STDERR: fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+3]]:4: ERROR: `fn` introducer should be followed by a name. // CHECK:STDERR: fn (a tokens c d e f g h i j k l m n o p q r s t u v w x y z); // CHECK:STDERR: ^ fn (a tokens c d e f g h i j k l m n o p q r s t u v w x y z); diff --git a/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon b/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon index c9ac956c4975..b9452867de09 100644 --- a/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon +++ b/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon @@ -8,7 +8,7 @@ fn F() { // Note: this might become valid depending on the expression syntax. This test // shouldn't be taken as a sign it should remain invalid. bar -// CHECK:STDERR: fail_identifier_in_statements.carbon:[[@LINE+3]]:1: Expected `;` after expression statement. +// CHECK:STDERR: fail_identifier_in_statements.carbon:[[@LINE+3]]:1: ERROR: Expected `;` after expression statement. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon b/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon index 7b4e01c1db8f..d4e34b20531c 100644 --- a/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon @@ -4,22 +4,22 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:12: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:12: ERROR: A `(` for parameters is required after deduced parameters. // CHECK:STDERR: class Foo[]; // CHECK:STDERR: ^ class Foo[]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:18: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:18: ERROR: A `(` for parameters is required after deduced parameters. // CHECK:STDERR: class Foo[a: i32]; // CHECK:STDERR: ^ class Foo[a: i32]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:17: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:17: ERROR: A `(` for parameters is required after deduced parameters. // CHECK:STDERR: interface Bar[] {} // CHECK:STDERR: ^ interface Bar[] {} -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:23: A `(` for parameters is required after deduced parameters. +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:23: ERROR: A `(` for parameters is required after deduced parameters. // CHECK:STDERR: interface Bar[a: i32] {} // CHECK:STDERR: ^ interface Bar[a: i32] {} diff --git a/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon b/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon index ceec8a088d1b..4dd9609d5cc8 100644 --- a/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:11: `interface` introducer should be followed by a name. +// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:11: ERROR: `interface` introducer should be followed by a name. // CHECK:STDERR: interface { // CHECK:STDERR: ^ interface { diff --git a/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon b/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon index 3ccb4bb022cc..3784744601c3 100644 --- a/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon @@ -4,14 +4,14 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+3]]:15: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition. +// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+3]]:15: ERROR: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition. // CHECK:STDERR: interface Bar Baz {} // CHECK:STDERR: ^ interface Bar Baz {} interface Foo -// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+12]]:21: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition. +// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+12]]:21: ERROR: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_missing_open_curly.carbon diff --git a/toolchain/parse/testdata/generics/interface/fail_no_impl_allowed.carbon b/toolchain/parse/testdata/generics/interface/fail_no_impl_allowed.carbon index 8fd33422fcbf..5dc668124327 100644 --- a/toolchain/parse/testdata/generics/interface/fail_no_impl_allowed.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_no_impl_allowed.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE interface Foo { - // CHECK:STDERR: fail_no_impl_allowed.carbon:[[@LINE+3]]:39: Method implementations are not allowed in interfaces. + // CHECK:STDERR: fail_no_impl_allowed.carbon:[[@LINE+3]]:39: ERROR: Method implementations are not allowed in interfaces. // CHECK:STDERR: fn Add[self: Self](b: Self) -> Self { // CHECK:STDERR: ^ fn Add[self: Self](b: Self) -> Self { diff --git a/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon b/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon index 01616ca7d0b6..9fc0c1af1314 100644 --- a/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon @@ -5,12 +5,12 @@ // AUTOUPDATE interface Foo { - // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:13: Expected parameter declaration. + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:13: ERROR: Expected parameter declaration. // CHECK:STDERR: fn Sub[me Self](b: Self) -> Self; // CHECK:STDERR: ^ fn Sub[me Self](b: Self) -> Self; - // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:10: Expected parameter declaration. + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:10: ERROR: Expected parameter declaration. // CHECK:STDERR: fn Mul[Self](b: Self) -> Self; // CHECK:STDERR: ^ fn Mul[Self](b: Self) -> Self; diff --git a/toolchain/parse/testdata/generics/named_constraint/fail_no_impl_allowed.carbon b/toolchain/parse/testdata/generics/named_constraint/fail_no_impl_allowed.carbon index f32b8bd5d336..e11058bced51 100644 --- a/toolchain/parse/testdata/generics/named_constraint/fail_no_impl_allowed.carbon +++ b/toolchain/parse/testdata/generics/named_constraint/fail_no_impl_allowed.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE constraint Foo { - // CHECK:STDERR: fail_no_impl_allowed.carbon:[[@LINE+3]]:39: Method implementations are not allowed in interfaces. + // CHECK:STDERR: fail_no_impl_allowed.carbon:[[@LINE+3]]:39: ERROR: Method implementations are not allowed in interfaces. // CHECK:STDERR: fn Add[self: Self](b: Self) -> Self {} // CHECK:STDERR: ^ fn Add[self: Self](b: Self) -> Self {} diff --git a/toolchain/parse/testdata/if/fail_else_unbraced.carbon b/toolchain/parse/testdata/if/fail_else_unbraced.carbon index 13b8dd24b75e..eb6d3c217aef 100644 --- a/toolchain/parse/testdata/if/fail_else_unbraced.carbon +++ b/toolchain/parse/testdata/if/fail_else_unbraced.carbon @@ -6,21 +6,21 @@ fn F() { if (a) - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block. // CHECK:STDERR: if (b) // CHECK:STDERR: ^ if (b) - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:7: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:7: ERROR: Expected braced code block. // CHECK:STDERR: c; // CHECK:STDERR: ^ c; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:7: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:7: ERROR: Expected braced code block. // CHECK:STDERR: d; // CHECK:STDERR: ^ d; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block. // CHECK:STDERR: e; // CHECK:STDERR: ^ e; diff --git a/toolchain/parse/testdata/if/fail_errors.carbon b/toolchain/parse/testdata/if/fail_errors.carbon index 40f12a86bb2a..00cd51beff0a 100644 --- a/toolchain/parse/testdata/if/fail_errors.carbon +++ b/toolchain/parse/testdata/if/fail_errors.carbon @@ -5,23 +5,23 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:6: Expected `(` after `if`. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:6: ERROR: Expected `(` after `if`. // CHECK:STDERR: if a {} // CHECK:STDERR: ^ if a {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:7: Expected expression. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:7: ERROR: Expected expression. // CHECK:STDERR: if () {} // CHECK:STDERR: ^ if () {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:9: Unexpected tokens before `)`. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:9: ERROR: Unexpected tokens before `)`. // CHECK:STDERR: if (b c) {} // CHECK:STDERR: ^ if (b c) {} if (d) -// CHECK:STDERR: fail_errors.carbon:[[@LINE+6]]:1: Expected braced code block. +// CHECK:STDERR: fail_errors.carbon:[[@LINE+6]]:1: ERROR: Expected braced code block. // CHECK:STDERR: } // CHECK:STDERR: ^ -// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: Expected expression. +// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: ERROR: Expected expression. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/if/fail_missing_cond.carbon b/toolchain/parse/testdata/if/fail_missing_cond.carbon index c5bb6fced438..ca66e43723a5 100644 --- a/toolchain/parse/testdata/if/fail_missing_cond.carbon +++ b/toolchain/parse/testdata/if/fail_missing_cond.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:6: Expected `(` after `if`. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:6: ERROR: Expected `(` after `if`. // CHECK:STDERR: if { // CHECK:STDERR: ^ if { diff --git a/toolchain/parse/testdata/if/fail_square_brackets.carbon b/toolchain/parse/testdata/if/fail_square_brackets.carbon index cb0ca3ce02c6..c0705ffe4026 100644 --- a/toolchain/parse/testdata/if/fail_square_brackets.carbon +++ b/toolchain/parse/testdata/if/fail_square_brackets.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+9]]:6: Expected `(` after `if`. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+9]]:6: ERROR: Expected `(` after `if`. // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+6]]:7: Expected expression. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+6]]:7: ERROR: Expected expression. // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: Expected `;` in array type. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: ERROR: Expected `;` in array type. // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ if [] {} diff --git a/toolchain/parse/testdata/if/fail_unbraced.carbon b/toolchain/parse/testdata/if/fail_unbraced.carbon index fd2484f4104d..4e31e2ddd340 100644 --- a/toolchain/parse/testdata/if/fail_unbraced.carbon +++ b/toolchain/parse/testdata/if/fail_unbraced.carbon @@ -7,15 +7,15 @@ fn F() { if (a) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block. // CHECK:STDERR: if (b) // CHECK:STDERR: ^ if (b) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:7: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:7: ERROR: Expected braced code block. // CHECK:STDERR: if (c) // CHECK:STDERR: ^ if (c) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: ERROR: Expected braced code block. // CHECK:STDERR: d; // CHECK:STDERR: ^ d; diff --git a/toolchain/parse/testdata/if_expression/fail_condition_missing.carbon b/toolchain/parse/testdata/if_expression/fail_condition_missing.carbon index f693e949341d..8a750f28090f 100644 --- a/toolchain/parse/testdata/if_expression/fail_condition_missing.carbon +++ b/toolchain/parse/testdata/if_expression/fail_condition_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_condition_missing.carbon:[[@LINE+3]]:18: Expected expression. + // CHECK:STDERR: fail_condition_missing.carbon:[[@LINE+3]]:18: ERROR: Expected expression. // CHECK:STDERR: var n: i32 = if; // CHECK:STDERR: ^ var n: i32 = if; diff --git a/toolchain/parse/testdata/if_expression/fail_else_expr_missing.carbon b/toolchain/parse/testdata/if_expression/fail_else_expr_missing.carbon index 0c75323dea00..07371a3ef1c3 100644 --- a/toolchain/parse/testdata/if_expression/fail_else_expr_missing.carbon +++ b/toolchain/parse/testdata/if_expression/fail_else_expr_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_else_expr_missing.carbon:[[@LINE+3]]:35: Expected expression. + // CHECK:STDERR: fail_else_expr_missing.carbon:[[@LINE+3]]:35: ERROR: Expected expression. // CHECK:STDERR: var n: i32 = if true then 1 else; // CHECK:STDERR: ^ var n: i32 = if true then 1 else; diff --git a/toolchain/parse/testdata/if_expression/fail_else_missing.carbon b/toolchain/parse/testdata/if_expression/fail_else_missing.carbon index e24c4dcffb61..a3489c9a0dbf 100644 --- a/toolchain/parse/testdata/if_expression/fail_else_missing.carbon +++ b/toolchain/parse/testdata/if_expression/fail_else_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_else_missing.carbon:[[@LINE+3]]:30: Expected `else` after `if ... then ...`. + // CHECK:STDERR: fail_else_missing.carbon:[[@LINE+3]]:30: ERROR: Expected `else` after `if ... then ...`. // CHECK:STDERR: var n: i32 = if true then 1; // CHECK:STDERR: ^ var n: i32 = if true then 1; diff --git a/toolchain/parse/testdata/if_expression/fail_then_expr_missing.carbon b/toolchain/parse/testdata/if_expression/fail_then_expr_missing.carbon index d044e54b8fb2..d87728db295c 100644 --- a/toolchain/parse/testdata/if_expression/fail_then_expr_missing.carbon +++ b/toolchain/parse/testdata/if_expression/fail_then_expr_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_then_expr_missing.carbon:[[@LINE+3]]:28: Expected expression. + // CHECK:STDERR: fail_then_expr_missing.carbon:[[@LINE+3]]:28: ERROR: Expected expression. // CHECK:STDERR: var n: i32 = if true then; // CHECK:STDERR: ^ var n: i32 = if true then; diff --git a/toolchain/parse/testdata/if_expression/fail_then_missing.carbon b/toolchain/parse/testdata/if_expression/fail_then_missing.carbon index 4aac0249e0dc..39a662478585 100644 --- a/toolchain/parse/testdata/if_expression/fail_then_missing.carbon +++ b/toolchain/parse/testdata/if_expression/fail_then_missing.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_then_missing.carbon:[[@LINE+3]]:23: Expected `then` after `if` condition. + // CHECK:STDERR: fail_then_missing.carbon:[[@LINE+3]]:23: ERROR: Expected `then` after `if` condition. // CHECK:STDERR: var n: i32 = if true; // CHECK:STDERR: ^ var n: i32 = if true; diff --git a/toolchain/parse/testdata/if_expression/fail_top_level_if.carbon b/toolchain/parse/testdata/if_expression/fail_top_level_if.carbon index 7faadf946abd..e286739a9d20 100644 --- a/toolchain/parse/testdata/if_expression/fail_top_level_if.carbon +++ b/toolchain/parse/testdata/if_expression/fail_top_level_if.carbon @@ -5,13 +5,13 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+9]]:6: Expected `(` after `if`. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+9]]:6: ERROR: Expected `(` after `if`. // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+6]]:11: Expected braced code block. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+6]]:11: ERROR: Expected braced code block. // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: Expected expression. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: ERROR: Expected expression. // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^ if true then 1 else 2; diff --git a/toolchain/parse/testdata/index/fail_empty_expr.carbon b/toolchain/parse/testdata/index/fail_empty_expr.carbon index 03c837d3c2ce..c7d2822227d7 100644 --- a/toolchain/parse/testdata/index/fail_empty_expr.carbon +++ b/toolchain/parse/testdata/index/fail_empty_expr.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_empty_expr.carbon:[[@LINE+3]]:16: Expected expression. +// CHECK:STDERR: fail_empty_expr.carbon:[[@LINE+3]]:16: ERROR: Expected expression. // CHECK:STDERR: var v: i32 = t[]; // CHECK:STDERR: ^ var v: i32 = t[]; diff --git a/toolchain/parse/testdata/index/fail_malformed_expr.carbon b/toolchain/parse/testdata/index/fail_malformed_expr.carbon index 10d49d9f675f..0e331bed180f 100644 --- a/toolchain/parse/testdata/index/fail_malformed_expr.carbon +++ b/toolchain/parse/testdata/index/fail_malformed_expr.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_malformed_expr.carbon:[[@LINE+3]]:17: Unexpected tokens before `]`. +// CHECK:STDERR: fail_malformed_expr.carbon:[[@LINE+3]]:17: ERROR: Unexpected tokens before `]`. // CHECK:STDERR: var v: i32 = t[0,]; // CHECK:STDERR: ^ var v: i32 = t[0,]; diff --git a/toolchain/parse/testdata/namespace/fail_args.carbon b/toolchain/parse/testdata/namespace/fail_args.carbon index 6df832118ece..7761cb9ac3cd 100644 --- a/toolchain/parse/testdata/namespace/fail_args.carbon +++ b/toolchain/parse/testdata/namespace/fail_args.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_args.carbon:[[@LINE+3]]:14: `namespace` declarations must end with a `;`. +// CHECK:STDERR: fail_args.carbon:[[@LINE+3]]:14: ERROR: `namespace` declarations must end with a `;`. // CHECK:STDERR: namespace Foo(); // CHECK:STDERR: ^ namespace Foo(); diff --git a/toolchain/parse/testdata/namespace/fail_arrow.carbon b/toolchain/parse/testdata/namespace/fail_arrow.carbon index 62aa1c37a161..4a975d1630ae 100644 --- a/toolchain/parse/testdata/namespace/fail_arrow.carbon +++ b/toolchain/parse/testdata/namespace/fail_arrow.carbon @@ -6,7 +6,7 @@ namespace Foo; -// CHECK:STDERR: fail_arrow.carbon:[[@LINE+3]]:7: `fn` requires a `(` for parameters. +// CHECK:STDERR: fail_arrow.carbon:[[@LINE+3]]:7: ERROR: `fn` requires a `(` for parameters. // CHECK:STDERR: fn Foo->Bar() {} // CHECK:STDERR: ^ fn Foo->Bar() {} diff --git a/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon b/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon index 3f5b6fa5fc1e..1402b8b824eb 100644 --- a/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon +++ b/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_incomplete_name.carbon:[[@LINE+3]]:15: Expected identifier after `.`. +// CHECK:STDERR: fail_incomplete_name.carbon:[[@LINE+3]]:15: ERROR: Expected identifier after `.`. // CHECK:STDERR: namespace Foo.; // CHECK:STDERR: ^ namespace Foo.; diff --git a/toolchain/parse/testdata/namespace/fail_no_name.carbon b/toolchain/parse/testdata/namespace/fail_no_name.carbon index d330c1e8863d..f96aa51c3289 100644 --- a/toolchain/parse/testdata/namespace/fail_no_name.carbon +++ b/toolchain/parse/testdata/namespace/fail_no_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:10: `namespace` introducer should be followed by a name. +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:10: ERROR: `namespace` introducer should be followed by a name. // CHECK:STDERR: namespace; // CHECK:STDERR: ^ namespace; diff --git a/toolchain/parse/testdata/operators/fail_chained_assign.carbon b/toolchain/parse/testdata/operators/fail_chained_assign.carbon index 5c7fe9a9fe4f..d568362a8f2b 100644 --- a/toolchain/parse/testdata/operators/fail_chained_assign.carbon +++ b/toolchain/parse/testdata/operators/fail_chained_assign.carbon @@ -9,7 +9,7 @@ fn F() { var b: i32; // TODO: Produce a custom diagnostic for this. - // CHECK:STDERR: fail_chained_assign.carbon:[[@LINE+3]]:9: Operator `=` can only be used as a complete statement. + // CHECK:STDERR: fail_chained_assign.carbon:[[@LINE+3]]:9: ERROR: Operator `=` can only be used as a complete statement. // CHECK:STDERR: a = b = 1; // CHECK:STDERR: ^ a = b = 1; diff --git a/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon b/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon index eeba2b02af44..f319a41e556c 100644 --- a/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon +++ b/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon @@ -6,7 +6,7 @@ // TODO: We could figure out that this first Failed example is infix // with one-token lookahead. -// CHECK:STDERR: fail_infix_uneven_space_after.carbon:[[@LINE+3]]:16: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_infix_uneven_space_after.carbon:[[@LINE+3]]:16: ERROR: `var` declarations must end with a `;`. // CHECK:STDERR: var n: i8 = n* n; // CHECK:STDERR: ^ var n: i8 = n* n; diff --git a/toolchain/parse/testdata/operators/fail_invalid_infix.carbon b/toolchain/parse/testdata/operators/fail_invalid_infix.carbon index 7ce2e705334c..73230d21c14a 100644 --- a/toolchain/parse/testdata/operators/fail_invalid_infix.carbon +++ b/toolchain/parse/testdata/operators/fail_invalid_infix.carbon @@ -4,18 +4,18 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:19: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:19: ERROR: Expected expression. // CHECK:STDERR: var a: i32 = n == ; // CHECK:STDERR: ^ var a: i32 = n == ; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:14: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:14: ERROR: Expected expression. // CHECK:STDERR: var b: i32 = == n; // CHECK:STDERR: ^ var b: i32 = == n; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+6]]:14: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+6]]:14: ERROR: Expected expression. // CHECK:STDERR: var c: i32 = == ; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: ERROR: Expected expression. // CHECK:STDERR: var c: i32 = == ; // CHECK:STDERR: ^ var c: i32 = == ; diff --git a/toolchain/parse/testdata/operators/fail_postincrement.carbon b/toolchain/parse/testdata/operators/fail_postincrement.carbon index fe1cb4016ff5..3dd281bf64ac 100644 --- a/toolchain/parse/testdata/operators/fail_postincrement.carbon +++ b/toolchain/parse/testdata/operators/fail_postincrement.carbon @@ -7,11 +7,11 @@ fn F() { var n: i32 = 0; // TODO: It'd be nice to produce a custom diagnostic here. - // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: Expected `;` after expression statement. + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: ERROR: Expected `;` after expression statement. // CHECK:STDERR: n++; // CHECK:STDERR: ^ n++; - // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: Expected `;` after expression statement. + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: ERROR: Expected `;` after expression statement. // CHECK:STDERR: n--; // CHECK:STDERR: ^ n--; diff --git a/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon b/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon index 7db85ceac258..b15e8533a0ee 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_precedence_and_or.carbon:[[@LINE+3]]:11: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_and_or.carbon:[[@LINE+3]]:11: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: a and b or c; // CHECK:STDERR: ^ a and b or c; diff --git a/toolchain/parse/testdata/operators/fail_precedence_as.carbon b/toolchain/parse/testdata/operators/fail_precedence_as.carbon index cf05e15c562f..3bf2349e064a 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_as.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_as.carbon @@ -6,17 +6,17 @@ fn F(n: i32) { // No ordering between `not` and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:12: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:12: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: not true as bool; // CHECK:STDERR: ^ not true as bool; // No ordering between most binary operators and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:9: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:9: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: 1 + 1 as i32; // CHECK:STDERR: ^ 1 + 1 as i32; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:9: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:9: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: 5 % 2 as i32; // CHECK:STDERR: ^ 5 % 2 as i32; diff --git a/toolchain/parse/testdata/operators/fail_precedence_assign.carbon b/toolchain/parse/testdata/operators/fail_precedence_assign.carbon index 120b4fa831c4..51a7740a0bcf 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_assign.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_assign.carbon @@ -8,22 +8,22 @@ fn F() { var a: i32; // Assignment can only appear as an expression statement, not as a subexpression. // TODO: Produce the "can only be used as a complete statement" diagnostic in each of these cases. - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:10: Expected `,` or `)`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:10: ERROR: Expected `,` or `)`. // CHECK:STDERR: 1 + (a = 1); // CHECK:STDERR: ^ 1 + (a = 1); - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+6]]:19: Expected `else` after `if ... then ...`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+6]]:19: ERROR: Expected `else` after `if ... then ...`. // CHECK:STDERR: (if true then a += 1 else a /= 2); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:19: Expected `,` or `)`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:19: ERROR: Expected `,` or `)`. // CHECK:STDERR: (if true then a += 1 else a /= 2); // CHECK:STDERR: ^ (if true then a += 1 else a /= 2); - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:7: Operator `++` can only be used as a complete statement. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:7: ERROR: Operator `++` can only be used as a complete statement. // CHECK:STDERR: a + ++a; // CHECK:STDERR: ^ a + ++a; - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:5: Parentheses are required around this unary `if` operator. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:5: ERROR: Parentheses are required around this unary `if` operator. // CHECK:STDERR: ++if c then a else b; // CHECK:STDERR: ^ ++if c then a else b; diff --git a/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon b/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon index 99252d8bcbab..1ba01ac99bbe 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon @@ -5,7 +5,7 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_precedence_or_and.carbon:[[@LINE+3]]:10: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_or_and.carbon:[[@LINE+3]]:10: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: a or b and c; // CHECK:STDERR: ^ a or b and c; diff --git a/toolchain/parse/testdata/operators/fail_precedence_star_minus.carbon b/toolchain/parse/testdata/operators/fail_precedence_star_minus.carbon index 628196df2043..f270aebecc9e 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_star_minus.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_star_minus.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_precedence_star_minus.carbon:[[@LINE+3]]:16: Parentheses are required to disambiguate operator precedence. +// CHECK:STDERR: fail_precedence_star_minus.carbon:[[@LINE+3]]:16: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: var n: i8 = n* -n; // CHECK:STDERR: ^ var n: i8 = n* -n; diff --git a/toolchain/parse/testdata/operators/fail_precedence_star_star.carbon b/toolchain/parse/testdata/operators/fail_precedence_star_star.carbon index 98d0495db9c9..782bb4e51195 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_star_star.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_star_star.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_precedence_star_star.carbon:[[@LINE+3]]:16: Parentheses are required to disambiguate operator precedence. +// CHECK:STDERR: fail_precedence_star_star.carbon:[[@LINE+3]]:16: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: var n: i8 = n* *p; // CHECK:STDERR: ^ var n: i8 = n* *p; diff --git a/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon b/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon index eb075ef7b200..ab9395702ab6 100644 --- a/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon +++ b/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon @@ -8,7 +8,7 @@ // before we notice the missing whitespace around the second `*`. // It'd be better to (somehow) form n*(*p) and reject due to the missing // whitespace around the first `*`. -// CHECK:STDERR: fail_star_star_no_space.carbon:[[@LINE+3]]:16: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_star_star_no_space.carbon:[[@LINE+3]]:16: ERROR: `var` declarations must end with a `;`. // CHECK:STDERR: var n: i8 = n**p; // CHECK:STDERR: ^ var n: i8 = n**p; diff --git a/toolchain/parse/testdata/operators/fail_variety.carbon b/toolchain/parse/testdata/operators/fail_variety.carbon index a9c8021843ce..e0fb0875dfa0 100644 --- a/toolchain/parse/testdata/operators/fail_variety.carbon +++ b/toolchain/parse/testdata/operators/fail_variety.carbon @@ -5,19 +5,19 @@ // AUTOUPDATE fn F() { - // CHECK:STDERR: fail_variety.carbon:[[@LINE+15]]:21: Operator `=` can only be used as a complete statement. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+15]]:21: ERROR: Operator `=` can only be used as a complete statement. // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_variety.carbon:[[@LINE+12]]:29: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+12]]:29: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_variety.carbon:[[@LINE+9]]:34: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+9]]:34: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_variety.carbon:[[@LINE+6]]:38: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+6]]:38: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_variety.carbon:[[@LINE+3]]:40: Parentheses are required around this unary `not` operator. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+3]]:40: ERROR: Parentheses are required around this unary `not` operator. // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ n = a * b + c * d = d * d << e & f - not g; diff --git a/toolchain/parse/testdata/operators/recover_infix_uneven_space_before.carbon b/toolchain/parse/testdata/operators/recover_infix_uneven_space_before.carbon index 32bd9d46be74..477c3daf0e03 100644 --- a/toolchain/parse/testdata/operators/recover_infix_uneven_space_before.carbon +++ b/toolchain/parse/testdata/operators/recover_infix_uneven_space_before.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_infix_uneven_space_before.carbon:[[@LINE+3]]:15: Whitespace missing after binary operator. +// CHECK:STDERR: recover_infix_uneven_space_before.carbon:[[@LINE+3]]:15: ERROR: Whitespace missing after binary operator. // CHECK:STDERR: var n: i8 = n *n; // CHECK:STDERR: ^ var n: i8 = n *n; diff --git a/toolchain/parse/testdata/operators/recover_postfix_space.carbon b/toolchain/parse/testdata/operators/recover_postfix_space.carbon index b539eac98efc..76e846a1b424 100644 --- a/toolchain/parse/testdata/operators/recover_postfix_space.carbon +++ b/toolchain/parse/testdata/operators/recover_postfix_space.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_postfix_space.carbon:[[@LINE+3]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: recover_postfix_space.carbon:[[@LINE+3]]:18: ERROR: Whitespace is not allowed before this unary operator. // CHECK:STDERR: var v: type = i8 *; // CHECK:STDERR: ^ var v: type = i8 *; diff --git a/toolchain/parse/testdata/operators/recover_postfix_space_before_comma.carbon b/toolchain/parse/testdata/operators/recover_postfix_space_before_comma.carbon index 3d6e04e0c057..8267a7a4db5e 100644 --- a/toolchain/parse/testdata/operators/recover_postfix_space_before_comma.carbon +++ b/toolchain/parse/testdata/operators/recover_postfix_space_before_comma.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_postfix_space_before_comma.carbon:[[@LINE+3]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: recover_postfix_space_before_comma.carbon:[[@LINE+3]]:18: ERROR: Whitespace is not allowed before this unary operator. // CHECK:STDERR: var n: i8 = F(i8 *, 0); // CHECK:STDERR: ^ var n: i8 = F(i8 *, 0); diff --git a/toolchain/parse/testdata/operators/recover_postfix_space_in_call.carbon b/toolchain/parse/testdata/operators/recover_postfix_space_in_call.carbon index 7f6e23a6cdde..0bcafb58b501 100644 --- a/toolchain/parse/testdata/operators/recover_postfix_space_in_call.carbon +++ b/toolchain/parse/testdata/operators/recover_postfix_space_in_call.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_postfix_space_in_call.carbon:[[@LINE+3]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: recover_postfix_space_in_call.carbon:[[@LINE+3]]:18: ERROR: Whitespace is not allowed before this unary operator. // CHECK:STDERR: var n: i8 = F(i8 *); // CHECK:STDERR: ^ var n: i8 = F(i8 *); diff --git a/toolchain/parse/testdata/operators/recover_postfix_space_surrounding.carbon b/toolchain/parse/testdata/operators/recover_postfix_space_surrounding.carbon index 6e295cca65fb..e5364f31cdf1 100644 --- a/toolchain/parse/testdata/operators/recover_postfix_space_surrounding.carbon +++ b/toolchain/parse/testdata/operators/recover_postfix_space_surrounding.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_postfix_space_surrounding.carbon:[[@LINE+3]]:18: Whitespace is not allowed before this unary operator. +// CHECK:STDERR: recover_postfix_space_surrounding.carbon:[[@LINE+3]]:18: ERROR: Whitespace is not allowed before this unary operator. // CHECK:STDERR: var v: type = i8 * ; // CHECK:STDERR: ^ var v: type = i8 * ; diff --git a/toolchain/parse/testdata/operators/recover_prefix_repeat.carbon b/toolchain/parse/testdata/operators/recover_prefix_repeat.carbon index f39c389f0c4e..347a7cb84ff0 100644 --- a/toolchain/parse/testdata/operators/recover_prefix_repeat.carbon +++ b/toolchain/parse/testdata/operators/recover_prefix_repeat.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_prefix_repeat.carbon:[[@LINE+3]]:17: Parentheses are required around this unary `const` operator. +// CHECK:STDERR: recover_prefix_repeat.carbon:[[@LINE+3]]:17: ERROR: Parentheses are required around this unary `const` operator. // CHECK:STDERR: fn F() -> const const i32* { // CHECK:STDERR: ^ fn F() -> const const i32* { diff --git a/toolchain/parse/testdata/operators/recover_prefix_space.carbon b/toolchain/parse/testdata/operators/recover_prefix_space.carbon index dce01845b73d..d8f38ecd8b27 100644 --- a/toolchain/parse/testdata/operators/recover_prefix_space.carbon +++ b/toolchain/parse/testdata/operators/recover_prefix_space.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_prefix_space.carbon:[[@LINE+3]]:13: Whitespace is not allowed after this unary operator. +// CHECK:STDERR: recover_prefix_space.carbon:[[@LINE+3]]:13: ERROR: Whitespace is not allowed after this unary operator. // CHECK:STDERR: var n: i8 = - n; // CHECK:STDERR: ^ var n: i8 = - n; diff --git a/toolchain/parse/testdata/operators/recover_prefix_uneven_space_with_assign.carbon b/toolchain/parse/testdata/operators/recover_prefix_uneven_space_with_assign.carbon index c21b084bcc68..2943e55e9acd 100644 --- a/toolchain/parse/testdata/operators/recover_prefix_uneven_space_with_assign.carbon +++ b/toolchain/parse/testdata/operators/recover_prefix_uneven_space_with_assign.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: recover_prefix_uneven_space_with_assign.carbon:[[@LINE+3]]:12: Whitespace is not allowed after this unary operator. +// CHECK:STDERR: recover_prefix_uneven_space_with_assign.carbon:[[@LINE+3]]:12: ERROR: Whitespace is not allowed after this unary operator. // CHECK:STDERR: var n: i8 =- n; // CHECK:STDERR: ^ var n: i8 =- n; diff --git a/toolchain/parse/testdata/package/fail_extra_string.carbon b/toolchain/parse/testdata/package/fail_extra_string.carbon index d39960c250a2..4ead3e20bb8e 100644 --- a/toolchain/parse/testdata/package/fail_extra_string.carbon +++ b/toolchain/parse/testdata/package/fail_extra_string.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: Expected a `api` or `impl`. +// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: ERROR: Expected a `api` or `impl`. // CHECK:STDERR: package Foo library "bar" "baz"; // CHECK:STDERR: ^ package Foo library "bar" "baz"; diff --git a/toolchain/parse/testdata/package/fail_library_is_identifier.carbon b/toolchain/parse/testdata/package/fail_library_is_identifier.carbon index 9316e9e71aa6..3e87f5ce572d 100644 --- a/toolchain/parse/testdata/package/fail_library_is_identifier.carbon +++ b/toolchain/parse/testdata/package/fail_library_is_identifier.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: Expected a string literal to specify the library name. +// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: ERROR: Expected a string literal to specify the library name. // CHECK:STDERR: package Geometry library Shapes api; // CHECK:STDERR: ^ package Geometry library Shapes api; diff --git a/toolchain/parse/testdata/package/fail_library_skips_name.carbon b/toolchain/parse/testdata/package/fail_library_skips_name.carbon index e1c700c894f7..ef141c6d8811 100644 --- a/toolchain/parse/testdata/package/fail_library_skips_name.carbon +++ b/toolchain/parse/testdata/package/fail_library_skips_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: Expected identifier after `package`. +// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: ERROR: Expected identifier after `package`. // CHECK:STDERR: package library "Shapes" api; // CHECK:STDERR: ^ package library "Shapes" api; diff --git a/toolchain/parse/testdata/package/fail_name_is_keyword.carbon b/toolchain/parse/testdata/package/fail_name_is_keyword.carbon index 14093adc253f..8d0388babc28 100644 --- a/toolchain/parse/testdata/package/fail_name_is_keyword.carbon +++ b/toolchain/parse/testdata/package/fail_name_is_keyword.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: Expected identifier after `package`. +// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: ERROR: Expected identifier after `package`. // CHECK:STDERR: package fn; // CHECK:STDERR: ^ package fn; diff --git a/toolchain/parse/testdata/package/fail_no_name.carbon b/toolchain/parse/testdata/package/fail_no_name.carbon index 62ad7d422f23..25100737d794 100644 --- a/toolchain/parse/testdata/package/fail_no_name.carbon +++ b/toolchain/parse/testdata/package/fail_no_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: Expected identifier after `package`. +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: ERROR: Expected identifier after `package`. // CHECK:STDERR: package; // CHECK:STDERR: ^ package; diff --git a/toolchain/parse/testdata/package/fail_no_semi.carbon b/toolchain/parse/testdata/package/fail_no_semi.carbon index 4d248f72be36..0098048c070b 100644 --- a/toolchain/parse/testdata/package/fail_no_semi.carbon +++ b/toolchain/parse/testdata/package/fail_no_semi.carbon @@ -6,7 +6,7 @@ package Geometry api -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: `package` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: ERROR: `package` declarations must end with a `;`. // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_semi.carbon diff --git a/toolchain/parse/testdata/package/fail_no_type.carbon b/toolchain/parse/testdata/package/fail_no_type.carbon index a623019cc9d9..de34fdcc36cc 100644 --- a/toolchain/parse/testdata/package/fail_no_type.carbon +++ b/toolchain/parse/testdata/package/fail_no_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_type.carbon:[[@LINE+3]]:17: Expected a `api` or `impl`. +// CHECK:STDERR: fail_no_type.carbon:[[@LINE+3]]:17: ERROR: Expected a `api` or `impl`. // CHECK:STDERR: package Geometry; // CHECK:STDERR: ^ package Geometry; diff --git a/toolchain/parse/testdata/package/fail_omit_library_keyword.carbon b/toolchain/parse/testdata/package/fail_omit_library_keyword.carbon index 151dad853641..794d1ce99d5f 100644 --- a/toolchain/parse/testdata/package/fail_omit_library_keyword.carbon +++ b/toolchain/parse/testdata/package/fail_omit_library_keyword.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: Missing `library` keyword. +// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: ERROR: Missing `library` keyword. // CHECK:STDERR: package Geometry "Shapes" api; // CHECK:STDERR: ^ package Geometry "Shapes" api; diff --git a/toolchain/parse/testdata/pointer/fail_pointer_type_in_expression.carbon b/toolchain/parse/testdata/pointer/fail_pointer_type_in_expression.carbon index 97c7cc1383b8..22fa1e5caf39 100644 --- a/toolchain/parse/testdata/pointer/fail_pointer_type_in_expression.carbon +++ b/toolchain/parse/testdata/pointer/fail_pointer_type_in_expression.carbon @@ -9,24 +9,24 @@ fn F() -> i32 { // error, so that it's clear what ambiguity we're referring to. // TODO: Improve error recovery so that we recover as `3 * (i32*) * 4`, not // as `(3 * i32)* * 4`, to suppress the second error here. - // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+6]]:17: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+6]]:17: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: return 3 * i32* * 4; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:19: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:19: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: return 3 * i32* * 4; // CHECK:STDERR: ^ return 3 * i32* * 4; } fn G() -> i32 { - // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:15: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:15: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: return i32* + 4; // CHECK:STDERR: ^ return i32* + 4; } fn H() -> i32 { - // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:14: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_pointer_type_in_expression.carbon:[[@LINE+3]]:14: ERROR: Parentheses are required to disambiguate operator precedence. // CHECK:STDERR: return *i32*; // CHECK:STDERR: ^ return *i32*; diff --git a/toolchain/parse/testdata/return/fail_expr_no_semi.carbon b/toolchain/parse/testdata/return/fail_expr_no_semi.carbon index 7b6e3cd20cf6..c0f0ab4afef6 100644 --- a/toolchain/parse/testdata/return/fail_expr_no_semi.carbon +++ b/toolchain/parse/testdata/return/fail_expr_no_semi.carbon @@ -6,7 +6,7 @@ fn F() { return x -// CHECK:STDERR: fail_expr_no_semi.carbon:[[@LINE+3]]:1: `return` statements must end with a `;`. +// CHECK:STDERR: fail_expr_no_semi.carbon:[[@LINE+3]]:1: ERROR: `return` statements must end with a `;`. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/return/fail_no_semi.carbon b/toolchain/parse/testdata/return/fail_no_semi.carbon index 160718400656..318260b798b3 100644 --- a/toolchain/parse/testdata/return/fail_no_semi.carbon +++ b/toolchain/parse/testdata/return/fail_no_semi.carbon @@ -6,10 +6,10 @@ fn F() { return -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+6]]:1: Expected expression. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+6]]:1: ERROR: Expected expression. // CHECK:STDERR: } // CHECK:STDERR: ^ -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: `return` statements must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: ERROR: `return` statements must end with a `;`. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/struct/fail_comma_only.carbon b/toolchain/parse/testdata/struct/fail_comma_only.carbon index c6e3b4092c85..69a1a7d21a1a 100644 --- a/toolchain/parse/testdata/struct/fail_comma_only.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_only.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_comma_only.carbon:[[@LINE+3]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_comma_only.carbon:[[@LINE+3]]:9: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {,} = {}; // CHECK:STDERR: ^ var x: {,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon b/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon index 2a7bb8c65c72..24a6a59f72ca 100644 --- a/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_comma_repeat_in_type.carbon:[[@LINE+3]]:17: Expected `.field: field_type`. +// CHECK:STDERR: fail_comma_repeat_in_type.carbon:[[@LINE+3]]:17: ERROR: Expected `.field: field_type`. // CHECK:STDERR: var x: {.a: i32,,} = {}; // CHECK:STDERR: ^ var x: {.a: i32,,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon b/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon index 4186a3f6e235..7c75512069e4 100644 --- a/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_comma_repeat_in_value.carbon:[[@LINE+3]]:16: Expected `.field = value`. +// CHECK:STDERR: fail_comma_repeat_in_value.carbon:[[@LINE+3]]:16: ERROR: Expected `.field = value`. // CHECK:STDERR: var x: {.a = 0,,} = {}; // CHECK:STDERR: ^ var x: {.a = 0,,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_dot_only.carbon b/toolchain/parse/testdata/struct/fail_dot_only.carbon index bbd12779fd40..4ce707e7c1b1 100644 --- a/toolchain/parse/testdata/struct/fail_dot_only.carbon +++ b/toolchain/parse/testdata/struct/fail_dot_only.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_dot_only.carbon:[[@LINE+3]]:10: Expected identifier after `.`. +// CHECK:STDERR: fail_dot_only.carbon:[[@LINE+3]]:10: ERROR: Expected identifier after `.`. // CHECK:STDERR: var x: {.} = {}; // CHECK:STDERR: ^ var x: {.} = {}; diff --git a/toolchain/parse/testdata/struct/fail_dot_string_colon.carbon b/toolchain/parse/testdata/struct/fail_dot_string_colon.carbon index c53bba535ed2..4241b49b232b 100644 --- a/toolchain/parse/testdata/struct/fail_dot_string_colon.carbon +++ b/toolchain/parse/testdata/struct/fail_dot_string_colon.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_dot_string_colon.carbon:[[@LINE+3]]:10: Expected identifier after `.`. +// CHECK:STDERR: fail_dot_string_colon.carbon:[[@LINE+3]]:10: ERROR: Expected identifier after `.`. // CHECK:STDERR: var x: {."hello": i32, .y: i32} = {}; // CHECK:STDERR: ^ var x: {."hello": i32, .y: i32} = {}; diff --git a/toolchain/parse/testdata/struct/fail_dot_string_equals.carbon b/toolchain/parse/testdata/struct/fail_dot_string_equals.carbon index 2fa7dadb3417..ef9ad3fd52e3 100644 --- a/toolchain/parse/testdata/struct/fail_dot_string_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_dot_string_equals.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_dot_string_equals.carbon:[[@LINE+3]]:10: Expected identifier after `.`. +// CHECK:STDERR: fail_dot_string_equals.carbon:[[@LINE+3]]:10: ERROR: Expected identifier after `.`. // CHECK:STDERR: var x: {."hello" = 0, .y = 4} = {}; // CHECK:STDERR: ^ var x: {."hello" = 0, .y = 4} = {}; diff --git a/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon b/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon index cc1230b2b1f7..4cb9257118f0 100644 --- a/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon +++ b/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_extra_token_in_type.carbon:[[@LINE+3]]:17: Expected `,` or `}`. +// CHECK:STDERR: fail_extra_token_in_type.carbon:[[@LINE+3]]:17: ERROR: Expected `,` or `}`. // CHECK:STDERR: var x: {.a: i32 banana} = {.a = 0}; // CHECK:STDERR: ^ var x: {.a: i32 banana} = {.a = 0}; diff --git a/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon b/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon index e9680729e05c..08cdb459937f 100644 --- a/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon +++ b/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_extra_token_in_value.carbon:[[@LINE+3]]:28: Expected `,` or `}`. +// CHECK:STDERR: fail_extra_token_in_value.carbon:[[@LINE+3]]:28: ERROR: Expected `,` or `}`. // CHECK:STDERR: var x: {.a: i32} = {.a = 0 banana}; // CHECK:STDERR: ^ var x: {.a: i32} = {.a = 0 banana}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_colon.carbon b/toolchain/parse/testdata/struct/fail_identifier_colon.carbon index 33db2ecc26a7..0f5f1bd9d712 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_colon.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_colon.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_identifier_colon.carbon:[[@LINE+3]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_colon.carbon:[[@LINE+3]]:9: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {a:} = {}; // CHECK:STDERR: ^ var x: {a:} = {}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_equals.carbon b/toolchain/parse/testdata/struct/fail_identifier_equals.carbon index 9e13b1e848b3..90de2522025e 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_equals.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_identifier_equals.carbon:[[@LINE+3]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_equals.carbon:[[@LINE+3]]:9: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {a=} = {}; // CHECK:STDERR: ^ var x: {a=} = {}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_only.carbon b/toolchain/parse/testdata/struct/fail_identifier_only.carbon index 496b0ea16425..2f1c917e2807 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_only.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_only.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_identifier_only.carbon:[[@LINE+3]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_only.carbon:[[@LINE+3]]:9: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {a} = {}; // CHECK:STDERR: ^ var x: {a} = {}; diff --git a/toolchain/parse/testdata/struct/fail_missing_type.carbon b/toolchain/parse/testdata/struct/fail_missing_type.carbon index 4cc3f061ef58..e0de796dca11 100644 --- a/toolchain/parse/testdata/struct/fail_missing_type.carbon +++ b/toolchain/parse/testdata/struct/fail_missing_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:12: Expected expression. +// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:12: ERROR: Expected expression. // CHECK:STDERR: var x: {.a:} = {}; // CHECK:STDERR: ^ var x: {.a:} = {}; diff --git a/toolchain/parse/testdata/struct/fail_missing_value.carbon b/toolchain/parse/testdata/struct/fail_missing_value.carbon index 339df2cd1960..874a2fd433a3 100644 --- a/toolchain/parse/testdata/struct/fail_missing_value.carbon +++ b/toolchain/parse/testdata/struct/fail_missing_value.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:12: Expected expression. +// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:12: ERROR: Expected expression. // CHECK:STDERR: var x: {.a=} = {}; // CHECK:STDERR: ^ var x: {.a=} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon b/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon index 5181749d93ce..35d38b4f44ac 100644 --- a/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_mix_type_and_value.carbon:[[@LINE+3]]:21: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_type_and_value.carbon:[[@LINE+3]]:21: ERROR: Expected `.field: field_type`. // CHECK:STDERR: var x: {.a: i32, .b = 0} = {}; // CHECK:STDERR: ^ var x: {.a: i32, .b = 0} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon b/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon index c2fbd0b411bd..0d04f8d19249 100644 --- a/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_mix_value_and_type.carbon:[[@LINE+3]]:17: Expected `.field = value`. +// CHECK:STDERR: fail_mix_value_and_type.carbon:[[@LINE+3]]:17: ERROR: Expected `.field = value`. // CHECK:STDERR: var x: {.a = 0, b: i32} = {}; // CHECK:STDERR: ^ var x: {.a = 0, b: i32} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon b/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon index d91b0e5a8371..c2f5566ee11f 100644 --- a/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon @@ -4,18 +4,18 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+6]]:25: Expected `.field = value`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+6]]:25: ERROR: Expected `.field = value`. // CHECK:STDERR: var x: i32 = {.a = 1, .b, .c: i32}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:29: Expected `.field = value`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:29: ERROR: Expected `.field = value`. // CHECK:STDERR: var x: i32 = {.a = 1, .b, .c: i32}; // CHECK:STDERR: ^ var x: i32 = {.a = 1, .b, .c: i32}; -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+6]]:26: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+6]]:26: ERROR: Expected `.field: field_type`. // CHECK:STDERR: var x: i32 = {.a: i32, .b, .c = 1}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:31: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:31: ERROR: Expected `.field: field_type`. // CHECK:STDERR: var x: i32 = {.a: i32, .b, .c = 1}; // CHECK:STDERR: ^ var x: i32 = {.a: i32, .b, .c = 1}; diff --git a/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon b/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon index 3a0912f94e4e..8a0705295eb2 100644 --- a/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_no_colon_or_equals.carbon:[[@LINE+3]]:11: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_no_colon_or_equals.carbon:[[@LINE+3]]:11: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {.a} = {}; // CHECK:STDERR: ^ var x: {.a} = {}; diff --git a/toolchain/parse/testdata/struct/fail_type_no_designator.carbon b/toolchain/parse/testdata/struct/fail_type_no_designator.carbon index 777b1beb02e4..38ea3355411c 100644 --- a/toolchain/parse/testdata/struct/fail_type_no_designator.carbon +++ b/toolchain/parse/testdata/struct/fail_type_no_designator.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_type_no_designator.carbon:[[@LINE+3]]:9: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_type_no_designator.carbon:[[@LINE+3]]:9: ERROR: Expected `.field: field_type` or `.field = value`. // CHECK:STDERR: var x: {i32} = {}; // CHECK:STDERR: ^ var x: {i32} = {}; diff --git a/toolchain/parse/testdata/var/fail_bad_name.carbon b/toolchain/parse/testdata/var/fail_bad_name.carbon index 6f470749a3e1..8202e1d22063 100644 --- a/toolchain/parse/testdata/var/fail_bad_name.carbon +++ b/toolchain/parse/testdata/var/fail_bad_name.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: Expected pattern in `var` declaration. +// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: ERROR: Expected pattern in `var` declaration. // CHECK:STDERR: var *; // CHECK:STDERR: ^ var *; diff --git a/toolchain/parse/testdata/var/fail_empty.carbon b/toolchain/parse/testdata/var/fail_empty.carbon index 0a6cf1451929..2b997cecc9be 100644 --- a/toolchain/parse/testdata/var/fail_empty.carbon +++ b/toolchain/parse/testdata/var/fail_empty.carbon @@ -4,7 +4,7 @@ // // AUTOUPDATE -// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: Expected pattern in `var` declaration. +// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: ERROR: Expected pattern in `var` declaration. // CHECK:STDERR: var; // CHECK:STDERR: ^ var; diff --git a/toolchain/parse/testdata/while/fail_no_semi.carbon b/toolchain/parse/testdata/while/fail_no_semi.carbon index f8daa552d25d..cd57cf018328 100644 --- a/toolchain/parse/testdata/while/fail_no_semi.carbon +++ b/toolchain/parse/testdata/while/fail_no_semi.carbon @@ -8,13 +8,13 @@ fn F() { while (a) { if (b) { break - // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: `break` statements must end with a `;`. + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: ERROR: `break` statements must end with a `;`. // CHECK:STDERR: } // CHECK:STDERR: ^ } if (c) { continue - // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: `continue` statements must end with a `;`. + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: ERROR: `continue` statements must end with a `;`. // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/while/fail_unbraced.carbon b/toolchain/parse/testdata/while/fail_unbraced.carbon index a696cd4d038d..6868a95d73b9 100644 --- a/toolchain/parse/testdata/while/fail_unbraced.carbon +++ b/toolchain/parse/testdata/while/fail_unbraced.carbon @@ -7,7 +7,7 @@ fn F() { while (a) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block. // CHECK:STDERR: break; // CHECK:STDERR: ^ break;