From f1c6412c62b71ceb50d25367f4747e154b71c3a1 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 5 Jan 2017 22:44:07 +0000 Subject: Fix for shared_ptrification in Clang git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@291186 91177308-0d34-0410-b5e6-96231b3b80d8 --- include-fixer/IncludeFixer.cpp | 5 +++-- include-fixer/IncludeFixer.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include-fixer') diff --git a/include-fixer/IncludeFixer.cpp b/include-fixer/IncludeFixer.cpp index ad3f8e9d..204d0c4e 100644 --- a/include-fixer/IncludeFixer.cpp +++ b/include-fixer/IncludeFixer.cpp @@ -82,14 +82,15 @@ IncludeFixerActionFactory::IncludeFixerActionFactory( IncludeFixerActionFactory::~IncludeFixerActionFactory() = default; bool IncludeFixerActionFactory::runInvocation( - clang::CompilerInvocation *Invocation, clang::FileManager *Files, + std::shared_ptr Invocation, + clang::FileManager *Files, std::shared_ptr PCHContainerOps, clang::DiagnosticConsumer *Diagnostics) { assert(Invocation->getFrontendOpts().Inputs.size() == 1); // Set up Clang. clang::CompilerInstance Compiler(PCHContainerOps); - Compiler.setInvocation(Invocation); + Compiler.setInvocation(std::move(Invocation)); Compiler.setFileManager(Files); // Create the compiler's actual diagnostics engine. We want to drop all diff --git a/include-fixer/IncludeFixer.h b/include-fixer/IncludeFixer.h index 28fc28a7..13092a34 100644 --- a/include-fixer/IncludeFixer.h +++ b/include-fixer/IncludeFixer.h @@ -42,7 +42,7 @@ public: ~IncludeFixerActionFactory() override; bool - runInvocation(clang::CompilerInvocation *Invocation, + runInvocation(std::shared_ptr Invocation, clang::FileManager *Files, std::shared_ptr PCHContainerOps, clang::DiagnosticConsumer *Diagnostics) override; -- cgit v1.2.3