[llvm-bugs] [Bug 43680] Cannot throw move-only object on Windows

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 30 15:12:33 PDT 2019


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

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #12 from Reid Kleckner <rnk at google.com> ---
812bdb3c13210759341e8a1b08b864a539ce9dc7

While I was working on the fix, it seems it's more complicated. It seems that
Sema checks that the throw operand is copyable or movable. If it's not one of
those two, it rejects it. So you cannot remove the move constructor.

We also already get this right if the std::string member (or any other
non-trivial member) is removed. Somehow, in that case, LookupCopyingConstructor
will return null if the object doesn't have any non-trivial members. Perhaps
LookupCopyingConstructor shouldn't return deleted constructors. I didn't audit
the callers, but someone could.

Separately, all the ABI-specific semantic analysis should probably be sunk
through the AST CXXABI interface.

-- 
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/20191030/6743a952/attachment.html>


More information about the llvm-bugs mailing list