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

2019-10-05 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)." > >

[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

[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 |

[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:

[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

[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) { +

[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) { +

[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

[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

[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:

[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/

[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: > >

[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

[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)) {

[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:

[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

[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/

[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] 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

[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-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

[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-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

[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

[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

[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-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:

[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

[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:

[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-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-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

[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

[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] 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] D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation

2018-08-18 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D50703#1205109, @kbobyrev wrote: > In https://reviews.llvm.org/D50703#1205049, @malaperle wrote: > > > I hadn't marked it as done because without symbols in main files I found it > > quite lacking. > > > Ah, I see, thank you for spotting

[PATCH] D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation

2018-08-17 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Herald added a subscriber: kadircet. I hadn't marked it as done because without symbols in main files I found it quite lacking. Repository: rL LLVM https://reviews.llvm.org/D50703 ___ cfe-commits mailing list

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-08-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Both check-clang and check-clang-tools pass successfully for me on Windows with the patch. Repository: rC Clang https://reviews.llvm.org/D48903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-08-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D48903#1188437, @malaperle wrote: > In https://reviews.llvm.org/D48903#1187605, @simark wrote: > > > If somebody else could run the tests on Windows, it would make me a bit > > more confident too. > > > Which tests/targets exactly? If you

[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

2018-08-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D48903#1187605, @simark wrote: > If somebody else could run the tests on Windows, it would make me a bit more > confident too. Which tests/targets exactly? If you know Repository: rC Clang https://reviews.llvm.org/D48903

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-31 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. @simark would you mind finishing this patch and committing it? I won't be able to finish it given that I started it at a different company, etc. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49833 ___

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-30 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Was there any objection to this patch? It would have been nice to have this before the branching. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49833 ___ cfe-commits mailing list

[PATCH] D49920: [clangd] [WIP] Find references of local symbols

2018-07-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added a comment. Needs tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D49920: [clangd] [WIP] Find references of local symbols

2018-07-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 157732. malaperle added a comment. Fix silly bug I introduced in last minute clean-up. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49920 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp

[PATCH] D49920: [clangd] [WIP] Find references of local symbols

2018-07-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, arphaman, mgrang, jkorous, MaskRay, ioeric, ilya-biryukov. We do not have a global index of references but we can find the references of local symbols within the AST in the mean time. Also, since we will not record local

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-26 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D49833#1176337, @ilya-biryukov wrote: > Not strictly opposed to this change, but is there any reason why the clients > can't guarantee they'll send didChangeConfiguration right after clangd is > initialized? LSP: > Until the server has

[PATCH] D49833: [clangd] Receive compilationDatabasePath in 'initialize' request

2018-07-25 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. That way, as soon as the "initialize" is received by the server, it can start parsing/indexing with a valid compilation database and not have to wait for a an initial

[PATCH] D49267: [clangd] Watch for changes in compile_commands.json

2018-07-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/ClangdLSPServer.cpp:430 CDB.clear(); - -reparseOpenedFiles(); +compileCommandsChangePost(CCChangeData); } ilya-biryukov wrote: > Maybe keep the old logic of reparsing all open files? This would

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

2018-07-20 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D49523#1169000, @arphaman wrote: > In https://reviews.llvm.org/D49523#1167553, @malaperle wrote: > > > Interesting! We also have a need for passing compilation commands in a > > context where there is no compile_commands.json, but we were

[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

[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] 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] 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

[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

[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

[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

[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] 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

[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

[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

[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

[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 sammccall wrote: > I guess the alternative here is

[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] 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

[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:

[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

[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

[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:

[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

[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:

[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 ___

[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] 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

[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

[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

[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

[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

[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.

[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] 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

[PATCH] D47737: [clangd] Remove unused variables

2018-06-05 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 rL334018: [clangd] Remove unused variables (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits.

[PATCH] D47737: [clangd] Remove unused variables

2018-06-05 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 rCTE334018: [clangd] Remove unused variables (authored by malaperle, committed by ). Changed prior to commit:

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL334017: [clangd] Add member symbols to the index (authored by malaperle, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44954 Files:

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-05 Thread Marc-Andre Laperle via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE334017: [clangd] Add member symbols to the index (authored by malaperle, committed by ). Changed prior to commit: https://reviews.llvm.org/D44954?vs=149532=149970#toc Repository: rCTE Clang Tools

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47643#1120913, @ilya-biryukov wrote: > PS I've checked it on my Mac and lldb seems to attach just fine. Working fine in my setup too! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47643

[PATCH] D47737: [clangd] Remove unused variables

2018-06-04 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, jkorous, MaskRay, ioeric, ilya-biryukov, klimek. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D47737 Files: clangd/ClangdServer.cpp Index: clangd/ClangdServer.cpp

[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

2018-06-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47643#1119187, @sammccall wrote: > @malaperle: would you mind patching this in and checking whether attaching a > debugger still works on Mac (this was the reason for the EINTR loop, right?) > > I want to preserve this but now people other

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 149532. malaperle marked 4 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-06-01 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/CodeCompleteTests.cpp:741 +TEST(CompletionTest, Enums) { + EXPECT_THAT(completions(R"cpp( ioeric wrote: > malaperle wrote: > > ioeric wrote: > > > It's not clear to me what the following tests

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-30 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 149206. malaperle added a comment. Update with suggestions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/index/Index.h clangd/index/MemIndex.cpp

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-30 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked an inline comment as done. malaperle added inline comments. Comment at: clangd/index/Index.h:158 unsigned References = 0; - + /// Whether or not this is symbol is meant to be used for the global + /// completion. sammccall wrote: > ioeric

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: unittests/clangd/SymbolCollectorTests.cpp:141 Args.insert(Args.end(), ExtraArgs.begin(), ExtraArgs.end()); +Args.push_back(TestFileName); + This allows to override the "-xc++" with something else, i.e.

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added inline comments. Comment at: clangd/index/SymbolCollector.cpp:158 + translationUnitDecl(), namespaceDecl(), linkageSpecDecl(), recordDecl(), + enumDecl(), objcProtocolDecl(), objcInterfaceDecl(), objcCategoryDecl(), + objcCategoryImplDecl(),

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 148834. malaperle marked 6 inline comments as done. malaperle added a comment. Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/index/Index.h clangd/index/MemIndex.cpp

[PATCH] D47187: [clangd] Skip .inc headers when canonicalizing header #include.

2018-05-24 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added subscribers: ioeric, sammccall, malaperle. malaperle added a comment. I think this might have broken the "shared lib" build? Could you double check that you don't need to add "clangDriver" ? ../tools/clang/tools/extra/clangd/index/CanonicalIncludes.cpp:61: error: undefined

[PATCH] D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47223#1109247, @ilya-biryukov wrote: > I'm not sure if we have tests for that, but I remember that we kept the > enumerators in the outer scope so that completion could find them.. > Am I right that this patch will change the behavior and

[PATCH] D44954: [clangd] Add "member" symbols to the index

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 148329. malaperle added a comment. Use "SupportGlobalCompletion", white-list decl contexts, add more tests Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44954 Files: clangd/CodeComplete.cpp clangd/index/Index.h

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. In https://reviews.llvm.org/D47272#1109914, @ilya-biryukov wrote: > In https://reviews.llvm.org/D47272#1109909, @malaperle wrote: > > > > We do not to rely on symbols from the main file anyway, since any info > > > hat those provide can always be taken from the AST. >

[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

2018-05-23 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. > We do not to rely on symbols from the main file anyway, since any info hat > those provide can always be taken from the AST. I'll be adding those soon for workspace symbols... And also for document symbols. Repository: rCTE Clang Tools Extra

  1   2   3   4   >