This is an incremental step towards getting some other code converted. In any case, I believe this makes the breakpoint code significantly easier to understand and also removes many string copies in the range id code.
Details
Diff Detail
Event Timeline
This looks correct to me. I had a couple of trivial inline comments, but this looks fine.
source/Breakpoint/BreakpointID.cpp | ||
---|---|---|
80–81 | This really should return a BreakpointID not pointers to the break & loc ID's. It always gets used that way, not sure why it wasn't written that way... That's not a necessary change but while you are cleaning this stuff up... | |
source/Breakpoint/BreakpointIDList.cpp | ||
350–351 | Can you add a comment here saying what is returned, particularly that you return a pair of empty string refs when it isn't an ID range? |
Fixed up ParseCanonicalReference and SplitIDRangeExpression as suggested. I could have probably returned an Optional<std::pair<StringRef,StringRef>> but it seemed like overkill. An empty pair seems sufficient for conveying failure.
No good deed goes unpunished... You made ParseCanonicalReference more beautiful but forgot to update the header doc.
Also I didn't see the comment for SplitIDRangeExpression.
include/lldb/Breakpoint/BreakpointID.h | ||
---|---|---|
75–76 | You changed the interface but not the header doc for it. | |
source/Breakpoint/BreakpointIDList.cpp | ||
350–357 | Did you upload the latest version of your patch, I don't see a comment here... |
source/Breakpoint/BreakpointIDList.cpp | ||
---|---|---|
350–357 | I put the comment in the header. I can put it here if you prefer. Putting it on both places seems unnecessary though. LMK which you prefer. I'll fix up the header doc of the other function in the meantime. |
You changed the interface but not the header doc for it.