llvm-capstone/clang-tools-extra/clangd
Haojian Wu 6585dd3b83 [clangd] Replace the hacky include-cleaner macro-reference implementation.
Now MainFileMacros preserves enough information, we perform a just-in-time
convertion to interop with include-cleaner::Macro for include-cleaer features.

Differential Revision: https://reviews.llvm.org/D147034
2023-06-23 14:08:55 +02:00
..
benchmarks [clangd] Allow to build Clangd without decision forest 2022-12-07 13:52:22 +01:00
fuzzer [clangd] Fix shared lib builds 2023-01-20 08:57:21 +01:00
index [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
indexer [clangd] Use FileManager for getCanonicalPath, NFC 2023-06-02 12:55:21 +02:00
quality [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra 2023-05-23 08:29:52 +02:00
refactor [clangd] Use FileManager for getCanonicalPath, NFC 2023-06-02 12:55:21 +02:00
support [clangd] Remove unused variable IsBroadcasting 2023-05-29 14:17:03 -07:00
test [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra 2023-05-23 08:29:52 +02:00
tool [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
unittests [clangd] Replace the hacky include-cleaner macro-reference implementation. 2023-06-23 14:08:55 +02:00
xpc [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-07 20:19:42 -08:00
AST.cpp [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
AST.h [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
ASTSignals.cpp [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
ASTSignals.h [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
ClangdLSPServer.cpp [clangd] Move completion signatures and labelDetails 2023-06-05 18:05:18 +02:00
ClangdLSPServer.h [clangd] Move completion signatures and labelDetails 2023-06-05 18:05:18 +02:00
ClangdServer.cpp [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
ClangdServer.h [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
CMakeLists.txt [clangd] Fix missing dependency on clang/Driver/Options.inc's tblgen target 2023-05-06 10:11:39 -07:00
CodeComplete.cpp [clangd] Move completion signatures and labelDetails 2023-06-05 18:05:18 +02:00
CodeComplete.h [clangd] Add flag to control #import include insertions 2023-01-09 09:48:29 -05:00
CodeCompletionStrings.cpp [clangd] Refine logic on $0 in completion snippets 2023-03-17 17:57:24 +08:00
CodeCompletionStrings.h [clangd] Refine logic on $0 in completion snippets 2023-03-17 17:57:24 +08:00
CollectMacros.cpp [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
CollectMacros.h [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
CompileCommands.cpp Migrate {starts,ends}with_insensitive to {starts,ends}_with_insensitive (NFC) 2023-05-16 10:12:42 -07:00
CompileCommands.h [clangd] Move standard options adaptor to CommandMangler 2023-03-17 03:10:36 -07:00
Compiler.cpp [clang][deps] Make clang-scan-deps write modules in raw format 2023-05-03 12:07:46 -07:00
Compiler.h [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
Config.cpp
Config.h [clangd] Enforce strict unused includes by default 2023-06-12 11:47:03 +02:00
ConfigCompile.cpp [clangd] Implement configs to stop clangd produce a certain semantic tokens 2023-05-26 03:25:35 -04:00
ConfigFragment.h [clangd] Implement configs to stop clangd produce a certain semantic tokens 2023-05-26 03:25:35 -04:00
ConfigProvider.cpp [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
ConfigProvider.h [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
ConfigYAML.cpp [clangd] Implement configs to stop clangd produce a certain semantic tokens 2023-05-26 03:25:35 -04:00
DecisionForest.cpp [clangd] NFC. Add a newline at the end of the file 2022-12-09 12:31:50 +01:00
Diagnostics.cpp [clangd] Use FileManager for getCanonicalPath, NFC 2023-06-02 12:55:21 +02:00
Diagnostics.h [clangd] Add batch fixes for include-cleaner diagnostics 2023-04-27 12:08:59 +02: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 [clang] Forward-declare DynTypedNode (NFC) 2022-01-23 13:28:04 -08:00
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 [NFC][TargetParser] Replace uses of llvm/Support/Host.h 2023-02-10 09:59:46 +00:00
Feature.h [clangd] Rename Features.h -> Feature.h to avoid confilct with libstdc++ 2021-08-06 18:56:41 +02:00
FeatureModule.cpp Don't use Optional::hasValue (NFC) 2022-06-26 19:54:41 -07:00
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 [clang-tools-extra] Use *{Set,Map}::contains (NFC) 2023-03-14 21:30:29 -07:00
FileDistance.h [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
FindSymbols.cpp [clangd] Remove reundant use of getSpellingLoc() 2023-03-20 14:52:10 -04:00
FindSymbols.h
FindTarget.cpp [Clang][NFC] Rename methods/vars to reflect their real usage 2023-04-18 13:48:08 -07:00
FindTarget.h [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
Format.cpp [clangd] Handle tabs in getIncrementalChangesAfterNewline() 2022-03-29 01:43:09 -04:00
Format.h [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
FS.cpp [clangd] Store paths as requested in PreambleStatCache 2023-05-23 14:30:58 +02:00
FS.h [clangd] Store paths as requested in PreambleStatCache 2023-05-23 14:30:58 +02:00
FuzzyMatch.cpp [llvm][ADT] Replace uses of makeMutableArrayRef with deduction guides 2023-01-16 14:49:37 -07:00
FuzzyMatch.h [clang-tools-extra] Use std::optional instead of llvm::Optional (NFC) 2023-01-02 16:17:40 -08:00
GlobalCompilationDatabase.cpp [clangd] Move standard options adaptor to CommandMangler 2023-03-17 03:10:36 -07:00
GlobalCompilationDatabase.h [clang-tools-extra] Remove remaining uses of llvm::Optional (NFC) 2023-01-07 20:34:53 -08:00
Headers.cpp [clangd] NFC, remove an unused member in 2023-06-01 14:53:33 +02:00
Headers.h [clangd] Remove the IncludeStructure::isSelfContained API. 2023-03-13 12:37:38 +01: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] Remove remaining uses of llvm::Optional (NFC) 2023-01-07 20:34:53 -08:00
HeuristicResolver.cpp [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution 2023-06-20 13:40:26 -04:00
HeuristicResolver.h [clangd] Use resolveTypeToRecordDecl() to resolve the type of a base specifier during heuristic resolution 2023-06-20 13:40:26 -04:00
Hover.cpp [clangd] Skip function parameter decls when evaluating variables on hover. 2023-06-16 12:09:28 +00:00
Hover.h [clangd] Show size, offset and padding for bit fields on hover 2023-06-05 17:52:34 +02:00
IncludeCleaner.cpp [clangd] Replace the hacky include-cleaner macro-reference implementation. 2023-06-23 14:08:55 +02:00
IncludeCleaner.h [clangd] Use include_cleaner spelling strategies in clangd. 2023-06-14 14:06:35 +00:00
IncludeFixer.cpp [clangd] Include the correct header for typeid() 2023-01-09 18:07:07 -05:00
IncludeFixer.h [clangd] Full support for #import insertions 2023-01-09 09:48:30 -05:00
InlayHints.cpp [clangd] Initialize local variable 2023-06-13 08:58:46 -07: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 [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
ParsedAST.h [clangd] Implement unused include warnings with include-cleaner library. 2023-01-19 14:31:40 +01: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 [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
Preamble.h [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
Protocol.cpp [clangd] Move completion signatures and labelDetails 2023-06-05 18:05:18 +02:00
Protocol.h [clangd] Move completion signatures and labelDetails 2023-06-05 18:05:18 +02:00
Quality.cpp Use llvm::bit_cast (NFC) 2023-02-14 01:22:12 -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 [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
Selection.cpp Move from llvm::makeArrayRef to ArrayRef deduction guides - last part 2023-01-10 11:47:43 +01:00
Selection.h [clangd] SelectionTree should prefer lexical declcontext 2021-10-28 17:39:35 +02:00
SemanticHighlighting.cpp [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
SemanticHighlighting.h [clangd] Add semantic token for labels 2023-06-07 12:28:06 +02:00
SemanticSelection.cpp [llvm][ADT] Replace uses of makeMutableArrayRef with deduction guides 2023-01-16 14:49:37 -07:00
SemanticSelection.h FoldingRanges: Handle LineFoldingsOnly clients. 2022-08-29 19:03:48 +02:00
SourceCode.cpp [clang] NFC: Use DirectoryEntryRef in FileManager::getCanonicalName() 2023-06-15 11:22:31 +02:00
SourceCode.h [clangd] Use FileManager for getCanonicalPath, NFC 2023-06-02 12:55:21 +02:00
SystemIncludeExtractor.cpp [clangd] Use all inputs to SystemIncludeExtractor in cache key 2023-04-17 16:57:33 +02:00
TidyFastChecks.inc [clangd] Add script to maintain list of fast clang-tidy checks 2022-11-28 14:29:23 +01:00
TidyFastChecks.py [NFC][Py Reformat] Reformat python files in clang and clang-tools-extra 2023-05-23 08:29:52 +02:00
TidyProvider.cpp [clang-tidy] Implement an include-cleaner check. 2023-06-02 15:21:20 +00:00
TidyProvider.h [clangd] Clean up unused includes. NFCI 2022-02-26 12:00:16 +01:00
Transport.h [clangd] Fix some header guard names, NFC 2022-12-13 10:00:51 +01:00
TUScheduler.cpp [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
TUScheduler.h [RFC][clangd] Move preamble index out of document open critical path 2023-06-12 12:56:41 +01:00
URI.cpp Use llvm::all_of (NFC) 2022-08-14 16:25:36 -07:00
URI.h [clangd] cleanup of header guard names 2021-12-02 15:58:35 +00:00
XRefs.cpp [clangd] Store offsets in MacroOccurrence 2023-06-23 09:21:08 +02:00
XRefs.h [clang-tools-extra] Remove remaining uses of llvm::Optional (NFC) 2023-01-07 20:34:53 -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.