aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-18 08:46:16 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-18 08:46:16 +0000
commitf515b2268f829adfbfdb751f54d102b53ed0285c (patch)
tree625ef2f816cf73dfef5cace274c17fc1f339fb35 /lib/AST/Expr.cpp
parent240592ca490ca3084fef0acfab39f12218ce8168 (diff)
Disable questionable code for handling isNullPointerConstant on value dependent
expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index d7565c7bbe..60458b4fb6 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -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) {