llvm-project/polly/lib/Analysis
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
..
DependenceInfo.cpp [DepInfo] Use isl++ in Dependences::isValidSchedule. NFC. 2018-08-10 22:33:27 +00:00
PolyhedralInfo.cpp getDependences to new C++ interface 2018-06-06 13:10:32 +00:00
PruneUnprofitable.cpp [polly] Update uses of DEBUG macro to LLVM_DEBUG. 2018-05-15 13:37:17 +00:00
ScopBuilder.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
ScopDetection.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
ScopDetectionDiagnostic.cpp [ScopDetect] Reject loop with multiple exit blocks. 2018-04-25 18:53:33 +00:00
ScopGraphPrinter.cpp Adjust to clang-format changes 2018-03-20 17:16:32 +00:00
ScopInfo.cpp [TI removal] Make `getTerminator()` return a generic `Instruction`. 2018-10-15 10:42:50 +00:00
ScopPass.cpp Rename OptimizationDiagnosticInfo.h to OptimizationRemarkEmitter.h 2017-10-09 23:49:08 +00:00