summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove extra ';'. NFCI.Simon Pilgrim2019-10-281-1/+1
|
* [clangd] Do not report anonymous entities in findExplicitReferencesIlya Biryukov2019-10-282-9/+24
| | | | | | | | | | | | | | | | | | | Summary: Otherwise every client dealing with name location should handle anonymous names in a special manner. This seems too error-prone, clients can probably handle anonymous entities they care about differently. Reviewers: hokein Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69511
* [clangd] Flush streams when printing HoverInfo Name and DefinitionKadir Cetinkaya2019-10-281-0/+2
| | | | Summary: Fixes some windows breakages when compiled via msvc.
* [clangd] Do not highlight keywords in semantic highlightingIlya Biryukov2019-10-284-91/+88
| | | | | | | | | | | | | | | | | | Summary: Editors are good at highlightings the keywords themselves. Note that this only affects highlightings of builtin types spelled out as keywords in the source code. Highlightings of typedefs to builtin types are unchanged. Reviewers: hokein Reviewed By: hokein Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69431
* [clangd] Do not insert parentheses when completing a using declarationIlya Biryukov2019-10-282-5/+57
| | | | | | | | | | | | | | | | | | Summary: Would be nice to also fix this in clang, but that looks like more work if we want to preserve signatures in informative chunks. Fixes https://github.com/clangd/clangd/issues/118 Reviewers: kadircet Reviewed By: kadircet Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69382
* [clangd] Reland Store Index in Tweak::SelectionKadir Cetinkaya2019-10-285-9/+20
| | | | | | | | | | | | | | | | Summary: Incoming define out-of-line tweak requires access to index. This patch simply propogates the index in ClangdServer to Tweak::Selection while passing the AST. Also updates TweakTest to accommodate this change. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69165
* [clangd] Reland DefineInline action apply logic with fully qualified namesKadir Cetinkaya2019-10-284-15/+759
| | | | | | | | | | | | Summary: Initial version of DefineInline action that will fully qualify every name inside function body. Reviewers: sammccall, ilya-biryukov, hokein Tags: #clang Differential Revision: https://reviews.llvm.org/D66647
* [clangd] Reland DefineInline action availability checksKadir Cetinkaya2019-10-285-3/+395
| | | | | | | | | | | | | | | | Summary: Introduces DefineInline action and initial version of availability checks. Reviewers: sammccall, ilya-biryukov, hokein Reviewed By: hokein Subscribers: thakis, usaxena95, mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65433
* [clangd] Pass ExtraArgs to TestTU in TweakIsAvailable matcherKadir Cetinkaya2019-10-281-2/+4
|
* [clangd] Revert define-inline action changes to un-break windows build-botsKadir Cetinkaya2019-10-258-1159/+21
|
* [clangd][NFC] Get rid of raw string literals in macros to make stage1 ↵Kadir Cetinkaya2019-10-251-388/+413
| | | | compiler happy
* Fix compilation error in clangd/refactor/tweaks/ExpandAutoType.cppKadir Cetinkaya2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: During the compilation of the `clangd/refactor/tweaks/ExpandAutoType.cpp`, MSVC returns the following error: llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2146: syntax error: missing ')' before identifier 'and' llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(85): error C2065: 'and': undeclared identifier llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(86): error C2143: syntax error: missing ';' before '<template-id>' llvm-monorepo\llvm\tools\clang\tools\extra\clangd\refactor\tweaks\ExpandAutoType.cpp(73): fatal error C1075: '{': no matching token found So, && must be used instead of `and`. Patch By Pavel Samolysov (@psamolysov) ! Reviewers: kadircet Reviewed By: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D69427
* [clangd] Store Index in Tweak::SelectionKadir Cetinkaya2019-10-255-10/+22
| | | | | | | | | | | | | | | | Summary: Incoming define out-of-line tweak requires access to index. This patch simply propogates the index in ClangdServer to Tweak::Selection while passing the AST. Also updates TweakTest to accommodate this change. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69165
* [clangd] Implement GetEligiblePointsKadir Cetinkaya2019-10-253-44/+195
| | | | | | | | | | | | | | Summary: This is an helper for incoming move definition out-of-line action to figure out possible insertion locations for definition of a qualified name. Reviewers: hokein, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68024
* [clangd] DefineInline action apply logic with fully qualified namesKadir Cetinkaya2019-10-254-15/+727
| | | | | | | | | | | | Summary: Initial version of DefineInline action that will fully qualify every name inside function body. Reviewers: sammccall, ilya-biryukov, hokein Tags: #clang Differential Revision: https://reviews.llvm.org/D66647
* [clangd] DefineInline action availability checksKadir Cetinkaya2019-10-255-3/+392
| | | | | | | | | | | | Summary: Introduces DefineInline action and initial version of availability checks. Reviewers: sammccall, ilya-biryukov, hokein Tags: #clang Differential Revision: https://reviews.llvm.org/D65433
* [clangd] Fix case of variables and functions in code complete tests. NFCIlya Biryukov2019-10-241-16/+16
|
* [clangd] Handle the missing constructor initializers in findExplicitReferences.Haojian Wu2019-10-242-7/+52
| | | | | | | | | | Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69241
* [clangd] Collect name references in the index.Haojian Wu2019-10-242-4/+17
| | | | | | | | | | | | | | Summary: This is used for cross-file rename. When renaming a class, we expect to rename all related constructors/destructors. Reviewers: kadircet, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69338
* [clangd] abort if shutdown takes more than a minute.Sam McCall2019-10-233-8/+29
| | | | | | | | | | | | | | | | | | | | Summary: A certain class of bug (e.g. infloop on an AST worker thread) currently means clangd never terminates, even if the editor shuts down the protocol and closes our stdin, and the main thread recognizes that. Instead, let's wait 60 seconds for threads to finish cleanly, and then crash if they haven't. (Obviously, we should still fix these bugs). Reviewers: kadircet Subscribers: MaskRay, jkorous, arphaman, jfb, usaxena95, cfe-commits, ilya-biryukov Tags: #clang Differential Revision: https://reviews.llvm.org/D69329
* [clangd] Propogate context in TUScheduler::runKadir Cetinkaya2019-10-232-1/+15
| | | | | | | | | | Reviewers: sammccall Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D69328
* Move endian constant from Host.h to SwapByteOrder.h, prune includeReid Kleckner2019-10-191-0/+1
| | | | | | | | | | | | | | Works on this dependency chain: ArrayRef.h -> Hashing.h -> --CUT-- Host.h -> StringMap.h / StringRef.h ArrayRef is very popular, but Host.h is rarely needed. Move the IsBigEndianHost constant to SwapByteOrder.h. Clients of that header are more likely to need it. llvm-svn: 375316
* [clangd] Report declaration references in findExplicitReferences.Haojian Wu2019-10-187-97/+172
| | | | | | | | | | | | Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68977 llvm-svn: 375226
* [clangd] Use our own relation kind.Haojian Wu2019-10-1719-117/+58
| | | | | | | | | | | | | | | | Summary: Move the RelationKind from Serialization.h to Relation.h. This patch doesn't introduce any breaking changes. Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68981 llvm-svn: 375117
* [clangd] Add the missing dependency on `clangLex`.Michael Liao2019-10-162-0/+2
| | | | llvm-svn: 375039
* [clangd] Add RemoveUsingNamespace tweak.Utkarsh Saxena2019-10-165-17/+459
| | | | | | | | | | | | | | | | | | Summary: Removes the 'using namespace' under the cursor and qualifies all accesses in the current file. E.g.: using namespace std; vector<int> foo(std::map<int, int>); Would become: std::vector<int> foo(std::map<int, int>); Subscribers: mgorny, ilya-biryukov, MaskRay, jkorous, mgrang, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68562 llvm-svn: 374982
* [clangd][NFC] Update comments to use triple-slashesKadir Cetinkaya2019-10-151-3/+4
| | | | llvm-svn: 374901
* [clangd] Propagate main context into ClangdServerKadir Cetinkaya2019-10-152-9/+22
| | | | | | | | | | | | | | | | | | | | Summary: Currently clangd initializes the ClangdServer lazily during onInitialize request, and it results in propagation of caller's context rather than the main context created ClangdLSPServer. This patch changes the logic to store main context that created ClangdLSPServer and pass it onto to ClangdServer and other objects like CDBs. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68978 llvm-svn: 374892
* [clangd] Improve semantic highlighting in dependent contexts (fixes #154)Nathan Ridge2019-10-144-5/+119
| | | | | | | | | | | | Reviewers: hokein Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67901 llvm-svn: 374799
* clangd tests: use extended regex with sedNico Weber2019-10-143-3/+3
| | | | | | | | | The escaped parens seem to confuse the combination of lit, cygwin quoting, and cygwin's sed. unxutils sed in cmd.exe is fine with both forms, so use the extended regex form that doesn't need an escaped paren. llvm-svn: 374753
* convert another test to unix line endingsNico Weber2019-10-141-14/+14
| | | | llvm-svn: 374752
* convert a test to unix line endingsNico Weber2019-10-141-84/+84
| | | | llvm-svn: 374751
* fix typo in 374747Nico Weber2019-10-141-1/+1
| | | | llvm-svn: 374750
* Prefer 'env not' over 'not env' in tests.Nico Weber2019-10-141-1/+1
| | | | | | | | | That way, lit's builtin 'env' command can be used for the 'env' bit. Also it's clearer that way that the 'not' shouldn't cover 'env' failures. llvm-svn: 374749
* Make symbols.test pass on Windows.Nico Weber2019-10-142-2/+2
| | | | | | | | See commit message of r374746 for details. Hopefully final bit of PR43592. llvm-svn: 374747
* Make code-action-request.test and request-reply.test pass on Windows.Nico Weber2019-10-142-5/+5
| | | | | | | | | | | | clangd's test:// scheme expands to /clangd-test on non-Win and to C:/clang-test on Win, so it can't be mixed freely with file:///clangd-test since that's wrong on Windows. This makes both tests consistenly use the test:// scheme. (Alternatively, we could use the //INPUT_DIR pattern used in a few other tests.) Part of PR43592. llvm-svn: 374746
* Don't run background-index.test on Windows.Nico Weber2019-10-141-1/+1
| | | | | | | | | The test had a "UNSUPPORTED: win32" line, but the spelling of that changed in r339307 a year ago. Finally update this test too. Part of PR43592. llvm-svn: 374745
* Add missing "REQUIRES: shell" to system-include-extractor.testNico Weber2019-10-131-0/+3
| | | | | | Part of PR43592. llvm-svn: 374730
* Make the last to clangd unit tests pass on Windows.Nico Weber2019-10-131-2/+8
| | | | | | | | | | (Some lit tests still fail.) See FIXME in diff for details. Part of PR43592. llvm-svn: 374727
* Make most clangd unittests pass on WindowsNico Weber2019-10-138-7/+57
| | | | | | | | | | | | | | | | | | | | The Windows triple currently turns on delayed template parsing, which confuses several unit tests that use templates. For now, just explicitly disable delayed template parsing. This isn't ideal, but: - the Windows triple will soon no longer use delayed template parsing by default - there's precedent for this in the clangd unit tests already - let's get the clangd tests pass on Windows first before making behavioral changes Part of PR43592. llvm-svn: 374718
* Get ClangdXPC.framework building (barely) with CMake's Xcode generatorJordan Rose2019-10-111-2/+2
| | | | | | | | | | | | | | | | | | | The output directories for CMake's Xcode project generator are specific to the configuration, and so looking in CMAKE_LIBRARY_OUTPUT_DIRECTORY isn't going to work. Fortunately, CMake already provides generator expressions to find the output of a given target. I call this "barely" building because the built framework isn't going to respect the configuration; that is, I can't have both Debug and RelWithDebInfo variants of ClangdXPC.framework at the same time like I can with normal library or executable targets. To do that we'd have to put the framework in a configuration-specific output directory or use CMake's native support for frameworks instead. https://reviews.llvm.org/D68846 llvm-svn: 374494
* [clangd] Make sure ReplyCallbacks are destroyed before RequestCancelersMutexKadir Cetinkaya2019-10-091-10/+13
| | | | | | | | | | | | | | | | | Summary: After rL374163, replycallbacks might have a cancellable context, which will try to access RequestCancellers on destruction. See http://45.33.8.238/mac/1245/step_7.txt for a sample failure. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits, thakis Tags: #clang Differential Revision: https://reviews.llvm.org/D68702 llvm-svn: 374168
* [clangd] Propagate context into reply handlersKadir Cetinkaya2019-10-091-1/+1
| | | | llvm-svn: 374163
* [clangd] Disable expand auto on decltype(auto)Ilya Biryukov2019-10-082-1/+5
| | | | | | | | | | | | | | | | Summary: Applying it produces incorrect code at the moment. Reviewers: sammccall Reviewed By: sammccall Subscribers: kuhnel, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68630 llvm-svn: 374048
* [clangd] Bump timeouts in speculative completion testsKadir Cetinkaya2019-10-081-1/+1
| | | | llvm-svn: 374047
* Try to get clangd tests passing on Windows.Nico Weber2019-10-072-10/+10
| | | | | | Part of PR43592. See also r328645. llvm-svn: 373932
* [clangd] Fix raciness in code completion testsKadir Cetinkaya2019-10-071-11/+19
| | | | | | | | | | | | Reviewers: sammccall, ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68273 llvm-svn: 373924
* [clangd] Catch an unchecked "Expected<T>" in HeaderSourceSwitch.Haojian Wu2019-10-074-3/+12
| | | | | | | | | | | | | | Summary: Also fixes a potential user-after-scope issue of "Path". Reviewers: kadircet Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68564 llvm-svn: 373897
* [clangd] If an undocumented definition exists, don't accept documentation ↵Sam McCall2019-10-072-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | from other forward decls. Summary: This fixes cases like: foo.h class Undocumented{} bar.h // break an include cycle. we should refactor this! class Undocumented; Where the comment doesn't describe the class. Note that a forward decl that is *visible to the definition* will still have its doc comment used, by SymbolCollector: Merge isn't involved here. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68467 llvm-svn: 373892
* [clangd] Collect missing macro references.Haojian Wu2019-10-072-2/+38
| | | | | | | | | | | | | | Summary: Semantic highlghting is missing a few macro references. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68458 llvm-svn: 373889
OpenPOWER on IntegriCloud