This is an archive of the discontinued LLVM Phabricator instance.

Supply missing break in case statement.
ClosedPublic

Authored by amccarth on Feb 12 2018, 4:32 PM.

Details

Summary

The FIXME comment is provocative, but I haven't repro'd yet. This changes
the behavior in the surprising case, but that doesn't seem to affect any
tests, and returning a bool type for void doesn't seem any more correct
than letting the default code handle the odd situation.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth created this revision.Feb 12 2018, 4:32 PM
amccarth added a subscriber: lldb-commits.

Aaron, do you remember why you added a check for width == 0 here? Would it ever not be 0?

That's a good question and I'm not sure. If all the tests pass you can make it return unconditionally.

amccarth updated this revision to Diff 134252.Feb 14 2018, 9:50 AM

Per Aaron's suggestion, I ran the tests with an unconditional return (and an assertion). There was no change in the test results, so I'm making this return unconditionally.

Any remaining concerns?

zturner accepted this revision.Feb 14 2018, 3:16 PM
This revision is now accepted and ready to land.Feb 14 2018, 3:16 PM
This revision was automatically updated to reflect the committed changes.