[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cdt-dev] How to identify the called function?
|
An IASTName (just like any IASTNode) is always part of an AST. If you
are working with the index there are no ASTs around and you don't get
any IASTName's.
Markus.
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of manivannan_pk
> Sent: Thursday, May 28, 2009 11:23 AM
> To: cdt-dev@xxxxxxxxxxx
> Subject: RE: [cdt-dev] How to identify the called function?
> Importance: Low
>
>
>
> That brings us back to one of my earlier questions. How do we
> use the IIndexName to get to the IASTName? Ultimately, my
> goal is to find all the IASTNames corresponding to references
> to a function, field or a global variable.
>
> Thanks,
> mani
>
>
>
> Schorn, Markus wrote:
> >
> > I recommend using the index to find declarations, definitions or
> > references for a binding.
> > If you do need to work with multiple ASTs you need to compare the
> > bindings yourself. For that in plain C, it is suficient to check
> > whether the two functions have the same name.
> >
> > Markus.
> >
> >> -----Original Message-----
> >> From: cdt-dev-bounces@xxxxxxxxxxx
> >> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of manivannan_pk
> >> Sent: Thursday, May 28, 2009 10:46 AM
> >> To: cdt-dev@xxxxxxxxxxx
> >> Subject: [cdt-dev] How to identify the called function?
> >> Importance: Low
> >>
> >>
> >>
> >> Hi
> >>
> >> Say a function foo is declared in foo.h, defined in foo.c
> and used in
> >> use.c; The function has 3 different bindings in the ASTs
> of these 3
> >> files. Then how does one identify which function is being
> called in
> >> use.c and where its definition is?
> >>
> >> Thanks,
> >> mani
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/How-to-identify-the-called-function--tp2
> >> 3757709p23757709.html
> >> Sent from the Eclipse CDT - Development mailing list archive at
> >> Nabble.com.
> >>
> >> _______________________________________________
> >> 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
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-identify-the-called-function--tp2
> 3757709p23758238.html
> Sent from the Eclipse CDT - Development mailing list archive
> at Nabble.com.
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>