summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/unittests/clangd/XRefsTests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clangd] Move clangd tests to clangd directory. check-clangd is no longer ↵Sam McCall2019-04-291-1504/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Test #import directive go-to-definition. NFCSam McCall2019-04-041-0/+12
| | | | llvm-svn: 357690
* [clangd] Make sure constructors do not reference classKadir Cetinkaya2019-03-081-0/+9
| | | | | | | | | | | | Reviewers: gribozavr Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58815 llvm-svn: 355679
* [clangd] Enhance macro hover to see full definitionMarc-Andre Laperle2019-02-241-1/+19
| | | | | | | | | | | | | | | | Summary: Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com> Reviewers: simark, ilya-biryukov, sammccall, ioeric, hokein Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D55250 llvm-svn: 354761
* [clangd] Only report explicitly typed symbols during code navigationKadir Cetinkaya2019-02-211-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Clangd was reporting implicit symbols, like results of implicit cast expressions during code navigation, which is not desired. For example: ``` struct Foo{ Foo(int); }; void bar(Foo); vod foo() { int x; bar(^x); } ``` Performing a GoTo on the point specified by ^ would give two results one pointing to line `int x` and the other for definition of `Foo(int);` Reviewers: ilya-biryukov, sammccall Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58495 llvm-svn: 354585
* [clangd] Enable indexing of template type parametersKadir Cetinkaya2019-02-211-3/+7
| | | | | | | | | | | | | | Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=36285 Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58294 llvm-svn: 354561
* [clangd] Revert r354442 and r354444Kadir Cetinkaya2019-02-201-34/+0
| | | | | | Looks like sysroot is only working on linux. llvm-svn: 354453
* [clangd] Try to fix windows build botsKadir Cetinkaya2019-02-201-3/+8
| | | | llvm-svn: 354444
* [clangd] Testcase for bug 39811Kadir Cetinkaya2019-02-201-0/+29
| | | | | | | | | | Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58133 llvm-svn: 354442
* [clangd] Add tests for template specializationsKadir Cetinkaya2019-02-181-0/+52
| | | | | | | | | | Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58190 llvm-svn: 354272
* [clangd] Prefer location from codegen files when merging symbols.Eric Liu2019-02-111-0/+20
| | | | | | | | | | | | | | | | | | | Summary: For example, if an index symbol has location in a .proto file and an AST symbol has location in a generated .proto.h file, then we prefer location in .proto which is more meaningful to users. Also use `mergeSymbols` to get the preferred location between AST location and index location in go-to-def. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58037 llvm-svn: 353708
* [clangd] Index parameters in function declsKadir Cetinkaya2019-02-111-0/+4
| | | | | | | | | | | | Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57950 llvm-svn: 353696
* [clangd] Implement textDocument/declaration from LSP 3.14Sam McCall2019-02-011-100/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [clangd] Add Limit parameter for xref.Haojian Wu2019-01-141-6/+10
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56597 llvm-svn: 351081
* [clangd] Remove 'using namespace llvm' from .cpp files. NFCIlya Biryukov2019-01-071-4/+3
| | | | | | | | The new guideline is to qualify with 'llvm::' explicitly both in '.h' and '.cpp' files. This simplifies moving the code between header and source files and is easier to keep consistent. llvm-svn: 350531
* [clangd] clang-format everything. NFCIlya Biryukov2019-01-031-1/+2
| | | | llvm-svn: 350303
* [clangd] Refine the way of checking a declaration is referenced by the ↵Haojian Wu2018-12-131-0/+47
| | | | | | | | | | | | | | | | | written code. Summary: The previous solution (checking the AST) is not a reliable way to determine whether a declaration is explicitly referenced by the source code, we are still missing a few cases. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D55191 llvm-svn: 349033
* [clangd] Canonicalize file path in URIForFile.Eric Liu2018-11-281-18/+19
| | | | | | | | | | | | | | | | | | | Summary: File paths in URIForFile can come from index or local AST. Path from index goes through URI transformation and the final path is resolved by URI scheme and could be potentially different from the original path. Hence, we should do the same transformation for all paths. We do this in URIForFile, which now converts a path to URI and back to a canonicalized path. Reviewers: sammccall Reviewed By: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54845 llvm-svn: 347739
* [clangd] Fix crash hovering on non-decltype trailing returnMarc-Andre Laperle2018-11-171-0/+8
| | | | | | | | | | | | | | | | | | | | Summary: More specifically, hovering on "auto" in auto main() -> int { return 0; } Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com> Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54553 llvm-svn: 347119
* [clangd] Simplify auto hoverIlya Biryukov2018-10-241-0/+7
| | | | | | | | | | | | | | | | Summary: Use helper from clang. Also fixes some weird corner cases, e.g. auto (*foo)() = bar; Reviewers: kadircet, hokein Reviewed By: kadircet, hokein Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53347 llvm-svn: 345128
* [clangd] Namespace style cleanup in cpp files. NFC.Sam McCall2018-10-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standardize on the most common namespace setup in our *.cpp files: using namespace llvm; namespace clang { namespace clangd { void foo(StringRef) { ... } And remove redundant llvm:: qualifiers. (Except for cases like make_unique where this causes problems with std:: and ADL). This choice is pretty arbitrary, but some broad consistency is nice. This is going to conflict with everything. Sorry :-/ Squash the other configurations: A) using namespace llvm; using namespace clang; using namespace clangd; void clangd::foo(StringRef); This is in some of the older files. (It prevents accidentally defining a new function instead of one in the header file, for what that's worth). B) namespace clang { namespace clangd { void foo(llvm::StringRef) { ... } This is fine, but in practice the using directive often gets added over time. C) namespace clang { namespace clangd { using namespace llvm; // inside the namespace This was pretty common, but is a bit misleading: name lookup preferrs clang::clangd::foo > clang::foo > llvm:: foo (no matter where the using directive is). llvm-svn: 344850
* [clangd] Support hover on "aut^o *".Haojian Wu2018-10-121-0/+19
| | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D53186 llvm-svn: 344330
* [clangd] Use canonical declarations in ReferenceFinder.Haojian Wu2018-10-041-17/+25
| | | | | | | | | | | | | | | | | | Summary: handleDeclOccurrencce reports a canonical declartion, so stick to use canonical declarations to determine whether a declaration is in the target set. Also fix a previous ref test which misses a matched label (it fails without this patch). Reviewers: sammccall Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52871 llvm-svn: 343763
* [NFC][clangd] fix warning for extra semicolonJonas Toth2018-09-111-2/+2
| | | | llvm-svn: 341933
* [clangd] Sort GoToDefinition results.Haojian Wu2018-09-051-0/+41
| | | | | | | | | | | | | | | | | | | | | | | Summary: GoToDefinition returns all declaration results (implicit/explicit) that are in the same location, and the results are returned in arbitrary order. Some LSP clients defaultly take the first result as the final result, which might present a bad result (implicit decl) to users. This patch ranks the result based on whether the declarations are referenced explicitly/implicitly. We put explicit declarations first. This also improves the "hover" (which just take the first result) feature in some cases. Reviewers: ilya-biryukov Subscribers: kadircet, ioeric, MaskRay, jkorous, mgrang, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50438 llvm-svn: 341463
* [clangd] Implement findReferences functionSam McCall2018-09-051-0/+137
| | | | | | clangd will use findReferences to provide LSP's reference feature. llvm-svn: 341458
* [clangd] Check for include overlapping looks for only the line now.Kadir Cetinkaya2018-08-231-2/+4
| | | | | | | | | | | | | | | | Summary: Currently we match an include only if we are inside filename, with this patch we will match whenever we are on the starting line of the include. Reviewers: ilya-biryukov, hokein, ioeric Reviewed By: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D51163 llvm-svn: 340539
* [clangd] Always use the latest preambleHaojian Wu2018-08-171-0/+45
| | | | | | | | | | | | | | | | | | | | | Summary: Fix an inconsistent behavior of using `LastBuiltPreamble`/`NewPreamble` in TUScheduler (see the test for details), AST should always use NewPreamble. This patch makes LastBuiltPreamble always point to NewPreamble. Preamble rarely fails to build, even there are errors in headers, so we assume it would not cause performace issue for code completion. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50695 llvm-svn: 340001
* [clangd] Avoid duplicates in findDefinitions responseSimon Marchi2018-08-101-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When compile_commands.json contains some source files expressed as relative paths, we can get duplicate responses to findDefinitions. The responses only differ by the URI, which are different versions of the same file: "result": [ { ... "uri": "file:///home/emaisin/src/ls-interact/cpp-test/build/../src/first.h" }, { ... "uri": "file:///home/emaisin/src/ls-interact/cpp-test/src/first.h" } ] In getAbsoluteFilePath, we try to obtain the realpath of the FileEntry by calling tryGetRealPathName. However, this can fail and return an empty string. It may be bug a bug in clang, but in any case we should fall back to computing it ourselves if it happens. I changed getAbsoluteFilePath so that if tryGetRealPathName succeeds, we return right away (a real path is always absolute). Otherwise, we try to build an absolute path, as we did before, but we also call VFS->getRealPath to make sure to get the canonical path (e.g. without any ".." in it). Reviewers: malaperle Subscribers: hokein, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48687 llvm-svn: 339483
* [clangd] Implement hover for "auto" and "decltype"Marc-Andre Laperle2018-07-021-3/+269
| | | | | | | | | | | | | | | | | | | Summary: This allows hovering on keywords that refer to deduced types. This should cover most useful cases. Not covered: - auto template parameters: Since this can be instantiated with many types, it would not be practical to show the types. - Structured binding: This could be done later to show multiple deduced types in the hover. - auto:: (part of concepts): Outside the scope of this patch. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D48159 llvm-svn: 336119
* [clangd] Fix inverted test (--gtest_filter strikes again...)Sam McCall2018-06-041-1/+1
| | | | llvm-svn: 333897
* [clangd] Hover should return null when not hovering over anything.Sam McCall2018-06-041-3/+13
| | | | | | | | | | | | Summary: Also made JSON serialize Optional<T> to simplify this. Reviewers: ioeric Subscribers: klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47701 llvm-svn: 333881
* [clangd] Extract scoring/ranking logic, and shave yaks.Sam McCall2018-05-151-38/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Code completion scoring was embedded in CodeComplete.cpp, which is bad: - awkward to test. The mechanisms (extracting info from index/sema) can be unit-tested well, the policy (scoring) should be quantitatively measured. Neither was easily possible, and debugging was hard. The intermediate signal struct makes this easier. - hard to reuse. This is a bug in workspaceSymbols: it just presents the results in the index order, which is not sorted in practice, it needs to rank them! Also, index implementations care about scoring (both query-dependent and independent) in order to truncate result lists appropriately. The main yak shaved here is the build() function that had 3 variants across unit tests is unified in TestTU.h (rather than adding a 4th variant). Reviewers: ilya-biryukov Subscribers: klimek, mgorny, ioeric, MaskRay, jkorous, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46524 llvm-svn: 332378
* [clangd] Using index for GoToDefinition.Haojian Wu2018-04-301-7/+85
| | | | | | | | | | | | | | | | | | | Summary: This patch adds index support for GoToDefinition -- when we don't get the definition from local AST, we query our index (Static&Dynamic) index to get it. Since we currently collect top-level symbol in the index, it doesn't support all cases (e.g. class members), we will extend the index to include more symbols in the future. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45717 llvm-svn: 331189
* [clangd] Use operator<< to prevent printers issues in GtestMarc-Andre Laperle2018-04-101-9/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: It is possible that there will be two different instantiations of the printer template for a given type and some tests could end up calling the wrong (default) one. For example, it was seen in CodeCompleteTests.cpp when printing CompletionItems that it would use the wrong printer because the default is also instantiated in ClangdTests.cpp. With this change, objects that were previously printed with a custom Printer now get printed through the operator<< which is declared alongside the class. This rule of the thumb should make it less error-prone. Reviewers: simark, ilya-biryukov, sammccall Reviewed By: simark, ilya-biryukov, sammccall Subscribers: bkramer, hokein, sammccall, klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44764 llvm-svn: 329725
* [clangd] Adapt index interfaces to D45014, and fix the old bugs.Sam McCall2018-04-091-1/+16
| | | | | | | | | | | | | Summary: Fix bugs: - don't count occurrences of decls where we don't spell the name - findDefinitions at MACRO(^X) goes to the definition of MACRO Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D45356 llvm-svn: 329571
* [clangd] Use the macro name range as the definition range.Haojian Wu2018-03-131-2/+2
| | | | | | | | | | | | | | Summary: This also aligns with the behavior of declarations. Reviewers: sammccall Reviewed By: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44423 llvm-svn: 327401
* [clangd] Fix irrelevant declaratations in goto definition (on macros).Haojian Wu2018-03-131-0/+9
| | | | | | | | | | | | | | | Summary: DeclrationAndMacrosFinder will find some declarations (not macro!) that are referened inside the macro somehow, isSearchedLocation() is not sufficient, we don't know whether the searched source location is macro or not. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44293 llvm-svn: 327387
* [clangd] Remove Tagged and some related APIs from ClangdServer.Sam McCall2018-03-121-11/+10
| | | | | | | | | | | | Context can do what Tagged was intended to support (snapshot filesystems), and less intrusively. getTaggedFileSystem() no longer needs a filename. Cleanups while here: - code-complete now returns errors as Expected, like other functions - added an alias Callback<T> for the usual callback function type llvm-svn: 327344
* [clangd] Fix diagnostic errors in the test code, NFC.Haojian Wu2018-03-121-1/+3
| | | | | | | | | | | | Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, jkorous-apple, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D44294 llvm-svn: 327293
* [clangd] Revamp handling of diagnostics.Ilya Biryukov2018-03-121-2/+2
| | | | | | | | | | | | | | | | Summary: The new implementation attaches notes to diagnostic message and shows the original diagnostics in the message of the note. Reviewers: hokein, ioeric, sammccall Reviewed By: sammccall Subscribers: klimek, mgorny, cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D44142 llvm-svn: 327282
* [clangd] Use identifier range as the definition range.Haojian Wu2018-03-091-15/+27
| | | | | | | | | | | | Summary: This also matches the range in symbol index. Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44247 llvm-svn: 327129
* [clangd] Extract ClangdServer::Options struct.Sam McCall2018-03-051-5/+3
| | | | | | | | | | | | | | | | | | Summary: This subsumes most of the params to ClangdServer and ClangdLSPServer. Adjacent changes: - tests use a consistent set of options, except when testing specific options - tests that previously used synchronous mode for convenience no longer do - added a runAddDocument helper to SyncAPIs to mitigate the extra code - rearranged main a bit to follow the structure of the options Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D44088 llvm-svn: 326719
* [clangd] #include statements support for Open definitionMarc-Andre Laperle2018-02-211-0/+68
| | | | | | | | | | | | | | Summary: ctrl-clicking on #include statements now opens the file being pointed by that statement. Reviewers: malaperle, krasimir, bkramer, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: jkorous-apple, ioeric, mgrang, klimek, ilya-biryukov, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D38639 llvm-svn: 325662
* [clangd] Rename some protocol field to lower caseMarc-Andre Laperle2018-02-161-1/+1
| | | | | | | | | | | | | Summary: Also fixes a GCC compilation error. Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43411 llvm-svn: 325409
* [clangd] Implement textDocument/hoverMarc-Andre Laperle2018-02-161-0/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Implemention of textDocument/hover as described in LSP definition. This patch adds a basic Hover implementation. When hovering a variable, function, method or namespace, clangd will return a text containing the declaration's scope, as well as the declaration of the hovered entity. For example, for a variable: Declared in class Foo::Bar int hello = 2 For macros, the macro definition is returned. This patch doesn't include: - markdown support (the client I use doesn't support it yet) - range support (optional in the Hover response) - comments associated to variables/functions/classes They are kept as future work to keep this patch simpler. I added tests in XRefsTests.cpp. hover.test contains one simple smoketest to make sure the feature works from a black box perspective. Reviewers: malaperle, krasimir, bkramer, ilya-biryukov Subscribers: sammccall, mgrang, klimek, rwols, ilya-biryukov, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D35894 Signed-off-by: Simon Marchi <simon.marchi@ericsson.com> Signed-off-by: William Enright <william.enright@polymtl.ca> llvm-svn: 325395
* [clangd] TestFS cleanup: getVirtualBlahBlah -> testPath/testRoot. Remove ↵Sam McCall2018-02-161-7/+6
| | | | | | SmallString micro-opt for more ergonomic tests. NFC llvm-svn: 325326
* [clangd] Make functions of ClangdServer callback-basedIlya Biryukov2018-02-151-1/+3
| | | | | | | | | | | | | | | | | | Summary: As a consequence, all LSP operations are now handled asynchronously, i.e. they never block the main processing thread. However, if -run-synchronously flag is specified, clangd still runs everything on the main thread. Reviewers: sammccall, ioeric, hokein Reviewed By: sammccall, ioeric Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43227 llvm-svn: 325233
* [clangd] Fixed findDefinitions to always return absolute paths.Ilya Biryukov2018-02-131-0/+30
| | | | | | | | Relative paths could be returned in some cases, e.g. when relative path is used in compilation arguments. This led to crash when trying to convert the path to URI. llvm-svn: 325029
OpenPOWER on IntegriCloud