summaryrefslogtreecommitdiffstats
path: root/include-fixer
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-01-05 22:44:07 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-01-05 22:44:07 +0000
commitf1c6412c62b71ceb50d25367f4747e154b71c3a1 (patch)
tree1a70a31029a3b655a595888590ba918947a1e3a0 /include-fixer
parent9e7c3af789b532b90168c8e627290a1fead683bb (diff)
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
Diffstat (limited to 'include-fixer')
-rw-r--r--include-fixer/IncludeFixer.cpp5
-rw-r--r--include-fixer/IncludeFixer.h2
2 files changed, 4 insertions, 3 deletions
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<clang::CompilerInvocation> Invocation,
+ clang::FileManager *Files,
std::shared_ptr<clang::PCHContainerOperations> 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<clang::CompilerInvocation> Invocation,
clang::FileManager *Files,
std::shared_ptr<clang::PCHContainerOperations> PCHContainerOps,
clang::DiagnosticConsumer *Diagnostics) override;