summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/modularize
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-08-10 19:56:59 +0000
commit680c4c898c3ec1b10be6833e1dfad533724c4d20 (patch)
treec624345afa1a1fadd0b38af44456d9584bae31bb /clang-tools-extra/modularize
parent6beb6aa8f0f6fa20e8c8de7a17f39b101ed0da59 (diff)
downloadbcm5719-llvm-680c4c898c3ec1b10be6833e1dfad533724c4d20.tar.gz
bcm5719-llvm-680c4c898c3ec1b10be6833e1dfad533724c4d20.zip
Recommit 213308: unique_ptr-ify ownership of ASTConsumers (reverted in r213324)
After post-commit review and community discussion, this seems like a reasonable direction to continue, making ownership semantics explicit in the source using the type system. llvm-svn: 215324
Diffstat (limited to 'clang-tools-extra/modularize')
-rw-r--r--clang-tools-extra/modularize/Modularize.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang-tools-extra/modularize/Modularize.cpp b/clang-tools-extra/modularize/Modularize.cpp
index c95126f9677..83c5547a916 100644
--- a/clang-tools-extra/modularize/Modularize.cpp
+++ b/clang-tools-extra/modularize/Modularize.cpp
@@ -652,10 +652,10 @@ public:
HadErrors(HadErrors) {}
protected:
- virtual clang::ASTConsumer *CreateASTConsumer(CompilerInstance &CI,
- StringRef InFile) {
- return new CollectEntitiesConsumer(Entities, PPTracker,
- CI.getPreprocessor(), InFile, HadErrors);
+ std::unique_ptr<clang::ASTConsumer>
+ CreateASTConsumer(CompilerInstance &CI, StringRef InFile) override {
+ return llvm::make_unique<CollectEntitiesConsumer>(
+ Entities, PPTracker, CI.getPreprocessor(), InFile, HadErrors);
}
private:
OpenPOWER on IntegriCloud