aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r--lib/Sema/SemaInit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp
index 5887c5e7e4..5c55b56c7d 100644
--- a/lib/Sema/SemaInit.cpp
+++ b/lib/Sema/SemaInit.cpp
@@ -3457,18 +3457,20 @@ InitializationSequence::Perform(Sema &S,
// We have a derived-to-base cast that produces either an rvalue or an
// lvalue. Perform that cast.
+ CXXBaseSpecifierArray BasePath;
+
// Casts to inaccessible base classes are allowed with C-style casts.
bool IgnoreBaseAccess = Kind.isCStyleOrFunctionalCast();
if (S.CheckDerivedToBaseConversion(SourceType, Step->Type,
CurInitExpr->getLocStart(),
- CurInitExpr->getSourceRange(), 0,
- IgnoreBaseAccess))
+ CurInitExpr->getSourceRange(),
+ &BasePath, IgnoreBaseAccess))
return S.ExprError();
CurInit = S.Owned(new (S.Context) ImplicitCastExpr(Step->Type,
CastExpr::CK_DerivedToBase,
(Expr*)CurInit.release(),
- CXXBaseSpecifierArray(),
+ BasePath,
Step->Kind == SK_CastDerivedToBaseLValue));
break;
}