[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. An AST-based approach is used to retrieve the document symbols rather than an in-memory index query. The index is not an ideal fit to achieve this because of the file-centric query bein

[PATCH] D47821: [clangd] Make workspace/symbols actually rank its results.

2018-06-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. This works much better! Just a nit. Comment at: clangd/FindSymbols.cpp:20 +#define DEBUG_TYPE "FindSymbols" + nit: I don't think this is used. Remove? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47821 __

[PATCH] D47847: [clangd] Simplify matches in FindSymbols tests

2018-06-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. Instead of checking symbol name and container (scope) separately, check the qualified name instead. This is much shorter and similar to how it is done in the SymbolCollector tests. Sig

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/FindSymbolsTests.cpp:39 } +MATCHER_P(QName, Name, "") { + if (arg.containerName.empty()) I updated the other tests to use this in https://reviews.llvm.org/D47847 Repository: rCTE Clang Tools Extr

[PATCH] D47950: [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther"

2018-06-11 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Very nice! I tried "std" and got much less (unimportant) results. I see something a bit weird with "getStandardResourceDir" but it might be VSCode. Here, I guess it's the "d" in Dir that matches but what's odd is that VS Code will highlight the first "d", i.e. in "sta

[PATCH] D47950: [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther"

2018-06-11 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47950#1128487, @sammccall wrote: > In https://reviews.llvm.org/D47950#1128370, @malaperle wrote: > > > Very nice! I tried "std" and got much less (unimportant) results. I see > > something a bit weird with "getStandardResourceDir" but it mi

[PATCH] D48071: [clangd] Add an option controlling caching of compile commands.

2018-06-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Does this change affect the switching of compilation database, through workspace/didChangeConfiguration ? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48071 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. 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 typ

[PATCH] D47847: [clangd] Simplify matches in FindSymbols tests

2018-06-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 152536. malaperle added a comment. Rebased. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47847 Files: unittests/clangd/FindSymbolsTests.cpp Index: unittests/clangd/FindSymbolsTests.cpp

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-01-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked 2 inline comments as done. malaperle added inline comments. Comment at: clangd/XRefs.cpp:572 + + // Try to get the full definition, not just the name + SourceLocation StartLoc = Decl.Info->getDefinitionLoc(); simark wrote: > hokein wrote: > > i

[PATCH] D52273: [clangd] Initial implementation of expected types

2018-11-11 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. What is the goal for doing this without the AST? Is the goal to not have to keep the AST and save memory? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52273 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. More specifically, hovering on "auto" in auto main() -> int { return 0; } Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://re

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 174117. malaperle added a comment. Fix comment in test Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54553 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: unittests/clangd/XRefsTests.cpp =

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 174202. malaperle added a comment. Address comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54553 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: unittests/clangd/XRefsTests.cpp

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Thanks for the review! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54553: [clangd] Fix crash hovering on non-decltype trailing return

2018-11-16 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347119: [clangd] Fix crash hovering on non-decltype trailing return (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-20 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Alt+o is used on Windows/Linux and Option+Cmd+o on macOS. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D5478

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-20 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 174866. malaperle added a comment. Fix a bad change Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54781 Files: clangd/clients/clangd-vscode/package.json clangd/clients/clangd-vscode/src/extension.ts Index: clangd/clients/clangd-vsc

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 175078. malaperle marked 5 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54781 Files: clangd/clients/clangd-vscode/package.json clangd/clients/clangd-vscode/src/ex

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D54781#1306102, @ioeric wrote: > Could you run clang-format on the changed lines? I didn't know clang-format could be used for Typescript. I ran it and it's a bit inconsistent with the rest of the file but I don't want to format the whole

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54781#1306872 , @sammccall wrote: > This is great! > > I'm slightly nervous - the way we've extended the protocol with > `textDocument/switchSourceHeader` is pretty hard to extend, itself (since the > response is a string d

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347509: [clangd] Add 'Switch header/source' command in clangd-vscode (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION htt

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Using Clang-cl, I have seen scenarios where the compilation database contains all flags necessary to find compiler-specific (CL) headers, using /imsvc. Specifying -

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54781#1307755 , @hokein wrote: > @malaperle, do you want a new release of `vscode-clangd` extension for this? I don't plan on doing changes for a little while in vscode-clangd so it would be good indeed to have a new relea

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added a comment. In D54872#1307775 , @ilya-biryukov wrote: > We have to point clangd into the resource dir, corresponding to the version > of the headers it was built with. It's important we pick the

[PATCH] D54781: [clangd] Add 'Switch header/source' command in clangd-vscode

2018-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54781#1311038 , @hokein wrote: > Just made a new release v0.0.7, please try to use it (it works on my machine). Works great! Thanks a lot! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54781

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Reading D54630 , I think that's what might be happening. Here's how to reproduce the problem though: - Clangd compiled from source with Visual Studio 2017 (i.e. not from win installer) - LLVM win installer from http://llvm.org/builds/

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Hi Ilya. Does this apply to compile_commands.json too? I've seen that problem for that file as well. If not, I understand it can be another patch, just curious. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55139/new/ ht

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 176754. malaperle added a comment. Clang-format Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: un

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. It doesn't seem like there is any difference in how -resource-dir and /imsvc are handled: they are all added as -internal-isystem In MSVCToolChain::AddClangSystemIncludeArgs (MSCV.cpp): if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) { AddSystemIncludeWithSub

[PATCH] D54872: [clangd] Add ability to not use -resource-dir at all

2018-12-06 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D54872#1319958 , @ilya-biryukov wrote: > I'm a bit confused now, will put up a few clarifying questions to make sure I > understand the probem properly. > Does `clang-cl` work correctly the arguments from `compile_commands.

[PATCH] D52089: [clangd] Get rid of AST matchers in SymbolCollector. NFC

2018-09-14 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. why? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52089: [clangd] Get rid of AST matchers in SymbolCollector. NFC

2018-09-15 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D52089#1235851, @ioeric wrote: > In https://reviews.llvm.org/D52089#1235777, @malaperle wrote: > > > why? > > > I wanted to get some numbers and update the patch summary, but somehow > forgot. Sorry about that and thanks for asking! > > The

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 184928. malaperle marked 2 inline comments as done. malaperle added a comment. Herald added a project: clang. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-08 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 185959. malaperle marked an inline comment as not done. malaperle added a comment. Remove temporary code. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clan

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Ping? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 187783. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h c

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && HoverSupportsMarkdown) { + (*H)->contents.kind

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:816 +// If the client supports Markdown, convert from plaintext here. +if (*H && HoverSupportsMarkdown) { + (*H)->contents.kind

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 187902. malaperle added a comment. Remove Markdown support. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55250/new/ https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2019-02-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354761: [clangd] Enhance macro hover to see full definition (authored by malaperle, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[PATCH] D37972: [clangd] Introduced Logger interface.

2017-09-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Looks very nice! Just a few questions. Comment at: clangd/ClangdServer.h:24 #include "ClangdUnit.h" +#include "Logger.h" #include "Protocol.h" forward declare? Comment at: clangd/ClangdUnit.h:13 +#include "Logge

[PATCH] D37972: [clangd] Introduced Logger interface.

2017-09-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle accepted this revision. malaperle added a comment. This revision is now accepted and ready to land. Look good. Thank you! https://reviews.llvm.org/D37972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D64614: [clangd] Mark type hierarchy as a supported feature in the docs

2019-07-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clang-tools-extra/docs/clangd/Features.rst:264 +-++--+ -| Type hierarchy | No | No | +| Type hierarchy | No | Ye

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-11 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1064196, @sammccall wrote: > (BTW @hokein has https://reviews.llvm.org/D45513 to add row/col to the index, > which will allow all the file-reading stuff to be cleaned up, but no need to > wait on that since it's all working now). L

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-11 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 142112. malaperle marked 2 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1065622, @sammccall wrote: > Still LG, thanks! > I'll look into the testing issue. I thought about it after... I think it was because I was trying to test with std::unordered_map (to prevent multiple results) which needs std=c++11,

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1065787, @hokein wrote: > @malaperle, what's your plan of this patch? Are you going to land it before > https://reviews.llvm.org/D45513? With the Line&Column info in the index, this > patch could be simplified. I'll address the las

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1065632, @sammccall wrote: > In https://reviews.llvm.org/D44882#1065631, @malaperle wrote: > > > In https://reviews.llvm.org/D44882#1065622, @sammccall wrote: > > > > > Still LG, thanks! > > > I'll look into the testing issue. > > > >

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 142328. malaperle marked an inline comment as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-12 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:113 + auto KindVal = static_cast(Kind); + if (KindVal >= SymbolKindMin && KindVal <= SymbolKindMax) +SupportedSymbolKinds.set(KindVal); --

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 142403. malaperle marked 2 inline comments as done. malaperle added a comment. Address comments. Simplify with using line/col from index. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdL

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-13 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1066883, @hokein wrote: > Thanks, I have landed the patch today, you need to update your patch (I think > it is mostly about removing the code of reading-file stuff). I updated the patch using the new line/col from the index. This i

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-17 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Any objections to the latest version? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 143219. malaperle marked 5 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Sorry for the embarrassing clean-ups I forgot! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-19 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 143220. malaperle added a comment. Remove more includes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/Clangd

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE330637: [clangd] Implementation of workspace/symbol request (authored by malaperle, committed by ). Changed prior to commit: https://reviews.llvm.org/D44882?vs=143220&id=143626#toc Repository: rCTE

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1076864, @sammccall wrote: > So this fails if there's no standard library available without flags, which > is the case in google's test environment to ensure hermeticity :-( > > In the short-term, we've disabled the test internally -

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D44882#1077516, @sammccall wrote: > It makes sense, but @bkramer came up with some deep magic in > https://reviews.llvm.org/rL330754 so I think we're actually good now. Nice! Thanks @bkramer ! Repository: rCTE Clang Tools Extra https:

[PATCH] D47847: [clangd] Simplify matches in FindSymbols tests

2018-06-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle accepted this revision. malaperle added a comment. This revision is now accepted and ready to land. Self-approving because this is pretty inconsequential. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47847 ___ cfe-commit

[PATCH] D47847: [clangd] Simplify matches in FindSymbols tests

2018-06-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335624: [clangd] Simplify matches in FindSymbols tests (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47847 Files: cla

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 152953. malaperle added a comment. Rebased. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/FindSymbols.cpp c

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 152958. malaperle added a comment. Rebased. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48159 Files: clangd/XRefs.cpp unittests/clangd/TestTU.cpp unittests/clangd/TestTU.h unittests/clangd/XRefsTests.cpp Index: unittests/clang

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added a comment. I found some issues while testing, I will investigate before review. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 ___ cfe-commits mailing list cfe-commit

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked 4 inline comments as done. malaperle added inline comments. Comment at: clangd/XRefs.cpp:559 + //- auto& i = 1; + bool VisitDeclaratorDecl(DeclaratorDecl *D) { +if (!D->getTypeSourceInfo() || sammccall wrote: > out of curiosity, why not imp

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 153153. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48159 Files: clangd/XRefs.cpp unittests/clangd/TestTU.cpp unittests/clangd/TestTU.h unittests/clangd/XRefsTests.cpp Index: unitte

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-06-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D48687#1146515, @simark wrote: > In https://reviews.llvm.org/D48687#1146308, @ilya-biryukov wrote: > > > Thanks for the patch! > > Could we try to figure out why the duplicates were there in the first > > place and why the paths were diffe

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/XRefs.cpp:559 + //- auto& i = 1; + bool VisitDeclaratorDecl(DeclaratorDecl *D) { +if (!D->getTypeSourceInfo() || klimek wrote: > sammccall wrote: > > malaperle wrote: > > > sammccall wrote: > > > > out of

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/FindSymbols.cpp:181 +/// Finds document symbols in the main file of the AST. +class DocumentSymbolsConsumer : public index::IndexDataConsumer { + ASTContext &AST; sammccall wrote: > I guess the alternative here

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-06-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 153611. malaperle added a comment. Fix handling of externs, definition vs declaration and call more common code. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-06-29 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 153612. malaperle added a comment. Add comment about AutoTypeLoc work-around. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48159 Files: clangd/XRefs.cpp unittests/clangd/TestTU.cpp unittests/clangd/TestTU.h unittests/clangd/XRef

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-07-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 153737. malaperle added a comment. Tweak comment with FIXME. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48159 Files: clangd/XRefs.cpp unittests/clangd/TestTU.cpp unittests/clangd/TestTU.h unittests/clangd/XRefsTests.cpp Index

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-07-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/XRefs.cpp:559 + //- auto& i = 1; + bool VisitDeclaratorDecl(DeclaratorDecl *D) { +if (!D->getTypeSourceInfo() || klimek wrote: > klimek wrote: > > malaperle wrote: > > > klimek wrote: > > > > sammccall wro

[PATCH] D48159: [clangd] Implement hover for "auto" and "decltype"

2018-07-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336119: [clangd] Implement hover for "auto" and "decltype" (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D48159 Files:

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-07-02 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 153742. malaperle added a comment. Rebased. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/FindSymbols.cpp c

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-07-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 154280. malaperle marked 7 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-07-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Thanks a lot for the great comments (as always)! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/

[PATCH] D47846: [clangd] Implementation of textDocument/documentSymbol

2018-07-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL336386: [clangd] Implementation of textDocument/documentSymbol (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47846 File

[PATCH] D48996: [clangd] Mark "Document Symbols" as implemented in the docs

2018-07-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D48996 Files: docs/clangd.rst Index: docs/clangd.rst ===

[PATCH] D48996: [clangd] Mark "Document Symbols" as implemented in the docs

2018-07-09 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL336550: [clangd] Mark "Document Symbols" as implemented in the docs (authored by malaperle, committed by ). Herald added a

[PATCH] D49523: [clangd] Add support for per-file override compilation command

2018-07-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Interesting! We also have a need for passing compilation commands in a context where there is no compile_commands.json, but we were thinking of putting this in a "didChangeConfiguration" message so that all the commands would be available even before files are opened.

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-10-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Herald added a subscriber: usaxena95. "Extend our extension to support detecting these files as C++ files based on the first line (-*- C++ -*-), it will make clangd work on C++ standard headers (e.g. iostream)." This is not in the standard right? I don't see this in MS

[PATCH] D63397: [clangd] Detect C++ for extension-less source files in vscode extension

2019-10-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In D63397#1696000 , @malaperle wrote: > "Extend our extension to support detecting these files as C++ files based on > the first > line (-*- C++ -*-), it will make clangd work on C++ standard headers > (e.g. iostream)." > > Th

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-22 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:230 + std::vector LocationVector; + auto test = Items->Value; + remove Comment at: clangd/ClangdLSPServer.cpp:236 + + C.reply(json::ary(LocationVector)); }

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdLSPServer.cpp:67 ); + if (Params.rootUri && !Params.rootUri->file.empty()) extra line

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:1245 + + for (unsigned I = 0; I < DocHighlightsFinder->getSourceRanges().size(); I++) { +HighlightLocations.push_back( malaperle wrote: > replace all this code (1242-1265) by moving it in Do

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:997 + DocumentHighlightKind Kind; + switch (Roles) { + case (unsigned)index::SymbolRole::Read: With this code, I always get "text" kind. It's because index::SymbolRoleSet is a bitf

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D38425#922408, @ioeric wrote: > Drive-by comment: in general, have you considered reusing the existing > declarations and occurrences finding functionalities in clang-rename? AFAIK, > it deals with templates and macros pretty well. > > o >

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdLSPServer.cpp:242 + + auto Items = Server + .findDocumentHighlights(Params.textDocument.uri.file,

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: test/clangd/documenthighlight.test:1 +# RUN: clangd -run-synchronously < %s | FileCheck %s +# It is absolutely vital that this file has CRLF l

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added a comment. This revision now requires changes to proceed. There were some things I missed, sorry about that! Comment at: clangd/main.cpp:1 +#define MACRO 1 +namespace ns1 { This files needs to be rem

[PATCH] D40450: [clangd] Refactoring of GlobalCompilationDatabase

2017-11-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. @Nebiroth , Will this be compatible with your patch to change CompilationDatabase at runtime? https://reviews.llvm.org/D39571 https://reviews.llvm.org/D40450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added a comment. This revision now requires changes to proceed. I tested the patch and it works quite well! I think those are the last comments from me. Sorry, I should have bundled them together a bit more :( Comment at:

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:246 + + C.reply(json::ary(Highlights->Value)); +} I get a test failure here because there is an assertion that the Expected<> needs to be checked. I can't really think of any failure case r

[PATCH] D40548: [clangd] Prototyping index support and naive index-based global code completion. WIP

2017-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Hi Eric! As you might know I'm working on persisted indexing. I was wondering which cases needed the index for code completion? Could you give a small example? I thought the AST alone would be sufficient for that. I'll look at this patch more closely a bit later but I

[PATCH] D38425: [clangd] Document highlights for clangd

2017-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:246 + + C.reply(json::ary(Highlights->Value)); +} malaperle wrote: > I get a test failure here because there is an assertion that the Expected<> > needs to be checked. I can't really think

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle requested changes to this revision. malaperle added inline comments. This revision now requires changes to proceed. Comment at: clangd/ClangdLSPServer.cpp:245 + + C.reply(Hover::unparse(H->Value)); +} we need to check the "Expected" here, so if (!H)

[PATCH] D35894: [clangd] Code hover for Clangd

2017-11-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdUnit.cpp:1173 +H.range = L.range; +Ref = getDataBufferFromSourceRange(AST, SR, L); + } malaperle wrote: > I get the same crash as I mentioned before if I hover on the class in > "isa(

<    1   2   3   4   >