CK_UserDefinedConversion is a valid kind when doing copy ctor elision.

llvm-svn: 91695
This commit is contained in:
Anders Carlsson 2009-12-18 17:29:21 +00:00
parent 029707885c
commit 28a133d602
1 changed files with 2 additions and 1 deletions

View File

@ -580,7 +580,8 @@ CodeGenFunction::EmitCXXConstructExpr(llvm::Value *Dest,
if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) { if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) {
assert((ICE->getCastKind() == CastExpr::CK_NoOp || assert((ICE->getCastKind() == CastExpr::CK_NoOp ||
ICE->getCastKind() == CastExpr::CK_ConstructorConversion) && ICE->getCastKind() == CastExpr::CK_ConstructorConversion ||
ICE->getCastKind() == CastExpr::CK_UserDefinedConversion) &&
"Unknown implicit cast kind in constructor elision"); "Unknown implicit cast kind in constructor elision");
Arg = ICE->getSubExpr(); Arg = ICE->getSubExpr();
} }