aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-07-16 18:42:10 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-07-16 18:42:10 +0000
commit35dda71933d2e71b7a865b6ba41cf703e8b99c56 (patch)
tree6b2e46b51e962fa6349f6170a9ed3536b7a6ca66
parentb7c21018ec1049580cf6df88db09e606550a7baa (diff)
Give the 'self/array-comparison is always true/false' warning a new flag,
"-Wtautological-compare". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108546 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index b88480dc69..fee5a56e49 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/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<DiagGroup<"tautological-compare">>;
def warn_stringcompare : Warning<
"result of comparison against %select{a string literal|@encode}0 is "