summaryrefslogtreecommitdiffstats
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
commitf29231ece0721024e8e6f04e66a2fe27c5c6d015 (patch)
treed121359a5316669e206397688bd4b7c2a514ef1e
parent465dfb270584bd223472cdb021c36e713add24b8 (diff)
downloadbcm5719-llvm-f29231ece0721024e8e6f04e66a2fe27c5c6d015.tar.gz
bcm5719-llvm-f29231ece0721024e8e6f04e66a2fe27c5c6d015.zip
The second check point in the old test case was invalid.
llvm-svn: 101983
-rw-r--r--clang/test/Analysis/new.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/test/Analysis/new.cpp b/clang/test/Analysis/new.cpp
index 95bd966cb02..f26eecd4b19 100644
--- a/clang/test/Analysis/new.cpp
+++ b/clang/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
}
}
OpenPOWER on IntegriCloud