summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clangd
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Fix windows buildbot, remove stray file after r359424. NFCSam McCall2019-04-291-9/+0
| | | | llvm-svn: 359434
* [clangd] Move clangd tests to clangd directory. check-clangd is no longer ↵Sam McCall2019-04-2953-2183/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | part of check-clang-tools. Summary: Motivation: - this layout is a pain to work with - without a common root, it's painful to express things like "disable clangd" (D61122) - CMake/lit configs are a maintenance hazard, and the more the one-off hacks for various tools are entangled, the more we see apathy and non-ownership. This attempts to use the bare-minimum configuration needed (while still supporting the difficult cases: windows, standalone clang build, dynamic libs). In particular the lit.cfg.py and lit.site.cfg.py.in are merged into lit.cfg.in. The logic in these files is now minimal. (Much of clang-tools-extra's lit configs can probably be cleaned up by reusing lit.llvm.llvm_config.use_clang(), and every llvm project does its own version of LDPATH mangling. I haven't attempted to fix any of those). Docs are still in clang-tools-extra/docs, I don't have any plans to touch those. Reviewers: gribozavr Subscribers: mgorny, javed.absar, MaskRay, jkorous, arphaman, kadircet, jfb, cfe-commits, ilya-biryukov, thakis Tags: #clang Differential Revision: https://reviews.llvm.org/D61187 llvm-svn: 359424
* [clangd] Use JSON streaming API for Trace rather than pasting strings. NFCSam McCall2019-04-251-14/+17
| | | | llvm-svn: 359202
* [clangd] Support relatedInformation in diagnostics.Sam McCall2019-04-181-0/+48
| | | | | | | | | | | | | | Summary: We already have the structure internally, we just need to expose it. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60267 llvm-svn: 358675
* [clangd] Emit better error messages when rename fails.Haojian Wu2019-04-181-1/+1
| | | | | | | | | | | | | | | | Summary: Currently we emit an unfriendly "clang diagnostic" message when rename fails. This patch makes clangd to emit a detailed diagnostic message. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60821 llvm-svn: 358658
* [clangd] Strip the ' [some-check-name]' suffix from clang-tidy diagnostics. ↵Sam McCall2019-04-171-1/+1
| | | | | | | | | | | | | | The check name is reported in Diagnostic.code. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60819 llvm-svn: 358612
* [clangd] Use shorter, more recognizable codes for diagnostics.Sam McCall2019-04-178-11/+11
| | | | | | | | | | | | | | | | | | | | | Summary: - for warnings, use the flag the warning is controlled by (-Wfoo) - for errors, keep using the internal name (there's nothing better) but drop the err_ prefix This comes at the cost of uniformity, it's no longer totally obvious exactly what the code field contains. But the -Wname flags are so much more useful to end-users than the internal warn_foo that this seems worth it. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60822 llvm-svn: 358611
* [clangd] Include textual diagnostic ID as Diagnostic.code.Sam McCall2019-04-178-12/+47
| | | | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58291 llvm-svn: 358575
* [clangd] Include compile command heuristic in logsSam McCall2019-04-111-1/+3
| | | | llvm-svn: 358157
* [clangd] Support utf-8 offsets (rather than utf-16) as a protocol extensionSam McCall2019-03-271-0/+32
| | | | | | | | | | | | | | | | Summary: Still some pieces to go here: unit tests for new SourceCode functionality and a command-line flag to force utf-8 mode. But wanted to get early feedback. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58275 llvm-svn: 357102
* [clangd] Send empty diagnostics when a file is closedIlya Biryukov2019-03-251-0/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: The LSP clients cannot know clangd will not send diagnostic updates for closed files, so we send them an empty list of diagnostics to avoid showing stale diagnostics for closed files in the UI, e.g. in the "Problems" pane of VSCode. Fixes PR41217. Reviewers: hokein Reviewed By: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59757 llvm-svn: 356880
* [clangd] Add support for type hierarchy (super types only for now)Kadir Cetinkaya2019-03-192-0/+93
| | | | | | | | | | | | | | | | | | | | | | | Summary: Patch by Nathan Ridge(@nridge)! This is an LSP extension proposed here: https://github.com/Microsoft/vscode-languageserver-node/pull/426 An example client implementation can be found here: https://github.com/theia-ide/theia/pull/3802 Reviewers: kadircet, sammccall Reviewed By: kadircet Subscribers: jdoerfert, sammccall, cfe-commits, mgorny, dschaefer, simark, ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet Tags: #clang Differential Revision: https://reviews.llvm.org/D56370 llvm-svn: 356445
* [clangd] Store index in '.clangd/index' instead of '.clangd-index'Ilya Biryukov2019-02-201-1/+1
| | | | | | | | | | | | | | | | Summary: To take up the .clangd folder for other potential uses in the future. Reviewers: kadircet, sammccall Reviewed By: kadircet Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58440 llvm-svn: 354505
* [clangd] Fix a lit-test.Kadir Cetinkaya2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=40593. Non-percent-encoded chars doesn't cause any problems on the input-side since we assume everything after authority section is data and don't interpret them as delimeters. Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58126 llvm-svn: 353857
* Revamp the "[clangd] Format tweak's replacements"Haojian Wu2019-02-111-0/+50
| | | | | | | | | | | | | | | | | | | | Summary: This patch contains two parts: 1) reverts commit r353306. 2) move the format logic out from tweaks, keep tweaks API unchanged. Reviewers: sammccall, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58051 llvm-svn: 353712
* [Clangd] textDocument/definition and textDocument/declaration "bounce" ↵Sam McCall2019-02-021-8/+41
| | | | | | | | | | | | | | | | | | between definition and declaration location when they are distinct. Summary: This helps minimize the disruption of not returning declarations as part of a find-definition response (r352864). Reviewers: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, ilya-biryukov Tags: #clang Differential Revision: https://reviews.llvm.org/D57580 llvm-svn: 352953
* [clangd] Implement textDocument/declaration from LSP 3.14Sam McCall2019-02-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LSP now reflects the declaration/definition distinction. Language server changes: - textDocument/definition now returns a definition if one is found, otherwise the declaration. It no longer returns declaration + definition if they are distinct. - textDocument/declaration returns the best declaration we can find. - For macros, the active macro definition is returned for both methods. - For include directive, the top of the target file is returned for both. There doesn't appear to be a discovery mechanism (we can't return everything to clients that only know about definition), so this changes existing behavior. In practice, it should greatly reduce the fraction of the time we need to show the user a menu of options. C++ API changes: - findDefinitions is replaced by locateSymbolAt, which returns a vector<LocatedSymbol> - one for each symbol under the cursor. - this contains the preferred declaration, the definition (if found), and the symbol name This API enables some potentially-neat extensions, like swapping between decl and def, and exposing the symbol name to the UI in the case of multiple symbols. Reviewers: hokein Subscribers: ilya-biryukov, javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57388 llvm-svn: 352864
* [clangd] Append "(fix available)" to diagnostic message when fixes are present.Eric Liu2019-01-317-12/+12
| | | | | | | | | | | | | | | | Summary: This would make diagnostic fixits more discoverable, especially for plugins like YCM. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57509 llvm-svn: 352764
* [clangd] Drop fixes if replying with tweaks resulted in an errorIlya Biryukov2019-01-301-1/+1
| | | | | | | | | | This should not happen in normal operation, as it implies that the diagnostics with some available fixes were produced but the AST is invalid. Moreover, the code had an error: always returned code actions ignoring the SupportsCodeAction capability and writing a test for this is impossible, since this can only happen due to programmer's error rather than invalid inputs. llvm-svn: 352624
* [clangd] Interfaces for writing code tweaksIlya Biryukov2019-01-292-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The code tweaks are an implementation of mini-refactorings exposed via the LSP code actions. They run in two stages: - Stage 1. Decides whether the action is available to the user and collects all the information required to finish the action. Should be cheap, since this will run over all the actions known to clangd on each textDocument/codeAction request from the client. - Stage 2. Uses information from stage 1 to produce the actual edits that the code action should perform. This stage can be expensive and will only run if the user chooses to perform the specified action in the UI. One unfortunate consequence of this change is increased latency of processing the textDocument/codeAction requests, which now wait for an AST. However, we cannot avoid this with what we have available in the LSP today. Reviewers: kadircet, ioeric, hokein, sammccall Reviewed By: sammccall Subscribers: mgrang, mgorny, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56267 llvm-svn: 352494
* [clangd] XPC transport layerJan Korous2019-01-161-0/+10
| | | | | | | | | | | | - New transport layer for macOS. - XPC Framework - Test client Framework and client were written by Alex Lorenz. Differential Revision: https://reviews.llvm.org/D54428 llvm-svn: 351280
* [clangd] Introduce loading of shards within auto-indexKadir Cetinkaya2019-01-101-2/+1
| | | | | | | | | | | | | | | | Summary: Whenever a change happens on a CDB, load shards associated with that CDB before issuing re-index actions. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55224 llvm-svn: 350847
* [clangd] Check preceding char when completion triggers on ':' or '>'Ilya Biryukov2019-01-031-0/+106
| | | | | | | | | | | | | | | | | | Summary: Only run completion when we were trigerred on '->' and '::', otherwise send an error code in return. To avoid automatically invoking completions in cases like 'a >^' or 'a ? b :^'. Reviewers: hokein Reviewed By: hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55994 llvm-svn: 350304
* [clangd] Expose FileStatus to LSP.Haojian Wu2018-12-201-0/+13
| | | | | | | | | | | | | Summary: Add an LSP extension "textDocument/clangd.fileStatus" to emit file-status information. Reviewers: ilya-biryukov Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55363 llvm-svn: 349768
* [clangd] BackgroundIndex rebuilds symbol index periodically.Eric Liu2018-12-181-1/+1
| | | | | | | | | | | | | | | | | | Summary: Currently, background index rebuilds symbol index on every indexed file, which can be inefficient. This patch makes it only rebuild symbol index periodically. As the rebuild no longer happens too often, we could also build more efficient dex index. Reviewers: ilya-biryukov, kadircet Reviewed By: kadircet Subscribers: dblaikie, MaskRay, jkorous, arphaman, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D55770 llvm-svn: 349496
* [clangd] Recommit the "AnyScope" changes in requests.json by rCTE347753 ↵Fangrui Song2018-12-011-7/+7
| | | | | | | | (reverted by rCTE347792) This fixes IndexBenchmark tests. llvm-svn: 348066
* Revert "[clang-tools-extra] r347753 - [clangd] Build and test IndexBenchmark ↵Matthew Voss2018-11-282-7/+8
| | | | | | | | | in check-clangd" This revision was causing failures on the buildbots, and our internal CI. See: http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/20856 llvm-svn: 347792
* [clangd] Build and test IndexBenchmark in check-clangdHaojian Wu2018-11-282-8/+7
| | | | | | | | | | | | | | Summary: Include IndexBenchmark in check-clangd to make sure we won't forget to update it when doing breaking changes; also fix an out-of-date test input. Reviewers: ilya-biryukov Subscribers: mgorny, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54998 llvm-svn: 347753
* [clangd] textDocument/SymbolInfo extensionJan Korous2018-11-271-0/+14
| | | | | | | | | | New method returning symbol info for given source position. Differential Revision: https://reviews.llvm.org/D54799 rdar://problem/46050281 llvm-svn: 347675
* [clangd] Enable auto-index behind a flag.Sam McCall2018-11-265-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Ownership and configuration: The auto-index (background index) is maintained by ClangdServer, like Dynamic. (This means ClangdServer will be able to enqueue preamble indexing in future). For now it's enabled by a simple boolean flag in ClangdServer::Options, but we probably want to eventually allow injecting the storage strategy. New 'sync' command: In order to meaningfully test the integration (not just unit-test components) we need a way for tests to ensure the asynchronous index reads/writes occur before a certain point. Because these tests and assertions are few, I think exposing an explicit "sync" command for use in tests is simpler than allowing threading to be completely disabled in the background index (as we do for TUScheduler). Bugs: I fixed a couple of trivial bugs I found while testing, but there's one I can't. JSONCompilationDatabase::getAllFiles() may return relative paths, and currently we trigger an assertion that assumes they are absolute. There's no efficient way to resolve them (you have to retrieve the corresponding command and then resolve against its directory property). In general I think this behavior is broken and we should fix it in JSONCompilationDatabase and require CompilationDatabase::getAllFiles() to be absolute. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D54894 llvm-svn: 347567
* [clangd] Cleanup: stop passing around list of supported URI schemes.Eric Liu2018-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of passing around a list of supported URI schemes in clangd, we expose an interface to convert a path to URI using any compatible scheme that has been registered. It favors customized schemes and falls back to "file" when no other scheme works. Changes in this patch are: - URI::create(AbsPath, URISchemes) -> URI::create(AbsPath). The new API finds a compatible scheme from the registry. - Remove URISchemes option everywhere (ClangdServer, SymbolCollecter, FileIndex etc). - Unit tests will use "unittest" by default. - Move "test" scheme from ClangdLSPServer to ClangdMain.cpp, and only register the test scheme when lit-test or enable-lit-scheme is set. (The new flag is added to make lit protocol.test work; I wonder if there is alternative here.) Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54800 llvm-svn: 347467
* [clangd] Cleanup: use index file instead of header in workspace symbols lit ↵Eric Liu2018-11-223-8/+22
| | | | | | | | | | | | | | | | test. Summary: The full path of the input header depends on the execution environment and may result in different behavior (e.g. when different URI schemes are used). Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54833 llvm-svn: 347466
* [clangd] Remove didOpen extraFlags extension.Sam McCall2018-11-021-52/+0
| | | | | | | | | | | | | | | | | | | | Summary: This was added in D34947 to support YCM, but YCM actually provides *all* args, and this was never actually used. Meanwhile, we grew another extension that allows specifying all args. I did find one user of this extension: https://github.com/thomasjo/atom-ide-cpp. I'll reach out, there are multiple good alternatives: - compile_commands.txt can serve the same purpose as .clang_complete there - we can add an extension to support setting the fallback command Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53641 llvm-svn: 345969
* [clangd] Embed fixes as CodeAction, instead of clangd_fixes. Clean up ↵Sam McCall2018-10-241-5/+6
| | | | | | | | | | | | | | | | | | | serialization. Summary: CodeAction provides us with a standard way of representing fixes inline, so use it, replacing our existing ad-hoc extension. After this, it's easy to serialize diagnostics using the structured toJSON/Protocol.h mechanism rather than assembling JSON ad-hoc. Reviewers: hokein, arphaman Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53391 llvm-svn: 345119
* [clangd] Enforce rules around "initialize" request, and create ClangdServer ↵Sam McCall2018-10-183-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lazily. Summary: LSP is a slightly awkward map to C++ object lifetimes: the initialize request is part of the protocol and provides information that doesn't change over the lifetime of the server. Until now, we handled this by initializing ClangdServer and ClangdLSPServer right away, and making anything that can be set in the "initialize" request mutable. With this patch, we create ClangdLSPServer immediately, but defer creating ClangdServer until "initialize". This opens the door to passing the relevant initialize params in the constructor and storing them immutably. (That change isn't actually done in this patch). To make this safe, we have the MessageDispatcher enforce that the "initialize" method is called before any other (as required by LSP). That way each method handler can assume Server is initialized, as today. As usual, while implementing this I found places where our test cases violated the protocol. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53398 llvm-svn: 344741
* [clangd] Lay JSONRPCDispatcher to rest.Sam McCall2018-10-185-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most of its functionality is moved into ClangdLSPServer. The decoupling between JSONRPCDispatcher, ProtocolCallbacks, ClangdLSPServer was never real, and only served to obfuscate. Some previous implicit/magic stuff is now explicit: - the return type of LSP method calls are now in the signature - no more reply() that gets the ID using global context magic - arg tracing no longer relies on RequestArgs::stash context magic either This is mostly refactoring, but some deliberate fixes while here: - LSP method params are now by const reference - notifications and calls are now distinct namespaces. (some tests had protocol errors and needed updating) - we now reply to calls we failed to decode - outgoing calls use distinct IDs A few error codes and message IDs changed in unimportant ways (see tests). Reviewers: ioeric Subscribers: mgorny, ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53387 llvm-svn: 344737
* [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction. ↵Sam McCall2018-10-1710-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | (re-land r344620) Summary: This paves the way for alternative transports (mac XPC, maybe messagepack?), and also generally improves layering: testing ClangdLSPServer becomes less of a pipe dream, we split up the JSONOutput monolith, etc. This isn't a final state, much of what remains in JSONRPCDispatcher can go away, handlers can call reply() on the transport directly, JSONOutput can be renamed to StreamLogger and removed, etc. But this patch is sprawling already. The main observable change (see tests) is that hitting EOF on input is now an error: the client should send the 'exit' notification. This is defensible: the protocol doesn't spell this case out. Reproducing the current behavior for all combinations of shutdown/exit/EOF clutters interfaces. We can iterate on this if desired. Reviewers: jkorous, ioeric, hokein Subscribers: mgorny, ilya-biryukov, MaskRay, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53286 llvm-svn: 344672
* Revert "[clangd] Refactor JSON-over-stdin/stdout code into Transport ↵Krasimir Georgiev2018-10-1610-21/+0
| | | | | | | | | abstraction." This reverts commit r344620. Breaks upstream bots. llvm-svn: 344637
* [clangd] Refactor JSON-over-stdin/stdout code into Transport abstraction.Sam McCall2018-10-1610-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This paves the way for alternative transports (mac XPC, maybe messagepack?), and also generally improves layering: testing ClangdLSPServer becomes less of a pipe dream, we split up the JSONOutput monolith, etc. This isn't a final state, much of what remains in JSONRPCDispatcher can go away, handlers can call reply() on the transport directly, JSONOutput can be renamed to StreamLogger and removed, etc. But this patch is sprawling already. The main observable change (see tests) is that hitting EOF on input is now an error: the client should send the 'exit' notification. This is defensible: the protocol doesn't spell this case out. Reproducing the current behavior for all combinations of shutdown/exit/EOF clutters interfaces. We can iterate on this if desired. Reviewers: jkorous, ioeric, hokein Subscribers: mgorny, ilya-biryukov, MaskRay, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53286 llvm-svn: 344620
* [clangd] Send CodeAction responses to textDocument/codeAction (LSP 3.8)Sam McCall2018-10-162-0/+126
| | | | | | | | | | | | | | Summary: I don't bother mirroring the full capabilities struct, just parse the bits we care about. I'll send a new patch to use this approach elsewhere too. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53213 llvm-svn: 344617
* Remove possibility to change compile database path at runtimeSimon Marchi2018-10-162-52/+1
| | | | | | | | | | | | | | Summary: This patch removes the possibility to change the compilation database path at runtime using the didChangeConfiguration request. Instead, it is suggested to use the setting on the initialize request, and clangd whenever the user wants to use a different build configuration. Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D53220 llvm-svn: 344614
* Mark index-tools.test as REQUIRES: shell so that it does not run with the ↵Reid Kleckner2018-09-141-0/+1
| | | | | | internal lit shell which does not support "if" llvm-svn: 342282
* [clangd] Cleanup FuzzyFindRequest filtering limit semanticsKirill Bobyrev2018-09-131-7/+7
| | | | | | | | | | | As discussed during D51860 review, it is better to use `llvm::Optional` here as it has clear semantics which reflect intended behavior. Reviewed By: sammccall Differential Revision: https://reviews.llvm.org/D52028 llvm-svn: 342138
* [clangd] Use JSON format in benchmark requests readerKirill Bobyrev2018-09-133-6/+10
| | | | | | | | | | | | After `FuzzyFindRequest` JSON (de)serialization was introduced, it should replace ad-hoc fuzzy-find request parsing implemented in the IndexBenchmark driver. Reviewed By: ilya-biryukov Differential Revision: https://reviews.llvm.org/D51971 llvm-svn: 342137
* [clangd] Rename global-symbol-builder to clangd-indexer.Ilya Biryukov2018-09-131-1/+1
| | | | | | | | | | | | | | | | | | | Summary: Given that the indexer binary is put directly into ./bin directory when built, 'clangd-' prefix seems to provide better context to the reader than 'global-'. The new name is also shorter and easier to type. Reviewers: ioeric, sammccall, kadircet Reviewed By: ioeric, sammccall Subscribers: kbobyrev, ilya-biryukov, mgorny, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51987 llvm-svn: 342123
* Fix buildbots after r342027Kirill Bobyrev2018-09-121-1/+2
| | | | llvm-svn: 342036
* [clangd] Add index benchmarksKirill Bobyrev2018-09-124-0/+27
| | | | | | | | | | | This patch introduces index benchmarks on top of the proposed LLVM benchmark pull. Reviewed By: sammccall, lebedev.ri Differential Revision: https://reviews.llvm.org/D51090 llvm-svn: 342026
* [clangd] Fix references.test assertionsSam McCall2018-09-051-3/+3
| | | | llvm-svn: 341466
* [clangd] Add xrefs LSP boilerplate implementation.Sam McCall2018-09-053-35/+42
| | | | | | | | | | Reviewers: ilya-biryukov, ioeric Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50896 llvm-svn: 341462
* [clangd] send diagnostic categories only when 'categorySupport'Alex Lorenz2018-08-229-12/+43
| | | | | | | | | | | | capability was given by the client After r339738 Clangd started sending categories with each diagnostic, but that broke the eglot client. This commit puts the categories behind a capability to fix that breakage. Differential Revision: https://reviews.llvm.org/D51077 llvm-svn: 340449
OpenPOWER on IntegriCloud