Richard,
When using expr->getOperatorNew()->isReplaceableGlobalAllocationFunction()
we don't handle operator new defined inside a class (see below).
Using expr->getNumPlacementArgs() == 0 fixes that but breaks new
(std::nothrow) X[n].
Would you suggest another check that will include all non-placement
operator new cases?
#include <new>
#include <stdlib.h>
class Foo {
public:
#ifdef OPN
void *operator new(size_t s);
void *operator new[] (size_t s);
#endif
~Foo();
};
Foo *getFoo(size_t s) {
return new Foo[s];
}
On Mon, Aug 25, 2014 at 6:33 PM, Richard Smith <[email protected]>
wrote:
> LGTM
>
> http://reviews.llvm.org/D4774
>
>
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits