summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Sema/ExternalSemaSourceTest.cpp
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/unittests/Sema/ExternalSemaSourceTest.cpp
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/unittests/Sema/ExternalSemaSourceTest.cpp')
-rw-r--r--clang/unittests/Sema/ExternalSemaSourceTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Sema/ExternalSemaSourceTest.cpp b/clang/unittests/Sema/ExternalSemaSourceTest.cpp
index bc0d632cfdb..4291b76e7d4 100644
--- a/clang/unittests/Sema/ExternalSemaSourceTest.cpp
+++ b/clang/unittests/Sema/ExternalSemaSourceTest.cpp
@@ -140,10 +140,10 @@ class ExternalSemaSourceInstaller : public clang::ASTFrontendAction {
std::unique_ptr<DiagnosticConsumer> OwnedClient;
protected:
- virtual clang::ASTConsumer *
+ virtual std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &Compiler,
llvm::StringRef /* dummy */) {
- return new clang::ASTConsumer();
+ return llvm::make_unique<clang::ASTConsumer>();
}
virtual void ExecuteAction() {
OpenPOWER on IntegriCloud