From 4d15e347a0bb35430635e1ae50d429c49761ae31 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Thu, 17 Jul 2014 20:40:36 +0000 Subject: 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) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213307 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/Sema/ExternalSemaSourceTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'unittests/Sema') diff --git a/unittests/Sema/ExternalSemaSourceTest.cpp b/unittests/Sema/ExternalSemaSourceTest.cpp index bc0d632cfd..4291b76e7d 100644 --- a/unittests/Sema/ExternalSemaSourceTest.cpp +++ b/unittests/Sema/ExternalSemaSourceTest.cpp @@ -140,10 +140,10 @@ class ExternalSemaSourceInstaller : public clang::ASTFrontendAction { std::unique_ptr OwnedClient; protected: - virtual clang::ASTConsumer * + virtual std::unique_ptr CreateASTConsumer(clang::CompilerInstance &Compiler, llvm::StringRef /* dummy */) { - return new clang::ASTConsumer(); + return llvm::make_unique(); } virtual void ExecuteAction() { -- cgit v1.2.3