[clang-tools-extra] r320074 - [clangd-fuzzer] Update contruction of LSPServer.

Matt Morehouse via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 11:04:27 PST 2017


Author: morehouse
Date: Thu Dec  7 11:04:27 2017
New Revision: 320074

URL: http://llvm.org/viewvc/llvm-project?rev=320074&view=rev
Log:
[clangd-fuzzer] Update contruction of LSPServer.

The constructor for ClangdLSPServer changed in r318412 and r318925,
breaking the clangd-fuzzer build.

Modified:
    clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp

Modified: clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp?rev=320074&r1=320073&r2=320074&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp (original)
+++ clang-tools-extra/trunk/clangd/fuzzer/ClangdFuzzer.cpp Thu Dec  7 11:04:27 2017
@@ -13,16 +13,19 @@
 ///
 //===----------------------------------------------------------------------===//
 
+#include "CodeComplete.h"
 #include "ClangdLSPServer.h"
 #include <sstream>
 
 extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
   clang::clangd::JSONOutput Out(llvm::nulls(), llvm::nulls(), nullptr);
+  clang::clangd::CodeCompleteOptions CCOpts;
+  CCOpts.EnableSnippets = false;
 
   // Initialize and run ClangdLSPServer.
   clang::clangd::ClangdLSPServer LSPServer(
       Out, clang::clangd::getDefaultAsyncThreadsCount(),
-      /*EnableSnippets=*/false, llvm::None, llvm::None);
+      /*StorePreamblesInMemory=*/false, CCOpts, llvm::None, llvm::None);
 
   std::istringstream In(std::string(reinterpret_cast<char *>(data), size));
   LSPServer.run(In);




More information about the cfe-commits mailing list