From 6017bf4f315f9a49a2512cef0d640197172659b3 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Tue, 27 Feb 2018 15:19:20 +0000 Subject: [Tooling] [0/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<> Summary: Noticed during review of D41102. I'm not sure whether there are any principal reasons why it returns raw owning pointer, or it is just a old code that was not updated post-C++11. I'm not too sure what testing i should do, because `check-all` is not error clean here for some reason, but it does not //appear// asif those failures are related to these changes. This is clang part. Clang-tools-extra part is D43780. Reviewers: klimek, bkramer, alexfh, pcc Reviewed By: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D43779 llvm-svn: 326201 --- clang/unittests/Tooling/CommentHandlerTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/unittests/Tooling/CommentHandlerTest.cpp') diff --git a/clang/unittests/Tooling/CommentHandlerTest.cpp b/clang/unittests/Tooling/CommentHandlerTest.cpp index 9c3abdc4b15..682f19e9b13 100644 --- a/clang/unittests/Tooling/CommentHandlerTest.cpp +++ b/clang/unittests/Tooling/CommentHandlerTest.cpp @@ -56,8 +56,8 @@ public: CommentVerifier GetVerifier(); protected: - ASTFrontendAction *CreateTestAction() override { - return new CommentHandlerAction(this); + std::unique_ptr CreateTestAction() override { + return llvm::make_unique(this); } private: -- cgit v1.2.3