[cfe-dev] The integer-constant-expr patch
clattner at apple.com
Wed Jun 4 10:32:57 PDT 2008
Your change to isIntegerConstantExpr is somewhat ok, but it has a
// GCC accepts pointers as an extension.
// FIXME: check getLangOptions().NoExtensions. At the moment,
// appear possible to get langOptions() from the Expr.
if (SubExpr->getType()->isPointerType()) // && !NoExtensions
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
This is PR2413.
More information about the cfe-dev