]> granicus.if.org Git - clang/commitdiff
Return false if we encounter a type we can't handle.
authorAnders Carlsson <andersca@mac.com>
Sat, 22 Nov 2008 22:56:32 +0000 (22:56 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 22 Nov 2008 22:56:32 +0000 (22:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59889 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ExprConstant.cpp

index 5c5adb6a45e5beac0261a0f14c4b41bbfe6489b6..6fba884028da3a3d180244119b8a9b0676a920ee 100644 (file)
@@ -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;