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);
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);
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits