Infinite recursion in DUContext::findDeclarationsInternal
Milian Wolff
mail at milianw.de
Tue Jan 27 23:24:12 UTC 2009
Hi guys!
I'm having a bit of a problem while developing the PHP plugin. Take this code:
~~~
class a extends b {}
class b extends c {}
class c extends a {}
~~~
Internally this gets parsed twice to get all declarations. The
DeclarationBuilder works fine, but the second UseBuilder segfaults because it
uses findDeclarations which goes into findDeclarationsInternal and segfaults
then, backtrace shows an infinite recursion in ducontext.cpp:833 if I remember
correctly.
I'm not sure how I should handle that:
1) Do I have to adapt the DeclarationBuilder to make sure it does not
introduce circular inheritance?
2) Do I have to write a cleanup/validation function which looks for circular
inheritance and filters those?
3) Do I have to adapt the UseBuilder?
4) Something other than that?
How does Cpp handle that? It seems to work fine there:
~~~
class A : public B{};
class B : public C{};
class C : public A{};
~~~
--
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: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090128/21eba6c8/attachment.sig>
More information about the KDevelop-devel
mailing list