[clangd] Guard fuzzer against empty inputs.

llvm-svn: 337860
This commit is contained in:
Benjamin Kramer 2018-07-24 21:50:06 +00:00
parent 1ba1f9310c
commit 11eef3b3e9
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@
#include <stdio.h>
extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
if (size == 0)
return 0;
clang::clangd::JSONOutput Out(llvm::nulls(), llvm::nulls(),
clang::clangd::Logger::Error, nullptr);
clang::clangd::CodeCompleteOptions CCOpts;