Disable questionable code for handling isNullPointerConstant on value dependent

expression.

llvm-svn: 82217
This commit is contained in:
Daniel Dunbar 2009-09-18 08:46:16 +00:00
parent 23c1ae7fae
commit ebc5140e22
2 changed files with 5 additions and 2 deletions

View File

@ -1627,8 +1627,8 @@ bool Expr::isIntegerConstantExpr(llvm::APSInt &Result, ASTContext &Ctx,
/// cast to void*.
bool Expr::isNullPointerConstant(ASTContext &Ctx) const {
// Ignore value dependent expressions.
if (isValueDependent())
return true;
assert(!isValueDependent() && "Unexpect value dependent expression!");
// Strip off a cast to void*, if it exists. Except in C++.
if (const ExplicitCastExpr *CE = dyn_cast<ExplicitCastExpr>(this)) {
if (!Ctx.getLangOptions().CPlusPlus) {

View File

@ -14,10 +14,13 @@ class C0 {
int b[I];
};
// FIXME: I'm unclear where the right place to handle this is.
#if 0
void f0(int *p) {
if (p == I) {
}
}
#endif
#if 0
// FIXME: Not sure whether we care about these.