summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Tooling
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 17:01:33 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 17:01:33 +0000
commit103a2de0b4003bbb25c0aa42fd9247621620d1dd (patch)
treed50d6de51f91b63e14e760b28230e8a04792633a /clang/unittests/Tooling
parent0840a22452f70d09bed5c9e114e6df21f3ea9963 (diff)
downloadbcm5719-llvm-103a2de0b4003bbb25c0aa42fd9247621620d1dd.tar.gz
bcm5719-llvm-103a2de0b4003bbb25c0aa42fd9247621620d1dd.zip
Push unique_ptr ownership of ASTUnits further back into their factories.
llvm-svn: 207237
Diffstat (limited to 'clang/unittests/Tooling')
-rw-r--r--clang/unittests/Tooling/ToolingTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/ToolingTest.cpp b/clang/unittests/Tooling/ToolingTest.cpp
index 606eda15df0..2d055e70859 100644
--- a/clang/unittests/Tooling/ToolingTest.cpp
+++ b/clang/unittests/Tooling/ToolingTest.cpp
@@ -108,11 +108,11 @@ TEST(runToolOnCode, FindsClassDecl) {
}
TEST(buildASTFromCode, FindsClassDecl) {
- std::unique_ptr<ASTUnit> AST(buildASTFromCode("class X;"));
+ std::unique_ptr<ASTUnit> AST = buildASTFromCode("class X;");
ASSERT_TRUE(AST.get());
EXPECT_TRUE(FindClassDeclX(AST.get()));
- AST.reset(buildASTFromCode("class Y;"));
+ AST = buildASTFromCode("class Y;");
ASSERT_TRUE(AST.get());
EXPECT_FALSE(FindClassDeclX(AST.get()));
}
OpenPOWER on IntegriCloud