[Prev][Next][Index]
numberOfArgs() for SgFunctionCallExp.
- From: Rahul Singh <rsingh@valhalla.cs.wright.edu>
- Date: Sun, 21 Apr 1996 10:14:57 -0400
- To: sage-bugs@extreme.indiana.edu
- Subject: numberOfArgs() for SgFunctionCallExp.
- Cc: ktomko@valhalla.cs.wright.edu
- Sender: owner-sage-bugs@extreme.indiana.edu
For S (a pointer to SgStatement) pointing to a function call, I converted S by
the following fragment
EL = isSgExprListExp(isSgCExpStmt (S)->expr());
E = isSgFunctionCallExp (EL->value ());
In order to extract the parameters of the call, E->numberOfArgs () gave me a
segmentation fault. However, E->arg(0) worked. I used the following fragment.
EL = isSgExprListExp(E->args());
for (; EL; EL = EL->next()){
EL->value()->unparsestdout(); printf ("\n");}
Rahul