[cfe-commits] r101502 - in /cfe/trunk/lib/Sema: Sema.h SemaCXXCast.cpp SemaExprCXX.cpp SemaInit.cpp SemaOverload.cpp

Douglas Gregor dgregor at apple.com
Fri Apr 16 11:00:29 PDT 2010


Author: dgregor
Date: Fri Apr 16 13:00:29 2010
New Revision: 101502

URL: http://llvm.org/viewvc/llvm-project?rev=101502&view=rev
Log:
Kill ForceRValue once and for all

Modified:
    cfe/trunk/lib/Sema/Sema.h
    cfe/trunk/lib/Sema/SemaCXXCast.cpp
    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=101502&r1=101501&r2=101502&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Fri Apr 16 13:00:29 2010
@@ -1064,7 +1064,6 @@
   TryImplicitConversion(Expr* From, QualType ToType,
                         bool SuppressUserConversions,
                         bool AllowExplicit,
-                        bool ForceRValue,
                         bool InOverloadResolution,
                         bool UserCast = false);
   bool IsStandardConversion(Expr *From, QualType ToType,

Modified: cfe/trunk/lib/Sema/SemaCXXCast.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaCXXCast.cpp?rev=101502&r1=101501&r2=101502&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaCXXCast.cpp (original)
+++ cfe/trunk/lib/Sema/SemaCXXCast.cpp Fri Apr 16 13:00:29 2010
@@ -961,7 +961,6 @@
     Self.TryImplicitConversion(SrcExpr, DestType,
                                /*SuppressUserConversions=*/false,
                                /*AllowExplicit=*/true,
-                               /*ForceRValue=*/false,
                                /*InOverloadResolution=*/false,
                                /*one of user provided casts*/true);
 

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=101502&r1=101501&r2=101502&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Fri Apr 16 13:00:29 2010
@@ -1494,7 +1494,6 @@
   ICS = TryImplicitConversion(From, ToType,
                               /*SuppressUserConversions=*/false,
                               AllowExplicit,
-                              /*ForceRValue=*/false,
                               /*InOverloadResolution=*/false);
   return PerformImplicitConversion(From, ToType, ICS, Action);
 }
@@ -2369,13 +2368,11 @@
     TryImplicitConversion(E1, Composite1,
                           /*SuppressUserConversions=*/false,
                           /*AllowExplicit=*/false,
-                          /*ForceRValue=*/false,
                           /*InOverloadResolution=*/false);
   ImplicitConversionSequence E2ToC1 =
     TryImplicitConversion(E2, Composite1,
                           /*SuppressUserConversions=*/false,
                           /*AllowExplicit=*/false,
-                          /*ForceRValue=*/false,
                           /*InOverloadResolution=*/false);
 
   bool ToC2Viable = false;
@@ -2385,12 +2382,10 @@
     E1ToC2 = TryImplicitConversion(E1, Composite2,
                                    /*SuppressUserConversions=*/false,
                                    /*AllowExplicit=*/false,
-                                   /*ForceRValue=*/false,
                                    /*InOverloadResolution=*/false);
     E2ToC2 = TryImplicitConversion(E2, Composite2,
                                    /*SuppressUserConversions=*/false,
                                    /*AllowExplicit=*/false,
-                                   /*ForceRValue=*/false,
                                    /*InOverloadResolution=*/false);
     ToC2Viable = !E1ToC2.isBad() && !E2ToC2.isBad();
   }

Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=101502&r1=101501&r2=101502&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Fri Apr 16 13:00:29 2010
@@ -2527,7 +2527,6 @@
   ImplicitConversionSequence ICS
     = S.TryImplicitConversion(Initializer, cv1T1,
                               /*SuppressUserConversions=*/false, AllowExplicit, 
-                              /*ForceRValue=*/false, 
                               /*FIXME:InOverloadResolution=*/false,
                               /*UserCast=*/Kind.isExplicitCast());
             
@@ -2888,7 +2887,6 @@
     = S.TryImplicitConversion(Initializer, Entity.getType(),
                               /*SuppressUserConversions=*/true, 
                               /*AllowExplicit=*/false,
-                              /*ForceRValue=*/false, 
                               /*FIXME:InOverloadResolution=*/false,
                               /*UserCast=*/Kind.isExplicitCast());
   

Modified: cfe/trunk/lib/Sema/SemaOverload.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOverload.cpp?rev=101502&r1=101501&r2=101502&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOverload.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOverload.cpp Fri Apr 16 13:00:29 2010
@@ -436,14 +436,12 @@
 /// not permitted.
 /// If @p AllowExplicit, then explicit user-defined conversions are
 /// permitted.
-/// If @p ForceRValue, then overloading is performed as if From was an rvalue,
-/// no matter its actual lvalueness.
 /// If @p UserCast, the implicit conversion is being done for a user-specified
 /// cast.
 ImplicitConversionSequence
 Sema::TryImplicitConversion(Expr* From, QualType ToType,
                             bool SuppressUserConversions,
-                            bool AllowExplicit, bool ForceRValue,
+                            bool AllowExplicit, 
                             bool InOverloadResolution,
                             bool UserCast) {
   ImplicitConversionSequence ICS;
@@ -2483,7 +2481,6 @@
   //   and does not constitute a conversion.
   ICS = S.TryImplicitConversion(Init, T1, SuppressUserConversions,
                                 /*AllowExplicit=*/false,
-                                /*ForceRValue=*/false,
                                 /*InOverloadResolution=*/false);
 
   // Of course, that's still a reference binding.
@@ -2502,8 +2499,7 @@
 /// sequence required to pass this argument, which may be a bad
 /// conversion sequence (meaning that the argument cannot be passed to
 /// a parameter of this type). If @p SuppressUserConversions, then we
-/// do not permit any user-defined conversion sequences. If @p ForceRValue,
-/// then we treat @p From as an rvalue, even if it is an lvalue.
+/// do not permit any user-defined conversion sequences.
 static ImplicitConversionSequence
 TryCopyInitialization(Sema &S, Expr *From, QualType ToType,
                       bool SuppressUserConversions, 
@@ -2517,7 +2513,6 @@
   return S.TryImplicitConversion(From, ToType,
                                  SuppressUserConversions,
                                  /*AllowExplicit=*/false,
-                                 /*ForceRValue=*/false,
                                  InOverloadResolution);
 }
 
@@ -2638,7 +2633,6 @@
                                // FIXME: Are these flags correct?
                                /*SuppressUserConversions=*/false,
                                /*AllowExplicit=*/true,
-                               /*ForceRValue=*/false,
                                /*InOverloadResolution=*/false);
 }
 





More information about the cfe-commits mailing list