diff options
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r-- | clang/lib/Sema/SemaCast.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp index d986e3b..ddf17d8 100644 --- a/clang/lib/Sema/SemaCast.cpp +++ b/clang/lib/Sema/SemaCast.cpp @@ -962,7 +962,7 @@ void CastOperation::CheckDynamicCast() { } // C++ 5.2.7p6: Otherwise, v shall be [polymorphic]. - const RecordDecl *SrcDecl = SrcRecord->getOriginalDecl()->getDefinition(); + const RecordDecl *SrcDecl = SrcRecord->getDecl()->getDefinition(); assert(SrcDecl && "Definition missing"); if (!cast<CXXRecordDecl>(SrcDecl)->isPolymorphic()) { Self.Diag(OpRange.getBegin(), diag::err_bad_dynamic_cast_not_polymorphic) @@ -1453,7 +1453,7 @@ static TryCastResult TryStaticCast(Sema &Self, ExprResult &SrcExpr, // converted to an integral type. [...] A value of a scoped enumeration type // can also be explicitly converted to a floating-point type [...]. if (const EnumType *Enum = dyn_cast<EnumType>(SrcType)) { - if (Enum->getOriginalDecl()->isScoped()) { + if (Enum->getDecl()->isScoped()) { if (DestType->isBooleanType()) { Kind = CK_IntegralToBoolean; return TC_Success; @@ -3105,7 +3105,7 @@ void CastOperation::CheckCStyleCast() { } // GCC's cast to union extension. - if (RecordDecl *RD = DestRecordTy->getOriginalDecl(); RD->isUnion()) { + if (RecordDecl *RD = DestRecordTy->getDecl(); RD->isUnion()) { if (CastExpr::getTargetFieldForToUnionCast(RD->getDefinitionOrSelf(), SrcType)) { Self.Diag(OpRange.getBegin(), diag::ext_typecheck_cast_to_union) |