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/Tooling/RefactoringTest.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/Tooling/RefactoringTest.cpp')
-rw-r--r-- | clang/unittests/Tooling/RefactoringTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/unittests/Tooling/RefactoringTest.cpp b/clang/unittests/Tooling/RefactoringTest.cpp index ddb974ac9f4..3e067dd3f99 100644 --- a/clang/unittests/Tooling/RefactoringTest.cpp +++ b/clang/unittests/Tooling/RefactoringTest.cpp @@ -299,11 +299,12 @@ private: public: TestAction(TestVisitor *Visitor) : Visitor(Visitor) {} - virtual clang::ASTConsumer* CreateASTConsumer( - clang::CompilerInstance& compiler, llvm::StringRef dummy) { + virtual std::unique_ptr<clang::ASTConsumer> + CreateASTConsumer(clang::CompilerInstance &compiler, + llvm::StringRef dummy) { Visitor->SM = &compiler.getSourceManager(); /// TestConsumer will be deleted by the framework calling us. - return new FindConsumer(Visitor); + return llvm::make_unique<FindConsumer>(Visitor); } private: |