aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-25 10:28:54 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-25 10:28:54 +0000
commit5baba9d98364a3525d6afa15a04cdad82fd6dd30 (patch)
treefa5f362a24e847c0853cb792239948880e89f96c /lib/Sema/Sema.cpp
parentf869d205c5985121b8134a9174ed8d3b136637b5 (diff)
More incremental progress towards not including Expr.h in Sema.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112044 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 6143492ea7..120035c923 100644
--- a/lib/Sema/Sema.cpp
+++ b/lib/Sema/Sema.cpp
@@ -191,8 +191,7 @@ Sema::~Sema() {
/// If there is already an implicit cast, merge into the existing one.
/// The result is of the given category.
void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty,
- CastExpr::CastKind Kind,
- ImplicitCastExpr::ResultCategory Category,
+ CastKind Kind, ExprValueKind VK,
const CXXCastPath *BasePath) {
QualType ExprTy = Context.getCanonicalType(Expr->getType());
QualType TypeTy = Context.getCanonicalType(Ty);
@@ -224,21 +223,18 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty,
if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr)) {
if (ImpCast->getCastKind() == Kind && (!BasePath || BasePath->empty())) {
ImpCast->setType(Ty);
- ImpCast->setCategory(Category);
+ ImpCast->setValueKind(VK);
return;
}
}
- Expr = ImplicitCastExpr::Create(Context, Ty, Kind, Expr, BasePath, Category);
+ Expr = ImplicitCastExpr::Create(Context, Ty, Kind, Expr, BasePath, VK);
}
-ImplicitCastExpr::ResultCategory Sema::CastCategory(Expr *E) {
+ExprValueKind Sema::CastCategory(Expr *E) {
Expr::Classification Classification = E->Classify(Context);
- return Classification.isRValue() ?
- ImplicitCastExpr::RValue :
- (Classification.isLValue() ?
- ImplicitCastExpr::LValue :
- ImplicitCastExpr::XValue);
+ return Classification.isRValue() ? VK_RValue :
+ (Classification.isLValue() ? VK_LValue : VK_XValue);
}
void Sema::DeleteExpr(ExprTy *E) {