forked from OSchip/llvm-project
Disable questionable code for handling isNullPointerConstant on value dependent
expression. llvm-svn: 82217
This commit is contained in:
parent
23c1ae7fae
commit
ebc5140e22
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue