diff options
author | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-24 05:12:34 +0000 |
commit | 7eb0a9eb0cde8444b97f9c5b713d9be7a6f1e607 (patch) | |
tree | e828a6fb6060ac7711b5209210bfd31c15de71af /lib/Sema/SemaOverload.cpp | |
parent | 834f9de3d3d76986d09f41725a70ba45a3e2aecd (diff) |
Switch a lot of call-sites over to using the new value-kind calculations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaOverload.cpp')
-rw-r--r-- | lib/Sema/SemaOverload.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 5ea7414026..5da655907c 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -1003,8 +1003,8 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType, // Lvalue-to-rvalue conversion (C++ 4.1): // An lvalue (3.10) of a non-function, non-array type T can be // converted to an rvalue. - Expr::isLvalueResult argIsLvalue = From->isLvalue(S.Context); - if (argIsLvalue == Expr::LV_Valid && + bool argIsLValue = From->isLValue(); + if (argIsLValue && !FromType->isFunctionType() && !FromType->isArrayType() && S.Context.getCanonicalType(FromType) != S.Context.OverloadTy) { SCS.First = ICK_Lvalue_To_Rvalue; @@ -1036,7 +1036,7 @@ static bool IsStandardConversion(Sema &S, Expr* From, QualType ToType, SCS.setAllToTypes(FromType); return true; } - } else if (FromType->isFunctionType() && argIsLvalue == Expr::LV_Valid) { + } else if (FromType->isFunctionType() && argIsLValue) { // Function-to-pointer conversion (C++ 4.3). SCS.First = ICK_Function_To_Pointer; |