diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2011-11-12 03:56:23 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2011-11-12 03:56:23 +0000 |
| commit | 47133bed4af66c31bc124b12e822276d3e0405fb (patch) | |
| tree | 3b3b09fc4fa9471d8f2737ca5cd308b530fe364f /clang/lib/Sema/SemaExpr.cpp | |
| parent | d48ab845563c06f12278cfb66148bd350e9814dc (diff) | |
| download | bcm5719-llvm-47133bed4af66c31bc124b12e822276d3e0405fb.tar.gz bcm5719-llvm-47133bed4af66c31bc124b12e822276d3e0405fb.zip | |
Add missing casts to AST.
llvm-svn: 144455
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index a5b766ad73b..d22a431d065 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -823,14 +823,21 @@ static QualType handleComplexIntConversion(Sema &S, ExprResult &LHS, if (LHSComplexInt) { // int -> _Complex int + // FIXME: This needs to take integer ranks into account + RHS = S.ImpCastExprToType(RHS.take(), LHSComplexInt->getElementType(), + CK_IntegralCast); RHS = S.ImpCastExprToType(RHS.take(), LHSType, CK_IntegralRealToComplex); return LHSType; } assert(RHSComplexInt); // int -> _Complex int - if (!IsCompAssign) + // FIXME: This needs to take integer ranks into account + if (!IsCompAssign) { + LHS = S.ImpCastExprToType(LHS.take(), RHSComplexInt->getElementType(), + CK_IntegralCast); LHS = S.ImpCastExprToType(LHS.take(), RHSType, CK_IntegralRealToComplex); + } return RHSType; } |

