Make lambda introduce a context in DU chain
ClosedPublic

Authored by gracicot on Mar 14 2018, 12:35 AM.

Details

Summary

Lambda in clang completion were not introducing a context. This
had the effect of making all local variable in a global lambda
highlighted as a global

Before:

After:

Fixes https://bugs.kde.org/show_bug.cgi?id=387994

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
gracicot created this revision.Mar 14 2018, 12:35 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptMar 14 2018, 12:35 AM
gracicot requested review of this revision.Mar 14 2018, 12:35 AM
gracicot edited the summary of this revision. (Show Details)Mar 14 2018, 12:37 AM
gracicot edited the test plan for this revision. (Show Details)
gracicot added a reviewer: KDevelop.
gracicot edited the summary of this revision. (Show Details)
mwolff added a subscriber: mwolff.Mar 14 2018, 7:41 AM

awesome! the patch looks really good, but can you please also add a unit test?

gracicot updated this revision to Diff 29506.EditedMar 14 2018, 2:54 PM

Of course. This is my first unit test, tell me if this one is okay. It passes on my machine. Before my patch, only one context with 6 declaration was created.

Added commit:

  • Added unit test for context introduced by lambdas
mwolff accepted this revision.Mar 14 2018, 5:48 PM

excellent, lgtm. do you have commit rights?

This revision is now accepted and ready to land.Mar 14 2018, 5:48 PM
gracicot added a comment.EditedMar 14 2018, 5:50 PM

excellent, lgtm. do you have commit rights?

I don't think so. My last patches were landed by @kfunk I think.

gracicot added a subscriber: kfunk.Mar 14 2018, 6:01 PM
This revision was automatically updated to reflect the committed changes.