summaryrefslogtreecommitdiff
path: root/clang-tools-extra/include-fixer
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-02-27 15:19:28 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-02-27 15:19:28 +0000
commit0814b860ef5f2b38385bace661816e0fa417bcb9 (patch)
tree7710e9a886dd3423aaef57f5f530827016aef640 /clang-tools-extra/include-fixer
parent8631f87145fc96f4e8ac0530c8fe46c6858c40d8 (diff)
[Tooling] [1/1] Refactor FrontendActionFactory::create() to return std::unique_ptr<>
Summary: 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-tools-extra part. Clang part is D43779. Reviewers: klimek, bkramer, alexfh, pcc Reviewed By: alexfh Subscribers: ioeric, jkorous-apple, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D43780
Diffstat (limited to 'clang-tools-extra/include-fixer')
-rw-r--r--clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbolsAction.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbolsAction.h b/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbolsAction.h
index 7be9fe2b2be..0e109d58175 100644
--- a/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbolsAction.h
+++ b/clang-tools-extra/include-fixer/find-all-symbols/FindAllSymbolsAction.h
@@ -48,8 +48,8 @@ public:
const HeaderMapCollector::RegexHeaderMap *RegexHeaderMap = nullptr)
: Reporter(Reporter), RegexHeaderMap(RegexHeaderMap) {}
- clang::FrontendAction *create() override {
- return new FindAllSymbolsAction(Reporter, RegexHeaderMap);
+ std::unique_ptr<clang::FrontendAction> create() override {
+ return llvm::make_unique<FindAllSymbolsAction>(Reporter, RegexHeaderMap);
}
private: