Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] How do I get the member declaration for a member functioncall reference?

Thanks for the pointer.

It is a ProblemBinding and clicking on it the debugger:

Attempt to use symbol failed : append

Am I out of luck or Is there anything you would recommend I try to resolve the method?

-- Jeff J.

Schorn, Markus wrote:
Do you get the correct binding for 'append', or is it a ProblemBinding?
-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Jeff Johnston
Sent: Tuesday, February 03, 2009 1:25 AM
To: CDT General developers list.
Subject: [cdt-dev] How do I get the member declaration for a member functioncall reference?
Importance: Low

I have a C++ file and in it I have:

   std::string *k = new std::string("blah");
   k->append(3, 'c');

I have the file position of the append call. Is there a way I can find the declaration of the append member function for std::string (which is actually std::basic_string<char>) from the AST? Doing a dump of the AST via ASTPrinter, the information appears to be there. I am trying to narrow down which append() method is being called as there are multiple versions for std::basic_string<char>.

FWIW: I was able to locate the IASTName for the append call using the IASTNodeSelector and when I tried to use its binding and called getDeclarationsInAST(), I ended up with an empty list.

Thanks in advance,

-- Jeff J.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top