diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-23 22:18:37 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-23 22:18:37 +0000 |
commit | 88465d3e996e627bbaa11099b039ddab66d5af2c (patch) | |
tree | af24459279b9dda86eea5d03ed91258e3c8b6dc1 /lib/Sema/Sema.cpp | |
parent | f88b0d6c99e6473e78331271935986535dc4603c (diff) |
Add an InheritancePath parameter to the ImplicitCastExpr constructor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 2bb1ed8ce9..62fbe94746 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -158,7 +158,9 @@ Sema::~Sema() { /// 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, - CastExpr::CastKind Kind, bool isLvalue) { + CastExpr::CastKind Kind, + CastExpr::CXXBaseVector *InheritancePath, + bool isLvalue) { QualType ExprTy = Context.getCanonicalType(Expr->getType()); QualType TypeTy = Context.getCanonicalType(Ty); @@ -178,13 +180,15 @@ void Sema::ImpCastExprToType(Expr *&Expr, QualType Ty, if (ImplicitCastExpr *ImpCast = dyn_cast<ImplicitCastExpr>(Expr)) { if (ImpCast->getCastKind() == Kind) { + assert(!InheritancePath && "FIXME: Merge paths!"); ImpCast->setType(Ty); ImpCast->setLvalueCast(isLvalue); return; } } - Expr = new (Context) ImplicitCastExpr(Ty, Kind, Expr, isLvalue); + Expr = new (Context) ImplicitCastExpr(Ty, Kind, Expr, InheritancePath, + isLvalue); } void Sema::DeleteExpr(ExprTy *E) { |