This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Silence GCC warnings about control reaching the end of non-void functions. NFC.
ClosedPublic

Authored by mstorsjo on Apr 13 2021, 11:07 PM.

Details

Summary

Also remove a superfluous semicolon after the braces for a switch
statement (that wasn't warned about).

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Apr 13 2021, 11:07 PM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2021, 11:07 PM

I'm guessing this change will break the build in a different way, triggering clang's -Wcovered-switch-default - the usual way this gcc/clang diagnostic pinch is resolved is by putting the unreachable after the switch/at the end of the function, instead of in a default case.

mstorsjo updated this revision to Diff 337366.Apr 14 2021, 1:23 AM

Moved unreachable to outside of switch

dblaikie accepted this revision.Apr 14 2021, 1:38 AM

Looks good - thanks! Do you need me to commit this for you?

This revision is now accepted and ready to land.Apr 14 2021, 1:38 AM

Looks good - thanks! Do you need me to commit this for you?

Thanks, but I've got commit access!

This revision was landed with ongoing or failed builds.Apr 14 2021, 1:55 AM
This revision was automatically updated to reflect the committed changes.