Print a blank line after a diagnostic. (#3806)

The purpose of the newline is to make it clearer where a given
diagnostic begins and ends, particularly as the first message of a
diagnostic may not be the error.

This is a trivial code change, but ripples edits through test files.
This commit is contained in:
Jon Ross-Perkins
2024-03-22 18:10:49 +00:00
committed by GitHub
parent 93e40289dd
commit b8ceb8dd8b
165 changed files with 2184 additions and 1693 deletions
@@ -5,9 +5,10 @@
// AUTOUPDATE
// Fix and uncomment this to test error handling.
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+6]]:7: ERROR: Opening symbol without a corresponding closing symbol.
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+7]]:7: ERROR: Opening symbol without a corresponding closing symbol.
// CHECK:STDERR: fn Div[();
// CHECK:STDERR: ^
// CHECK:STDERR:
// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+3]]:7: ERROR: `fn` requires a `(` for parameters.
// CHECK:STDERR: fn Div[();
// CHECK:STDERR: ^
@@ -4,13 +4,15 @@
//
// AUTOUPDATE
// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:18: ERROR: Expected builtin function name after `=`.
// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:18: ERROR: Expected builtin function name after `=`.
// CHECK:STDERR: fn NotString() = banana;
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR:
fn NotString() = banana;
// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:32: ERROR: `fn` declarations must end with a `;`.
// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:32: ERROR: `fn` declarations must end with a `;`.
// CHECK:STDERR: fn JunkAfterString() = "hello" "world";
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR:
fn JunkAfterString() = "hello" "world";
// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:23: ERROR: Expected builtin function name after `=`.