[cfe-commits] r101983 - /cfe/trunk/test/Analysis/new.cpp

Zhongxing Xu xuzhongxing at gmail.com
Tue Apr 20 19:22:25 PDT 2010


Author: zhongxingxu
Date: Tue Apr 20 21:22:25 2010
New Revision: 101983

URL: http://llvm.org/viewvc/llvm-project?rev=101983&view=rev
Log:
The second check point in the old test case was invalid.

Modified:
    cfe/trunk/test/Analysis/new.cpp

Modified: cfe/trunk/test/Analysis/new.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/new.cpp?rev=101983&r1=101982&r2=101983&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/new.cpp (original)
+++ cfe/trunk/test/Analysis/new.cpp Tue Apr 20 21:22:25 2010
@@ -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
   }
 }
 





More information about the cfe-commits mailing list