[cfe-commits] r108546 - /cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
Nick Lewycky
nicholas at mxc.ca
Fri Jul 16 11:42:10 PDT 2010
Author: nicholas
Date: Fri Jul 16 13:42:10 2010
New Revision: 108546
URL: http://llvm.org/viewvc/llvm-project?rev=108546&view=rev
Log:
Give the 'self/array-comparison is always true/false' warning a new flag,
"-Wtautological-compare".
Modified:
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=108546&r1=108545&r2=108546&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Fri Jul 16 13:42:10 2010
@@ -3003,7 +3003,8 @@
// should result in a warning, since these always evaluate to a constant.
// Array comparisons have similar warnings
def warn_comparison_always : Warning<
- "%select{self-|array }0comparison always evaluates to %select{false|true|a constant}1">;
+ "%select{self-|array }0comparison always evaluates to %select{false|true|a constant}1">,
+ InGroup<DiagGroup<"tautological-compare">>;
def warn_stringcompare : Warning<
"result of comparison against %select{a string literal|@encode}0 is "
More information about the cfe-commits
mailing list