summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-07-31 01:23:52 +0000
committerAnders Carlsson <andersca@mac.com>2009-07-31 01:23:52 +0000
commita076d14514200507ba381bada8e23adf5e6ba17d (patch)
treefa2e10e81835660ce4c1918bf179a45ffa8ec8d4 /clang/lib/Sema/Sema.cpp
parent5b78af9ed72f9abe0c95bd90398e08f25c93314b (diff)
downloadbcm5719-llvm-a076d14514200507ba381bada8e23adf5e6ba17d.tar.gz
bcm5719-llvm-a076d14514200507ba381bada8e23adf5e6ba17d.zip
Add CK_DerivedToBase and use it PerformObjectMemberConversion.
llvm-svn: 77652
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index f7fce8527a2..84d72115554 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -194,7 +194,8 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
/// ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
/// If there is already an implicit cast, merge into the existing one.
/// If isLvalue, the result of the cast is an lvalue.
-void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty, bool isLvalue) {
+void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty,
+ CastExpr::CastKind Kind, bool isLvalue) {
QualType ExprTy = Context.getCanonicalType(Expr->getType());
QualType TypeTy = Context.getCanonicalType(Ty);
@@ -217,7 +218,7 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty, bool isLvalue) {
ImpCast->setType(Ty);
ImpCast->setLvalueCast(isLvalue);
} else
- Expr = new (Context) ImplicitCastExpr(Ty, CastExpr::CK_Unknown, Expr,
+ Expr = new (Context) ImplicitCastExpr(Ty, Kind, Expr,
isLvalue);
}
OpenPOWER on IntegriCloud