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

Sergey Kalinichev kalinichev.so.0 at gmail.com
Wed Jun 3 07:54:13 UTC 2015



> On June 3, 2015, 10: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

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.


- Sergey


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


On June 3, 2015, 10: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, 10: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/39adfbbe/attachment.html>


More information about the KDevelop-devel mailing list