[PATCH] D48708: NFC Build fix in RegisterCustomCheckersTest.cpp

Gabor Buella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 01:16:03 PDT 2018


GBuella created this revision.
GBuella added reviewers: alexfh, george.karpenkov.
Herald added a subscriber: cfe-commits.

`ninja-build check-clang` failed using GCC 4.8.5 with:

  unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:64:12: error: could not convert ‘AnalysisConsumer’ from ‘std::unique_ptr<clang::ento::AnalysisASTConsumer>’ to ‘std::unique_ptr<clang::ASTConsumer>’
       return AnalysisConsumer;
              ^


Repository:
  rC Clang

https://reviews.llvm.org/D48708

Files:
  unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp


Index: unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
===================================================================
--- unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
+++ unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp
@@ -61,7 +61,7 @@
     AnalysisConsumer->AddCheckerRegistrationFn([](CheckerRegistry &Registry) {
       Registry.addChecker<CustomChecker>("custom.CustomChecker", "Description");
     });
-    return AnalysisConsumer;
+    return std::unique_ptr<ASTConsumer>(AnalysisConsumer.release());
   }
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48708.153266.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180628/56f4cfcb/attachment.bin>


More information about the cfe-commits mailing list