summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Frontend/FrontendActionTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:51 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:51 +0000
commit6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59 (patch)
tree584157687d5fd851d1afa4ca2e217973ff095555 /clang/unittests/Frontend/FrontendActionTest.cpp
parent4422df6fa321019aad77ea3a1aacff3fcf6d0280 (diff)
downloadbcm5719-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/Frontend/FrontendActionTest.cpp')
-rw-r--r--clang/unittests/Frontend/FrontendActionTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/Frontend/FrontendActionTest.cpp b/clang/unittests/Frontend/FrontendActionTest.cpp
index 44843eed137..cb9cc527258 100644
--- a/clang/unittests/Frontend/FrontendActionTest.cpp
+++ b/clang/unittests/Frontend/FrontendActionTest.cpp
@@ -38,9 +38,9 @@ public:
return ASTFrontendAction::BeginSourceFileAction(ci, filename);
}
- virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- StringRef InFile) {
- return new Visitor(decl_names);
+ virtual std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
+ StringRef InFile) {
+ return llvm::make_unique<Visitor>(decl_names);
}
private:
OpenPOWER on IntegriCloud