Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Apr 17, 2020

Switch all of the relevant FailureDiagnostic APIs to use TypedNode instead of Expr *
and refactor diagnostic implementations to avoid relying on anchors being expressions where
possible.

Since FailureDiagnostic is the biggest user of ConstraintLocator this refactoring enables
to transition locator from being anchored only on expressions.

xedin added 8 commits April 17, 2020 11:43
…eDiagnostic`

This decouples `FailureDiagnostic` from expression.
In preparation to anchor `ConstraintLocator` from `TypedNode`
let's refactor diagnostics (which is the biggest user of locators)
to support `TypedNode` instead of `Expr *`.
Since `TypedNode` elements are all marked as `const` diagnostics
need to get some of the APIs adjusted to support passing `const Expr *`.
@xedin xedin requested review from hamishknight and hborla April 17, 2020 20:33
Copy link
Member

@hborla hborla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@xedin
Copy link
Contributor Author

xedin commented Apr 17, 2020

@swift-ci please smoke test

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@xedin
Copy link
Contributor Author

xedin commented Apr 17, 2020

@swift-ci please smoke test Linux platform

@xedin
Copy link
Contributor Author

xedin commented Apr 18, 2020

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Apr 20, 2020

@swift-ci please smoke test

@xedin xedin merged commit 0a037e7 into swiftlang:master Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants