Accessing parameter values of function uses
Bertjan Broeksema
bertjan at kdab.net
Wed Sep 23 16:52:19 BST 2009
Hi all,
I'm trying to use the KDevelop CppDuchain to build a query/transformation
framework but I ran into an issue.
e.g. Lets say I search for uses of QString(const char*) and find at some point
in a file:
QString str("some char literal");
Is there a way to access this char literal and more general, is it possible to
access the values that are passed to a function.
The reason I'm asking is this. In the case of char literals I'd like to check
the contents. In other cases I'd like to move out paramaters in a transform.
e.g.
SomeClass x(arg, arg2, arg3);
->
SomeClass x;
x.setArg(arg1);
x.setAnotherArg(arg2);
x.setYetAnotherArg(arg3);
Where the methods that mus be called are described in the transform. However
for this I'd need to get arg1, arg2 and arg3 out of the original call (however
complex they are).
My current understanding of the CppDuchain is that this is not yet supported.
Any ideas/comments?
Cheers,
Bertjan
More information about the KDevelop
mailing list