diff options
| author | David Blaikie <dblaikie@gmail.com> | 2017-01-05 22:19:11 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2017-01-05 22:19:11 +0000 |
| commit | 9280a857bc4cbd43d597003416805d6e12f33830 (patch) | |
| tree | b07ae60f1d8c74749829644f5828b994b6ee4f8a /clang/unittests/AST/ExternalASTSourceTest.cpp | |
| parent | 04cfed9af5dbe5a67a10c8f0cb4bf030ebf41ae4 (diff) | |
| download | bcm5719-llvm-9280a857bc4cbd43d597003416805d6e12f33830.tar.gz bcm5719-llvm-9280a857bc4cbd43d597003416805d6e12f33830.zip | |
IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer
llvm-svn: 291184
Diffstat (limited to 'clang/unittests/AST/ExternalASTSourceTest.cpp')
| -rw-r--r-- | clang/unittests/AST/ExternalASTSourceTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/AST/ExternalASTSourceTest.cpp b/clang/unittests/AST/ExternalASTSourceTest.cpp index 4b3bb3e2b69..513ff5b99fa 100644 --- a/clang/unittests/AST/ExternalASTSourceTest.cpp +++ b/clang/unittests/AST/ExternalASTSourceTest.cpp @@ -49,14 +49,14 @@ bool testExternalASTSource(ExternalASTSource *Source, CompilerInstance Compiler; Compiler.createDiagnostics(); - CompilerInvocation *Invocation = new CompilerInvocation; + auto Invocation = std::make_shared<CompilerInvocation>(); Invocation->getPreprocessorOpts().addRemappedFile( "test.cc", MemoryBuffer::getMemBuffer(FileContents).release()); const char *Args[] = { "test.cc" }; CompilerInvocation::CreateFromArgs(*Invocation, Args, Args + array_lengthof(Args), Compiler.getDiagnostics()); - Compiler.setInvocation(Invocation); + Compiler.setInvocation(std::move(Invocation)); TestFrontendAction Action(Source); return Compiler.ExecuteAction(Action); |

