llvm-project/clang/lib/Sema
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
..
AnalysisBasedWarnings.cpp Start breaking -Wunreachable-code up into different diagnostic groups. 2014-03-15 01:26:32 +00:00
AttributeList.cpp Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator== 2014-03-09 05:18:27 +00:00
CMakeLists.txt [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
CodeCompleteConsumer.cpp Allow the computation of the base priority for a declaration code completion result to consider the completion context 2013-01-31 04:52:16 +00:00
DeclSpec.cpp argument -> parameter terminology fixes for FunctionTypeInfo 2014-02-26 22:27:52 +00:00
DelayedDiagnostic.cpp Implemented delayed processing of 'unavailable' checking, just like with 'deprecated'. 2013-12-18 23:30:06 +00:00
IdentifierResolver.cpp [C++11] Replacing iterators redecls_begin() and redecls_end() with iterator_range redecls(). Updating all of the usages of the iterators with range-based for loops, which allows the begin/end forms to be removed entirely. 2014-03-06 23:45:36 +00:00
JumpDiagnostics.cpp [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
Makefile
MultiplexExternalSemaSource.cpp Add hooks to ExternalSemaSource for after-the-fact diagnosis of 2013-08-12 22:11:14 +00:00
Scope.cpp [-cxx-abi microsoft] Implement local manglings accurately 2014-03-05 08:57:59 +00:00
ScopeInfo.cpp [REFACTOR] Refactored some of the generic-lambda capturing code. 2013-12-07 20:22:44 +00:00
Sema.cpp [C++11] Replace verbose functors with succinct lambdas 2014-03-01 14:48:57 +00:00
SemaAccess.cpp [C++11] Replacing CXXRecordDecl iterators friend_begin() and friend_end() with iterator_range friends(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 17:00:06 +00:00
SemaAttr.cpp [C++11] Expand and eliminate the LLVM_ENUM_INT_TYPE() macro 2014-03-02 03:20:16 +00:00
SemaCXXScopeSpec.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaCast.cpp MS ABI: Tweak pointer-to-member mangling/inheritance model selection 2014-02-06 10:59:19 +00:00
SemaChecking.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaCodeComplete.cpp [C++11] Replacing ObjCCategoryDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 12:55:57 +00:00
SemaConsumer.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:48:34 +00:00
SemaDecl.cpp Objective-C. Redo turning off designated initialization warnings on 2014-03-14 23:30:18 +00:00
SemaDeclAttr.cpp Objective-C. Allow objc_designated_initializer for private 2014-03-14 18:19:46 +00:00
SemaDeclCXX.cpp [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
SemaDeclObjC.cpp Objective-C. Redo turning off designated initialization warnings on 2014-03-14 23:30:18 +00:00
SemaExceptionSpec.cpp PR16638, DR1552: the exception specification on an implicitly-declared 2014-02-07 22:51:16 +00:00
SemaExpr.cpp Add two missing entries to the C++11 support page. Bump one relevant diagnostic 2014-03-14 21:21:24 +00:00
SemaExprCXX.cpp DR1346: a parenthesized braced-init-list cannot be used as the initializer when 2014-03-12 17:42:45 +00:00
SemaExprMember.cpp [C++11] Replacing ObjCProtocolDecl iterators protocol_begin() and protocol_end() with iterator_range protocols(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 22:58:06 +00:00
SemaExprObjC.cpp Objective-C. Issue diagnostics on mismatched methods when their selector is used 2014-03-12 18:34:01 +00:00
SemaFixItUtils.cpp PR17290: Use 'false' macro in fix-it hint for initializing a variable of type 2013-09-20 00:27:40 +00:00
SemaInit.cpp [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 15:41:46 +00:00
SemaLambda.cpp DR1346: a parenthesized braced-init-list cannot be used as the initializer when 2014-03-12 17:42:45 +00:00
SemaLookup.cpp Call RequireCompleteType when performing ADL even if the type is already 2014-03-14 22:07:27 +00:00
SemaObjCProperty.cpp [C++11] Replacing ObjCCategoryDecl iterators propimpl_begin() and propimpl_end() with iterator_range property_impls(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 15:02:45 +00:00
SemaOpenMP.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaOverload.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaPseudoObject.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaStmt.cpp [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
SemaStmtAsm.cpp [ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happen 2013-05-24 18:32:55 +00:00
SemaStmtAttr.cpp Distinguish between attributes explicitly written at the request of the user, and attributes implicitly generated to assist in bookkeeping by the compiler. This is done so by table generating a CreateImplicit method for each attribute. 2014-01-16 13:03:14 +00:00
SemaTemplate.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaTemplateDeduction.cpp [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 15:41:46 +00:00
SemaTemplateInstantiate.cpp Refactor InstantiatingTemplate constructors 2014-03-13 20:34:22 +00:00
SemaTemplateInstantiateDecl.cpp [C++11] Replacing OMPThreadPrivateDecl and OMPClause iterators varlist_begin() and varlist_end() with iterator_range varlists(). Updating all of the usages of the iterators with range-based for loops. 2014-03-14 15:55:35 +00:00
SemaTemplateVariadic.cpp [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-12 04:55:44 +00:00
SemaType.cpp [C++11] Replacing CXXRecordDecl iterators vbases_begin() and vbases_end() with iterator_range vbases(). Updating all of the usages of the iterators with range-based for loops. 2014-03-13 16:15:17 +00:00
TreeTransform.h [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
TypeLocBuilder.cpp Add missing file from r183563 (the recommit of 183466). 2013-06-07 20:33:10 +00:00
TypeLocBuilder.h Re-commit r183466 with a fix to make the TypeLoc casting machinery work 2013-06-07 20:31:48 +00:00