]> granicus.if.org Git - clang/commit
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable...
authorAlexander Kornienko <alexfh@google.com>
Thu, 7 Feb 2013 02:17:19 +0000 (02:17 +0000)
committerAlexander Kornienko <alexfh@google.com>
Thu, 7 Feb 2013 02:17:19 +0000 (02:17 +0000)
commit878d0ad2c9d83ee6485fd16e21c5082acc63a890
treef0cd536477945ab29c3e14de06c463ee476afdf0
parentcd3b036dbdd29b0ddcaa12b5cce69b647b2ac5ba
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly.

Summary:
-Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly:

1. In actual unreachable code, but not immediately on a fall-through execution
path "fallthrough annotation does not directly precede switch label" is better;
2. After default: in a switch with covered enum cases. Actually, these shouldn't
be treated as unreachable code for our purpose.

Reviewers: rsmith

Reviewed By: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D374

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174575 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/AnalysisBasedWarnings.cpp
test/SemaCXX/switch-implicit-fallthrough.cpp