Review Request 124601: Added look-ahead matching code completion

Sergey Kalinichev kalinichev.so.0 at gmail.com
Tue Aug 4 09:17:41 UTC 2015



> On Aug. 3, 2015, 1:21 p.m., Olivier Jean de Gaalon wrote:
> > I don't mean to be a bother, but I don't see the point of this. Useful lookahead completion involves checking for possible type conversions and operator->, which can only be usefully done inside of clang (we don't want to do that logic based on the duchain).
> > IMO this feature should be dropped unless someone can get it into clang, otherwise it's not useful enough to justify adding it (especially not on-by-default).
> > 
> > If anyone else feels differently, then ship it, of course... but I'd even like it off by default to avoid the performance hit.

Yes, that would be the ideal solution.
Otoh if at least more types were exposed through LibClang and Clang provided types for matching, the current approach would be much more useful...

Btw, the performance penalty is not that severe (about 30ms for me.)


- Sergey


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124601/#review83369
-----------------------------------------------------------


On Aug. 3, 2015, 1:02 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124601/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2015, 1:02 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> Known shortcomings:
> 
> 1)Auto type (and many other types) is not exposed through LibClang. So we assign DelayedType to it instead of IdentifiedType, therefore no declaration attached to the type, hence no look-ahead completion.
> 
> 2)LibClang missing API to determine expected code completion type. To workaround it, now we use types of declarations from the best mathes group. Therefore if no declarations found with a high enough priority, no items will be added to the look-ahead completion group.
> 
> As a result the look-ahead completion works only in the simpliest cases.
> 
> 
> Diffs
> -----
> 
>   clangsettings/clangsettingsmanager.h 0d6eec1 
>   clangsettings/clangsettingsmanager.cpp db125f3 
>   clangsettings/sessionsettings/sessionconfig.kcfg 63fb6c5 
>   clangsettings/sessionsettings/sessionsettings.ui 74a157f 
>   codecompletion/context.cpp 1d52021 
>   tests/test_codecompletion.cpp fca922d 
> 
> Diff: https://git.reviewboard.kde.org/r/124601/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150804/67f0e1cc/attachment.html>


More information about the KDevelop-devel mailing list