summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp2
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 22b0f03a52d..9ebc7de84d3 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -7421,7 +7421,7 @@ static bool IsConstProperty(Expr *E, Sema &S) {
ObjCPropertyDecl *PDecl = PropExpr->getExplicitProperty();
QualType T = PDecl->getType();
if (T->isReferenceType())
- T = cast<ReferenceType>(T)->getPointeeType();
+ T = T->getAs<ReferenceType>()->getPointeeType();
CanQualType CT = S.Context.getCanonicalType(T);
return CT.isConstQualified();
}
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index 43e30275e2f..95a365cacf6 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -540,7 +540,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
ParmVarDecl *Param = (*P);
QualType T = Param->getType();
if (T->isReferenceType())
- T = cast<ReferenceType>(T)->getPointeeType();
+ T = T->getAs<ReferenceType>()->getPointeeType();
Expr *rhs = new (Context) DeclRefExpr(Param, T,
VK_LValue, SourceLocation());
ExprResult Res = BuildBinOp(S, lhs->getLocEnd(),
OpenPOWER on IntegriCloud