Review Request 115637: add UseExpressionVisitor

Sven Brauch svenbrauch at googlemail.com
Tue Feb 11 11:23:55 UTC 2014



> On Feb. 11, 2014, 10:25 a.m., Milian Wolff wrote:
> > A few minor nitpicks, then go for it!
> > 
> > Just a hint: This approach is a good to get things going in a first approximation. But it will probably fail as soon as you have nested contexts, no? I.e. when you start visiting, you "inject" the top context but where are the sub contexts set as the current context from which to search for declarations? Anyhow - this is something you should investigate later then and we can come up with a way to fix it then.
> > 
> > Thanks for working on this!

We discussed that yesterday on IRC. It's a bit convoluted. The weird thing is that the ExpressionVisitor inherits from the ContextBuilder, thus nested contexts *should* work fine. The injectContext is a hack to make it work for the top context too, which is *usually* opened by AbstractContextBuiler::supportBuild(), which cannot be used in this case because otherwise the cleanup logic will run and delete stuff you don't want deleted.

All this is certainly not optimal but as you said -- let's first try to get it working a bit.


- Sven


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


On Feb. 11, 2014, 3:33 a.m., Matija Skala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115637/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2014, 3:33 a.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-java
> 
> 
> Description
> -------
> 
> so that uses of variables are detected. The startVisiting() function might seem a bit hacky, but it works and produces no new issues. I will improve it in one of the future commits.
> 
> 
> Diffs
> -----
> 
>   duchain/usebuilder.h 2c13dff 
>   duchain/usebuilder.cpp 513c03c 
> 
> Diff: https://git.reviewboard.kde.org/r/115637/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matija Skala
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140211/789e2ce6/attachment-0001.html>


More information about the KDevelop-devel mailing list