[cfe-commits] r121192 - in /cfe/trunk/lib/Sema: SemaExprCXX.cpp SemaInit.cpp
John McCall
rjmccall at apple.com
Tue Dec 7 14:54:17 PST 2010
Author: rjmccall
Date: Tue Dec 7 16:54:16 2010
New Revision: 121192
URL: http://llvm.org/viewvc/llvm-project?rev=121192&view=rev
Log:
Bump up property conversion earlier in the initialization process. Fixes
the failed compile in PR8751.
Modified:
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=121192&r1=121191&r2=121192&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Tue Dec 7 16:54:16 2010
@@ -1850,7 +1850,7 @@
// Should this get its own ICK?
if (From->getObjectKind() == OK_ObjCProperty) {
ConvertPropertyForRValue(From);
- if (!From->isRValue()) break;
+ if (!From->isGLValue()) break;
}
FromType = FromType.getUnqualifiedType();
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=121192&r1=121191&r2=121192&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Tue Dec 7 16:54:16 2010
@@ -3100,6 +3100,10 @@
return;
}
+ for (unsigned I = 0; I != NumArgs; ++I)
+ if (Args[I]->getObjectKind() == OK_ObjCProperty)
+ S.ConvertPropertyForRValue(Args[I]);
+
QualType SourceType;
Expr *Initializer = 0;
if (NumArgs == 1) {
@@ -3214,7 +3218,7 @@
/*AllowExplicitConversions*/ false,
/*InOverloadResolution*/ false))
{
- if (Initializer->getType() == Context.OverloadTy )
+ if (Initializer->getType() == Context.OverloadTy)
SetFailed(InitializationSequence::FK_AddressOfOverloadFailed);
else
SetFailed(InitializationSequence::FK_ConversionFailed);
More information about the cfe-commits
mailing list