[cfe-dev] Compiler optimizing out calls to new()
John McCall via cfe-dev
cfe-dev at lists.llvm.org
Mon Dec 3 21:02:33 PST 2018
On 3 Dec 2018, at 21:51, Richard Smith via cfe-dev wrote:
> More generally, a (non-placement) new-expression is not required to call
> any 'operator new' in particular to get its storage.
To be precise, this rule applies to new-expressions that directly use one
of the "replaceable global allocation functions", which both includes some
placement forms (e.g. `new (std::nothrow) double`) and excludes some
non-placement forms (e.g. `new MyClass` where `MyClass` declares an
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev