summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/additive-folding.c4
-rw-r--r--clang/test/Analysis/null-deref-ps.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/Analysis/additive-folding.c b/clang/test/Analysis/additive-folding.c
index e4a56513396..713f788ac0d 100644
--- a/clang/test/Analysis/additive-folding.c
+++ b/clang/test/Analysis/additive-folding.c
@@ -183,14 +183,14 @@ void tautologyGT (unsigned a) {
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/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c
index 8daa8450681..d4d18b4ff3b 100644
--- a/clang/test/Analysis/null-deref-ps.c
+++ b/clang/test/Analysis/null-deref-ps.c
@@ -237,7 +237,7 @@ int* f10(int* p, signed char x, int y) {
// 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
OpenPOWER on IntegriCloud