diff options
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
| -rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 172a811bee1..8a6d4ba7c42 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2073,7 +2073,14 @@ bool FloatExprEvaluator::VisitCastExpr(CastExpr *E) {                                      Result, Info.Ctx);      return true;    } -  // FIXME: Handle complex types + +  if (E->getCastKind() == CK_FloatingComplexToReal) { +    ComplexValue V; +    if (!EvaluateComplex(SubExpr, V, Info)) +      return false; +    Result = V.getComplexFloatReal(); +    return true; +  }    return false;  } | 

