This is an archive of the discontinued LLVM Phabricator instance.

Add LLVM_FALLTHROUGH macro to Compiler.h
ClosedPublic

Authored by jasonmolenda on Feb 9 2016, 7:26 PM.

Details

Reviewers
pcc
Summary

I'd like to revive Peter's Compiler.h patch in r237766 from May of last year, defining an LLVM_FALLTHROUGH macro for use in the lldb codebase. It looks like we've got at least half a dozen instances where case statements are not terminated with 'break;' when they should be. I will mark up the places in lldb where we fall through intentionally with this macro and then add -Wimplicit-fallthrough to our clang compile flags; I'd rather add it to the llvm Compiler.h file so we're not duplicating this over in lldb.

Diff Detail

Repository
rL LLVM

Event Timeline

jasonmolenda retitled this revision from to Add LLVM_FALLTHROUGH macro to Compiler.h.
jasonmolenda updated this object.
jasonmolenda added a reviewer: pcc.
jasonmolenda set the repository for this revision to rL LLVM.
jasonmolenda added a subscriber: llvm-commits.
pcc accepted this revision.Feb 22 2016, 11:06 AM
pcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 22 2016, 11:06 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Obsoleted by r278868.