[AST] Walk ErrorExpr's original expr in ASTWalker

We set an original expression on ErrorExpr for cases where we have
something semantically invalid that doesn't fit into the AST, but is
still something that the user has explicitly written. For example
this is how we represent unresolved dots without member names (`x.`).
We still want to type-check the underlying expression though since
it can provide useful diagnostics and allows semantic functionality
such as completion and cursor info to work correctly.

rdar://130771574
This commit is contained in:
Hamish Knight
2025-08-27 15:20:33 +01:00
parent b063947b37
commit 7e22297b71
10 changed files with 34 additions and 30 deletions

View File

@@ -445,6 +445,7 @@ _ = ^/"/"
_ = ^/"[/"
// expected-error@-1 {{'^' is not a prefix unary operator}}
// expected-error@-2 {{unterminated string literal}}
// expected-error@-3 {{cannot parse regular expression: expected custom character class members}}
_ = (^/)("/")