From 725b4e753385ec520002eaf760d9490c53f347c7 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Fri, 16 Jul 2010 18:42:10 +0000 Subject: [PATCH] Give the 'self/array-comparison is always true/false' warning a new flag, "-Wtautological-compare". llvm-svn: 108546 --- clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index b88480dc69d6..fee5a56e4924 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -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>; def warn_stringcompare : Warning< "result of comparison against %select{a string literal|@encode}0 is "