Author: d0k
Date: Thu Jun 28 06:31:36 2018
New Revision: 335854

URL: http://llvm.org/viewvc/llvm-project?rev=335854&view=rev
Log:
Fix unittest build with GCC older than 5.

Old GCCs have an annoying bug where RVO disables the automatic
conversion to base for unique_ptr. Add a pessimizing std::move as a
workaround.

Modified:
    cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp

Modified: cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp?rev=335854&r1=335853&r2=335854&view=diff
==============================================================================
--- cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp (original)
+++ cfe/trunk/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp Thu Jun 
28 06:31:36 2018
@@ -61,7 +61,7 @@ public:
     AnalysisConsumer->AddCheckerRegistrationFn([](CheckerRegistry &Registry) {
       Registry.addChecker<CustomChecker>("custom.CustomChecker", 
"Description");
     });
-    return AnalysisConsumer;
+    return std::move(AnalysisConsumer);
   }
 };
 


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to