aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unused-comparison.cpp
AgeCommit message (Collapse)Author
2011-10-10Don't analyze comparisons in type- or value-dependentDouglas Gregor
subexpressions. Fixes PR10291. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18Remove the last FIXMEs on -Wunused-comparison since it got moved toChandler Carruth
entirely use the existing -Wunused-value infrastructure. This also fixes a few missed cases for -Wunused in general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137916 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Whitelist operator== and operator!= as valid for unused value warnings,Chandler Carruth
even when overloaded and user-defined. These operators are both more valuable to warn on (due to likely typos) and extremely unlikely to be reasonable for use to trigger side-effects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137823 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-17Treating the unused equality comparisons as something other than part ofChandler Carruth
-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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137822 91177308-0d34-0410-b5e6-96231b3b80d8