diff options
| author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-07 20:03:18 +0000 |
|---|---|---|
| committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-03-07 20:03:18 +0000 |
| commit | b89843299a118d9f97774f35e59f9b541ef5e284 (patch) | |
| tree | ee6366d2f652d2475d52f6ea9b4fbbc64dc2647e /clang/unittests/ASTMatchers/ASTMatchersTest.h | |
| parent | 629afaefe0cd1a583ccee54918b7b13f48bfe273 (diff) | |
| download | bcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.tar.gz bcm5719-llvm-b89843299a118d9f97774f35e59f9b541ef5e284.zip | |
Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.
llvm-svn: 203279
Diffstat (limited to 'clang/unittests/ASTMatchers/ASTMatchersTest.h')
| -rw-r--r-- | clang/unittests/ASTMatchers/ASTMatchersTest.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.h b/clang/unittests/ASTMatchers/ASTMatchersTest.h index e79f9114f22..e224722e964 100644 --- a/clang/unittests/ASTMatchers/ASTMatchersTest.h +++ b/clang/unittests/ASTMatchers/ASTMatchersTest.h @@ -67,7 +67,8 @@ testing::AssertionResult matchesConditionally(const std::string &Code, Finder.addMatcher(AMatcher, new VerifyMatch(0, &Found)); if (!Finder.addDynamicMatcher(AMatcher, new VerifyMatch(0, &DynamicFound))) return testing::AssertionFailure() << "Could not add dynamic matcher"; - OwningPtr<FrontendActionFactory> Factory(newFrontendActionFactory(&Finder)); + std::unique_ptr<FrontendActionFactory> Factory( + newFrontendActionFactory(&Finder)); // Some tests use typeof, which is a gnu extension. std::vector<std::string> Args(1, CompileArg); if (!runToolOnCodeWithArgs(Factory->create(), Code, Args)) { @@ -105,12 +106,13 @@ testing::AssertionResult matchAndVerifyResultConditionally(const std::string &Code, const T &AMatcher, BoundNodesCallback *FindResultVerifier, bool ExpectResult) { - OwningPtr<BoundNodesCallback> ScopedVerifier(FindResultVerifier); + std::unique_ptr<BoundNodesCallback> ScopedVerifier(FindResultVerifier); bool VerifiedResult = false; MatchFinder Finder; Finder.addMatcher( AMatcher, new VerifyMatch(FindResultVerifier, &VerifiedResult)); - OwningPtr<FrontendActionFactory> Factory(newFrontendActionFactory(&Finder)); + std::unique_ptr<FrontendActionFactory> Factory( + newFrontendActionFactory(&Finder)); // Some tests use typeof, which is a gnu extension. std::vector<std::string> Args(1, "-std=gnu++98"); if (!runToolOnCodeWithArgs(Factory->create(), Code, Args)) { @@ -125,7 +127,7 @@ matchAndVerifyResultConditionally(const std::string &Code, const T &AMatcher, } VerifiedResult = false; - OwningPtr<ASTUnit> AST(buildASTFromCodeWithArgs(Code, Args)); + std::unique_ptr<ASTUnit> AST(buildASTFromCodeWithArgs(Code, Args)); if (!AST.get()) return testing::AssertionFailure() << "Parsing error in \"" << Code << "\" while building AST"; |

