malaperle (Marc-Andre Laperle)
User

Projects

User does not belong to any projects.

User Details

User Since
Jul 27 2016, 9:06 PM (116 w, 3 d)

Recent Activity

Fri, Oct 19

malaperle updated the diff for D52953: [lldb-mi] Implement -gdb-set breakpoint pending on/off.

Clang-format it

Fri, Oct 19, 9:38 PM · Restricted Project

Thu, Oct 18

malaperle added a comment to D52953: [lldb-mi] Implement -gdb-set breakpoint pending on/off.

And there is no reviewers set :)

Thu, Oct 18, 9:27 PM · Restricted Project
malaperle added a comment to D52953: [lldb-mi] Implement -gdb-set breakpoint pending on/off.

Gentle ping?

Thu, Oct 18, 7:47 PM · Restricted Project

Fri, Oct 5

malaperle set the repository for D52953: [lldb-mi] Implement -gdb-set breakpoint pending on/off to rL LLVM.
Fri, Oct 5, 3:49 PM · Restricted Project
malaperle created D52953: [lldb-mi] Implement -gdb-set breakpoint pending on/off.
Fri, Oct 5, 3:47 PM · Restricted Project

Sep 15 2018

malaperle added a comment to D52089: [clangd] Get rid of AST matchers in SymbolCollector. NFC.

why?

I wanted to get some numbers and update the patch summary, but somehow forgot. Sorry about that and thanks for asking!

The AST matcher pops up in performance profile. Although not the most expensive thing we could optimize, this still brings indexAST latency from ~5.3s to ~4.4s for a large TU with big preamble.

Sep 15 2018, 4:47 PM

Sep 14 2018

malaperle added a comment to D52089: [clangd] Get rid of AST matchers in SymbolCollector. NFC.

why?

Sep 14 2018, 6:42 PM

Aug 18 2018

malaperle added a comment to D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation.

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 it! I was under the impression that it's feature-complete. Should I mark it "Partial" until this is fixed then?

Aug 18 2018, 10:17 AM · Restricted Project

Aug 17 2018

malaperle added a comment to D50703: [clangd] NFC: Mark Workspace Symbol feature complete in the documentation.

I hadn't marked it as done because without symbols in main files I found it quite lacking.

Aug 17 2018, 6:05 PM · Restricted Project

Aug 4 2018

malaperle added a comment to D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name.

Both check-clang and check-clang-tools pass successfully for me on Windows with the patch.

Aug 4 2018, 9:42 AM

Aug 3 2018

malaperle added a comment to D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name.

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

Aug 3 2018, 10:04 PM
malaperle added a comment to D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name.

If somebody else could run the tests on Windows, it would make me a bit more confident too.

Aug 3 2018, 7:31 PM

Jul 31 2018

malaperle added a comment to D49833: [clangd] Receive compilationDatabasePath in 'initialize' request.

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

Jul 31 2018, 9:22 AM

Jul 30 2018

malaperle added a comment to D49833: [clangd] Receive compilationDatabasePath in 'initialize' request.

Was there any objection to this patch? It would have been nice to have this before the branching.

Jul 30 2018, 8:27 PM

Jul 27 2018

malaperle planned changes to D49920: [clangd] [WIP] Find references of local symbols.

Needs tests.

Jul 27 2018, 12:02 PM
malaperle updated the diff for D49920: [clangd] [WIP] Find references of local symbols.

Fix silly bug I introduced in last minute clean-up.

Jul 27 2018, 12:01 PM
malaperle added a reviewer for D49920: [clangd] [WIP] Find references of local symbols: simark.
Jul 27 2018, 10:51 AM
malaperle created D49920: [clangd] [WIP] Find references of local symbols.
Jul 27 2018, 10:50 AM

Jul 26 2018

malaperle added a comment to D49833: [clangd] Receive compilationDatabasePath in 'initialize' request.

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?

Jul 26 2018, 12:54 PM
malaperle edited reviewers for D49758: [clangd] allow clients to pass in compilationDatabaseChanges in the 'workspace/didChangeConfiguration' request, added: malaperle; removed: malaperle-ericsson.
Jul 26 2018, 10:25 AM · Restricted Project

Jul 25 2018

malaperle added a reviewer for D49833: [clangd] Receive compilationDatabasePath in 'initialize' request: simark.
Jul 25 2018, 8:48 PM
malaperle created D49833: [clangd] Receive compilationDatabasePath in 'initialize' request.
Jul 25 2018, 8:47 PM

Jul 24 2018

malaperle added inline comments to D49267: [clangd] Watch for changes in compile_commands.json.
Jul 24 2018, 7:47 AM

Jul 20 2018

malaperle added a comment to D49523: [clangd] Add support for per-file override compilation command.

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. This would be allow Clangd to have the necessary information for background indexing which would include unopened files. Subsequent changes to compilation commands would probably go through a similar didChangeConfiguration and the appropriate (opened) files would get reparsed (not unlike D49267). I'm making a few guesses here: I assume that in the context of XCode, you would not do background indexing in Clangd but let XCode do it as it can also coordinate (and not overlap) with build tasks. Is that correct? In any case, I think the approach in the patch is not incompatible with what we had in mind, i.e. we could also reuse "overrideCompilationCommandForFile" for each file specified in didChangeConfiguration. I'm point this out because if you *do* end up needing all the compilation commands beforehand like I mentioned, then maybe we can skip the approach of specifying them with didOpen and send them all with didChangeConfiguration from start.

Thanks for your response,
As it stands right now we will not run the indexer in Clangd for our use case, and it's unclear if we can even assemble a set of compile commands, so we would like to provide the commands when a file is open. We might be interested in a "didChangeConfiguration" message extension in the future (ideally it would be possible to change the subset of the constructed compilation database).

Jul 20 2018, 7:35 AM · Restricted Project

Jul 18 2018

malaperle added a comment to D49523: [clangd] Add support for per-file override compilation command.

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. This would be allow Clangd to have the necessary information for background indexing which would include unopened files. Subsequent changes to compilation commands would probably go through a similar didChangeConfiguration and the appropriate (opened) files would get reparsed (not unlike D49267). I'm making a few guesses here: I assume that in the context of XCode, you would not do background indexing in Clangd but let XCode do it as it can also coordinate (and not overlap) with build tasks. Is that correct? In any case, I think the approach in the patch is not incompatible with what we had in mind, i.e. we could also reuse "overrideCompilationCommandForFile" for each file specified in didChangeConfiguration. I'm point this out because if you *do* end up needing all the compilation commands beforehand like I mentioned, then maybe we can skip the approach of specifying them with didOpen and send them all with didChangeConfiguration from start.

Jul 18 2018, 7:59 PM · Restricted Project
malaperle updated subscribers of D49523: [clangd] Add support for per-file override compilation command.
Jul 18 2018, 7:26 PM · Restricted Project

Jul 10 2018

malaperle updated subscribers of D40992: Add index-while-building support to Clang - Part 2.
Jul 10 2018, 11:14 AM

Jul 9 2018

malaperle committed rCTE336550: [clangd] Mark "Document Symbols" as implemented in the docs.
[clangd] Mark "Document Symbols" as implemented in the docs
Jul 9 2018, 7:39 AM
malaperle committed rL336550: [clangd] Mark "Document Symbols" as implemented in the docs.
[clangd] Mark "Document Symbols" as implemented in the docs
Jul 9 2018, 7:39 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Jul 9 2018, 7:39 AM

Jul 5 2018

malaperle created D48996: [clangd] Mark "Document Symbols" as implemented in the docs.
Jul 5 2018, 2:09 PM
malaperle committed rCTE336386: [clangd] Implementation of textDocument/documentSymbol.
[clangd] Implementation of textDocument/documentSymbol
Jul 5 2018, 12:40 PM
malaperle committed rL336386: [clangd] Implementation of textDocument/documentSymbol.
[clangd] Implementation of textDocument/documentSymbol
Jul 5 2018, 12:40 PM
malaperle closed D47846: [clangd] Implementation of textDocument/documentSymbol.
Jul 5 2018, 12:40 PM
malaperle added a comment to D47846: [clangd] Implementation of textDocument/documentSymbol.

Thanks a lot for the great comments (as always)!

Jul 5 2018, 12:01 PM
malaperle updated the diff for D47846: [clangd] Implementation of textDocument/documentSymbol.

Address comments.

Jul 5 2018, 12:01 PM

Jul 2 2018

malaperle updated the diff for D47846: [clangd] Implementation of textDocument/documentSymbol.

Rebased.

Jul 2 2018, 9:37 AM
malaperle committed rCTE336119: [clangd] Implement hover for "auto" and "decltype".
[clangd] Implement hover for "auto" and "decltype"
Jul 2 2018, 9:33 AM
malaperle committed rL336119: [clangd] Implement hover for "auto" and "decltype".
[clangd] Implement hover for "auto" and "decltype"
Jul 2 2018, 9:33 AM
malaperle closed D48159: [clangd] Implement hover for "auto" and "decltype".
Jul 2 2018, 9:33 AM
malaperle added inline comments to D48159: [clangd] Implement hover for "auto" and "decltype".
Jul 2 2018, 9:28 AM
malaperle updated the diff for D48159: [clangd] Implement hover for "auto" and "decltype".

Tweak comment with FIXME.

Jul 2 2018, 9:28 AM

Jun 29 2018

malaperle updated the diff for D48159: [clangd] Implement hover for "auto" and "decltype".

Add comment about AutoTypeLoc work-around.

Jun 29 2018, 9:38 PM
malaperle updated the diff for D47846: [clangd] Implementation of textDocument/documentSymbol.

Fix handling of externs, definition vs declaration and call more common code.

Jun 29 2018, 9:16 PM
malaperle added inline comments to D47846: [clangd] Implementation of textDocument/documentSymbol.
Jun 29 2018, 1:22 PM

Jun 28 2018

malaperle added inline comments to D48159: [clangd] Implement hover for "auto" and "decltype".
Jun 28 2018, 1:41 PM
malaperle removed a reviewer for D48687: [clangd] Avoid duplicates in findDefinitions response: malaperle-ericsson.
Jun 28 2018, 7:36 AM
malaperle added a comment to D48687: [clangd] Avoid duplicates in findDefinitions response.

Thanks for the patch!
Could we try to figure out why the duplicates were there in the first place and why the paths were different?

I tried to do that, but it goes deep in the clang internals with which I'm not familiar. All I could see was that when creating the FileEntry representing the /home/emaisin/src/ls-interact/cpp-test/build/../src/first.h file, FileManager::getFile is called with OpenFile=false. This makes it so that the RealPathName field is not set (at FileManager.cpp:320). Because RealPathName is not set (well, empty), we use the non-normalized name in getAbsoluteFilePath. That's all I can tell.

Jun 28 2018, 5:59 AM

Jun 27 2018

malaperle updated the diff for D48159: [clangd] Implement hover for "auto" and "decltype".

Address comments.

Jun 27 2018, 12:28 PM
malaperle added inline comments to D48159: [clangd] Implement hover for "auto" and "decltype".
Jun 27 2018, 12:27 PM

Jun 26 2018

malaperle planned changes to D47846: [clangd] Implementation of textDocument/documentSymbol.

I found some issues while testing, I will investigate before review.

Jun 26 2018, 9:19 PM
malaperle added reviewers for D48159: [clangd] Implement hover for "auto" and "decltype": ilya-biryukov, ioeric, sammccall.
Jun 26 2018, 2:05 PM
malaperle updated the diff for D48159: [clangd] Implement hover for "auto" and "decltype".

Rebased.

Jun 26 2018, 2:05 PM
malaperle added reviewers for D47846: [clangd] Implementation of textDocument/documentSymbol: sammccall, ilya-biryukov, ioeric.
Jun 26 2018, 1:58 PM
malaperle updated the diff for D47846: [clangd] Implementation of textDocument/documentSymbol.

Rebased.

Jun 26 2018, 1:52 PM
malaperle committed rCTE335624: [clangd] Simplify matches in FindSymbols tests.
[clangd] Simplify matches in FindSymbols tests
Jun 26 2018, 10:02 AM
malaperle committed rL335624: [clangd] Simplify matches in FindSymbols tests.
[clangd] Simplify matches in FindSymbols tests
Jun 26 2018, 10:02 AM
malaperle closed D47847: [clangd] Simplify matches in FindSymbols tests.
Jun 26 2018, 10:02 AM
malaperle accepted D47847: [clangd] Simplify matches in FindSymbols tests.

Self-approving because this is pretty inconsequential.

Jun 26 2018, 9:59 AM

Jun 22 2018

malaperle updated the diff for D47847: [clangd] Simplify matches in FindSymbols tests.

Rebased.

Jun 22 2018, 1:04 PM

Jun 13 2018

malaperle created D48159: [clangd] Implement hover for "auto" and "decltype".
Jun 13 2018, 8:33 PM
malaperle added a comment to D48071: [clangd] Add an option controlling caching of compile commands..

Does this change affect the switching of compilation database, through workspace/didChangeConfiguration ?

Jun 13 2018, 7:09 AM

Jun 11 2018

malaperle added a comment to D47950: [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther".

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 "standard". But it doesn't look like there is any way to control this in the LSP, is there?

That's right. VSCode applies its fuzzymatch again client-side to determine which characters to highlight, and it chooses the wrong (IMO) "d" here. We wouldn't match [std] against "getStandardResourceZir".
(Worse, they use the same algorithm to rerank our results if client-side filtering applies...)

Jun 11 2018, 10:19 AM
malaperle added a comment to D47950: [clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther".

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 "standard". But it doesn't look like there is any way to control this in the LSP, is there?

Jun 11 2018, 8:58 AM

Jun 6 2018

malaperle added a reviewer for D47847: [clangd] Simplify matches in FindSymbols tests: simark.
Jun 6 2018, 2:42 PM
malaperle added inline comments to D47846: [clangd] Implementation of textDocument/documentSymbol.
Jun 6 2018, 2:42 PM
malaperle created D47847: [clangd] Simplify matches in FindSymbols tests.
Jun 6 2018, 2:36 PM
malaperle added a comment to D47821: [clangd] Make workspace/symbols actually rank its results..

This works much better! Just a nit.

Jun 6 2018, 2:17 PM
malaperle created D47846: [clangd] Implementation of textDocument/documentSymbol.
Jun 6 2018, 2:11 PM

Jun 5 2018

malaperle committed rL334018: [clangd] Remove unused variables.
[clangd] Remove unused variables
Jun 5 2018, 7:12 AM
malaperle committed rCTE334018: [clangd] Remove unused variables.
[clangd] Remove unused variables
Jun 5 2018, 7:12 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Jun 5 2018, 7:12 AM
This revision was not accepted when it landed; it landed in state Needs Review.
Jun 5 2018, 7:12 AM
malaperle committed rL334017: [clangd] Add "member" symbols to the index.
[clangd] Add "member" symbols to the index
Jun 5 2018, 7:06 AM
malaperle committed rCTE334017: [clangd] Add "member" symbols to the index.
[clangd] Add "member" symbols to the index
Jun 5 2018, 7:06 AM
malaperle closed D44954: [clangd] Add "member" symbols to the index.
Jun 5 2018, 7:06 AM
malaperle closed D44954: [clangd] Add "member" symbols to the index.
Jun 5 2018, 7:06 AM

Jun 4 2018

malaperle added a comment to D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream..

PS I've checked it on my Mac and lldb seems to attach just fine.

Jun 4 2018, 9:17 PM
malaperle created D47737: [clangd] Remove unused variables.
Jun 4 2018, 12:33 PM

Jun 3 2018

malaperle added a comment to D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream..

@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 than me are complaining about old clangds hanging around and eating all their CPU :-)

Jun 3 2018, 9:55 PM

Jun 1 2018

malaperle added inline comments to D44954: [clangd] Add "member" symbols to the index.
Jun 1 2018, 12:33 PM
malaperle updated the diff for D44954: [clangd] Add "member" symbols to the index.

Address comments.

Jun 1 2018, 12:33 PM

May 30 2018

malaperle updated the diff for D44954: [clangd] Add "member" symbols to the index.

Update with suggestions.

May 30 2018, 2:37 PM
malaperle added inline comments to D44954: [clangd] Add "member" symbols to the index.
May 30 2018, 2:35 PM

May 28 2018

malaperle added inline comments to D44954: [clangd] Add "member" symbols to the index.
May 28 2018, 11:58 AM
malaperle added inline comments to D44954: [clangd] Add "member" symbols to the index.
May 28 2018, 11:54 AM
malaperle updated the diff for D44954: [clangd] Add "member" symbols to the index.

Address comments.

May 28 2018, 11:54 AM

May 24 2018

malaperle updated subscribers of D47187: [clangd] Skip .inc headers when canonicalizing header #include..

I think this might have broken the "shared lib" build? Could you double check that you don't need to add "clangDriver" ?

May 24 2018, 8:56 AM

May 23 2018

malaperle added a comment to D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums.

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 we won't get enumerators in the following example:

/// foo.h
enum Foo {
  A, B, C
};

/// foo.cpp
#include "foo.h"

int a = ^ // <-- A, B, C should be in completion list here.
May 23 2018, 7:33 PM
malaperle updated the diff for D44954: [clangd] Add "member" symbols to the index.

Use "SupportGlobalCompletion", white-list decl contexts, add more tests

May 23 2018, 7:23 PM
malaperle added a comment to D47272: [clangd] Build index on preamble changes instead of the AST changes.

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.

I can add extra code to build pieces for the AST later. This is not hard to do, but would require rearranging some code a bit more.
Will try to send the change tomorrow for review tomorrow. Does that SG?

May 23 2018, 11:38 AM
malaperle added a comment to D47272: [clangd] Build index on preamble changes instead of the AST changes.

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.

May 23 2018, 11:28 AM

May 22 2018

malaperle added a comment to D44954: [clangd] Add "member" symbols to the index.

What scopes will non-scoped enum members have?

Hmm. I think all of them, since you can refer them like that in code too. Case #1 doesn't work but that was the case before this patch so it can probably be addressed separately. I'll add some tests though!

I would vote for making queries En::A and A match the enumerator, but not ::A. The reasoning is: yes, you can reference it this way in a C++ file, but workspaceSymbol is not a real C++ resolve and I think it should match the outline of the code rather than the actual C++ lookup rules.
E.g. I wouldn't expect it to match symbols from base classes, etc. This should also simplify implementation too.

I don't have a strong opinion, so I can try this suggestion!

May 22 2018, 1:42 PM
malaperle added a reviewer for D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums: ilya-biryukov.
May 22 2018, 1:42 PM
malaperle created D47223: [clangd] Handle enumerators in named, unscoped enums similarly to scoped enums.
May 22 2018, 1:36 PM

May 18 2018

malaperle added a comment to D44954: [clangd] Add "member" symbols to the index.

It's probably better to consider this in a future patch. Maybe something like the first suggestion: vector::push_back and match both. Otherwise, I would think it might be a bit too verbose to have to spell out all of the specialization. Maybe we could allow it too. So... all of the above? :)

This certainly does not have to be addressed in this patch. Just wanted to collect opinions on what the behavior we want in the long term.
My thoughts would be towards allowing only vector::push_back and make it match both push_backs: in vector<bool> and vector<T>.
Other cases might work too, but I wouldn't try implementing something that matches specializations. It's just too complicated in the general case. This will only be used in workspaceSymbol and it's fine to give a few more results there...

May 18 2018, 7:57 AM
malaperle updated subscribers of D47063: [clangd] Keep only a limited number of idle ASTs in memory.

Maybe we can even store enough information to not need the AST for navigation at all and build it only for features like refactorings.
@sammccall, let me know what are your thoughts on all of this.

May 18 2018, 7:56 AM

May 17 2018

malaperle added a comment to D44954: [clangd] Add "member" symbols to the index.

A few questions regarding class members. To pinpoint some interesting cases and agree on how we want those to behave in the long run.

How do we handle template specializations? What will the qualified names of those instantiations be?
I.e. how do I query for push_back inside a vector? Which of the following queries should produce a result?

  • vector::push_back. Should it match both vector<T>::push_back and vector<bool>::push_back or only the first one?
  • vector<bool>::push_back
  • vector<int>::push_back
May 17 2018, 1:42 PM

May 16 2018

malaperle added a comment to D44954: [clangd] Add "member" symbols to the index.

@ioeric You mentioned in D46751 that it would make sense to add a flag to disable indexing members. Could you comment on that? What kind of granularity were you thinking? Would a "member" flag cover both class members (member vars and functions) and enum class enumerators for example? I think that would be reasonable. But I will also add symbols in main files too, so another flag for that? Hmmm.

May 16 2018, 1:07 PM
malaperle added a reviewer for D44954: [clangd] Add "member" symbols to the index: ioeric.
May 16 2018, 1:04 PM