[clang-tools-extra] r291251 - Revert "Fix for shared_ptrification in Clang"

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 09:47:19 PST 2017


Author: dblaikie
Date: Fri Jan  6 11:47:19 2017
New Revision: 291251

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

The original commit caused an asan-detected memory leak in Clang.
Reverting while I investigate.

This reverts commit r291186.

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=291251&r1=291250&r2=291251&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp (original)
+++ clang-tools-extra/trunk/include-fixer/IncludeFixer.cpp Fri Jan  6 11:47:19 2017
@@ -82,15 +82,14 @@ IncludeFixerActionFactory::IncludeFixerA
 IncludeFixerActionFactory::~IncludeFixerActionFactory() = default;
 
 bool IncludeFixerActionFactory::runInvocation(
-    std::shared_ptr<clang::CompilerInvocation> Invocation,
-    clang::FileManager *Files,
+    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(std::move(Invocation));
+  Compiler.setInvocation(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=291251&r1=291250&r2=291251&view=diff
==============================================================================
--- clang-tools-extra/trunk/include-fixer/IncludeFixer.h (original)
+++ clang-tools-extra/trunk/include-fixer/IncludeFixer.h Fri Jan  6 11:47:19 2017
@@ -42,7 +42,7 @@ public:
   ~IncludeFixerActionFactory() override;
 
   bool
-  runInvocation(std::shared_ptr<clang::CompilerInvocation> Invocation,
+  runInvocation(clang::CompilerInvocation *Invocation,
                 clang::FileManager *Files,
                 std::shared_ptr<clang::PCHContainerOperations> PCHContainerOps,
                 clang::DiagnosticConsumer *Diagnostics) override;




More information about the cfe-commits mailing list