[
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?
|
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
>