llvm-capstone/clang-tools-extra/clangd
Kazu Hirata f71ffd3b73 [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC)
This patch replaces (llvm::|)Optional< with std::optional<.  I'll post
a separate patch to clean up the "using" declarations, #include
"llvm/ADT/Optional.h", etc.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2023-01-07 20:19:42 -08:00
..
benchmarks [clangd] Allow to build Clangd without decision forest 2022-12-07 13:52:22 +01:00
fuzzer
index [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
indexer [clangd] Pass the entire tooling::CompileCommand to CommandMangler 2022-11-07 17:58:37 -05:00
quality
refactor [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
support [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
test [clangd] Add extension for adding context (enclosing function or class) in references results 2023-01-01 15:25:18 +01:00
tool [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
unittests [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
xpc [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
AST.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
AST.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ASTSignals.cpp
ASTSignals.h
ClangdLSPServer.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ClangdLSPServer.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ClangdServer.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ClangdServer.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
CMakeLists.txt [Support] Move TargetParsers to new component 2022-12-20 11:05:50 +00:00
CodeComplete.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
CodeComplete.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
CodeCompletionStrings.cpp
CodeCompletionStrings.h
CollectMacros.cpp
CollectMacros.h
CompileCommands.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
CompileCommands.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Compiler.cpp [clangd] Disable backend-releated filelist compiler options. 2023-01-04 13:00:24 +01:00
Compiler.h
Config.cpp
Config.h Include <optional> instead of "llvm/ADT/Optional.h" 2022-12-18 00:28:54 -08:00
ConfigCompile.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ConfigFragment.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
ConfigProvider.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
ConfigProvider.h
ConfigYAML.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
DecisionForest.cpp [clangd] NFC. Add a newline at the end of the file 2022-12-09 12:31:50 +01:00
Diagnostics.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Diagnostics.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
DraftStore.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
DraftStore.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
DumpAST.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
DumpAST.h
ExpectedTypes.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ExpectedTypes.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Feature.cpp [clangd] Allow to build Clangd without decision forest 2022-12-07 13:52:22 +01:00
Feature.h
FeatureModule.cpp
FeatureModule.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Features.inc.in [clangd] Fix a typo "Features.h" => "Feature.h" in IWYU pragma. 2022-12-12 13:46:19 +01:00
FileDistance.cpp
FileDistance.h
FindSymbols.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
FindSymbols.h
FindTarget.cpp [AST] Preserve more structure in UsingEnumDecl node. 2022-10-12 19:54:51 +02:00
FindTarget.h
Format.cpp
Format.h
FS.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
FS.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
FuzzyMatch.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
FuzzyMatch.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
GlobalCompilationDatabase.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
GlobalCompilationDatabase.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Headers.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Headers.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
HeaderSourceSwitch.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
HeaderSourceSwitch.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
HeuristicResolver.cpp NFC: [clang] Template argument cleanups. 2022-10-25 00:29:56 +02:00
HeuristicResolver.h
Hover.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Hover.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
IncludeCleaner.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
IncludeCleaner.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
IncludeFixer.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
IncludeFixer.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
InlayHints.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
InlayHints.h JSON: llvm::Optional => std::optional 2022-12-16 07:56:52 +00:00
JSONTransport.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
LSPBinder.h
ParsedAST.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
ParsedAST.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
PathMapping.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
PathMapping.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
Preamble.cpp [clang-tools-extra] Don't including None.h (NFC) 2022-12-06 23:22:09 -08:00
Preamble.h
Protocol.cpp [clangd] Add extension for adding context (enclosing function or class) in references results 2023-01-01 15:25:18 +01:00
Protocol.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Quality.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Quality.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
README.md
RIFF.cpp
RIFF.h
Selection.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
Selection.h
SemanticHighlighting.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
SemanticHighlighting.h [clangd] Add support for semantic token type "operator" 2022-12-12 16:17:43 +01:00
SemanticSelection.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
SemanticSelection.h FoldingRanges: Handle LineFoldingsOnly clients. 2022-08-29 19:03:48 +02:00
SourceCode.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
SourceCode.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
SystemIncludeExtractor.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
TidyFastChecks.inc [clangd] Add script to maintain list of fast clang-tidy checks 2022-11-28 14:29:23 +01:00
TidyFastChecks.py [clangd] Add script to maintain list of fast clang-tidy checks 2022-11-28 14:29:23 +01:00
TidyProvider.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
TidyProvider.h
Transport.h [clangd] Fix some header guard names, NFC 2022-12-13 10:00:51 +01:00
TUScheduler.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
TUScheduler.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
URI.cpp
URI.h
XRefs.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
XRefs.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00

clangd

clangd is a language server, and provides C++ IDE features to editors. This is not its documentation.

Communication channels

If you have any questions or feedback, you can reach community and developers through one of these channels:

Building and testing clangd

For a minimal setup on building clangd:

  • Clone the LLVM repo to $LLVM_ROOT.

  • Create a build directory, for example at $LLVM_ROOT/build.

  • Inside the build directory run: cmake $LLVM_ROOT/llvm/ -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra".

    • We suggest building in Release mode as building DEBUG binaries requires considerably more resources. You can check Building LLVM with CMake documentation for more details about cmake flags.
    • In addition to that using Ninja as a generator rather than default make is preferred. To do that consider passing -G Ninja to cmake invocation.
    • Finally, you can turn on assertions via -DLLVM_ENABLE_ASSERTS=On.
  • Afterwards you can build clangd with cmake --build $LLVM_ROOT/build --target clangd, similarly run tests by changing target to check-clangd.