This is an archive of the discontinued LLVM Phabricator instance.

Fix some warnings, one of which was a legit bug.
ClosedPublic

Authored by zturner on Nov 10 2014, 11:23 AM.

Details

Reviewers
jasonmolenda
Summary
MSVC warns that not all control paths return a value when a switch
doesn't have a default case handler.  Changed explicit value checks
to a default check.

Also, it caught a case where bitwise AND was being used instead of
logical AND.  I'm not sure what this fixes, but presumably it is
not covered by any kind of test case.

Diff Detail

Event Timeline

zturner updated this revision to Diff 15999.Nov 10 2014, 11:23 AM
zturner retitled this revision from to Fix some warnings, one of which was a legit bug..
zturner updated this object.
zturner edited the test plan for this revision. (Show Details)
zturner added a reviewer: jasonmolenda.
zturner added a subscriber: Unknown Object (MLST).
jasonmolenda accepted this revision.Nov 10 2014, 2:17 PM
jasonmolenda edited edge metadata.

Nice catch on the UnwindAssembly bug, thanks.. LazyBools only have three possible states (and aren't going to gain extra states in the future) so the code in CommandInterpreter was safe - but silencing warnings is always good to do so we can spot real issues. Thanks.

This revision is now accepted and ready to land.Nov 10 2014, 2:17 PM
zturner closed this revision.Nov 12 2014, 9:37 AM