summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Sema/CodeCompleteTest.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-30 09:29:34 +0000
commitb22804b35464049ca92107d45042d2a5bbd292f6 (patch)
tree4e29b283156209efc4945de2129c9f8ad878d28f /clang/unittests/Sema/CodeCompleteTest.cpp
parent12a7e6c09cda7fd0259be85c949cf87b040bf1b7 (diff)
downloadbcm5719-llvm-b22804b35464049ca92107d45042d2a5bbd292f6.tar.gz
bcm5719-llvm-b22804b35464049ca92107d45042d2a5bbd292f6.zip
[Tooling] Migrated APIs that take ownership of objects to unique_ptr
Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66960 llvm-svn: 370451
Diffstat (limited to 'clang/unittests/Sema/CodeCompleteTest.cpp')
-rw-r--r--clang/unittests/Sema/CodeCompleteTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/Sema/CodeCompleteTest.cpp b/clang/unittests/Sema/CodeCompleteTest.cpp
index dc0f7e07e03..ab1792ba637 100644
--- a/clang/unittests/Sema/CodeCompleteTest.cpp
+++ b/clang/unittests/Sema/CodeCompleteTest.cpp
@@ -101,10 +101,10 @@ ParsedSourceLocation offsetToPosition(llvm::StringRef Code, size_t Offset) {
CompletionContext runCompletion(StringRef Code, size_t Offset) {
CompletionContext ResultCtx;
- auto Action = std::make_unique<CodeCompleteAction>(
- offsetToPosition(Code, Offset), ResultCtx);
- clang::tooling::runToolOnCodeWithArgs(Action.release(), Code, {"-std=c++11"},
- TestCCName);
+ clang::tooling::runToolOnCodeWithArgs(
+ std::make_unique<CodeCompleteAction>(offsetToPosition(Code, Offset),
+ ResultCtx),
+ Code, {"-std=c++11"}, TestCCName);
return ResultCtx;
}
OpenPOWER on IntegriCloud