diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-08-10 19:56:51 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-08-10 19:56:51 +0000 |
commit | 6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59 (patch) | |
tree | 584157687d5fd851d1afa4ca2e217973ff095555 /clang/unittests/AST/ExternalASTSourceTest.cpp | |
parent | 4422df6fa321019aad77ea3a1aacff3fcf6d0280 (diff) | |
download | bcm5719-llvm-6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59.tar.gz bcm5719-llvm-6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59.zip |
Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325)
After post-commit review and community discussion, this seems like a
reasonable direction to continue, making ownership semantics explicit in
the source using the type system.
llvm-svn: 215323
Diffstat (limited to 'clang/unittests/AST/ExternalASTSourceTest.cpp')
-rw-r--r-- | clang/unittests/AST/ExternalASTSourceTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/AST/ExternalASTSourceTest.cpp b/clang/unittests/AST/ExternalASTSourceTest.cpp index 5cc2defe20f..6a5db6c1dd3 100644 --- a/clang/unittests/AST/ExternalASTSourceTest.cpp +++ b/clang/unittests/AST/ExternalASTSourceTest.cpp @@ -35,9 +35,9 @@ private: return ASTFrontendAction::ExecuteAction(); } - virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, - StringRef InFile) { - return new ASTConsumer; + virtual std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI, + StringRef InFile) { + return llvm::make_unique<ASTConsumer>(); } IntrusiveRefCntPtr<ExternalASTSource> Source; |