The second check point in the old test case was invalid.

llvm-svn: 101983
This commit is contained in:
Zhongxing Xu 2010-04-21 02:22:25 +00:00
parent 465dfb2705
commit f29231ece0
1 changed files with 8 additions and 6 deletions

View File

@ -1,12 +1,14 @@
// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -verify %s
void f1() {
int *n1 = new int;
if (*n1) { // expected-warning {{Branch condition evaluates to a garbage value}}
}
int *n2 = new int(3);
if (*n2) { // no-warning
int *n = new int;
if (*n) { // expected-warning {{Branch condition evaluates to a garbage value}}
}
}
void f2() {
int *n = new int(3);
if (*n) { // no-warning
}
}