summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/null-deref-ps.c
diff options
context:
space:
mode:
authorTom Care <tom.care@uqconnect.edu.au>2010-08-27 22:50:47 +0000
committerTom Care <tom.care@uqconnect.edu.au>2010-08-27 22:50:47 +0000
commit71cc9d886ada122bd82ed7d20325a98fa19390a3 (patch)
tree40bc1ee240a11da03a895fd86d4ce7c4ab2cad6b /clang/test/Analysis/null-deref-ps.c
parent98e679508d1afd926d8ab2a33090d7b7d5c80961 (diff)
downloadbcm5719-llvm-71cc9d886ada122bd82ed7d20325a98fa19390a3.tar.gz
bcm5719-llvm-71cc9d886ada122bd82ed7d20325a98fa19390a3.zip
Added checking of (x == x) and (x != x) to IdempotentOperationChecker and updated test cases flagged by it.
llvm-svn: 112313
Diffstat (limited to 'clang/test/Analysis/null-deref-ps.c')
-rw-r--r--clang/test/Analysis/null-deref-ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c
index d0e4f61521a..8daa8450681 100644
--- a/clang/test/Analysis/null-deref-ps.c
+++ b/clang/test/Analysis/null-deref-ps.c
@@ -66,7 +66,7 @@ int f4_b() {
short *p = x; // expected-warning{{incompatible integer to pointer conversion}}
// The following branch should be infeasible.
- if (!(p == &array[0])) {
+ if (!(p == &array[0])) { // expected-warning{{Both operands to '==' always have the same value}}
p = 0;
*p = 1; // no-warning
}
OpenPOWER on IntegriCloud