Review Request 124007: Don't add functions for code-completion based on parameters.

Milian Wolff mail at milianw.de
Sun Jun 7 13:20:30 UTC 2015



> On June 6, 2015, 2:09 p.m., Milian Wolff wrote:
> > codecompletion/context.cpp, line 687
> > <https://git.reviewboard.kde.org/r/124007/diff/2/?file=378961#file378961line687>
> >
> >     else it gets lost - is that correct?
> 
> Sergey Kalinichev wrote:
>     Yes. This is intentional. This code path for the special completion identifier - "operator=" for which we don't have a declaration. E.g. "class A{}; a.|".  At | we get "operator=(const A&)" as completion item which is completely useless and just pollutes the test case.
>     
>     I've added a comment for it.

is it only for implicit declarations, i.e. will we still get operator== and the like? There are sometimes cases where one wants to write that, and having code completion for it can be useful. But I agree that it is very rare so we can keep it as-is for now. thanks for the clarification!


> On June 6, 2015, 2:09 p.m., Milian Wolff wrote:
> > codecompletion/context.cpp, line 442
> > <https://git.reviewboard.kde.org/r/124007/diff/2/?file=378961#file378961line442>
> >
> >     return nullptr;
> >     
> >     not sure what {} gives you here otherwise
> 
> Sergey Kalinichev wrote:
>     According to http://en.cppreference.com/w/cpp/language/list_initialization the value-initialization is used here. And according to http://en.cppreference.com/w/cpp/language/value_initialization it's zero-initialized. 
>     
>     But I've changed it to nullptr anyway.

true, thanks for looking it up. I prefer the nullptr here, as its much more explicit.


- Milian


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


On June 7, 2015, 8:12 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124007/
> -----------------------------------------------------------
> 
> (Updated June 7, 2015, 8:12 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> E.g.: class Abc; int f(Abc){ Ab|
> Completion invoked at the "|", that gives us "Abc" as a completion result. Before this we had "Abc" and "f(Abc)", which is obviously wrong.
>   
> Also this makes the "Detailed completion" option work.
> 
> 
> Diffs
> -----
> 
>   codecompletion/context.cpp 2bf8c81 
>   tests/test_codecompletion.cpp 470dcc0 
> 
> Diff: https://git.reviewboard.kde.org/r/124007/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

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


More information about the KDevelop-devel mailing list