-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb] Fix source display for artificial locations #115876
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "artificial_location.h" | ||
|
||
int A::foo() { | ||
#line 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI there's some discussion about this test going on in #107849, in case you had some thoughts on Jeremy's points There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the pointer. Quite a coincidence that I end up touching the same test just as Jaremy ends up breaking it :P |
||
return 42; | ||
} | ||
|
||
int main() { return A::foo(); } |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
struct A { | ||
static int foo(); | ||
}; |
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.
As you've noticed,
SupportFileSP
is always valid in a few places (like inLineEntry
). I don't think that's something that should generally hold (mostly because it's hard to enforce) so I would have done the same thing here. The alternative would be to initialize this to an emptySupportFile
and haveGetStartLineSourceInfo
do the same instead of calling::reset
, though I think that's pretty inefficient. Anyway, just an observation, no need to change anything.