aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-04-21 02:22:25 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-04-21 02:22:25 +0000
commit48fb32230541a434ae79064085101d3ea84fb14e (patch)
treed751422ad29b8d6b562893acc190f1709d0299b0
parent5fae1d67ac199755dd26a102e1bddc881edab19c (diff)
The second check point in the old test case was invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101983 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/new.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/Analysis/new.cpp b/test/Analysis/new.cpp
index 95bd966cb0..f26eecd4b1 100644
--- a/test/Analysis/new.cpp
+++ b/test/Analysis/new.cpp
@@ -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 *n = new int;
+ if (*n) { // expected-warning {{Branch condition evaluates to a garbage value}}
}
+}
- int *n2 = new int(3);
- if (*n2) { // no-warning
+void f2() {
+ int *n = new int(3);
+ if (*n) { // no-warning
}
}