hanchenye-llvm-project/clang/lib/ARCMigrate
Reid Kleckner 4dc0b1ac60 Fix clang -Wimplicit-fallthrough warnings across llvm, NFC
This patch should not introduce any behavior changes. It consists of
mostly one of two changes:
1. Replacing fall through comments with the LLVM_FALLTHROUGH macro
2. Inserting 'break' before falling through into a case block consisting
   of only 'break'.

We were already using this warning with GCC, but its warning behaves
slightly differently. In this patch, the following differences are
relevant:
1. GCC recognizes comments that say "fall through" as annotations, clang
   doesn't
2. GCC doesn't warn on "case N: foo(); default: break;", clang does
3. GCC doesn't warn when the case contains a switch, but falls through
   the outer case.

I will enable the warning separately in a follow-up patch so that it can
be cleanly reverted if necessary.

Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu

Differential Revision: https://reviews.llvm.org/D53950

llvm-svn: 345882
2018-11-01 19:54:45 +00:00
..
ARCMT.cpp NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects) 2018-10-30 20:31:30 +00:00
ARCMTActions.cpp
CMakeLists.txt Add missing library dependency to fix build break after rC340247 2018-08-21 11:41:41 +00:00
FileRemapper.cpp
Internals.h
ObjCMT.cpp [analyzer] [NFC] Split up RetainSummaryManager from RetainCountChecker - try #2 2018-08-21 03:09:02 +00:00
PlistReporter.cpp
TransAPIUses.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
TransARCAssign.cpp
TransAutoreleasePool.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
TransBlockObjCVariable.cpp
TransEmptyStatementsAndDealloc.cpp
TransGCAttrs.cpp Model type attributes as regular Attrs. 2018-08-20 21:47:29 +00:00
TransGCCalls.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
TransProperties.cpp
TransProtectedScope.cpp Port getLocEnd -> getEndLoc 2018-08-09 21:09:38 +00:00
TransRetainReleaseDealloc.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
TransUnbridgedCasts.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
TransUnusedInitDelegate.cpp
TransZeroOutPropsInDealloc.cpp
TransformActions.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
Transforms.cpp Create ConstantExpr class 2018-10-31 03:48:47 +00:00
Transforms.h