Author: dgregor
Date: Thu Nov 19 20:31:03 2009
New Revision: 89441
URL: http://llvm.org/viewvc/llvm-project?rev=89441&view=rev
Log:
Don't build an explicit conversion to a reference type
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=89441&r1=89440&r2=89441&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Thu Nov 19 20:31:03 2009
@@ -1156,11 +1156,12 @@
dyn_cast<CXXConstructorDecl>(FD)) {
CastKind = CastExpr::CK_ConstructorConversion;
// Do no conversion if dealing with ... for the first conversion.
- if (!ICS.UserDefined.EllipsisConversion)
+ if (!ICS.UserDefined.EllipsisConversion) {
// If the user-defined conversion is specified by a constructor, the
// initial standard conversion sequence converts the source type to
the
// type required by the argument of the constructor
- BeforeToType = Ctor->getParamDecl(0)->getType();
+ BeforeToType =
Ctor->getParamDecl(0)->getType().getNonReferenceType();
+ }
}
else
assert(0 && "Unknown conversion function kind!");
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits