This is an archive of the discontinued LLVM Phabricator instance.

Fix a logic error in "break delete --disabled" when no "protected" breakpoints are specified.
ClosedPublic

Authored by jingham on Jul 22 2021, 6:03 PM.

Details

Summary

Fix "break delete --disabled" with no arguments.

The code that figured out which breakpoints to delete was supposed
to set the result status if it found breakpoints, and then the code
that actually deleted them checked that the result's status was set.

The code for "break delete --disabled" failed to set the status if
no "protected" breakpoints were provided. This was a confusing way
to implement this, so I reworked it with early returns so it was less
error prone, and added a test case for the no arguments case.

Diff Detail

Event Timeline

jingham requested review of this revision.Jul 22 2021, 6:03 PM
jingham created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 6:03 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 27 2021, 1:38 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.