[cfe-commits] r106904 - /cfe/trunk/test/Analysis/dead-stores.cpp

Ted Kremenek kremenek at apple.com
Fri Jun 25 15:48:52 PDT 2010


Author: kremenek
Date: Fri Jun 25 17:48:52 2010
New Revision: 106904

URL: http://llvm.org/viewvc/llvm-project?rev=106904&view=rev
Log:
Add dead stores C++ test case that was previously asserting due to an
invalid source range for CXXNewExpr.

Modified:
    cfe/trunk/test/Analysis/dead-stores.cpp

Modified: cfe/trunk/test/Analysis/dead-stores.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dead-stores.cpp?rev=106904&r1=106903&r2=106904&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/dead-stores.cpp (original)
+++ cfe/trunk/test/Analysis/dead-stores.cpp Fri Jun 25 17:48:52 2010
@@ -92,3 +92,11 @@
   int &y = x;
 }
 
+//===----------------------------------------------------------------------===//
+// Dead stores involving 'new'
+//===----------------------------------------------------------------------===//
+
+static void test_new(unsigned n) {
+  char **p = new char* [n]; // expected-warning{{never read}}
+}
+





More information about the cfe-commits mailing list