Non default declaration search mechanism

Kucharski, Lukasz (NSN - PL/Wroclaw) lukasz.kucharski at
Sun Jan 22 01:36:47 UTC 2012

Hi all,

I am currently working on a ttcn3 plug-in for kdevelop and I've encountered a problem that I don't how to solve in elegant and efficient way.

Following C/C++ represents my problem:

enum AAA

enum BBB

const AAA c_val1 = one;
const BBB c_val2 = one;

Of course this won't compile however equivalent ttcn3 code is valid.

Having 'one' enumerator in two different enumeration types requires named context to allow use definition to valid enumerator.

Enumeration types without named context allows to find all 'one' declarations but use chain is build always to first declaration, I mean declaration from AAA type.
Enumeration types with named context [setPropagateDeclarations(true)] do not allow to find enumerator declarations with default search mechanism.
I were able to successfully overload findLocalDeclarationsInternal and findDeclarationsInternal methods to achieve required functionality however it's very slow.

Is there anybody there that knows declaration search mechanism well enough to point me a right direction?

Thanks in advance

More information about the KDevelop-devel mailing list