-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Add source location to instantiation error #82717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cxx-interop] Add source location to instantiation error #82717
Conversation
Previously, the diagnostic was emitted with an unknown location.
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is extremely useful, thanks!
@@ -25,12 +25,12 @@ public protocol A { } | |||
public protocol B { } | |||
public protocol C { } | |||
|
|||
// CHECK: error: unexpected error produced: could not generate C++ types from the generic Swift types provided; the following Swift type(s) provided to 'passThrough' could not be converted: any A & B | |||
// CHECK: function-templates.h{{.*}}: error: diagnostic produced elsewhere: could not generate C++ types from the generic Swift types provided; the following Swift type(s) provided to 'passThrough' could not be converted: any A & B |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to match the line number with [[@LINE+1]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This location is in a header that we import, so the line reported here has no relationship to the lines in this file. Or is there a way to make that work regardless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh year, right! It could be done by putting the CHECK line in the header, and passing the header to FileCheck instead. But that may or may not be suitable here.
@swift-ci please smoke test Windows |
@swift-ci please smoke test |
@swift-ci please smoke test windows |
Previously, the diagnostic was emitted with an unknown location.