diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-16 18:00:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-16 18:00:29 +0000 |
commit | 74e386e8ead6654fade7f8661e28e10100dd4005 (patch) | |
tree | 7fcf2178e3b520837b6e7c668c4be9a52c27f97c | |
parent | d617b85d12169ccb4bdf281836a281d0c173ba6a (diff) |
Kill ForceRValue once and for all
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101502 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/Sema.h | 1 | ||||
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 5 | ||||
-rw-r--r-- | lib/Sema/SemaInit.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 10 |
5 files changed, 2 insertions, 17 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 3bd927abbc..db8f34d1d1 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -1064,7 +1064,6 @@ public: TryImplicitConversion(Expr* From, QualType ToType, bool SuppressUserConversions, bool AllowExplicit, - bool ForceRValue, bool InOverloadResolution, bool UserCast = false); bool IsStandardConversion(Expr *From, QualType ToType, diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index 37df2a6000..a40bb62b17 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -961,7 +961,6 @@ TryStaticImplicitCast(Sema &Self, Expr *&SrcExpr, QualType DestType, Self.TryImplicitConversion(SrcExpr, DestType, /*SuppressUserConversions=*/false, /*AllowExplicit=*/true, - /*ForceRValue=*/false, /*InOverloadResolution=*/false, /*one of user provided casts*/true); diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 33cc63eb61..c906d22d6f 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -1494,7 +1494,6 @@ Sema::PerformImplicitConversion(Expr *&From, QualType ToType, ICS = TryImplicitConversion(From, ToType, /*SuppressUserConversions=*/false, AllowExplicit, - /*ForceRValue=*/false, /*InOverloadResolution=*/false); return PerformImplicitConversion(From, ToType, ICS, Action); } @@ -2369,13 +2368,11 @@ QualType Sema::FindCompositePointerType(Expr *&E1, Expr *&E2, 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 @@ QualType Sema::FindCompositePointerType(Expr *&E1, Expr *&E2, 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(); } diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 848d25efd0..b66c9805c3 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -2527,7 +2527,6 @@ static void TryReferenceInitialization(Sema &S, ImplicitConversionSequence ICS = S.TryImplicitConversion(Initializer, cv1T1, /*SuppressUserConversions=*/false, AllowExplicit, - /*ForceRValue=*/false, /*FIXME:InOverloadResolution=*/false, /*UserCast=*/Kind.isExplicitCast()); @@ -2888,7 +2887,6 @@ static void TryImplicitConversion(Sema &S, = S.TryImplicitConversion(Initializer, Entity.getType(), /*SuppressUserConversions=*/true, /*AllowExplicit=*/false, - /*ForceRValue=*/false, /*FIXME:InOverloadResolution=*/false, /*UserCast=*/Kind.isExplicitCast()); diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 1c85896bd4..ca8d13517e 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -436,14 +436,12 @@ bool Sema::IsOverload(FunctionDecl *New, FunctionDecl *Old) { /// 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 @@ TryReferenceInit(Sema &S, Expr *&Init, QualType DeclType, // 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 @@ TryReferenceInit(Sema &S, Expr *&Init, QualType DeclType, /// 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 @@ TryCopyInitialization(Sema &S, Expr *From, QualType ToType, return S.TryImplicitConversion(From, ToType, SuppressUserConversions, /*AllowExplicit=*/false, - /*ForceRValue=*/false, InOverloadResolution); } @@ -2638,7 +2633,6 @@ ImplicitConversionSequence Sema::TryContextuallyConvertToBool(Expr *From) { // FIXME: Are these flags correct? /*SuppressUserConversions=*/false, /*AllowExplicit=*/true, - /*ForceRValue=*/false, /*InOverloadResolution=*/false); } |