Review Request 123987: Don't create declarations for anonymous function parameters

Milian Wolff mail at milianw.de
Wed Jun 3 08:21:06 UTC 2015



> On June 3, 2015, 7:22 a.m., Milian Wolff wrote:
> > duchain/builder.cpp, line 785
> > <https://git.reviewboard.kde.org/r/123987/diff/1/?file=378686#file378686line785>
> >
> >     this is very costly for the common case of non-empty identifiers. could you instead use the range and check whether that is empty please? i.e. skip the string conversion
> 
> Sergey Kalinichev wrote:
>     I've just tried it, but both: clang_Cursor_getSpellingNameRange and clang_getCursorExtent return non empty ranges, is there any other method?
>     Also this path is called for function parameters only which is not so often, so I don't think it's a problem at all.

Then please add a comment like "TODO: find a way to do this without a costly string conversion" and I'll take a look at it.

thanks!


- Milian


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


On June 3, 2015, 7:04 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123987/
> -----------------------------------------------------------
> 
> (Updated June 3, 2015, 7:04 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> E.g.: void f(int);
> The int parameter is anonymous, so instead of creting a declaration pointing at the ) we do nothing here.
> 
> 
> Diffs
> -----
> 
>   duchain/builder.cpp 4165cfc 
>   tests/files/variables.cpp 71935e9 
> 
> Diff: https://git.reviewboard.kde.org/r/123987/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

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


More information about the KDevelop-devel mailing list