diff --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp index 0d3023be42f5..f71e36183a02 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.cpp +++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp @@ -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" diff --git a/clang-tools-extra/clangd/ClangdLSPServer.h b/clang-tools-extra/clangd/ClangdLSPServer.h index e4cbe5001a28..1d6252dadd3c 100644 --- a/clang-tools-extra/clangd/ClangdLSPServer.h +++ b/clang-tools-extra/clangd/ClangdLSPServer.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 diff --git a/clang-tools-extra/clangd/ClangdUnit.cpp b/clang-tools-extra/clangd/ClangdUnit.cpp index 86e7497a3bf5..ecb597ca796a 100644 --- a/clang-tools-extra/clangd/ClangdUnit.cpp +++ b/clang-tools-extra/clangd/ClangdUnit.cpp @@ -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" diff --git a/clang-tools-extra/clangd/ClangdUnit.h b/clang-tools-extra/clangd/ClangdUnit.h index c7aca17ea231..0b12fb1c0c2a 100644 --- a/clang-tools-extra/clangd/ClangdUnit.h +++ b/clang-tools-extra/clangd/ClangdUnit.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 diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 72e395f1e095..f603d1a81ec0 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -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" diff --git a/clang-tools-extra/clangd/CodeComplete.h b/clang-tools-extra/clangd/CodeComplete.h index 542d478542c8..227b49f0d048 100644 --- a/clang-tools-extra/clangd/CodeComplete.h +++ b/clang-tools-extra/clangd/CodeComplete.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 diff --git a/clang-tools-extra/clangd/CodeCompletionStrings.cpp b/clang-tools-extra/clangd/CodeCompletionStrings.cpp index e601e035928d..e0277000c67c 100644 --- a/clang-tools-extra/clangd/CodeCompletionStrings.cpp +++ b/clang-tools-extra/clangd/CodeCompletionStrings.cpp @@ -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" diff --git a/clang-tools-extra/clangd/CodeCompletionStrings.h b/clang-tools-extra/clangd/CodeCompletionStrings.h index dac4ba56676e..7b66c5c99152 100644 --- a/clang-tools-extra/clangd/CodeCompletionStrings.h +++ b/clang-tools-extra/clangd/CodeCompletionStrings.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 diff --git a/clang-tools-extra/clangd/Compiler.cpp b/clang-tools-extra/clangd/Compiler.cpp index 8fcc9a97cb98..9c7a59b494cb 100644 --- a/clang-tools-extra/clangd/Compiler.cpp +++ b/clang-tools-extra/clangd/Compiler.cpp @@ -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" diff --git a/clang-tools-extra/clangd/Compiler.h b/clang-tools-extra/clangd/Compiler.h index ce058ad28339..49c1c90c4075 100644 --- a/clang-tools-extra/clangd/Compiler.h +++ b/clang-tools-extra/clangd/Compiler.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 prepareCompilerInstance( } // namespace clangd } // namespace clang -#endif +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_COMPILER_H diff --git a/clang-tools-extra/clangd/Context.cpp b/clang-tools-extra/clangd/Context.cpp index 1a9ef24ff56a..66654c47edfe 100644 --- a/clang-tools-extra/clangd/Context.cpp +++ b/clang-tools-extra/clangd/Context.cpp @@ -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 diff --git a/clang-tools-extra/clangd/Diagnostics.cpp b/clang-tools-extra/clangd/Diagnostics.cpp index 3c293dde3436..c053bd22266f 100644 --- a/clang-tools-extra/clangd/Diagnostics.cpp +++ b/clang-tools-extra/clangd/Diagnostics.cpp @@ -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" diff --git a/clang-tools-extra/clangd/Diagnostics.h b/clang-tools-extra/clangd/Diagnostics.h index a08b9fe0465c..0370bd36d234 100644 --- a/clang-tools-extra/clangd/Diagnostics.h +++ b/clang-tools-extra/clangd/Diagnostics.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 diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp index 3bfc4eca1441..6ed236e93a2b 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp @@ -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" diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.h b/clang-tools-extra/clangd/GlobalCompilationDatabase.h index b64028fc6eb0..70e790416551 100644 --- a/clang-tools-extra/clangd/GlobalCompilationDatabase.h +++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.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 diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp index f96b50e2702a..5a9fcd2d4c8b 100644 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -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" diff --git a/clang-tools-extra/clangd/Quality.h b/clang-tools-extra/clangd/Quality.h index 86e21963dd52..fda90560c433 100644 --- a/clang-tools-extra/clangd/Quality.h +++ b/clang-tools-extra/clangd/Quality.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 #include #include + 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 diff --git a/clang-tools-extra/clangd/XRefs.cpp b/clang-tools-extra/clangd/XRefs.cpp index f5e2b1e12dab..a79a8d1195b4 100644 --- a/clang-tools-extra/clangd/XRefs.cpp +++ b/clang-tools-extra/clangd/XRefs.cpp @@ -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" diff --git a/clang-tools-extra/clangd/XRefs.h b/clang-tools-extra/clangd/XRefs.h index d698a61c9fd6..30b531951d89 100644 --- a/clang-tools-extra/clangd/XRefs.h +++ b/clang-tools-extra/clangd/XRefs.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 getHover(ParsedAST &AST, Position Pos); } // namespace clangd } // namespace clang -#endif + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_XREFS_H diff --git a/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp b/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp index 0cc0480210c1..a9f1f98c7d29 100644 --- a/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp +++ b/clang-tools-extra/clangd/global-symbol-builder/GlobalSymbolBuilderMain.cpp @@ -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" diff --git a/clang-tools-extra/clangd/index/CanonicalIncludes.h b/clang-tools-extra/clangd/index/CanonicalIncludes.h index a2fdb04ec7b8..2488f5653401 100644 --- a/clang-tools-extra/clangd/index/CanonicalIncludes.h +++ b/clang-tools-extra/clangd/index/CanonicalIncludes.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 . // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_CANONICALINCLUDES_H #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_CANONICALINCLUDES_H diff --git a/clang-tools-extra/clangd/index/FileIndex.h b/clang-tools-extra/clangd/index/FileIndex.h index 35c9f7efcff3..59bf58c6fefb 100644 --- a/clang-tools-extra/clangd/index/FileIndex.h +++ b/clang-tools-extra/clangd/index/FileIndex.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 diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h index 6d63335d7100..4ae5cd323616 100644 --- a/clang-tools-extra/clangd/index/Index.h +++ b/clang-tools-extra/clangd/index/Index.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 diff --git a/clang-tools-extra/clangd/index/Merge.cpp b/clang-tools-extra/clangd/index/Merge.cpp index 58d1564815b8..4834bfba69ff 100644 --- a/clang-tools-extra/clangd/index/Merge.cpp +++ b/clang-tools-extra/clangd/index/Merge.cpp @@ -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 mergeIndex(const SymbolIndex *Dynamic, const SymbolIndex *Static) { return llvm::make_unique(Dynamic, Static); } + } // namespace clangd } // namespace clang diff --git a/clang-tools-extra/clangd/index/Merge.h b/clang-tools-extra/clangd/index/Merge.h index b9b58fd9f456..48c3bc6c76de 100644 --- a/clang-tools-extra/clangd/index/Merge.h +++ b/clang-tools-extra/clangd/index/Merge.h @@ -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 mergeIndex(const SymbolIndex *Dynamic, } // namespace clangd } // namespace clang -#endif + +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_MERGE_H diff --git a/clang-tools-extra/clangd/index/SymbolYAML.h b/clang-tools-extra/clangd/index/SymbolYAML.h index 726af6c66844..a4b945c37425 100644 --- a/clang-tools-extra/clangd/index/SymbolYAML.h +++ b/clang-tools-extra/clangd/index/SymbolYAML.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 diff --git a/clang-tools-extra/clangd/index/dex/Iterator.h b/clang-tools-extra/clangd/index/dex/Iterator.h index 317b54964703..1616e8687e43 100644 --- a/clang-tools-extra/clangd/index/dex/Iterator.h +++ b/clang-tools-extra/clangd/index/dex/Iterator.h @@ -158,4 +158,4 @@ void populateChildren(std::vector> &Children, } // namespace clangd } // namespace clang -#endif +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_INDEX_DEX_ITERATOR_H diff --git a/clang-tools-extra/clangd/index/dex/Token.h b/clang-tools-extra/clangd/index/dex/Token.h index 33a16d36a4af..f31368cb435d 100644 --- a/clang-tools-extra/clangd/index/dex/Token.h +++ b/clang-tools-extra/clangd/index/dex/Token.h @@ -109,4 +109,4 @@ template <> struct DenseMapInfo { } // namespace llvm -#endif +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TOKEN_H diff --git a/clang-tools-extra/clangd/index/dex/Trigram.h b/clang-tools-extra/clangd/index/dex/Trigram.h index 00614edf56cc..a3fc6b32b4c2 100644 --- a/clang-tools-extra/clangd/index/dex/Trigram.h +++ b/clang-tools-extra/clangd/index/dex/Trigram.h @@ -69,4 +69,4 @@ std::vector generateQueryTrigrams(llvm::StringRef Query); } // namespace clangd } // namespace clang -#endif +#endif // LLVM_CLANG_TOOLS_EXTRA_CLANGD_DEX_TRIGRAM_H diff --git a/clang-tools-extra/modularize/ModuleAssistant.cpp b/clang-tools-extra/modularize/ModuleAssistant.cpp index 7f1cb1562a92..33dca788de5c 100644 --- a/clang-tools-extra/modularize/ModuleAssistant.cpp +++ b/clang-tools-extra/modularize/ModuleAssistant.cpp @@ -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" diff --git a/clang-tools-extra/unittests/clangd/Annotations.cpp b/clang-tools-extra/unittests/clangd/Annotations.cpp index 6bd81c81a599..bf71a96fb931 100644 --- a/clang-tools-extra/unittests/clangd/Annotations.cpp +++ b/clang-tools-extra/unittests/clangd/Annotations.cpp @@ -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. diff --git a/clang-tools-extra/unittests/clangd/Annotations.h b/clang-tools-extra/unittests/clangd/Annotations.h index 549a21e7ba3e..4d787c254af8 100644 --- a/clang-tools-extra/unittests/clangd/Annotations.h +++ b/clang-tools-extra/unittests/clangd/Annotations.h @@ -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 diff --git a/clang-tools-extra/unittests/clangd/SyncAPI.cpp b/clang-tools-extra/unittests/clangd/SyncAPI.cpp index ae9ece590697..a033db930e08 100644 --- a/clang-tools-extra/unittests/clangd/SyncAPI.cpp +++ b/clang-tools-extra/unittests/clangd/SyncAPI.cpp @@ -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 { diff --git a/clang-tools-extra/unittests/clangd/SyncAPI.h b/clang-tools-extra/unittests/clangd/SyncAPI.h index ddf90d81d865..4bb65c670350 100644 --- a/clang-tools-extra/unittests/clangd/SyncAPI.h +++ b/clang-tools-extra/unittests/clangd/SyncAPI.h @@ -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 diff --git a/clang-tools-extra/unittests/clangd/TestTU.cpp b/clang-tools-extra/unittests/clangd/TestTU.cpp index b47d94484db6..c2b97a9a0041 100644 --- a/clang-tools-extra/unittests/clangd/TestTU.cpp +++ b/clang-tools-extra/unittests/clangd/TestTU.cpp @@ -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" diff --git a/clang-tools-extra/unittests/clangd/TestTU.h b/clang-tools-extra/unittests/clangd/TestTU.h index b66159e3aa48..3995219e127d 100644 --- a/clang-tools-extra/unittests/clangd/TestTU.h +++ b/clang-tools-extra/unittests/clangd/TestTU.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