summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r--clang/lib/AST/ExprConstant.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index dfeb32df3d3..172a811bee1 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -2165,6 +2165,8 @@ bool ComplexExprEvaluator::VisitCastExpr(CastExpr *E) {
QualType EltType = E->getType()->getAs<ComplexType>()->getElementType();
QualType SubType = SubExpr->getType();
+ // TODO: just trust CastKind
+
if (SubType->isRealFloatingType()) {
APFloat &Real = Result.FloatReal;
if (!EvaluateFloat(SubExpr, Real, Info))
OpenPOWER on IntegriCloud