summaryrefslogtreecommitdiffstats
path: root/clang/examples/PrintFunctionNames
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-07-17 20:40:36 +0000
commita51666a4d624a745df90e1c84777fb7a644ff80b (patch)
tree27a6715358a552387f3e0fd041de88a3095d0a35 /clang/examples/PrintFunctionNames
parentfa59e620126114e35477299dbb726c4e85195276 (diff)
downloadbcm5719-llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.tar.gz
bcm5719-llvm-a51666a4d624a745df90e1c84777fb7a644ff80b.zip
unique_ptr-ify ownership of ASTConsumers
(after fixing a bug in MultiplexConsumer I noticed the ownership of the nested consumers was implemented with raw pointers - so this fixes that... and follows the source back to its origin pushing unique_ptr ownership up through there too) llvm-svn: 213307
Diffstat (limited to 'clang/examples/PrintFunctionNames')
-rw-r--r--clang/examples/PrintFunctionNames/PrintFunctionNames.cpp5
1 files changed, 3 insertions, 2 deletions
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<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
+ llvm::StringRef) {
+ return llvm::make_unique<PrintFunctionsConsumer>();
}
bool ParseArgs(const CompilerInstance &CI,
OpenPOWER on IntegriCloud