llvm-capstone/clang-tools-extra
Jonas Toth 9b1dc4c275 [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches
Summary:
This check searches for missing `else` branches in `if-else if`-chains and
missing `default` labels in `switch` statements, that use integers as condition.

It is very similar to -Wswitch, but concentrates on integers only, since enums are
already covered.

The option to warn for missing `else` branches is deactivated by default, since it is
very noise on larger code bases.

Running it on LLVM:
{F5354858} for default configuration
{F5354866} just for llvm/lib/Analysis/ScalarEvolution.cpp, the else-path checker is very noisy!

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: aaron.ballman

Subscribers: lebedev.ri, Eugene.Zelenko, cfe-commits, mgorny, JDevlieghere, xazax.hun

Tags: #clang-tools-extra

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

llvm-svn: 318600
2017-11-18 19:48:33 +00:00
..
change-namespace [change-namespace] do not change type locs in defaulted functions. 2017-10-16 08:20:10 +00:00
clang-apply-replacements [clang-tidy] clang-apply-replacements: Don't insert null entry 2017-07-25 14:28:16 +00:00
clang-move [clang-move] Find template class forward declarations more precisely. 2017-05-02 12:15:11 +00:00
clang-query [NFC] Update to account for DiagnosticRenderer use of FullSourceLoc 2017-06-27 10:04:04 +00:00
clang-reorder-fields [clang-reorder-fields] Switch to add_clang_tool 2017-11-02 01:10:05 +00:00
clang-tidy [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches 2017-11-18 19:48:33 +00:00
clang-tidy-vs Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only cases 2016-10-21 21:50:28 +00:00
clangd [clangd] Release the old preamble before building a new one. 2017-11-17 19:05:56 +00:00
docs [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches 2017-11-18 19:48:33 +00:00
include-fixer Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
modularize Support: Have directory_iterator::status() return FindFirstFileEx/FindNextFile results on Windows. 2017-10-10 22:19:46 +00:00
pp-trace [Support] Rename tool_output_file to ToolOutputFile, NFC 2017-09-23 01:03:17 +00:00
test [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches 2017-11-18 19:48:33 +00:00
tool-template Use ToolExecutor framework in the sample tool-template. 2017-11-03 16:03:56 +00:00
unittests [clangd] Use in-memory preambles in clangd. 2017-11-16 16:25:18 +00:00
.arcconfig Upgrade all the .arcconfigs to https. 2016-07-14 13:15:37 +00:00
.gitignore
CMakeLists.txt [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00
CODE_OWNERS.TXT
LICENSE.TXT Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ coding standard from PRQA. 2017-03-19 17:23:23 +00:00
README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/