summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-16 17:25:05 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-16 17:25:05 +0000
commit7b23e41774bad1820f1c2d2e2b4d740161177033 (patch)
tree69645c7357bfdb5808f5c41fb0170c56f394fbea /clang/lib/Sema/SemaOverload.cpp
parent73b0cd72ff765549d3994dcc5c67eef3d8c6538f (diff)
downloadbcm5719-llvm-7b23e41774bad1820f1c2d2e2b4d740161177033.tar.gz
bcm5719-llvm-7b23e41774bad1820f1c2d2e2b4d740161177033.zip
Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this.
llvm-svn: 101483
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index 88060532d94..c4f9eddeac4 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -461,7 +461,7 @@ Sema::TryImplicitConversion(Expr* From, QualType ToType,
OverloadingResult UserDefResult
= IsUserDefinedConversion(From, ToType, ICS.UserDefined, Conversions,
!SuppressUserConversions, AllowExplicit,
- ForceRValue, UserCast);
+ UserCast);
if (UserDefResult == OR_Success) {
ICS.setUserDefined();
@@ -1495,8 +1495,6 @@ Sema::IsQualificationConversion(QualType FromType, QualType ToType) {
/// "explicit" conversion functions as well as non-explicit conversion
/// functions (C++0x [class.conv.fct]p2).
///
-/// \param ForceRValue true if the expression should be treated as an rvalue
-/// for overload resolution.
/// \param UserCast true if looking for user defined conversion for a static
/// cast.
OverloadingResult Sema::IsUserDefinedConversion(Expr *From, QualType ToType,
@@ -1504,7 +1502,6 @@ OverloadingResult Sema::IsUserDefinedConversion(Expr *From, QualType ToType,
OverloadCandidateSet& CandidateSet,
bool AllowConversionFunctions,
bool AllowExplicit,
- bool ForceRValue,
bool UserCast) {
if (const RecordType *ToRecordType = ToType->getAs<RecordType>()) {
if (RequireCompleteType(From->getLocStart(), ToType, PDiag())) {
@@ -1552,13 +1549,13 @@ OverloadingResult Sema::IsUserDefinedConversion(Expr *From, QualType ToType,
AddTemplateOverloadCandidate(ConstructorTmpl, FoundDecl,
/*ExplicitArgs*/ 0,
&From, 1, CandidateSet,
- SuppressUserConversions, ForceRValue);
+ SuppressUserConversions, false);
else
// Allow one user-defined conversion when user specifies a
// From->ToType conversion via an static cast (c-style, etc).
AddOverloadCandidate(Constructor, FoundDecl,
&From, 1, CandidateSet,
- SuppressUserConversions, ForceRValue);
+ SuppressUserConversions, false);
}
}
}
@@ -1677,7 +1674,7 @@ Sema::DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType) {
OverloadCandidateSet CandidateSet(From->getExprLoc());
OverloadingResult OvResult =
IsUserDefinedConversion(From, ToType, ICS.UserDefined,
- CandidateSet, true, false, false, false);
+ CandidateSet, true, false, false);
if (OvResult == OR_Ambiguous)
Diag(From->getSourceRange().getBegin(),
diag::err_typecheck_ambiguous_condition)
OpenPOWER on IntegriCloud