summaryrefslogtreecommitdiffstats
path: root/clang/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
commit2536c6da0ec4db6506f93f5f7d65ac1c17348c77 (patch)
tree29819bf87dc6ae5874e44ce9962f04c94bc6f220 /clang/lib/Sema/Sema.cpp
parentb50a088122875184c3dfc96337e631e2e854d2f7 (diff)
downloadbcm5719-llvm-2536c6da0ec4db6506f93f5f7d65ac1c17348c77.tar.gz
bcm5719-llvm-2536c6da0ec4db6506f93f5f7d65ac1c17348c77.zip
More incremental progress towards not including Expr.h in Sema.h.
llvm-svn: 112044
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 6143492ea76..120035c923a 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/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) {
OpenPOWER on IntegriCloud