aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 8bda0f3e36..2e7e868616 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -184,19 +184,12 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
LValue::MakeAddr(CastPtr, 0));
return;
}
- if (E->getCastKind() == CastExpr::CK_UserDefinedConversion) {
- if (const CXXFunctionalCastExpr *CXXFExpr =
- dyn_cast<CXXFunctionalCastExpr>(E))
- CGF.EmitCXXFunctionalCastExpr(CXXFExpr);
- else
- if (isa<CStyleCastExpr>(E))
- Visit(E->getSubExpr());
- return;
- }
// FIXME: Remove the CK_Unknown check here.
assert((E->getCastKind() == CastExpr::CK_NoOp ||
- E->getCastKind() == CastExpr::CK_Unknown) &&
+ E->getCastKind() == CastExpr::CK_Unknown ||
+ E->getCastKind() == CastExpr::CK_UserDefinedConversion ||
+ E->getCastKind() == CastExpr::CK_ConstructorConversion) &&
"Only no-op casts allowed!");
assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(),
E->getType()) &&