Experimentally move the tautological comparison warnings from -Wsign-compare
to -Wtautological-compare. This implies that they're now on by default.
If this causes chaos, I'll figure something else out.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112877 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/additive-folding.c b/test/Analysis/additive-folding.c
index e4a5651..713f788 100644
--- a/test/Analysis/additive-folding.c
+++ b/test/Analysis/additive-folding.c
@@ -183,14 +183,14 @@
void tautologyGE (unsigned a) {
char* b = malloc(1);
- if (a >= 0)
+ if (a >= 0) // expected-warning{{always true}}
free(b);
return; // no-warning
}
void tautologyLT (unsigned a) {
char* b = malloc(1);
- if (a < 0)
+ if (a < 0) // expected-warning{{always false}}
return; // expected-warning{{never executed}}
free(b);
}
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index 8daa845..d4d18b4 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -237,7 +237,7 @@
// Test case from <rdar://problem/6407949>
void f11(unsigned i) {
int *x = 0;
- if (i >= 0) {
+ if (i >= 0) { // expected-warning{{always true}}
// always true
} else {
*x = 42; // no-warning