summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests
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/unittests
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/unittests')
-rw-r--r--clang-tools-extra/unittests/clang-modernize/TransformTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp
index ae05f5a4e4f..6115efd57d3 100644
--- a/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp
+++ b/clang-tools-extra/unittests/clang-modernize/TransformTest.cpp
@@ -93,8 +93,8 @@ public:
};
struct ConsumerFactory {
- ASTConsumer *newASTConsumer() {
- return new TimePassingASTConsumer(&Called);
+ std::unique_ptr<ASTConsumer> newASTConsumer() {
+ return llvm::make_unique<TimePassingASTConsumer>(&Called);
}
bool Called;
};
OpenPOWER on IntegriCloud