[llvm-bugs] [Bug 34602] New: Clang-CL __noop intrinsic attempts to use copy constructor
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 14 07:55:30 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=34602
Bug ID: 34602
Summary: Clang-CL __noop intrinsic attempts to use copy
constructor
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: steveire at gmail.com
CC: llvm-bugs at lists.llvm.org
MSVC compiles the following code, but Clang-CL rejects it:
class NonCopyable
{
public:
NonCopyable() {}
NonCopyable(const NonCopyable& other) = delete;
NonCopyable& operator=(const NonCopyable& other) = delete;
NonCopyable(const NonCopyable&& other) {}
NonCopyable& operator=(const NonCopyable&& other) {}
};
int main()
{
NonCopyable nc;
__noop(nc);
return 0;
}
....
C:\dev\src\playground\cpp\foo.cpp(17,9): error : call to deleted constructor of
'NonCopyable' [C:\dev\src\playground\cpp\build\cpptests.vcxproj]
__noop(nc);
^~
C:\dev\src\playground\cpp\foo.cpp(7,2): note: 'NonCopyable' has been
explicitly marked deleted here
NonCopyable(const NonCopyable& other) = delete;
^
3 warnings and 1 error generated.
--
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/20170914/c53c8c4d/attachment.html>
More information about the llvm-bugs
mailing list