The integer-constant-expr patch

Hi Steve,

Your change to isIntegerConstantExpr is somewhat ok, but it has a serious problem:

       // GCC accepts pointers as an extension.
       // FIXME: check getLangOptions().NoExtensions. At the moment, it doesn't
       // appear possible to get langOptions() from the Expr.
       if (SubExpr->getType()->isPointerType()) // && !NoExtensions
         return true;

When this returns you don't set 'Result'. isIntegerConstantExpr is required to return the constant expression when a pointer is involved. This means you should only return true if the operand is foldable.

This is PR2413.