Review Request: Add a new search flag for not resolving alias declarations, and fix a bug with range comparisons

Sven Brauch svenbrauch at gmx.de
Tue Apr 17 22:33:04 UTC 2012



> On April 17, 2012, 1:25 p.m., David Nolden wrote:
> > language/duchain/ducontext.cpp, line 636
> > <http://git.reviewboard.kde.org/r/104628/diff/1/?file=56954#file56954line636>
> >
> >     This could be done simpler: Just move the top-context and range-check up here with a "return 0", and then add "&& !(flags & DontResolveAliases)" to the check below. Then the two new variables are not required.

I'm sorry, I don't see an obvious way to do this. The range/context check depends on both the alias and the aliased declaration, as the range needs to be compared on one, and the top context on the other. So that must happen after the resolution. The other checks also need to be done after the resolution, as they must check the aliased declaration. Or am I just being blind? :)


- Sven


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104628/#review12572
-----------------------------------------------------------


On April 16, 2012, 10:28 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104628/
> -----------------------------------------------------------
> 
> (Updated April 16, 2012, 10:28 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Description
> -------
> 
> As discussed on the mailing list:
> 1) Add a new search flag to tell findDeclarations to not resolve AliasDeclarations
> 2) Fix a bug with range comparisons if the declaration is an alias declaration aliasing a declaration from a different top-context
> 
> 
> Diffs
> -----
> 
>   language/duchain/ducontext.h f4fa7c1 
>   language/duchain/ducontext.cpp 0b6dc75 
> 
> Diff: http://git.reviewboard.kde.org/r/104628/diff/
> 
> 
> Testing
> -------
> 
> Used it for a few days, no bugs discovered.
> cpp duchain tests still all pass.
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

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


More information about the KDevelop-devel mailing list