diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-21 02:22:25 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-04-21 02:22:25 +0000 |
commit | f29231ece0721024e8e6f04e66a2fe27c5c6d015 (patch) | |
tree | d121359a5316669e206397688bd4b7c2a514ef1e /clang/test/Analysis/new.cpp | |
parent | 465dfb270584bd223472cdb021c36e713add24b8 (diff) | |
download | bcm5719-llvm-f29231ece0721024e8e6f04e66a2fe27c5c6d015.tar.gz bcm5719-llvm-f29231ece0721024e8e6f04e66a2fe27c5c6d015.zip |
The second check point in the old test case was invalid.
llvm-svn: 101983
Diffstat (limited to 'clang/test/Analysis/new.cpp')
-rw-r--r-- | clang/test/Analysis/new.cpp | 10 |
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 } } |