diff options
author | Anders Carlsson <andersca@mac.com> | 2009-07-31 01:23:52 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-07-31 01:23:52 +0000 |
commit | 3503d041ca8a3535a1c1a30005a6b18ae7aed5db (patch) | |
tree | 23dfe3ea8c117f6ddbdf642ea1305153f593d236 /lib/Sema/Sema.cpp | |
parent | 87a05f1fe8ae14044f182b015b279e0a6f4cbdd1 (diff) |
Add CK_DerivedToBase and use it PerformObjectMemberConversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index f7fce8527a..84d7211555 100644 --- a/lib/Sema/Sema.cpp +++ b/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); } |