[llvm-bugs] [Bug 49260] Better error message when missing #include<new> and using placement new

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 5 15:58:47 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49260

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Fixed By Commit(s)|                            |abbe42d8b5e4e0f3a30adbf232c
                   |                            |693712cf2899c
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
Fixed in trunk; we now diagnose this as:

<stdin>:4:5: error: no matching 'operator new' function for non-allocating
placement new expression; include <new>
    new (this) A(other);
    ^   ~~~~~~

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210305/fec21d79/attachment.html>


More information about the llvm-bugs mailing list