mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:14:42 +01:00
Suppress follow-on errors for various forms of expression. (#3292)
Don't produce an error diagnostic if any of the information leading to identifying that error is itself known to be affected by an already-diagnosed error.
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
// AUTOUPDATE
|
||||
|
||||
fn A() {
|
||||
// CHECK:STDERR: fail_dereference_function.carbon:[[@LINE+6]]:3: ERROR: Cannot dereference operand of non-pointer type `<function>`.
|
||||
// CHECK:STDERR: *A;
|
||||
// CHECK:STDERR: ^
|
||||
// CHECK:STDERR: fail_dereference_function.carbon:[[@LINE+3]]:4: ERROR: Expression cannot be used as a value.
|
||||
// CHECK:STDERR: *A;
|
||||
// CHECK:STDERR: ^
|
||||
@@ -21,6 +18,6 @@ fn A() {
|
||||
// CHECK:STDOUT: fn @A() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %A.ref: <function> = name_reference "A", package.%A
|
||||
// CHECK:STDOUT: %.loc14: ref <error> = dereference <error>
|
||||
// CHECK:STDOUT: %.loc11: ref <error> = dereference <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user