On Wed, Sep 16, 2009 at 11:31 PM, Daniel Dunbar <[email protected]> wrote: ============================================================================== > --- cfe/trunk/lib/AST/Expr.cpp (original) > +++ cfe/trunk/lib/AST/Expr.cpp Thu Sep 17 01:31:27 2009 > @@ -1626,6 +1626,9 @@ > /// integer constant expression with the value zero, or if this is one that > is > /// cast to void*. > bool Expr::isNullPointerConstant(ASTContext &Ctx) const { > + // Ignore value dependent expressions. > + if (isValueDependent()) > + return true; > // Strip off a cast to void*, if it exists. Except in C++. > if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) { > if (!Ctx.getLangOptions().CPlusPlus) {
It's kind of confusing to claim that something which may not be a null pointer constant is a null pointer constant. It would be clearer for the callers to explicitly deal with this case. -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
