From 6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sun, 10 Aug 2014 19:56:51 +0000 Subject: 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 --- clang/examples/PrintFunctionNames/PrintFunctionNames.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/examples/PrintFunctionNames/PrintFunctionNames.cpp') diff --git a/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp b/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp index 3f18cd45e56..e8a361dbee9 100644 --- a/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp +++ b/clang/examples/PrintFunctionNames/PrintFunctionNames.cpp @@ -36,8 +36,9 @@ public: class PrintFunctionNamesAction : public PluginASTAction { protected: - ASTConsumer *CreateASTConsumer(CompilerInstance &CI, llvm::StringRef) { - return new PrintFunctionsConsumer(); + std::unique_ptr CreateASTConsumer(CompilerInstance &CI, + llvm::StringRef) { + return llvm::make_unique(); } bool ParseArgs(const CompilerInstance &CI, -- cgit v1.2.3