]> granicus.if.org Git - clang/commitdiff
Give the 'self/array-comparison is always true/false' warning a new flag,
authorNick Lewycky <nicholas@mxc.ca>
Fri, 16 Jul 2010 18:42:10 +0000 (18:42 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 16 Jul 2010 18:42:10 +0000 (18:42 +0000)
"-Wtautological-compare".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108546 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td

index b88480dc69d67d58c85b88ad27bcc52d449d2e32..fee5a56e4924a64b0e6b713f40c3fb67d3afd009 100644 (file)
@@ -3003,7 +3003,8 @@ def err_ret_local_block : Error<
 // 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 "