Summary: This change allows to navigate to most identifiers' declarations in code. This is a first step towards implementing "Go to Definition". It reuses clangIndex in order to detect which occurrences corresponds to the position requested. The occurrences' Decls are then used to generate locations suitable for navigating to the declarations.
Reviewers: krasimir, bkramer, ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: cfe-commits, mgorny
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34269
llvm-svn: 306558
Summary:
This commit itself doesn't add any unit tests, but one that does will
follow shortly.
Reviewers: krasimir, bkramer
Reviewed By: bkramer
Subscribers: mgorny, klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33395
llvm-svn: 303616
Summary:
This commit restores r303067(reverted by r303094) and fixes the 'formatting.test'
failure.
The failure is due to destructors of `ClangdLSPServer`'s fields(`FixItsMap` and
`FixItsMutex`) being called before destructor of `Server`. It led to the worker
thread calling `consumeDiagnostics` after `FixItsMutex` and `FixItsMap`
destructors were called.
Also, clangd is now run with '-run-synchronously' flag in 'formatting.test'.
Reviewers: bkramer, krasimir
Reviewed By: krasimir
Subscribers: mgorny, cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D33233
llvm-svn: 303151
This allows the install target to also install clangd to bin, so that
it can be deployed and used outside the build tree.
Patch by Marc-Andre Laperle!
Differential Revision: https://reviews.llvm.org/D30425
llvm-svn: 296390
Summary:
This requires an accessible compilation database. The parsing is done
asynchronously on a separate thread.
Reviewers: klimek, krasimir
Subscribers: cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D29886
llvm-svn: 295180
clangd is a language server protocol implementation based on clang. It's
supposed to provide editor integration while not suffering from the
confined ABI of libclang.
This implementation is limited to the bare minimum functionality of
doing (whole-document) formatting and rangeFormatting. The JSON parsing
is based on LLVM's YAMLParser but yet most of the code of clangd is
currently dealing with JSON serialization and deserialization.
This was only tested with VS Code so far, mileage with other LSP clients
may vary.
Differential Revision: https://reviews.llvm.org/D29451
llvm-svn: 294291