I was afraid of that. I’m not sure
this method is implemented correctly everywhere.
I go back to my recommendation for getting
the node locations, getNodeLocations(), and seeing if you can figure out what
you need from that. IASTMacroExpansion is one of the types of node locations
and it points back to the macro definition for which you can get the name.
From:
cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Yuan Zhang
Sent: Friday, July 07, 2006 8:56
AM
To: CDT
General developers list.
Subject: Re: [cdt-dev] A question
about IASTLiteralExpression
Yes, I tried. But
getRawSignature gave me an empty string.
On 7/6/06, Doug Schaefer <DSchaefer@xxxxxxx> wrote:
Did you try
getRawSignature on the IASTLiteralExpression?
To: CDT General developers list.
Subject: Re:
[cdt-dev] A question about IASTLiteralExpression
Go back to my original problem: I tried to traverse
the AST of an MPI program and recognized all barrier function calls
and their communicators. The barrier function has the form:
int MPI_Barrier(MPI_Comm comm). The MPI_Comm type is
defined in mpi.h . A typical use of this barrier function is like
MPI_Barrier(MPI_COMM_WORLD), and the communicator MPI_COMM_WORLD is a
pre-defined object with type MPI_Comm. I don't think MPI_COMM_WORLD is a macro.
When I looked into the AST, the MPI_COMM_WORLD is a
IASTLiteralExpression, and its value() is a char array "0x44000000".
It really confused me. I am wondering whether I can get the String
"MPI_COMM_WORLD" in some way?
On 7/6/06, Doug
Schaefer <
DSchaefer@xxxxxxx> wrote:
IASTLiteralExpression is
an IASTNode.
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev