llvm-project/clang/lib/Sema
Richard Trieu f935b562b9 Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare,
which warns on compound conditionals that always evaluate to the same value.
For instance, (x > 5 && x < 3) will always be false since no value for x can
satisfy both conditions.

This patch also changes the CFG to use these tautological values for better
branch analysis.  The test for -Wunreachable-code shows how this change catches
additional dead code.

Patch by Anders Rönnholm.

llvm-svn: 205665
2014-04-05 05:17:01 +00:00
..
AnalysisBasedWarnings.cpp Add a new subgroup to -Wtautological-compare, -Wtautological-overlap-compare, 2014-04-05 05:17:01 +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 Refactor: move loading pending instantiations from chained PCHs to a more appropriate place, so that we only ask the external source once. 2014-03-22 01:43:32 +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 Vector [Sema]. Vector "splats" which are truncated should have a warning 2014-04-04 19:33:39 +00:00
SemaCodeComplete.cpp [C++11] Replacing Scope iterators decl_begin() and decl_end() with iterator_range decls(). Updating all of the usages of the iterators with range-based for loops, and removing the no-longer-needed iterator versions. 2014-03-17 16:55:25 +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 PR19305: Don't issue -Wunused-variable warnings on variable templates. It's not 2014-04-02 18:28:36 +00:00
SemaDeclAttr.cpp In preparation for being able to use simple Boolean logic expressions involving capabilities, the semantics for attributes now looks through the types of the constituent parts of a capability expression instead of at the aggregate expression type. 2014-04-04 15:13:57 +00:00
SemaDeclCXX.cpp If a using-declaration names a class member, but appears outside a class, try 2014-04-02 21:44:35 +00:00
SemaDeclObjC.cpp Objective-C. Fixes a bogus warning on unimplemented 2014-03-26 20:59:26 +00:00
SemaExceptionSpec.cpp When the exception specification for a function in an imported PCH or module is 2014-03-20 21:47:22 +00:00
SemaExpr.cpp Try harder about not suggesting methods as corrections when they 2014-04-04 22:16:30 +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 vector [Sema]. Check for proper use of 's' char prefix 2014-04-03 19:43:01 +00:00
SemaExprObjC.cpp Objective-C. Make multiple selector warning 2014-03-27 21:59: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 PR19249: Don't forget to DiagnoseUseOfDecl for the implicit use of a variable 2014-03-25 21:11:32 +00:00
SemaLookup.cpp Try harder about not suggesting methods as corrections when they 2014-04-04 22:16:30 +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 [OPENMP] Implemented 'copyin' clause 2014-03-31 03:36:38 +00:00
SemaOverload.cpp Try harder about not suggesting methods as corrections when they 2014-04-04 22:16:30 +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 Render anonymous entities as '(anonymous <thing>)' (and lambdas as '(lambda at ... )') 2014-04-02 05:58:29 +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 Teach getTemplateInstantiationPattern to deal with generic lambdas. 2014-04-03 16:32:21 +00:00
SemaTemplateInstantiateDecl.cpp If a using-declaration names a class member, but appears outside a class, try 2014-04-02 21:44: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 ARM64: initial clang support commit. 2014-03-29 15:09:45 +00:00
TreeTransform.h [OPENMP][C++11] Renamed loop vars properly. 2014-04-04 10:02:14 +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