Re: Bug in SgExpression::IsSymbolInExpression()?

> 	I've been trying to use
> SgExpression::IsSymbolInExpression() with  no
> success. Maybe I'm doing something wrong, but I don't
> know what it is. 



sorry that you had to wait so long. I've been _very_ busy.
Here is the fix:

in lib/newsrc/low_level.c there is a definition of function:
PTR_LLND LibIsSymbolInExpression(exprold, symb)

add the two lines (marked below with /* BW */), recompile and try  
your code again. The IsSymbolInExpression method should work  
correctly. The only problem is that I am not sure if something else  
is not going to break as a result of the fix. I've done some testing  
but probably not enough. If you notice some funny changes in the  
behavior of the rest of your code, take the "fix" out (and let me  
know). I'll do some more testing soon and I'll let you know if I find  
any problems.    


PTR_LLND LibIsSymbolInExpression(exprold, symb)
     PTR_SYMB symb;
     PTR_LLND exprold;
  if (!exprold)
    return NULL;

  if(IsRefToSymb(exprold,symb)) /* BW */
    return exprold;     /* BW */

  if (IsRefToSymb(NODE_OPERAND0(exprold),symb))
    return NODE_OPERAND0(exprold);
    pt = LibIsSymbolInExpression(NODE_OPERAND0(exprold), symb);
  if (pt)
    return pt;

  if (IsRefToSymb(NODE_OPERAND1(exprold),symb))
    return NODE_OPERAND1(exprold) ;
    pt = LibIsSymbolInExpression(NODE_OPERAND1(exprold), symb);

  return pt;