[PATCH] D55702: [clangd] Fix memory leak in ClangdTests.
Haojian Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 05:22:45 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL349145: [clangd] Fix memory leak in ClangdTests. (authored by hokein, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55702/new/
https://reviews.llvm.org/D55702
Files:
clang-tools-extra/trunk/unittests/clangd/TestTU.cpp
Index: clang-tools-extra/trunk/unittests/clangd/TestTU.cpp
===================================================================
--- clang-tools-extra/trunk/unittests/clangd/TestTU.cpp
+++ clang-tools-extra/trunk/unittests/clangd/TestTU.cpp
@@ -38,8 +38,10 @@
Inputs.Contents = Code;
Inputs.FS = buildTestFS({{FullFilename, Code}, {FullHeaderName, HeaderCode}});
auto PCHs = std::make_shared<PCHContainerOperations>();
+ auto CI = buildCompilerInvocation(Inputs);
+ assert(CI && "Failed to build compilation invocation.");
auto Preamble =
- buildPreamble(FullFilename, *createInvocationFromCommandLine(Cmd),
+ buildPreamble(FullFilename, *CI,
/*OldPreamble=*/nullptr,
/*OldCompileCommand=*/Inputs.CompileCommand, Inputs, PCHs,
/*StoreInMemory=*/true, /*PreambleCallback=*/nullptr);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55702.178225.patch
Type: text/x-patch
Size: 867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181214/42adac45/attachment-0001.bin>
More information about the llvm-commits
mailing list