From: John McCall Date: Thu, 2 Sep 2010 22:27:38 +0000 (+0000) Subject: sabre points out that the timing here is pretty pessimal; I'll retry the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=40bfbbc8a56bb1cff136c8cd44ced7e673f21a5e;p=clang sabre points out that the timing here is pretty pessimal; I'll retry the experiment in a few days. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index d46e9a7c08..f6fb79d03c 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -100,7 +100,6 @@ def SignCompare : DiagGroup<"sign-compare">; def : DiagGroup<"stack-protector">; def : DiagGroup<"switch-default">; def : DiagGroup<"synth">; -def TautologicalCompare : DiagGroup<"tautological-compare">; // Preprocessor warnings. def : DiagGroup<"builtin-macro-redefined">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 081190bb27..d3fdb8050b 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2198,10 +2198,10 @@ def warn_mixed_sign_conditional : Warning< InGroup, DefaultIgnore; def warn_lunsigned_always_true_comparison : Warning< "comparison of unsigned expression %0 is always %1">, - InGroup; + InGroup, DefaultIgnore; def warn_runsigned_always_true_comparison : Warning< "comparison of %0 unsigned expression is always %1">, - InGroup; + InGroup, DefaultIgnore; def err_invalid_this_use : Error< "invalid use of 'this' outside of a nonstatic member function">; @@ -3062,7 +3062,7 @@ def err_ret_local_block : Error< // Array comparisons have similar warnings def warn_comparison_always : Warning< "%select{self-|array }0comparison always evaluates to %select{false|true|a constant}1">, - InGroup; + InGroup>; def warn_stringcompare : Warning< "result of comparison against %select{a string literal|@encode}0 is " diff --git a/test/Analysis/additive-folding.c b/test/Analysis/additive-folding.c index 713f788ac0..e4a5651339 100644 --- a/test/Analysis/additive-folding.c +++ b/test/Analysis/additive-folding.c @@ -183,14 +183,14 @@ void tautologyGT (unsigned a) { void tautologyGE (unsigned a) { char* b = malloc(1); - if (a >= 0) // expected-warning{{always true}} + if (a >= 0) free(b); return; // no-warning } void tautologyLT (unsigned a) { char* b = malloc(1); - if (a < 0) // expected-warning{{always false}} + if (a < 0) return; // expected-warning{{never executed}} free(b); } diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index d4d18b4ff3..8daa845068 100644 --- a/test/Analysis/null-deref-ps.c +++ b/test/Analysis/null-deref-ps.c @@ -237,7 +237,7 @@ int* f10(int* p, signed char x, int y) { // Test case from void f11(unsigned i) { int *x = 0; - if (i >= 0) { // expected-warning{{always true}} + if (i >= 0) { // always true } else { *x = 42; // no-warning