diff options
Diffstat (limited to 'lib/Sema')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 1d8d24882e..bf9b0ae988 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -7146,6 +7146,11 @@ static bool IsReadonlyProperty(Expr *E, Sema &S) { static bool IsConstProperty(Expr *E, Sema &S) { const ObjCPropertyRefExpr *PropExpr = dyn_cast<ObjCPropertyRefExpr>(E); if (!PropExpr) return false; + + assert(!S.Context.hasSameType(PropExpr->getType(), + S.Context.PseudoObjectTy) + && "property expression cannot be a pseudo object"); + if (PropExpr->isImplicitProperty()) return false; ObjCPropertyDecl *PDecl = PropExpr->getExplicitProperty(); |