Details
- Reviewers
ovyalov granata.enrico
Diff Detail
Event Timeline
I am assuming that your intent is:
int x = 1;
int& y = 1;
(lldb) frame variable y
(int&) y = 0x123456 (y = 1)
If so, two things:
a) a much better way would be to make FormatManager::ShouldPrintAsOneLiner() decide that a T& can be printed on one-line iff the referenced thing can
b) test cases would be great
If I am reading your intent wrong, can you please elaborate on what you're trying to achieve?
I would really appreciate if you didn't commit this.
I am assuming that your intent is:
Yep.
a) a much better way would be to make FormatManager::ShouldPrintAsOneLiner() decide that a T& can be printed on one-line iff the referenced thing can
I thought ShouldPrintAsOneLiner already does that for each of the < 50 children. The change around bool print_oneline is only refactoring for readability. The only difference is that curr_ptr_depth is not set to 1 so ShouldPrintAsOneLiner can actually get called.
Can you please try using revision 243301 or later?
In my testing, this change makes references work the way you expect
If you're still not getting the behavior you expect, can you please include a test case that fails before your change but succeeds after? That should help ensure we don't regress, and might also help us pinpoint the correct change to make
Yes, rL243301 does make references print correctly. This change won't be necessary anymore. It seems like it'd be nice to have a test case regardless. Could you please add a test case for your change?