llvm-project/clang/lib
Ted Kremenek 1a8641c1e7 Start breaking -Wunreachable-code up into different diagnostic groups.
Recent work on -Wunreachable-code has focused on suppressing uninteresting
unreachable code that center around "configuration values", but
there are still some set of cases that are sometimes interesting
or uninteresting depending on the codebase.  For example, a dead
"break" statement may not be interesting for a particular codebase,
potentially because it is auto-generated or simply because code
is written defensively.

To address these workflow differences, -Wunreachable-code is now
broken into several diagnostic groups:

-Wunreachable-code: intended to be a reasonable "default" for
most users.

and then other groups that turn on more aggressive checking:

-Wunreachable-code-break: warn about dead break statements

-Wunreachable-code-trivial-return: warn about dead return statements
that return "trivial" values (e.g., return 0).  Other return
statements that return non-trivial values are still reported
under -Wunreachable-code (this is an area subject to more refinement).

-Wunreachable-code-aggressive: supergroup that enables all these
groups.

The goal is to eventually make -Wunreachable-code good enough to
either be in -Wall or on-by-default, thus finessing these warnings
into different groups helps achieve maximum signal for more users.

TODO: the tests need to be updated to reflect this extra control
via diagnostic flags.

llvm-svn: 203994
2014-03-15 01:26:32 +00:00
..
ARCMigrate [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 18:34:04 +00:00
AST [C++11] Removing the found_decls_begin() and found_decls_end() APIs and replacing with a range-only found_decls() API. 2014-03-14 21:38:48 +00:00
ASTMatchers Remove unused typedef as pointed out by a GCC warning. 2014-03-14 10:15:44 +00:00
Analysis Start breaking -Wunreachable-code up into different diagnostic groups. 2014-03-15 01:26:32 +00:00
Basic De-virtualize a method since it doesn't override anything and isn't overridden itself. 2014-03-11 04:07:52 +00:00
CodeGen [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 18:34:04 +00:00
Driver AArch64_be specific clang target settings 2014-03-14 12:15:45 +00:00
Edit [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Format Remove an unnecessary check for FormatTok not being null. 2014-03-13 13:59:48 +00:00
Frontend Implement the MS extension __identifier properly: take a token and strip it of 2014-03-15 00:06:08 +00:00
FrontendTool Replace OwningPtr with std::unique_ptr. 2014-03-07 20:03:18 +00:00
Headers MS intrinsics: __interlockedbittestandset(64) (PR19054) 2014-03-13 17:05:09 +00:00
Index [C++11] Replacing FunctionDecl iterators param_begin() and param_end() with iterator_range params(). Updating all of the usages of the iterators with range-based for loops. 2014-03-07 15:12:56 +00:00
Lex Implement the MS extension __identifier properly: take a token and strip it of 2014-03-15 00:06:08 +00:00
Parse Fix crash if delayed template parsing meets an erroneous trailing return type. 2014-03-12 23:14:33 +00:00
Rewrite [C++11] Replacing BlockDecl iterators capture_begin() and capture_end() with iterator_range captures(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 18:34:04 +00:00
Sema Start breaking -Wunreachable-code up into different diagnostic groups. 2014-03-15 01:26:32 +00:00
Serialization [C++11] Removing the local_import_begin() and local_import_end() APIs and replacing with a range-only local_imports() API. Privatizes the iterator class as well. 2014-03-14 20:59:21 +00:00
StaticAnalyzer [C++11] Replacing DeclStmt iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 17:01:24 +00:00
Tooling Check for LLVM_ON_WIN32 instead of _WIN32. 2014-03-12 16:07:46 +00:00
CMakeLists.txt Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00
Makefile Fix dependencies now that the ARC migrator depends on the static analyzer. 2013-08-22 15:50:02 +00:00