mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-20 12:05:48 -04:00

Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
44 lines
1.5 KiB
C++
44 lines
1.5 KiB
C++
//===-- ClangdFuzzer.cpp - Fuzz clangd ------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// This file implements a function that runs clangd on a single input.
|
|
/// This function is then linked into the Fuzzer library.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "ClangdLSPServer.h"
|
|
#include "ClangdServer.h"
|
|
#include "CodeComplete.h"
|
|
#include "FSProvider.h"
|
|
#include <cstdio>
|
|
#include <sstream>
|
|
|
|
using namespace clang::clangd;
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
|
if (size == 0)
|
|
return 0;
|
|
|
|
// fmemopen isn't portable, but I think we only run the fuzzer on Linux.
|
|
std::FILE *In = fmemopen(data, size, "r");
|
|
auto Transport = newJSONTransport(In, llvm::nulls(),
|
|
/*InMirror=*/nullptr, /*Pretty=*/false,
|
|
/*Style=*/JSONStreamStyle::Delimited);
|
|
RealFileSystemProvider FS;
|
|
CodeCompleteOptions CCOpts;
|
|
CCOpts.EnableSnippets = false;
|
|
ClangdServer::Options Opts;
|
|
|
|
// Initialize and run ClangdLSPServer.
|
|
ClangdLSPServer LSPServer(*Transport, FS, CCOpts, llvm::None, false,
|
|
llvm::None, Opts);
|
|
LSPServer.run();
|
|
return 0;
|
|
}
|