Review Request 125013: Create uses for declarations instead of definitions

Sergey Kalinichev kalinichev.so.0 at gmail.com
Tue Sep 1 19:05:23 UTC 2015



> On Sept. 1, 2015, 2:31 p.m., Kevin Funk wrote:
> > duchain/builder.cpp, line 1253
> > <https://git.reviewboard.kde.org/r/125013/diff/1/?file=399869#file399869line1253>
> >
> >     This seems expensive. Can't we leverage Clang API here? I.e. passing the cursor from `clang_getCanonicalCursor(referenced)` into `findDeclaration(...)` (and remove this hunk again)?

Yeah, that's an interesting idea! Sadly it doesn't work for function templates, but I've added a workaround for it.


- Sergey


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


On Sept. 1, 2015, 10:03 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125013/
> -----------------------------------------------------------
> 
> (Updated Sept. 1, 2015, 10:03 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> This solves problems with missing uses, when function definition differs from function declaration. This happens e.g. with some unexposed types (see the added test).
> 
> 
> Diffs
> -----
> 
>   duchain/builder.cpp fc177b6 
>   tests/test_duchain.h 637c191 
>   tests/test_duchain.cpp 09e0760 
> 
> Diff: https://git.reviewboard.kde.org/r/125013/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

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


More information about the KDevelop-devel mailing list