diff options
author | Anders Carlsson <andersca@mac.com> | 2008-11-22 22:56:32 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2008-11-22 22:56:32 +0000 |
commit | 7c282e4f3fe21f9412b7330435bf04502123bae3 (patch) | |
tree | e7430f20a1bf5e23aef7701d68e8a9021281f605 /clang/lib | |
parent | 632ab20e1e4879b09387b73d6b1cec70254d6b9d (diff) | |
download | bcm5719-llvm-7c282e4f3fe21f9412b7330435bf04502123bae3.tar.gz bcm5719-llvm-7c282e4f3fe21f9412b7330435bf04502123bae3.zip |
Return false if we encounter a type we can't handle.
llvm-svn: 59889
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 5c5adb6a45e..6fba884028d 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/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; |