-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Honor #sourceLocation filenames in serialized diagnostics #19022
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
Conversation
I'm not sure why we never handled this. Oops. rdar://problem/43647151
@swift-ci Please test |
@swift-ci Please test source compatibility |
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.
LGTM. Could you add a short test that uses -vfsoverlay in a follow-up?
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.
Woah. How did we miss this for so long?
Build failed |
Looks great, thanks! |
Build failed |
Build failed |
@swift-ci Please test Linux |
@swift-ci Please test source compatibility |
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.
I don't really know enough about virtual files. What other places where we use getIdentifierForBuffer
should be changed?
@@ -497,7 +497,7 @@ emitDiagnosticMessage(SourceManager &SM, | |||
|
|||
StringRef filename = ""; | |||
if (Loc.isValid()) | |||
filename = SM.getIdentifierForBuffer(SM.findBufferContainingLoc(Loc)); | |||
filename = SM.getDisplayNameForLoc(Loc); |
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.
Ouch! More complexity around filenames, not your fault--I'm just winging!
Good question, and I feel bad for not thinking of it. I found a few more and I'll fix them in a follow-up PR. |
Probably
|
Tx. Hmmm...How about adding to the Doxygen comment to |
I'm not sure why we never handled this. Oops.
rdar://problem/43647151