llvm-project/clang-tools-extra
Sam McCall 60cd75a098 [clangd] Inject context provider rather than config into ClangdServer. NFC
This is a step towards allowing CDB behavior to being configurable.

Previously ClangdServer itself created the configs and installed them into
contexts. This was natural as it knows how to deal with resulting diagnostics.

However this prevents config being used in CDB, which must be created before
ClangdServer. So we extract the context provider (config loader) as a separate
object, which publishes diagnostics to a ClangdServer::Callbacks itself.

Now initialization looks like:
 - First create the config::Provider
 - Then create the ClangdLSPServer, passing config provider
 - Next, create the context provider, passing config provider + diagnostic callbacks
 - now create the CDB, passing context provider
 - finally create ClangdServer, passing CDB, context provider, and diagnostic callbacks

Differential Revision: https://reviews.llvm.org/D95087
2021-01-22 14:34:30 +01:00
..
clang-apply-replacements [clang-tools-extra] Prevent linking to duplicate .a libs and dylib 2020-06-17 19:00:26 +02:00
clang-change-namespace Revert "[NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II)" 2021-01-04 23:17:45 +01:00
clang-doc [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
clang-include-fixer [clang][nearly-NFC] Remove some superfluous uses of NamedDecl::getNameAsString 2020-08-05 13:54:37 +01:00
clang-move [NFC] SmallVector<char...> to SmallString<...> 2020-11-27 20:36:09 +00:00
clang-query Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
clang-reorder-fields [openmp] Add missing dependencies for OMP.h.inc after d90443b 2020-06-23 11:48:04 -04:00
clang-tidy [clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI 2021-01-14 13:50:16 +00:00
clangd [clangd] Inject context provider rather than config into ClangdServer. NFC 2021-01-22 14:34:30 +01:00
docs [clangd] Release notes for b8c37153d5 2020-12-22 22:58:45 +01:00
modularize Revert "Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef" 2020-12-14 22:05:08 -05:00
pp-trace [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
test Add -fexceptions to test as it uses them and fails on platforms where it is not on by default (like the PS4). 2021-01-14 13:27:06 -08:00
tool-template [OpenMP] "UnFix" layering problem with FrontendOpenMP 2020-04-07 14:41:18 -05:00
unittests [clang-tidy] Add test for Transformer-based checks with diagnostics. 2021-01-12 20:15:22 +00:00
.gitignore
CMakeLists.txt Add an explicit toggle for the static analyzer in clang-tidy 2020-09-10 10:48:17 -04:00
CODE_OWNERS.TXT [clangd] add CODE_OWNERS 2020-01-29 12:43:19 +01:00
LICENSE.TXT
README.txt

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.llvm.org/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/