<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Fix redundant-move for CWG1579."
href="https://bugs.llvm.org/show_bug.cgi?id=45254">45254</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Fix redundant-move for CWG1579.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++14
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>bungeman@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>In "D11615 Fix redundant move warning" the redundant-move diagnostic was
limited due to clang at the time not implementing CWG1579. Later with "D21619
[Sema] Implement C++14's DR1579: Prefer moving id-expression out of functions"
this was implemented, but the redundant-move diagnostic was not updated. In the
meantime gcc has implemented a redundant-move diagnostic which does support
CWG1579, so the diagnostics are confusingly different without need. Clang's
current redundant-move diagnostic would be better named
redundant-move-in-c++11.
This is somewhat complicated by the introduction in "D43322 Diagnose cases of
"return x" that should be "return std::move(x)" for efficiency" of
return-std-move-in-c++11 which is helpful if older toolchains need to be
supported. It would be nice if the redundant-move diagnostic were split into
redundant-move-in-c++11 and redundant-move since return-std-move-in-c++11 and a
full CWG1579 redundant-move are in conflict (by definition).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>