Review Request 123715: Set DUContext::Function context as internalFunctionContext and DUContext::Other context as internalContext

Sergey Kalinichev kalinichev.so.0 at gmail.com
Sun May 10 15:01:00 UTC 2015



> On May 10, 2015, 5:22 p.m., Olivier Jean de Gaalon wrote:
> > The DUContext structure was purposefully changed in kdev-clang. internalFunctionContext should not be used anymore, as it's broken (see DUContext::Import::context). The current context structure accurately represents scope without requiring convoluted import logic.
> > What's the issue that this targets? So that we can fix it without reintroducing this sad bit of history...

I see. The issue I'm trying to fix is that the declarations/uses in the DUContext::Other contexts don't get highlighted. Anyway, I've just uploaded a much simplier solution.


- Sergey


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


On May 10, 2015, 5:12 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123715/
> -----------------------------------------------------------
> 
> (Updated May 10, 2015, 5:12 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdev-clang
> 
> 
> Description
> -------
> 
> This chances the current approach: DUContext::Function context is the parent of the DUContext::Other context to top/class context is the parent of the DUContext::Function and the DUContext::Other contexts.
>     
>    This is what the oldcpp does. Also this enables code-highlighting of function internal contexts, i.e. within {...}
> 
> 
> Diffs
> -----
> 
>   duchain/duchainutils.cpp 38bd0c3 
>   duchain/tuduchain.h be76259 
>   duchain/tuduchain.cpp 5e460b8 
>   tests/files/basicdeclsandcontexts.cpp 03aefc2 
>   tests/files/defaultparameters.cpp 693c1d3 
>   tests/files/functiondefinitiondeclarations.cpp 037c065 
>   tests/files/functions.cpp 4fbcc68 
>   tests/files/imports.cpp a2cf9e3 
>   tests/test_duchain.cpp 41cb3d9 
> 
> Diff: https://git.reviewboard.kde.org/r/123715/diff/
> 
> 
> Testing
> -------
> 
> Some tests still fail: defaultparameters.cpp - seems like due to a bug in the JSON test, as it expects the DUContext::Function context to be owned by the function declaration, which is impossible if the Function context is set as internalFunctionContext (also this test fails for the oldcpp too);  and assistans test - due to wrong signature range (planning to fix it later on)
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

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


More information about the KDevelop-devel mailing list