From: Benjamin Kramer Date: Thu, 28 Jun 2018 13:31:36 +0000 (+0000) Subject: Fix unittest build with GCC older than 5. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28e87abe7b2c06bdbe39b267ec671477b982d084;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@335854 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp b/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp index 82887a1daf..dcd115e596 100644 --- a/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp +++ b/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp @@ -61,7 +61,7 @@ public: AnalysisConsumer->AddCheckerRegistrationFn([](CheckerRegistry &Registry) { Registry.addChecker("custom.CustomChecker", "Description"); }); - return AnalysisConsumer; + return std::move(AnalysisConsumer); } };