Navigation Widgets for 'empty range' Declarations

Milian Wolff mail at milianw.de
Mon Jul 4 19:21:11 UTC 2016


On Samstag, 2. Juli 2016 16:54:02 CEST David Nolden wrote:
> Hi KDevelopers,
> 
> I was always wondering why navigation-widgets didn't work for half of
> the functions and classes in my work project.
> 
> Now I found out that this is simply because in clangducontext.cpp,
> there are checks for "decl->range().isEmpty()' which simply reject
> creating a navigation widget for a declaration which has an empty
> range. And this means, that for any declaration that is created
> through a macro, this won't create a navigation widget. On macro-heavy
> projects, this is deadly.
> 
> Now the question: Why are these empty-range checks there in the first place?
> 
> I propose simply removing them.

Seems to have been added by:

commit 5ea86fa90cbdd7a92cc95e3752b4a2ec9204aec3
Author: Sergey Kalinichev <kalinichev.so.0 at gmail.com>
Date:   Mon Aug 3 18:51:18 2015 +0400

    Make assistant tests pass
    
    This fixes two tests and expects failure of two other.
    
    One test failed because it couldn't find anonymous function parameters
    And another one because of id was used when editing function
    definition
    
    REVIEW: 124802

I can't see how this would be related to hiding the navigation widget, so I'm 
in favor of removing the check there and see if something breaks (i.e. tests 
fail?). If not, and using KDevelop with this patch also improves things for 
you, +1 for pushing it to 5.0.

Bye

-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160704/ae5a5814/attachment.sig>


More information about the KDevelop-devel mailing list