Changed FrontendActionFactory::create to return a std::unique_ptr
[lldb.git] / clang-tools-extra / clang-tidy / ClangTidy.cpp
index dd5c35e..73933e3 100644 (file)
@@ -530,7 +530,9 @@ runClangTidy(clang::tidy::ClangTidyContext &Context,
     ActionFactory(ClangTidyContext &Context,
                   IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem> BaseFS)
         : ConsumerFactory(Context, BaseFS) {}
-    FrontendAction *create() override { return new Action(&ConsumerFactory); }
+    std::unique_ptr<FrontendAction> create() override {
+      return std::make_unique<Action>(&ConsumerFactory);
+    }
 
     bool runInvocation(std::shared_ptr<CompilerInvocation> Invocation,
                        FileManager *Files,