Re: A question about SgStatement::expr()

> 	I've been experimenting with SgStatement::expr() and it appears 
> that it is always true that given,
> 	SgStatement	*st = .... ;
> 	Then, if the statement is executable, st->expr(i)->lhs() will
> contain the executable expression and st->expr(i)->rhs() will be NULL. Is 
> that true?
> I tried it on several sources and it seems to be true, but I wanted to
> confirm that. 

It is not always true. Except in pathological circumstances, it
probably is, but check out this program:

int main (void)
  int i,j,k;
  k, j = 0; /* Counterexample :-) */

The top-level EXPR_LIST is used to make the comma that appears. Real
nice, huh?

If you want my dep-file cheat sheet that I wrote as I was learning how
to understand what was going on, let me know and I will send it to you.


Follow-Up(s): Reference(s):