<div dir="ltr">@Nico, Yes, I will. I'm sorry about that. I had mistakenly read that it would take the title and commit message from phabricator if I linked to that in my svn commit message.<div><br></div><div>@Piotr, A test failed to build on the build server (as shown on IRC), so I quickly reverted the commit. I will remember better commit messages (with both titles and messages) from now on. Sorry. </div><div><br></div><div>Not the best start to this endeavour, but lesson learned. </div><div><br></div><div>Best regards,</div><div>Mads Ravn</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, May 23, 2016 at 11:01 PM Piotr Padlewski <<a href="mailto:piotr.padlewski@gmail.com">piotr.padlewski@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">BTW why did you revert this change? And why the commit message doesn't have "revert" in name?</div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-23 20:51 GMT+02:00 Nico Weber via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Next time, please use real commit messages: Describe what the change does, and why it's being done. Include a link to the review link at the end of the commit message. If every change just had a phab link as commit message, people bisecting changes would have to click through for every change in `svn log` output.</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 2:15 PM, Mads Ravn via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: madsravn<br>
Date: Mon May 23 13:15:40 2016<br>
New Revision: 270472<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270472&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270472&view=rev</a><br>
Log:<br>
Commiting for <a href="http://reviews.llvm.org/D20365" rel="noreferrer" target="_blank">http://reviews.llvm.org/D20365</a><br>
<br>
Modified:<br>
    clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp<br>
    clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp?rev=270472&r1=270471&r2=270472&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp?rev=270472&r1=270471&r2=270472&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp Mon May 23 13:15:40 2016<br>
@@ -181,6 +181,12 @@ void PassByValueCheck::check(const Match<br>
   if (!paramReferredExactlyOnce(Ctor, ParamDecl))<br>
     return;<br>
<br>
+<br>
+  // If the parameter is trivial to copy, don't move it. Moving a trivivally<br>
+  // copyable type will cause a problem with modernize-pass-by-value<br>
+  if (ParamDecl->getType().isTriviallyCopyableType(*Result.Context))<br>
+    return;<br>
+<br>
   auto Diag = diag(ParamDecl->getLocStart(), "pass by value and use std::move");<br>
<br>
   // Iterate over all declarations of the constructor.<br>
<br>
Modified: clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp?rev=270472&r1=270471&r2=270472&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp?rev=270472&r1=270471&r2=270472&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp (original)<br>
+++ clang-tools-extra/trunk/test/clang-tidy/modernize-pass-by-value.cpp Mon May 23 13:15:40 2016<br>
@@ -194,3 +194,9 @@ struct S {<br>
   Movable M;<br>
 };<br>
<br>
+// Test that types that are trivially copyable will not use std::move. This will<br>
+// cause problems with misc-move-const-arg, as it will revert it.<br>
+struct T {<br>
+  std::array<int, 10> a_;<br>
+  T(std::array<int, 10> a) : a_(a) {}<br>
+};<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div>