mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 20:11:12 +01:00
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`.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
@@ -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 ();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Vendored
+1
-1
@@ -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,
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Vendored
+1
-1
@@ -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,
|
||||
|
||||
+1
-1
@@ -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 ()
|
||||
|
||||
+1
-1
@@ -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 () }
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Vendored
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user