r178397 - [analyzer] Test added
Anton Yartsev
anton.yartsev at gmail.com
Fri Mar 29 18:22:45 PDT 2013
Author: ayartsev
Date: Fri Mar 29 20:22:45 2013
New Revision: 178397
URL: http://llvm.org/viewvc/llvm-project?rev=178397&view=rev
Log:
[analyzer] Test added
Modified:
cfe/trunk/test/Analysis/NewDelete-intersections.mm
Modified: cfe/trunk/test/Analysis/NewDelete-intersections.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/NewDelete-intersections.mm?rev=178397&r1=178396&r2=178397&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/NewDelete-intersections.mm (original)
+++ cfe/trunk/test/Analysis/NewDelete-intersections.mm Fri Mar 29 20:22:45 2013
@@ -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);
More information about the cfe-commits
mailing list