diff options
| author | David Blaikie <dblaikie@gmail.com> | 2017-01-06 19:49:01 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2017-01-06 19:49:01 +0000 |
| commit | ea4395ebcd37905487b7a978db2f460bc576a5d1 (patch) | |
| tree | 92303c3c362a7eee408868cfa554f15683b0c02d /clang/lib/ARCMigrate | |
| parent | 9cbcc5ff0b325ef2c0638e6c5c365b35a1e4f087 (diff) | |
| download | bcm5719-llvm-ea4395ebcd37905487b7a978db2f460bc576a5d1.tar.gz bcm5719-llvm-ea4395ebcd37905487b7a978db2f460bc576a5d1.zip | |
Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer"
Aleksey Shlypanikov pointed out my mistake in migrating an explicit
unique_ptr to auto - I was expecting the function returned a unique_ptr,
but instead it returned a raw pointer - introducing a leak.
Thanks Aleksey!
This reapplies r291184, reverted in r291249.
llvm-svn: 291270
Diffstat (limited to 'clang/lib/ARCMigrate')
| -rw-r--r-- | clang/lib/ARCMigrate/ARCMT.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp index 680aa3e48da..cf7cddefc03 100644 --- a/clang/lib/ARCMigrate/ARCMT.cpp +++ b/clang/lib/ARCMigrate/ARCMT.cpp @@ -271,7 +271,7 @@ bool arcmt::checkForManualIssues( Diags->setClient(&errRec, /*ShouldOwnClient=*/false); std::unique_ptr<ASTUnit> Unit(ASTUnit::LoadFromCompilerInvocationAction( - CInvok.release(), PCHContainerOps, Diags)); + std::move(CInvok), PCHContainerOps, Diags)); if (!Unit) { errRec.FinishCapture(); return true; @@ -547,7 +547,7 @@ bool MigrationProcess::applyTransform(TransformFn trans, ASTAction.reset(new ARCMTMacroTrackerAction(ARCMTMacroLocs)); std::unique_ptr<ASTUnit> Unit(ASTUnit::LoadFromCompilerInvocationAction( - CInvok.release(), PCHContainerOps, Diags, ASTAction.get())); + std::move(CInvok), PCHContainerOps, Diags, ASTAction.get())); if (!Unit) { errRec.FinishCapture(); return true; |

