From: Anders Carlsson Date: Sat, 22 Nov 2008 22:56:32 +0000 (+0000) Subject: Return false if we encounter a type we can't handle. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d4c157baaada8945671dc98363a40ed00cbd824;p=clang Return false if we encounter a type we can't handle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59889 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 5c5adb6a45..6fba884028 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -1176,7 +1176,8 @@ bool Expr::Evaluate(APValue &Result, ASTContext &Ctx, bool *isEvaluated) const { } else if (getType()->isComplexType()) { if (!EvaluateComplexFloat(this, Result, Info)) return false; - } + } else + return false; if (isEvaluated) *isEvaluated = Info.isEvaluated;