Add dead stores C++ test case that was previously asserting due to an

invalid source range for CXXNewExpr.

llvm-svn: 106904
This commit is contained in:
Ted Kremenek 2010-06-25 22:48:52 +00:00
parent abb1f91325
commit da42d523cf
1 changed files with 8 additions and 0 deletions

View File

@ -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}}
}