diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2011-09-27 21:58:52 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2011-09-27 21:58:52 +0000 |
commit | c1c0dfb376b829b94d4c61e9f358ce23e6aa3169 (patch) | |
tree | 4c41ddf548926469fbe8b8de22022f06fe7c030b /lib/Sema/SemaExprCXX.cpp | |
parent | 1456fec8420de3dfce396de844a9e37d13417423 (diff) |
Get rid of useless helper Sema::CastCategory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 412d891a93..946f02c567 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -325,7 +325,7 @@ ExprResult Sema::BuildCXXTypeId(QualType TypeInfoType, QualType UnqualT = Context.getUnqualifiedArrayType(T, Quals); if (!Context.hasSameType(T, UnqualT)) { T = UnqualT; - E = ImpCastExprToType(E, UnqualT, CK_NoOp, CastCategory(E)).take(); + E = ImpCastExprToType(E, UnqualT, CK_NoOp, E->getValueKind()).take(); } } @@ -545,7 +545,7 @@ ExprResult Sema::CheckCXXThrowOperand(SourceLocation ThrowLoc, Expr *E, // or "pointer to function returning T", [...] if (E->getType().hasQualifiers()) E = ImpCastExprToType(E, E->getType().getUnqualifiedType(), CK_NoOp, - CastCategory(E)).take(); + E->getValueKind()).take(); ExprResult Res = DefaultFunctionArrayConversion(E); if (Res.isInvalid()) @@ -2430,7 +2430,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, return ExprError(); From = ImpCastExprToType(From, ToType.getNonReferenceType(), - CK_DerivedToBase, CastCategory(From), + CK_DerivedToBase, From->getValueKind(), &BasePath, CCK).take(); break; } @@ -2533,7 +2533,7 @@ Sema::PerformImplicitConversion(Expr *From, QualType ToType, // The qualification keeps the category of the inner expression, unless the // target type isn't a reference. ExprValueKind VK = ToType->isReferenceType() ? - CastCategory(From) : VK_RValue; + From->getValueKind() : VK_RValue; From = ImpCastExprToType(From, ToType.getNonLValueExprType(Context), CK_NoOp, VK, /*BasePath=*/0, CCK).take(); @@ -3339,8 +3339,7 @@ QualType Sema::CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, } // Cast LHS to type of use. QualType UseType = isIndirect ? Context.getPointerType(Class) : Class; - ExprValueKind VK = - isIndirect ? VK_RValue : CastCategory(LHS.get()); + ExprValueKind VK = isIndirect ? VK_RValue : LHS.get()->getValueKind(); CXXCastPath BasePath; BuildBasePathArray(Paths, BasePath); |