| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The client can send notifications when it detects watched files have
changed. This patch adds the protocol handling for this type of notification.
For now, the notification will be passed down to the ClangdServer, but it will
not be acted upon. However, this will become useful for the indexer to react
to file changes.
The events could also potentially be used to invalidate other caches
(compilation database, etc).
This change also updates the VSCode extension so that it sends the events.
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewers: ilya-biryukov, Nebiroth
Subscribers: ilya-biryukov
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D38422
llvm-svn: 314693
|
|
|
|
|
|
|
| |
- remove old ASTUnit includes
- fix typo (regiterCallbackHandlers)
llvm-svn: 314532
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Small extension to LSP to allow clients to use clangd to switch between C header files and source files.
Final version will use the completed clangd indexer to use the index of symbols to be able to switch from header to source file when the file names don't match.
Reviewers: malaperle, krasimir, bkramer, ilya-biryukov
Reviewed By: ilya-biryukov
Subscribers: ilya-biryukov, cfe-commits, arphaman
Patch by: William Enright
Differential Revision: https://reviews.llvm.org/D36150
llvm-svn: 314377
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The root Uri is the workspace location and will be useful in the context of
indexing. We could also add more things to InitializeParams in order to
configure Clangd for C/C++ sepecific extensions.
Reviewers: ilya-biryukov, bkramer, krasimir, Nebiroth
Reviewed By: ilya-biryukov
Subscribers: ilya-biryukov
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D38093
llvm-svn: 314309
|
|
|
|
|
|
|
| |
Caused by invalid order of members in ClangdServer.
DiagnosticsMutex was used after destruction.
llvm-svn: 313801
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Calls to onDiagnosticsReady were done concurrently before. This sometimes
led to older versions of diagnostics being reported to the user after
the newer versions.
Reviewers: klimek, bkramer, krasimir
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D38032
llvm-svn: 313754
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This fixes a bunch of logging-related FIXMEs.
Reviewers: bkramer, krasimir, malaperle
Reviewed By: malaperle
Subscribers: malaperle, klimek, cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D37972
llvm-svn: 313730
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhances CompletionItemsCollector in such a way that snippet
completions can be presented to the client. Enable snippet completion
items by specifying -enable-snippets while invoking the clangd
executable.
See: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#completion-request
See: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/browser/snippet.md
Patch by Raoul Wols.
llvm-svn: 313029
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer, krasimir, klimek
Reviewed By: klimek
Subscribers: arphaman, cfe-commits
Differential Revision: https://reviews.llvm.org/D36261
llvm-svn: 310821
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krasimir, bkramer, klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D36398
llvm-svn: 310819
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Calling addDocument after removeDocument could have resulted in an
invalid program state (AST and Preamble for the valid document could
have been incorrectly removed).
This commit also includes an improved CppFile::cancelRebuild
implementation that allows to cancel reparse without waiting for
ongoing rebuild to finish.
Reviewers: krasimir, bkramer, klimek
Reviewed By: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D36397
llvm-svn: 310818
|
|
|
|
|
|
|
| |
It turns out MSVC does not allow non-copyable classes in std::future
and std::promise template arguments.
llvm-svn: 309720
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: The new implementation allows code completion that never waits for AST.
Reviewers: bkramer, krasimir, klimek
Reviewed By: bkramer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D36133
llvm-svn: 309696
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is useful for managing lifetime of VFS-based caches.
Reviewers: bkramer, krasimir
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D36095
llvm-svn: 309585
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This refactoring does not aim to introduce any significant changes to
the behaviour of clangd to keep the change as simple as possible.
Reviewers: klimek, krasimir, bkramer
Reviewed By: krasimir
Subscribers: malaperle, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D35406
llvm-svn: 308738
|
|
|
|
| |
llvm-svn: 307068
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bkramer, krasimir, klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34470
llvm-svn: 306530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D34151
llvm-svn: 305376
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
ClangdServer owned objects passed to it in constructor for no good reason.
Lots of stuff was moved from the heap to the stack thanks to this change.
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D34148
llvm-svn: 305298
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This is a reapplied r305280 with a fix to the crash found by build bots
(StringRef to an out-of-scope local std::string).
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D34146
llvm-svn: 305291
|
|
|
|
|
|
|
| |
This caused buildbots failures, reverting until we'll find out what's
wrong.
llvm-svn: 305283
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: krasimir
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D34107
llvm-svn: 305280
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FileSystemProvider.
Summary:
This allows an implementation of FileSystemProvider that can track which vfs::FileSystem
were used for each of the requests.
Reviewers: bkramer, krasimir
Reviewed By: bkramer
Subscribers: klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33678
llvm-svn: 304214
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Custom vfs::FileSystem is currently used for unit tests.
This revision depends on https://reviews.llvm.org/D33397.
Reviewers: bkramer, krasimir
Reviewed By: bkramer, krasimir
Subscribers: klimek, cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33416
llvm-svn: 303977
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
And implemented a helper function to dump an AST of a file for
testing/debugging purposes.
Reviewers: bkramer, krasimir
Reviewed By: krasimir
Subscribers: klimek, cfe-commits
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33415
llvm-svn: 303634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
A refactoring to decouple ProtocolHandlers and Language Server input parsing
loop from the ClangdLSPServer.
The input parsing was extracted from `main` to a function(runLanguageServerLoop).
ProtocolHandlers now provide an interface to handle various LSP methods,
this interface is used by ClangdLSPServer.
Methods for code formatting were moved from ProtocolHandlers to ClangdServer.
ClangdLSPServer now provides a cleaner interface that only runs Language Server
input loop.
Reviewers: bkramer, krasimir
Reviewed By: krasimir
Subscribers: cfe-commits, klimek
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33201
llvm-svn: 303173
|
|
|
|
| |
llvm-svn: 303154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 reverts commit r303067.
Caused http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/34305/
And even after Simon's fix there is still a test failure.
llvm-svn: 303094
|
|
Summary: Major refactoring to split LSP implementation, Clang API calls and threading(mostly synchronization)
Reviewers: bkramer, krasimir
Reviewed By: bkramer
Subscribers: cfe-commits, mgorny, klimek
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33047
llvm-svn: 303067
|