aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-11-22 22:56:32 +0000
committerAnders Carlsson <andersca@mac.com>2008-11-22 22:56:32 +0000
commit9d4c157baaada8945671dc98363a40ed00cbd824 (patch)
tree293bcf662f5c8b01e086c5ccf0f8a56b3fe352ce /lib/AST/ExprConstant.cpp
parent9f4d86389f99c5d66664382add340a2ea19ad134 (diff)
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
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp3
1 files changed, 2 insertions, 1 deletions
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;