From: Ted Kremenek Date: Fri, 25 Jun 2010 22:48:52 +0000 (+0000) Subject: Add dead stores C++ test case that was previously asserting due to an X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a006342c8650738c7e3547a1a0a70334608c5db6;p=clang Add dead stores C++ test case that was previously asserting due to an invalid source range for CXXNewExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106904 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/dead-stores.cpp b/test/Analysis/dead-stores.cpp index 22d446e170..b21ffad6c5 100644 --- a/test/Analysis/dead-stores.cpp +++ b/test/Analysis/dead-stores.cpp @@ -92,3 +92,11 @@ void test3_e(int &x) { int &y = x; } +//===----------------------------------------------------------------------===// +// Dead stores involving 'new' +//===----------------------------------------------------------------------===// + +static void test_new(unsigned n) { + char **p = new char* [n]; // expected-warning{{never read}} +} +