<div dir="ltr">Thanks! I was going to push the same fix, but you also explained why it's needed ;)<br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 28, 2018 at 3:36 PM Benjamin Kramer via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: d0k<br>
Date: Thu Jun 28 06:31:36 2018<br>
New Revision: 335854<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=335854&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=335854&view=rev</a><br>
Log:<br>
Fix unittest build with GCC older than 5.<br>
<br>
Old GCCs have an annoying bug where RVO disables the automatic<br>
conversion to base for unique_ptr. Add a pessimizing std::move as a<br>
workaround.<br>
<br>
Modified:<br>
    cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp<br>
<br>
Modified: cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp?rev=335854&r1=335853&r2=335854&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp?rev=335854&r1=335853&r2=335854&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp (original)<br>
+++ cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp Thu Jun 28 06:31:36 2018<br>
@@ -61,7 +61,7 @@ public:<br>
     AnalysisConsumer->AddCheckerRegistrationFn([](CheckerRegistry &Registry) {<br>
       Registry.addChecker<CustomChecker>("custom.CustomChecker", "Description");<br>
     });<br>
-    return AnalysisConsumer;<br>
+    return std::move(AnalysisConsumer);<br>
   }<br>
 };<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>