summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Add RelationSlabNathan Ridge2019-06-035-0/+169
| | | | | | | | | | | | | | | | Summary: RelationSlab is a new index data structure that stores relations between symbols. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59407 llvm-svn: 362352
* [clangd] Add missing license for rename.cpp, NFC.Haojian Wu2019-05-311-1/+9
| | | | llvm-svn: 362226
* [clangd] clang-format SymbolCollector.cppNathan Ridge2019-05-301-4/+3
| | | | llvm-svn: 362176
* Support codesigning bundles and forcingChris Bieneman2019-05-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | Summary: Clangd's framework is assembled by copying binaries from the lib and bin directories into a bundle shape. This results in an invalid bundle code signature because the signature only applies to the binaries not the resources. This patch adds two new options to `llvm_codesign` to enable re-signing the library and XPC service as bundles. The `BUNDLE_PATH` option allow specifying an explicit path to codesign, which enables signing bundles which aren't generated using CMake's `FRAMEWORK` or `BUNDLE` target properties. The `FORCE` option allows re-signing binaries that have already been signed. This is required for how clangd exposes the clangd library and tools as both XPC and non-XPC services using the same binary. Reviewers: jkorous, bogner Reviewed By: bogner Subscribers: mgorny, ilya-biryukov, dexonsmith, arphaman, kadircet, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62693 llvm-svn: 362169
* [Index] Compute correct symbol kind for variable templatesIlya Biryukov2019-05-291-0/+25
| | | | | | | | | | | | | | | | | | Summary: The index library itself seems to never pass variable templates as input, however clangd does. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62579 llvm-svn: 361996
* [clangd] Map typedefs to the same LSP completion kind as VSCodeIlya Biryukov2019-05-291-2/+5
| | | | | | For consistency and, more importantly, to get a nicer icon for those in VSCode. llvm-svn: 361969
* [clangd] Fix buildbot error.Haojian Wu2019-05-291-0/+4
| | | | llvm-svn: 361960
* [clangd] Remove the whitelist std symbols in CanonicalIncludes.Haojian Wu2019-05-291-17/+0
| | | | | | | | | | | | | | Summary: These symbols have been included via StdSymbolMap.inc. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62527 llvm-svn: 361952
* [clangd] Another improvement for std include mapping.Haojian Wu2019-05-293-6/+64
| | | | | | | | | | | | | | | | Summary: Improve the way of checking a symbol name is in the first cell. The previous way is not very robost for cases where a cell lists multiple symbols (e.g. int8_t). Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62575 llvm-svn: 361951
* [Index] Correctly set symbol kind of IndirectFieldDeclIlya Biryukov2019-05-291-0/+14
| | | | | | | | | | | | | | | | Summary: The kind has been 'unknown' before, now it is 'field'. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62573 llvm-svn: 361941
* [clangd] Represent Hover result using FormattedStringIlya Biryukov2019-05-2911-95/+319
| | | | | | | | | | | | | | Reviewers: sammccall, kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61601 llvm-svn: 361940
* [clangd] Add SourceManager accessor to ParsedAST. NFCSam McCall2019-05-289-26/+27
| | | | llvm-svn: 361883
* [clangd] Fix test output for r361841Ilya Biryukov2019-05-281-1/+1
| | | | llvm-svn: 361846
* [clangd] Place cursor better after completing patternsIlya Biryukov2019-05-285-9/+76
| | | | | | | | | | | | | | | | | | | | | | | | Summary: By producing the $0 marker in the snippets at the last placeholder. This produces nicer results in most cases, e.g. for namespace <#name#> { <#decls#> } we now produce ${0:decls} instead of ${2:decls} and the final cursor placement is more convenient. Reviewers: hokein Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62389 llvm-svn: 361841
* [clangd] Compute expected type for templatesIlya Biryukov2019-05-282-6/+36
| | | | | | | | | | | | | | Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62515 llvm-svn: 361823
* [clangd] Introduce a structured hover responseKadir Cetinkaya2019-05-289-143/+769
| | | | | | | | | | | | | | | | Summary: Change ClangdServer layer to output a structured response for Hover, which can be rendered by client according to their needs. Reviewers: sammccall, ilya-biryukov Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61497 llvm-svn: 361803
* [clangd] Never end command-line flag description with a period. NFCIlya Biryukov2019-05-281-20/+20
| | | | | | | For consistency. Not having a period at the end is much more common and seems to be the preferred style for command-line options. llvm-svn: 361800
* [clangd] Rename -run-synchronously to -syncIlya Biryukov2019-05-286-23/+22
| | | | llvm-svn: 361798
* [clangd] tweaks: Add clangBasic dependency to LINK_LIBSHeejin Ahn2019-05-251-0/+1
| | | | | | This is necessary to make builds with `-DBUILD_SHARED_LIBS=ON` work. llvm-svn: 361687
* Rename clangToolingRefactor to clangToolingRefactoring for consistency with ↵Nico Weber2019-05-251-1/+1
| | | | | | | | | | its directory See "[cfe-dev] The name of clang/lib/Tooling/Refactoring". Differential Revision: https://reviews.llvm.org/D62420 llvm-svn: 361684
* [clangd] Limit the size of synthesized fix messageIlya Biryukov2019-05-242-7/+63
| | | | | | | | | | | | | | | | Summary: A temporary workaround until we figure out a better way to present fixes. Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62372 llvm-svn: 361625
* [CodeComplete] Filter override completions by function nameIlya Biryukov2019-05-241-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Summary: We put only part of the signature starting with a function name into "typed text" chunks now, previously the whole signature was "typed text". This leads to meaningful fuzzy match scores, giving better signals to compare with other completion items. Ideally, we would not display the result type to the user, but that requires adding a new kind of completion chunk. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62298 llvm-svn: 361623
* [Index] Fix reported references in presence of template type aliasesIlya Biryukov2019-05-231-0/+11
| | | | | | | | | | | | | | | | Summary: See the added test for an example. Reviewers: kadircet Reviewed By: kadircet Subscribers: jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62303 llvm-svn: 361511
* [clangd] Also update package-lock.jsonKadir Cetinkaya2019-05-231-1/+1
| | | | llvm-svn: 361488
* [clangd] Bump vscode extension versionKadir Cetinkaya2019-05-231-1/+1
| | | | llvm-svn: 361486
* [clangd-vscode] Do not customize uri converters in vscodeKadir Cetinkaya2019-05-231-12/+0
| | | | | | | | | | | | | | | | | | | Summary: Clangd is already resolving symlinks on the server side, therefore there is no more need to handle it in client side. This was also resulting in breakages whenever index contained a symbol coming from a non-existent file(like a generated file), e.g. during workspace symbols whole response was dropped since stat had failed. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62288 llvm-svn: 361475
* [clangd-vscode] Bump versions dependencies. NFCIlya Biryukov2019-05-231-20/+11
| | | | | | Result of running 'npm audit fix', which tracks security vulnerabilities. llvm-svn: 361464
* [clangd] improve help message for limit-resultsKadir Cetinkaya2019-05-221-1/+1
| | | | | | | | | | | | | | | | | | Summary: Make it clear that the default is 100. Patch by Brennan Vincent(@umanwizard)! Reviewers: #clang-tools-extra, kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61865 llvm-svn: 361388
* [clangd] Turn no-parse-completion on by when preamble isn't ready. Add flag ↵Sam McCall2019-05-215-27/+49
| | | | | | | | | | | | | | to force it. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62135 llvm-svn: 361258
* [clangd] Add tweak to convert normal to raw string literal, when it contains ↵Sam McCall2019-05-213-3/+139
| | | | | | | | | | | | | | escapes. Reviewers: ilya-biryukov Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62151 llvm-svn: 361252
* [clangd] Make it possible to use VFS from parsing for getting tidy optionsIlya Biryukov2019-05-203-10/+29
| | | | | | | | | | | | | | | | | | | Summary: To give an option for clangd embedders with snapshotted filesystem to read config files from exact snapshots, possibly loosing some performance from caching capabilities of the current implementations. Reviewers: sammccall Reviewed By: sammccall Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62143 llvm-svn: 361178
* [clangd] Fix naming warning from clang-tidy. NFCIlya Biryukov2019-05-201-5/+2
| | | | | | Also remove newlines and braces. llvm-svn: 361147
* [clangd] Respect WarningsAsErrors configuration for clang-tidyFangrui Song2019-05-196-18/+70
| | | | | | | | | | | | This completes the fix for https://bugs.llvm.org/show_bug.cgi?id=41218. Reviewed By: sammccall Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D61841 llvm-svn: 361113
* [clangd] Respect clang-tidy suppression commentsFangrui Song2019-05-194-2/+68
| | | | | | | | | | | | This partially fixes https://bugs.llvm.org/show_bug.cgi?id=41218. Reviewed By: sammccall Patch by Nathan Ridge! Differential Revision: https://reviews.llvm.org/D60953 llvm-svn: 361112
* [clangd] Bump index version and get rid of wrong assertionKadir Cetinkaya2019-05-092-2/+4
| | | | | | | | | | | | | | | | | | | | Summary: After rL360344, BackgroundIndex expects symbols with zero refcounts. Therefore existing index files are no longer valid. Assertion regarding finding target of a reference was wrong, since background-index might still be going on or we might've loaded only some part of the shards and might be missing the declaring shards for the symbol. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61734 llvm-svn: 360349
* [clangd] Count number of references while merging RefSlabs inside FileIndexKadir Cetinkaya2019-05-097-33/+104
| | | | | | | | | | | | | | | | | | | | | | | Summary: For counting number of references clangd was relying on merging every duplication of a symbol. Unfortunately this does not apply to FileIndex(and one of its users' BackgroundIndex), since we get rid of duplication by simply dropping symbols coming from non-canonical locations. So only one or two(coming from canonical declaration header and defined source file, if exists) replications of the same symbol reaches merging step. This patch changes reference counting logic to rather count number of different RefSlabs a given SymbolID exists. Reviewers: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, mgrang, arphaman, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59481 llvm-svn: 360344
* [clangd] Fix a TSAN warning in TUSchedulerTestsIlya Biryukov2019-05-091-2/+6
| | | | llvm-svn: 360336
* Fix gcc compilation warning in test case [NFC]Mikael Holmen2019-05-091-1/+1
| | | | | | | | | | Without this, gcc (7.4) complains with ../tools/clang/tools/extra/clangd/unittests/PrintASTTests.cpp:99:28: error: ISO C++11 requires at least one argument for the "..." in a variadic macro [-Werror] }))); ^ llvm-svn: 360334
* [clangd] Use AsyncTaskRunner in BackgroundIndex instead of std::threadIlya Biryukov2019-05-092-6/+7
| | | | | | | | | | | | | | | | | | Summary: To unify the way we create threads in clangd. This should simplify landing D50993. Reviewers: kadircet Reviewed By: kadircet Subscribers: MaskRay, jkorous, arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61724 llvm-svn: 360332
* [clangd] Introduce intermediate representation of formatted textIlya Biryukov2019-05-075-0/+388
| | | | | | | | | | | | | | | | Summary: That can render to markdown or plain text. Used for findHover requests. Reviewers: malaperle, sammccall, kadircet Reviewed By: sammccall Subscribers: mgorny, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58547 llvm-svn: 360151
* [clangd] Oops, switchSourceHeader still needs to return a URI.Sam McCall2019-05-072-3/+3
| | | | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61630 llvm-svn: 360121
* [clangd] switchSourceHeader uses null not empty string as sentinel.Sam McCall2019-05-072-5/+8
| | | | | | As far as I can see, only theia actually implements this, and it expects null. llvm-svn: 360119
* [clangd] Add test that r360116 accidentally fixed a duplicate-edits bug in ↵Sam McCall2019-05-072-20/+67
| | | | | | rename. NFC llvm-svn: 360118
* [clangd] Move Rename into its own file, and add unit test. NFCSam McCall2019-05-078-79/+164
| | | | | | | | | | | | Reviewers: kadircet Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61596 llvm-svn: 360116
* [clangd] Expose whether no-compile completion was used.Sam McCall2019-05-063-0/+7
| | | | | | | | | | | | | | Summary: Embedding clients want to experiment with showing such results in e.g. a different color. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61588 llvm-svn: 360039
* [clangd] Boost code completion results that were named in the last few lines.Sam McCall2019-05-0610-6/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The hope is this will catch a few patterns with repetition: SomeClass* S = ^SomeClass::Create() int getFrobnicator() { return ^frobnicator_; } // discard the factory, it's no longer valid. ^MyFactory.reset(); Without triggering antipatterns too often: return Point(x.first, x.^second); I'm going to gather some data on whether this turns out to be a win overall. Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, jfb, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61537 llvm-svn: 360030
* [clangd] Qualify uses of ::testing everywhere. NFCIlya Biryukov2019-05-0615-113/+110
| | | | | | | | | Add an initial '::' qualifier to all usages of 'testing' namespace that did not have one. The goal is to make our code style in tests more consistent. llvm-svn: 360026
* [clangd] Always call getFormatStyleForFile().Sam McCall2019-05-062-8/+9
| | | | | | | | | | This means "format" will no longer return an error if the -fallback-style flag is invalid, it will log and use LLVM style. This doesn't really matter. Also document the dependence on global variables. (This patch is a compromise - it's probably not worth actually avoiding the globals). llvm-svn: 360020
* [clangd] Support -fallback-style, similar to clang-format.Sam McCall2019-05-061-0/+9
| | | | | | | | | | | | Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61519 llvm-svn: 360016
* Fix test to avoid assuming clang will diagnose problems in unreachable code.Richard Smith2019-05-061-0/+2
| | | | llvm-svn: 360009
OpenPOWER on IntegriCloud