llvm-project/clang/lib/Index
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
..
CMakeLists.txt [Index] Add clangLex to LINK_LIBS 2018-07-09 08:54:42 +00:00
CodegenNameGenerator.cpp [index] Generate class & metaclass manglings for objc 2017-09-22 16:58:57 +00:00
CommentToXML.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
IndexBody.cpp [index] For an ObjC message call, also record as receivers the protocols if they are present in the ObjC type 2018-08-17 23:50:59 +00:00
IndexDecl.cpp Port getLocStart -> getBeginLoc 2018-08-09 21:08:08 +00:00
IndexSymbol.cpp [index] Introduce 'ProtocolInterface' as part of SymbolPropertySet 2018-08-26 06:27:23 +00:00
IndexTypeSourceInfo.cpp [Index] Respect "IndexFunctionLocals" option for type loc. 2018-10-04 11:03:55 +00:00
IndexingAction.cpp [index] Enhance indexing for module references 2018-09-18 15:02:56 +00:00
IndexingContext.cpp [index] Enhance indexing for module references 2018-09-18 15:02:56 +00:00
IndexingContext.h [Index] Add index::IndexingOptions::IndexImplicitInstantiation 2018-07-09 21:49:06 +00:00
SimpleFormatContext.h Lift VFS from clang to llvm (NFC) 2018-10-10 13:27:25 +00:00
USRGeneration.cpp Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00