[clang-tools-extra] r291186 - Fix for shared_ptrification in Clang

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 14:44:07 PST 2017


Author: dblaikie
Date: Thu Jan  5 16:44:07 2017
New Revision: 291186

URL: http://llvm.org/viewvc/llvm-project?rev=291186&view=rev
Log:
Fix for shared_ptrification in Clang

Modified:
    clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp
    clang-tools-extra/trunk/include-fixer/IncludeFixer.h

Modified: clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp?rev=291186&r1=291185&r2=291186&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp (original)
+++ clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp Thu Jan  5 16:44:07 2017
@@ -82,14 +82,15 @@ IncludeFixerActionFactory::IncludeFixerA
 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

Modified: clang-tools-extra/trunk/include-fixer/IncludeFixer.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/include-fixer/IncludeFixer.h?rev=291186&r1=291185&r2=291186&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/IncludeFixer.h (original)
+++ clang-tools-extra/trunk/include-fixer/IncludeFixer.h Thu Jan  5 16:44:07 2017
@@ -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;




More information about the cfe-commits mailing list