[Prev][Next][Index]

numberOfArgs() for SgFunctionCallExp.




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