[cfe-commits] r101483 - in /cfe/trunk/lib/Sema: Sema.h SemaOverload.cpp

Douglas Gregor dgregor at apple.com
Fri Apr 16 10:25:05 PDT 2010


Author: dgregor
Date: Fri Apr 16 12:25:05 2010
New Revision: 101483

URL: http://llvm.org/viewvc/llvm-project?rev=101483&view=rev
Log:
Eliminate the ForceRValue parameter from Sema::IsUserDefinedConversion. It's not the way we're going to handle this.

Modified:
    cfe/trunk/lib/Sema/Sema.h
    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=101483&r1=101482&r2=101483&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Fri Apr 16 12:25:05 2010
@@ -1092,7 +1092,7 @@
                                UserDefinedConversionSequence& User,
                                OverloadCandidateSet& Conversions,
                                bool AllowConversionFunctions,
-                               bool AllowExplicit, bool ForceRValue,
+                               bool AllowExplicit, 
                                bool UserCast);
   bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType);
                                               

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=101483&r1=101482&r2=101483&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Apr 16 12:25:05 2010
@@ -461,7 +461,7 @@
   OverloadingResult UserDefResult
     = IsUserDefinedConversion(From, ToType, ICS.UserDefined, Conversions,
                               !SuppressUserConversions, AllowExplicit,
-                              ForceRValue, UserCast);
+                              UserCast);
 
   if (UserDefResult == OR_Success) {
     ICS.setUserDefined();
@@ -1495,8 +1495,6 @@
 /// "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 @@
                                             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 @@
             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 @@
   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)





More information about the cfe-commits mailing list