NFC: Enforce good formatting across multiple clang-tools-extra files
This patch improves readability of multiple files in clang-tools-extra and enforces LLVM Coding Guidelines. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50707 llvm-svn: 339687
This commit is contained in:
parent
ed55138247
commit
8e35f1e7cb
|
@ -5,7 +5,7 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "ClangdLSPServer.h"
|
||||
#include "Diagnostics.h"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H
|
||||
|
@ -172,4 +172,4 @@ private:
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDLSPSERVER_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- ClangdUnit.cpp -----------------------------------------*- C++-*-===//
|
||||
//===--- ClangdUnit.cpp ------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "ClangdUnit.h"
|
||||
#include "Compiler.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- ClangdUnit.h -------------------------------------------*- C++-*-===//
|
||||
//===--- ClangdUnit.h --------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDUNIT_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDUNIT_H
|
||||
|
@ -168,4 +168,5 @@ void dumpAST(ParsedAST &AST, llvm::raw_ostream &OS);
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
#endif
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_CLANGDUNIT_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- CodeComplete.cpp ---------------------------------------*- C++-*-===//
|
||||
//===--- CodeComplete.cpp ----------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Code completion has several moving parts:
|
||||
// - AST-based completions are provided using the completion hooks in Sema.
|
||||
|
@ -16,7 +16,7 @@
|
|||
// Signature help works in a similar way as code completion, but it is simpler:
|
||||
// it's purely AST-based, and there are few candidates.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "CodeComplete.h"
|
||||
#include "AST.h"
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
//===--- CodeComplete.h -----------------------------------------*- C++-*-===//
|
||||
//===--- CodeComplete.h ------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Code completion provides suggestions for what the user might type next.
|
||||
// After "std::string S; S." we might suggest members of std::string.
|
||||
// Signature help describes the parameters of a function as you type them.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H
|
||||
|
||||
|
@ -192,4 +193,4 @@ bool isIndexedForCodeCompletion(const NamedDecl &ND, ASTContext &ASTCtx);
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETE_H
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "CodeCompletionStrings.h"
|
||||
#include "clang/AST/ASTContext.h"
|
||||
|
|
|
@ -5,12 +5,13 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Functions for retrieving code completion information from
|
||||
// `CodeCompletionString`.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETIONSTRINGS_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETIONSTRINGS_H
|
||||
|
||||
|
@ -70,4 +71,4 @@ std::string getReturnType(const CodeCompletionString &CCS);
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_CODECOMPLETIONSTRINGS_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Compiler.cpp -------------------------------------------*- C++-*-===//
|
||||
//===--- Compiler.cpp --------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Compiler.h"
|
||||
#include "Logger.h"
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
//===--- Compiler.h ---------------------------------------------*- C++-*-===//
|
||||
//===--- Compiler.h ----------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Shared utilities for invoking the clang compiler.
|
||||
// ClangdUnit takes care of much of this, but some features like CodeComplete
|
||||
// run their own compile actions that share logic.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
|
||||
|
||||
|
@ -50,4 +51,4 @@ std::unique_ptr<CompilerInstance> prepareCompilerInstance(
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Context.cpp -----------------------------------------*- C++-*-===//
|
||||
//===--- Context.cpp ---------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Context.h"
|
||||
#include <cassert>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Diagnostics.cpp ----------------------------------------*- C++-*-===//
|
||||
//===--- Diagnostics.cpp -----------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Diagnostics.h"
|
||||
#include "Compiler.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Diagnostics.h ------------------------------------------*- C++-*-===//
|
||||
//===--- Diagnostics.h -------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H
|
||||
|
@ -101,4 +101,4 @@ private:
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_DIAGNOSTICS_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- GlobalCompilationDatabase.cpp --------------------------*- C++-*-===//
|
||||
//===--- GlobalCompilationDatabase.cpp ---------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "GlobalCompilationDatabase.h"
|
||||
#include "Logger.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- GlobalCompilationDatabase.h ----------------------------*- C++-*-===//
|
||||
//===--- GlobalCompilationDatabase.h -----------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H
|
||||
|
@ -139,4 +139,4 @@ private:
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_GLOBALCOMPILATIONDATABASE_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Quality.cpp --------------------------------------------*- C++-*-===//
|
||||
//===--- Quality.cpp ---------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include "Quality.h"
|
||||
#include "FileDistance.h"
|
||||
#include "URI.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Quality.h - Ranking alternatives for ambiguous queries -*- C++-*-===//
|
||||
//===--- Quality.h - Ranking alternatives for ambiguous queries --*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
///
|
||||
/// Some operations such as code completion produce a set of candidates.
|
||||
/// Usually the user can choose between them, but we should put the best options
|
||||
|
@ -23,21 +23,27 @@
|
|||
/// - sorting utilities like the TopN container.
|
||||
/// These could be split up further to isolate dependencies if we care.
|
||||
///
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_QUALITY_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_QUALITY_H
|
||||
|
||||
#include "clang/Sema/CodeCompleteConsumer.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
}
|
||||
|
||||
namespace clang {
|
||||
class CodeCompletionResult;
|
||||
|
||||
namespace clangd {
|
||||
|
||||
struct Symbol;
|
||||
class URIDistance;
|
||||
|
||||
|
@ -176,4 +182,4 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &,
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_QUALITY_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- XRefs.cpp ----------------------------------------------*- C++-*-===//
|
||||
//===--- XRefs.cpp -----------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
#include "XRefs.h"
|
||||
#include "AST.h"
|
||||
#include "Logger.h"
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
//===--- XRefs.h ------------------------------------------------*- C++-*-===//
|
||||
//===--- XRefs.h -------------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Features that traverse references between symbols.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_XREFS_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_XREFS_H
|
||||
|
||||
|
@ -35,4 +36,5 @@ llvm::Optional<Hover> getHover(ParsedAST &AST, Position Pos);
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
#endif
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_XREFS_H
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// whole project. This tools is for **experimental** only. Don't use it in
|
||||
// production code.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "index/CanonicalIncludes.h"
|
||||
#include "index/Index.h"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// We have a lookup table for common standard library implementations.
|
||||
// libstdc++ puts char_traits in bits/char_traits.h, but we #include <string>.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_CANONICALINCLUDES_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_CANONICALINCLUDES_H
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
// maintained at source-file granuality (e.g. with ASTs), and files can be
|
||||
// updated dynamically.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_FILEINDEX_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_FILEINDEX_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Index.h ------------------------------------------------*- C++-*-===//
|
||||
//===--- Index.h -------------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H
|
||||
|
@ -386,4 +386,5 @@ public:
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_INDEX_H
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
//===--- Merge.h ------------------------------------------------*- C++-*-===//
|
||||
//===--- Merge.cpp -----------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Merge.h"
|
||||
#include "../Logger.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
namespace clang {
|
||||
namespace clangd {
|
||||
namespace {
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
class MergedIndex : public SymbolIndex {
|
||||
|
@ -131,5 +134,6 @@ std::unique_ptr<SymbolIndex> mergeIndex(const SymbolIndex *Dynamic,
|
|||
const SymbolIndex *Static) {
|
||||
return llvm::make_unique<MergedIndex>(Dynamic, Static);
|
||||
}
|
||||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
//===--- Merge.h ------------------------------------------------*- C++-*-===//
|
||||
//===--- Merge.h -------------------------------------------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H
|
||||
|
||||
#include "Index.h"
|
||||
|
||||
namespace clang {
|
||||
namespace clangd {
|
||||
|
||||
|
@ -26,4 +29,5 @@ std::unique_ptr<SymbolIndex> mergeIndex(const SymbolIndex *Dynamic,
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
#endif
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//
|
||||
// This is for **experimental** only. Don't use it in the production code.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_FROM_YAML_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_SYMBOL_FROM_YAML_H
|
||||
|
|
|
@ -158,4 +158,4 @@ void populateChildren(std::vector<std::unique_ptr<Iterator>> &Children,
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_ITERATOR_H
|
||||
|
|
|
@ -109,4 +109,4 @@ template <> struct DenseMapInfo<clang::clangd::dex::Token> {
|
|||
|
||||
} // namespace llvm
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TOKEN_H
|
||||
|
|
|
@ -69,4 +69,4 @@ std::vector<Token> generateQueryTrigrams(llvm::StringRef Query);
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TRIGRAM_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- ModuleAssistant.cpp - Module map generation manager -*- C++ -*---===//
|
||||
//===--- ModuleAssistant.cpp - Module map generation manager --*- C++ -*---===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file defines the module generation entry point function,
|
||||
// createModuleMap, a Module class for representing a module,
|
||||
|
@ -27,7 +27,7 @@
|
|||
// map file using a stream obtained and managed by an
|
||||
// llvm::ToolOutputFile object.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Modularize.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
//===--- Annotations.cpp - Annotated source code for unit tests -*- C++-*-===//
|
||||
//===--- Annotations.cpp - Annotated source code for unit tests --*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "Annotations.h"
|
||||
#include "SourceCode.h"
|
||||
|
||||
namespace clang {
|
||||
namespace clangd {
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
// Crash if the assertion fails, printing the message and testcase.
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- Annotations.h - Annotated source code for tests --------*- C++-*-===//
|
||||
//===--- Annotations.h - Annotated source code for tests ---------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Annotations lets you mark points and ranges inside source code, for tests:
|
||||
//
|
||||
|
@ -27,8 +27,10 @@
|
|||
// to define general overlapping ranges.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_ANNOTATIONS_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_ANNOTATIONS_H
|
||||
|
||||
#include "Protocol.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
|
@ -66,4 +68,5 @@ private:
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
#endif
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_ANNOTATIONS_H
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SyncAPI.h"
|
||||
|
||||
namespace clang {
|
||||
|
|
|
@ -5,10 +5,14 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file contains synchronous versions of ClangdServer's async API. We
|
||||
// deliberately don't expose the sync API outside tests to encourage using the
|
||||
// async versions in clangd code.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_SYNCAPI_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_SYNCAPI_H
|
||||
|
||||
|
@ -49,4 +53,4 @@ runDocumentSymbols(ClangdServer &Server, PathRef File);
|
|||
} // namespace clangd
|
||||
} // namespace clang
|
||||
|
||||
#endif
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_SYNCAPI_H
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "TestTU.h"
|
||||
#include "TestFS.h"
|
||||
#include "index/FileIndex.h"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
//===--- TestTU.h - Scratch source files for testing ------------*- C++-*-===//
|
||||
//===--- TestTU.h - Scratch source files for testing -------------*- C++-*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Many tests for indexing, code completion etc are most naturally expressed
|
||||
// using code examples.
|
||||
|
@ -14,8 +14,10 @@
|
|||
// AST, particular symbols, etc.
|
||||
//
|
||||
//===---------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTTU_H
|
||||
#define LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTTU_H
|
||||
|
||||
#include "ClangdUnit.h"
|
||||
#include "index/Index.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
@ -64,4 +66,5 @@ const NamedDecl &findAnyDecl(ParsedAST &AST, llvm::StringRef Name);
|
|||
|
||||
} // namespace clangd
|
||||
} // namespace clang
|
||||
#endif
|
||||
|
||||
#endif // LLVM_CLANG_TOOLS_EXTRA_UNITTESTS_CLANGD_TESTTU_H
|
||||
|
|
Loading…
Reference in New Issue