diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-02 07:10:35 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-02 07:10:35 +0000 |
commit | 2e13db8bc64bc99922b0aeb45443c681c1643c82 (patch) | |
tree | 1f67388e09f74e95120d3bab3ac14289dbacd9dc /lib/CodeGen | |
parent | 7bb12da2b0749eeebb21854c77877736969e59f2 (diff) |
Check in a test case and a nasty workaround for PR6199.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 4253d18c39..8dd747240a 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -309,7 +309,9 @@ CodeGenFunction::EmitCXXConstructExpr(llvm::Value *Dest, if (getContext().getLangOptions().ElideConstructors && E->isElidable()) { const Expr *Arg = E->getArg(0); - if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) { + // FIXME: This 'while' statement should really be an 'if' statement, it's + // added as a workaround for PR6199. + while (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Arg)) { assert((ICE->getCastKind() == CastExpr::CK_NoOp || ICE->getCastKind() == CastExpr::CK_ConstructorConversion || ICE->getCastKind() == CastExpr::CK_UserDefinedConversion) && |