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

Sergey Kalinichev kalinichev.so.0 at gmail.com
Sun Jun 7 08:15:40 UTC 2015



> On June 6, 2015, 5: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

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.


> On June 6, 2015, 5:09 p.m., Milian Wolff wrote:
> > codecompletion/context.cpp, line 660
> > <https://git.reviewboard.kde.org/r/124007/diff/2/?file=378961#file378961line660>
> >
> >     just to clarify: this is not required anymore, now that overloaded functions are properly handled - correct?

Precisely. Also see the TestCodeCompletion::testOverloadedFunctions() test, which still pass.


> On June 6, 2015, 5: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?

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.


- Sergey


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


On June 7, 2015, 11: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, 11: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/aafb91e3/attachment.html>


More information about the KDevelop-devel mailing list