diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaCXXCast.cpp | 14 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 5 |
3 files changed, 18 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp index a6e5570752b..393c84a5d8a 100644 --- a/clang/lib/Sema/SemaCXXCast.cpp +++ b/clang/lib/Sema/SemaCXXCast.cpp @@ -150,26 +150,34 @@ Sema::BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, case tok::kw_dynamic_cast: { CastExpr::CastKind Kind = CastExpr::CK_Unknown; + // FIXME: Initialize base path! + CXXBaseSpecifierArray BasePath; if (!TypeDependent) CheckDynamicCast(*this, Ex, DestType, OpRange, DestRange, Kind); return Owned(new (Context)CXXDynamicCastExpr(DestType.getNonReferenceType(), - Kind, Ex, DestTInfo, OpLoc)); + Kind, Ex, BasePath, DestTInfo, + OpLoc)); } case tok::kw_reinterpret_cast: { CastExpr::CastKind Kind = CastExpr::CK_Unknown; + // FIXME: Initialize base path! + CXXBaseSpecifierArray BasePath; if (!TypeDependent) CheckReinterpretCast(*this, Ex, DestType, OpRange, DestRange, Kind); return Owned(new (Context) CXXReinterpretCastExpr( DestType.getNonReferenceType(), - Kind, Ex, DestTInfo, OpLoc)); + Kind, Ex, BasePath, DestTInfo, OpLoc)); } case tok::kw_static_cast: { CastExpr::CastKind Kind = CastExpr::CK_Unknown; + // FIXME: Initialize base path! + CXXBaseSpecifierArray BasePath; if (!TypeDependent) CheckStaticCast(*this, Ex, DestType, OpRange, Kind); return Owned(new (Context) CXXStaticCastExpr(DestType.getNonReferenceType(), - Kind, Ex, DestTInfo, OpLoc)); + Kind, Ex, BasePath, + DestTInfo, OpLoc)); } } diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 683cd39012b..f0b25f90ffa 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3957,13 +3957,15 @@ Sema::BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, Expr *castExpr = static_cast<Expr*>(Op.get()); CastExpr::CastKind Kind = CastExpr::CK_Unknown; + // FIXME: Initialize base path! + CXXBaseSpecifierArray BasePath; if (CheckCastTypes(SourceRange(LParenLoc, RParenLoc), Ty->getType(), castExpr, Kind)) return ExprError(); Op.release(); return Owned(new (Context) CStyleCastExpr(Ty->getType().getNonReferenceType(), - Kind, castExpr, Ty, + Kind, castExpr, BasePath, Ty, LParenLoc, RParenLoc)); } diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index e3ffb24d755..b382236e80d 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -501,6 +501,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep, // if (NumExprs == 1) { CastExpr::CastKind Kind = CastExpr::CK_Unknown; + // FIXME: Initialize base path! + CXXBaseSpecifierArray BasePath; if (CheckCastTypes(TypeRange, Ty, Exprs[0], Kind, /*FunctionalStyle=*/true)) return ExprError(); @@ -508,7 +510,8 @@ Sema::ActOnCXXTypeConstructExpr(SourceRange TypeRange, TypeTy *TypeRep, return Owned(new (Context) CXXFunctionalCastExpr(Ty.getNonReferenceType(), TInfo, TyBeginLoc, Kind, - Exprs[0], RParenLoc)); + Exprs[0], BasePath, + RParenLoc)); } if (const RecordType *RT = Ty->getAs<RecordType>()) { |