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 | e781b71dd0fa9835aff199285aba0f83d47aed27 (patch) | |
tree | 746c15203e97a6e9bf75f556dea4fd5608c7fdcc /tools/clang-import-test | |
parent | 8dc751fddfd5052e23e51170699fb2bf2d242550 (diff) | |
download | clang-e781b71dd0fa9835aff199285aba0f83d47aed27.tar.gz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/clang-import-test')
-rw-r--r-- | tools/clang-import-test/clang-import-test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/clang-import-test/clang-import-test.cpp b/tools/clang-import-test/clang-import-test.cpp index 47598fc918..33190af4bf 100644 --- a/tools/clang-import-test/clang-import-test.cpp +++ b/tools/clang-import-test/clang-import-test.cpp @@ -157,7 +157,7 @@ BuildCompilerInstance(ArrayRef<const char *> ClangArgv) { Inv->getCodeGenOpts().setDebugInfo(codegenoptions::FullDebugInfo); Inv->getTargetOpts().Triple = llvm::sys::getDefaultTargetTriple(); - Ins->setInvocation(Inv.release()); + Ins->setInvocation(std::move(Inv)); TargetInfo *TI = TargetInfo::CreateTargetInfo( Ins->getDiagnostics(), Ins->getInvocation().TargetOpts); |