https://llvm.org/bugs/show_bug.cgi?id=23820
Bug ID: 23820
Summary: -Wredundant-move issued on non-redundant moves in
C++11 (that would be redundant in C++14)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This produces a -Wredundant-move warning, but removing the std::move call makes
the code ill-formed in C++11:
#include <utility>
struct X { X(); X(X&&); };
struct Y : X {};
X f() { Y y; return std::move(y); }
The warning is correct in C++14.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs