Review Request: Further improve auto-completion in switch statements.

Ivan Shapovalov intelfx100 at gmail.com
Mon Jul 16 08:37:38 UTC 2012



> On July 15, 2012, 12:50 a.m., Olivier Jean de Gaalon wrote:
> > languages/cpp/codecompletion/context.cpp, lines 1973-1984
> > <http://git.reviewboard.kde.org/r/105561/diff/2/?file=72678#file72678line1973>
> >
> >     Nitpicky: Prefer "&&" to nested ifs without elses.

...Here be dragons^W monstrous 5-line conditionals.


> On July 15, 2012, 12:50 a.m., Olivier Jean de Gaalon wrote:
> > languages/cpp/tests/test_cppcodecompletion.cpp, line 497
> > <http://git.reviewboard.kde.org/r/105561/diff/2/?file=72680#file72680line497>
> >
> >     This isn't needed

Ah, damn. Forgot to clear my own debug statement.


- Ivan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105561/#review15867
-----------------------------------------------------------


On July 16, 2012, 8:37 a.m., Ivan Shapovalov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105561/
> -----------------------------------------------------------
> 
> (Updated July 16, 2012, 8:37 a.m.)
> 
> 
> Review request for KDevelop and Olivier Jean de Gaalon.
> 
> 
> Description
> -------
> 
> Only compile-time integral constants are valid in "case ..."
> statements, so filter any certainly non-constant completion items.
> 
> This has 2 usability issues (well, not issues, but questionable points):
> 1) We do not filter type-names since they can be used either as scopes
> (SomeType::someConstant) or as ctor-like initializers
> (SomeIntegralTypedef(42)).
> 2) We do not filter integer-returning functions since they
> can be constexpr (thus syntactically usable) but we cannot handle
> constexpr now.
> 
> But, since one rarely would use these items, their match quality
> is forced to zero in order to avoid pollution of "best matches".
> 
> 
> Diffs
> -----
> 
>   languages/cpp/codecompletion/context.h e17fe7c 
>   languages/cpp/codecompletion/context.cpp 34bc728 
>   languages/cpp/tests/test_cppcodecompletion.h f88eb01 
>   languages/cpp/tests/test_cppcodecompletion.cpp eb44618 
> 
> Diff: http://git.reviewboard.kde.org/r/105561/diff/
> 
> 
> Testing
> -------
> 
> Unit-tests have been made aware of the newly-introduced filtering (+ added a new unit-test verifying the filtering itself); usability has been discussed with Olivier Jean de Gaalon.
> 
> 
> Thanks,
> 
> Ivan Shapovalov
> 
>

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


More information about the KDevelop-devel mailing list