diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-16 17:16:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-16 17:16:43 +0000 |
commit | 871f439643b297dbb49396f6a3617875390978df (patch) | |
tree | dfd48bd67369a1aa51cdb45b22c5965724572c2c | |
parent | 8ed4ff6d05ef41027ddaa13000309e719fa27ce8 (diff) |
Eliminate the Elidable parameter to PerformImplicitConversion; we
don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101481 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/Sema.h | 4 | ||||
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 31 | ||||
-rw-r--r-- | lib/Sema/SemaInit.cpp | 2 |
3 files changed, 10 insertions, 27 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h index 1be5f7af88..9c09039877 100644 --- a/lib/Sema/Sema.h +++ b/lib/Sema/Sema.h @@ -4109,12 +4109,10 @@ public: bool PerformImplicitConversion(Expr *&From, QualType ToType, AssignmentAction Action, - bool AllowExplicit = false, - bool Elidable = false); + bool AllowExplicit = false); bool PerformImplicitConversion(Expr *&From, QualType ToType, AssignmentAction Action, bool AllowExplicit, - bool Elidable, ImplicitConversionSequence& ICS); bool PerformImplicitConversion(Expr *&From, QualType ToType, const ImplicitConversionSequence& ICS, diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index be3ef83d99..33cc63eb61 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -1479,38 +1479,23 @@ Sema::IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType) { /// error, false otherwise. The expression From is replaced with the /// converted expression. Flavor is the kind of conversion we're /// performing, used in the error message. If @p AllowExplicit, -/// explicit user-defined conversions are permitted. @p Elidable should be true -/// when called for copies which may be elided (C++ 12.8p15). C++0x overload -/// resolution works differently in that case. +/// explicit user-defined conversions are permitted. bool Sema::PerformImplicitConversion(Expr *&From, QualType ToType, - AssignmentAction Action, bool AllowExplicit, - bool Elidable) { + AssignmentAction Action, bool AllowExplicit) { ImplicitConversionSequence ICS; - return PerformImplicitConversion(From, ToType, Action, AllowExplicit, - Elidable, ICS); + return PerformImplicitConversion(From, ToType, Action, AllowExplicit, ICS); } bool Sema::PerformImplicitConversion(Expr *&From, QualType ToType, AssignmentAction Action, bool AllowExplicit, - bool Elidable, ImplicitConversionSequence& ICS) { - ICS.setBad(BadConversionSequence::no_conversion, From, ToType); - if (Elidable && getLangOptions().CPlusPlus0x) { - ICS = TryImplicitConversion(From, ToType, - /*SuppressUserConversions=*/false, - AllowExplicit, - /*ForceRValue=*/true, - /*InOverloadResolution=*/false); - } - if (ICS.isBad()) { - ICS = TryImplicitConversion(From, ToType, - /*SuppressUserConversions=*/false, - AllowExplicit, - /*ForceRValue=*/false, - /*InOverloadResolution=*/false); - } + ICS = TryImplicitConversion(From, ToType, + /*SuppressUserConversions=*/false, + AllowExplicit, + /*ForceRValue=*/false, + /*InOverloadResolution=*/false); return PerformImplicitConversion(From, ToType, ICS, Action); } diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index dae3d3ae7e..1293e8d6c5 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3494,7 +3494,7 @@ InitializationSequence::Perform(Sema &S, case SK_ConversionSequence: if (S.PerformImplicitConversion(CurInitExpr, Step->Type, Sema::AA_Converting, - false, false, *Step->ICS)) + false, *Step->ICS)) return S.ExprError(); CurInit.release(); |