llvm-project/clang/lib/Sema
Chandler Carruth e2669397f1 Treating the unused equality comparisons as something other than part of
-Wunused was a mistake. It resulted in duplicate warnings and lots of
other hacks. Instead, this should be a special sub-category to
-Wunused-value, much like -Wunused-result is.

Moved to -Wunused-comparison, moved the implementation to piggy back on
the -Wunused-value implementation instead of rolling its own, different
mechanism for catching all of the "interesting" statements.

I like the unused-value mechanism for this better, but its currently
missing several top-level statements. For now, I've FIXME-ed out those
test cases. I'll enhance the generic infrastructure to catch these
statements in a subsequent patch.

This patch also removes the cast-to-void fixit hint. This hint isn't
available on any of the other -Wunused-value diagnostics, and if we want
it to be, we should add it generically rather than in one specific case.

llvm-svn: 137822
2011-08-17 09:34:37 +00:00
..
AnalysisBasedWarnings.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
AttributeList.cpp Added basic parsing for all remaining attributes, thread safety 2011-07-28 20:12:35 +00:00
CMakeLists.txt Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function. 2011-07-28 19:46:48 +00:00
CodeCompleteConsumer.cpp When performing code completion after at @interface, allow both 2011-07-30 06:55:39 +00:00
DeclSpec.cpp Add 'mutable' to the function declarator chunk, to be used when 2011-07-13 21:47:47 +00:00
DelayedDiagnostic.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
IdentifierResolver.cpp Fix the insertion of label declarations into the identifier chain in 2011-03-24 10:35:39 +00:00
JumpDiagnostics.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
Makefile BUILD_ARCHIVE is the default for libraries, no need to set it. 2010-07-18 00:14:47 +00:00
Scope.cpp Store a parameter index and function prototype depth in every 2011-05-01 22:35:37 +00:00
Sema.cpp Switch the __int128_t and __uint128_t types over to predefined types 2011-08-12 06:49:56 +00:00
SemaAccess.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
SemaAttr.cpp Add ms_struct attribute on record typee 2011-04-26 17:54:40 +00:00
SemaCXXCast.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
SemaCXXScopeSpec.cpp In Microsoft mode, if we are within a templated function and we can't resolve Identifier during BuildCXXNestedNameSpecifier, then extend the SS with Identifier. This will have the effect of resolving Identifier during template instantiation. The goal is to be able to resolve a function call whose nested-name-specifier is located inside a dependent base class. 2011-07-27 01:05:24 +00:00
SemaChecking.cpp Add a test case for the divide-by-zero fix in r137234 2011-08-10 19:47:25 +00:00
SemaCodeComplete.cpp Do l-value conversion, etc., on a switch condition expression in 2011-08-06 07:30:58 +00:00
SemaDecl.cpp Track in the AST whether a function is constexpr. 2011-08-15 21:04:07 +00:00
SemaDeclAttr.cpp Update a comment to match the recently-changed code 2011-08-10 16:09:55 +00:00
SemaDeclCXX.cpp Track in the AST whether a function is constexpr. 2011-08-15 21:04:07 +00:00
SemaDeclObjC.cpp objective-c: Using existing infrastructure for finding 2011-08-10 17:16:30 +00:00
SemaExceptionSpec.cpp Implement support for C++11 in-class initialization of non-static data members. 2011-06-11 17:19:42 +00:00
SemaExpr.cpp Switch this code to use the more idiomatic 'dyn_cast' pattern. 2011-08-16 22:30:10 +00:00
SemaExprCXX.cpp Perform array bounds checking in more situations and properly handle special 2011-08-05 23:18:04 +00:00
SemaExprMember.cpp Encapsulate the Objective-C id/Class/SEL "redefinition" types in 2011-08-11 20:58:55 +00:00
SemaExprObjC.cpp Add support for C++0x unicode string and character literals, from Craig Topper! 2011-07-27 05:40:30 +00:00
SemaFixItUtils.cpp Refactor the */& mismatch fixit generation out of SemaOverload and provide a simple conversion checking function. 2011-07-28 19:46:48 +00:00
SemaInit.cpp Conversions to bool count as integer conversions for the purposes of 2011-08-12 20:56:43 +00:00
SemaLookup.cpp Improve overloaded function handling in the typo correction code. 2011-08-03 20:36:05 +00:00
SemaObjCProperty.cpp objective-c: reverse patch for // rdar://9818354 2011-08-01 22:39:49 +00:00
SemaOverload.cpp Teach reference initialization from the result of a user-defined 2011-08-15 13:59:46 +00:00
SemaStmt.cpp Treating the unused equality comparisons as something other than part of 2011-08-17 09:34:37 +00:00
SemaTemplate.cpp Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. 2011-08-14 03:52:19 +00:00
SemaTemplateDeduction.cpp Objective-C++ ARC: When performing template argument deduction for a 2011-07-26 14:53:44 +00:00
SemaTemplateInstantiate.cpp Implement function template specialization at class scope extension in Microsoft mode. A new AST node is introduced: ClassScopeFunctionSpecialization. This node holds a FunctionDecl that is not yet specialized; then during the class template instantiation the ClassScopeFunctionSpecialization will spawn the actual function specialization. 2011-08-14 03:52:19 +00:00
SemaTemplateInstantiateDecl.cpp Track in the AST whether a function is constexpr. 2011-08-15 21:04:07 +00:00
SemaTemplateVariadic.cpp remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports 2011-07-23 10:55:15 +00:00
SemaType.cpp Let attribute((cdecl)) and company override -mrtd default calling convention. 2011-08-05 16:37:22 +00:00
TargetAttributesSema.cpp Support for C++11 (non-template) alias declarations. 2011-04-15 14:24:37 +00:00
TargetAttributesSema.h Remove Sema.h's dependency on DeclCXX.h. 2010-08-25 07:42:41 +00:00
TreeTransform.h The lock operand to an @synchronized statement is also 2011-07-27 21:50:02 +00:00
TypeLocBuilder.h Remove more unnecessary #include <llvm/ADT/SmallVector.h> 2011-06-20 06:11:46 +00:00