[cfe-commits] r80256 - in /cfe/trunk/lib/Sema: Sema.h SemaExprCXX.cpp SemaInit.cpp SemaOverload.cpp
Anders Carlsson
andersca at mac.com
Thu Aug 27 10:18:13 PDT 2009
Author: andersca
Date: Thu Aug 27 12:18:13 2009
New Revision: 80256
URL: http://llvm.org/viewvc/llvm-project?rev=80256&view=rev
Log:
Remove default argument from TryCopyInitialization.
Modified:
cfe/trunk/lib/Sema/Sema.h
cfe/trunk/lib/Sema/SemaExprCXX.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/lib/Sema/SemaOverload.cpp
Modified: cfe/trunk/lib/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.h?rev=80256&r1=80255&r2=80256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Thu Aug 27 12:18:13 2009
@@ -766,8 +766,7 @@
ImplicitConversionSequence
TryCopyInitialization(Expr* From, QualType ToType,
- bool SuppressUserConversions = false,
- bool ForceRValue = false);
+ bool SuppressUserConversions, bool ForceRValue);
bool PerformCopyInitialization(Expr *&From, QualType ToType,
const char *Flavor, bool Elidable = false);
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=80256&r1=80255&r2=80256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Thu Aug 27 12:18:13 2009
@@ -1228,7 +1228,9 @@
// Could still fail if there's no copy constructor.
// FIXME: Is this a hard error then, or just a conversion failure? The
// standard doesn't say.
- ICS = Self.TryCopyInitialization(From, TTy);
+ ICS = Self.TryCopyInitialization(From, TTy,
+ /*SuppressUserConversions=*/false,
+ /*ForceRValue=*/false);
}
} else {
// -- Otherwise: E1 can be converted to match E2 if E1 can be
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=80256&r1=80255&r2=80256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Thu Aug 27 12:18:13 2009
@@ -661,7 +661,10 @@
// an initializer-list. If the initializer can initialize a
// member, the member is initialized. [...]
ImplicitConversionSequence ICS
- = SemaRef.TryCopyInitialization(expr, ElemType);
+ = SemaRef.TryCopyInitialization(expr, ElemType,
+ /*SuppressUserConversions=*/false,
+ /*ForceRValue=*/false);
+
if (ICS.ConversionKind != ImplicitConversionSequence::BadConversion) {
if (SemaRef.PerformImplicitConversion(expr, ElemType, ICS,
"initializing"))
Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=80256&r1=80255&r2=80256&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Thu Aug 27 12:18:13 2009
@@ -2430,7 +2430,11 @@
CallExpr Call(Context, &ConversionFn, 0, 0,
Conversion->getConversionType().getNonReferenceType(),
SourceLocation());
- ImplicitConversionSequence ICS = TryCopyInitialization(&Call, ToType, true);
+ ImplicitConversionSequence ICS =
+ TryCopyInitialization(&Call, ToType,
+ /*SuppressUserConversions=*/true,
+ /*ForceRValue=*/false);
+
switch (ICS.ConversionKind) {
case ImplicitConversionSequence::StandardConversion:
Candidate.FinalConversion = ICS.Standard;
@@ -2543,7 +2547,8 @@
QualType ParamType = Proto->getArgType(ArgIdx);
Candidate.Conversions[ArgIdx + 1]
= TryCopyInitialization(Args[ArgIdx], ParamType,
- /*SuppressUserConversions=*/false);
+ /*SuppressUserConversions=*/false,
+ /*ForceRValue=*/false);
if (Candidate.Conversions[ArgIdx + 1].ConversionKind
== ImplicitConversionSequence::BadConversion) {
Candidate.Viable = false;
@@ -2674,7 +2679,8 @@
} else {
Candidate.Conversions[ArgIdx]
= TryCopyInitialization(Args[ArgIdx], ParamTys[ArgIdx],
- ArgIdx == 0 && IsAssignmentOperator);
+ ArgIdx == 0 && IsAssignmentOperator,
+ /*ForceRValue=*/false);
}
if (Candidate.Conversions[ArgIdx].ConversionKind
== ImplicitConversionSequence::BadConversion) {
More information about the cfe-commits
mailing list