diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-07-17 20:40:36 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-07-17 20:40:36 +0000 |
commit | a51666a4d624a745df90e1c84777fb7a644ff80b (patch) | |
tree | 27a6715358a552387f3e0fd041de88a3095d0a35 /clang/lib/ASTMatchers/ASTMatchFinder.cpp | |
parent | fa59e620126114e35477299dbb726c4e85195276 (diff) | |
download | bcm5719-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/lib/ASTMatchers/ASTMatchFinder.cpp')
-rw-r--r-- | clang/lib/ASTMatchers/ASTMatchFinder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp index 23708e2ff0c..50531f4e274 100644 --- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp +++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp @@ -823,8 +823,8 @@ bool MatchFinder::addDynamicMatcher(const internal::DynTypedMatcher &NodeMatch, return false; } -ASTConsumer *MatchFinder::newASTConsumer() { - return new internal::MatchASTConsumer(this, ParsingDone); +std::unique_ptr<ASTConsumer> MatchFinder::newASTConsumer() { + return llvm::make_unique<internal::MatchASTConsumer>(this, ParsingDone); } void MatchFinder::match(const clang::ast_type_traits::DynTypedNode &Node, |