[clang-tools-extra] r321867 - [clangd] Fix memory leak in code completion
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 5 05:36:55 PST 2018
Author: ibiryukov
Date: Fri Jan 5 05:36:55 2018
New Revision: 321867
URL: http://llvm.org/viewvc/llvm-project?rev=321867&view=rev
Log:
[clangd] Fix memory leak in code completion
Modified:
clang-tools-extra/trunk/clangd/CodeComplete.cpp
Modified: clang-tools-extra/trunk/clangd/CodeComplete.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/CodeComplete.cpp?rev=321867&r1=321866&r2=321867&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/CodeComplete.cpp (original)
+++ clang-tools-extra/trunk/clangd/CodeComplete.cpp Fri Jan 5 05:36:55 2018
@@ -506,6 +506,7 @@ bool invokeCodeComplete(const Context &C
&DummyDiagsConsumer, false),
VFS);
assert(CI && "Couldn't create CompilerInvocation");
+ CI->getFrontendOpts().DisableFree = false;
std::unique_ptr<llvm::MemoryBuffer> ContentsBuffer =
llvm::MemoryBuffer::getMemBufferCopy(Contents, FileName);
More information about the cfe-commits
mailing list