You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve autoupdate diagnostic CHECK line positioning. (#5942)
When an error diagnostic has an unattached location, for example because
the diagnostic points into a file that's in the prelude, use the next
attached location to position the error diagnostic's CHECK line. In
particular, if the error is followed by a note, use the position of the
note to determine where to place the error.
This exposes a general mechanism to do final fixups of the CHECK lines
to individual file_test binaries, which the toolchain's binary uses to
special-case error / warning CHECK lines.
Copy file name to clipboardExpand all lines: toolchain/check/testdata/basics/type_literals.carbon
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -78,14 +78,14 @@ var test_i0: i0;
78
78
// CHECK:STDERR: ^~
79
79
// CHECK:STDERR:
80
80
var test_i1: i1;
81
-
// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+7]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.Int(15)` instead [IntWidthNotMultipleOf8]
81
+
// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.Int(15)` instead [IntWidthNotMultipleOf8]
82
82
// CHECK:STDERR: var test_i15: i15;
83
83
// CHECK:STDERR: ^~~
84
84
// CHECK:STDERR:
85
+
var test_i15: i15;
85
86
// CHECK:STDERR: min_prelude/parts/int.carbon:10:9: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge]
86
87
// CHECK:STDERR: adapt MakeInt(N);
87
88
// CHECK:STDERR: ^~~~~~~~~~
88
-
var test_i15: i15;
89
89
// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:23: note: in `i1000000000` used here [ResolvingSpecificHere]
90
90
// CHECK:STDERR: var test_i1000000000: i1000000000;
91
91
// CHECK:STDERR: ^~~~~~~~~~~
@@ -115,14 +115,14 @@ var test_u0: u0;
115
115
// CHECK:STDERR: ^~
116
116
// CHECK:STDERR:
117
117
var test_u1: u1;
118
-
// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+7]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.UInt(15)` instead [IntWidthNotMultipleOf8]
118
+
// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.UInt(15)` instead [IntWidthNotMultipleOf8]
119
119
// CHECK:STDERR: var test_u15: u15;
120
120
// CHECK:STDERR: ^~~
121
121
// CHECK:STDERR:
122
+
var test_u15: u15;
122
123
// CHECK:STDERR: min_prelude/parts/uint.carbon:10:9: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge]
123
124
// CHECK:STDERR: adapt MakeUInt(N);
124
125
// CHECK:STDERR: ^~~~~~~~~~~
125
-
var test_u15: u15;
126
126
// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:23: note: in `u1000000000` used here [ResolvingSpecificHere]
127
127
// CHECK:STDERR: var test_u1000000000: u1000000000;
0 commit comments