[analyzer] Test added

llvm-svn: 178397
This commit is contained in:
Anton Yartsev 2013-03-30 01:22:45 +00:00
parent f0ea500c14
commit ae3630b011
1 changed files with 7 additions and 1 deletions

View File

@ -5,7 +5,6 @@
typedef __typeof__(sizeof(int)) size_t;
extern "C" void *malloc(size_t);
extern "C" void free(void *);
//int *global;
//----------------------------------------------------------------------------
// Check for intersections with unix.Malloc and unix.MallocWithAnnotations
@ -27,6 +26,13 @@ void testMallocFreeNoWarn() {
int *p3 = (int *)malloc(sizeof(int)); // no warn
}
void testDeleteMalloced() {
int *p = (int *)malloc(sizeof(int));
delete p; // no warn
}
// FIXME: Pointer should escape
//----- Test free standard new
void testFreeOpNew() {
void *p = operator new(0);