voidf(int*p);voidtestUseMiddleArgAfterDelete(int*p){delete p;f(p);// warn: use after free
}classSomeClass{public:voidf();};voidtest(){
SomeClass *c =new SomeClass;delete c;
c->f();// warn: use after free
}voidtest(){int*p =(int*)__builtin_alloca(sizeof(int));delete p;// warn: deleting memory allocated by alloca
}voidtest(){int*p =newint;delete p;delete p;// warn: attempt to free released
}voidtest(){int i;delete&i;// warn: delete address of local
}voidtest(){int*p =newint[1];delete[](++p);// warn: argument to 'delete[]' is offset by 4 bytes
// from the start of memory allocated by 'new[]'
}