diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-12 19:55:42 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-01-12 19:55:42 +0000 |
commit | 8e1555c7c3bf668fbda3fa9c13f0499332e1bf70 (patch) | |
tree | 7008bf246b43c096f5001a6ec77617d1d4a92045 /clang/lib/AST/Expr.cpp | |
parent | df5598444af12781b8d1eb0d6059463934d5c620 (diff) | |
download | bcm5719-llvm-8e1555c7c3bf668fbda3fa9c13f0499332e1bf70.tar.gz bcm5719-llvm-8e1555c7c3bf668fbda3fa9c13f0499332e1bf70.zip |
Patch to supprt case of readonly property being
assigned to when it has user declared setter method
defined in the class implementation (but no declaration in
the class itself).
llvm-svn: 62098
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 26260132e7c..89cad419791 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -604,19 +604,7 @@ Expr::isModifiableLvalueResult Expr::isModifiableLvalue(ASTContext &Ctx) const { if (!BDR->isByRef() && isa<VarDecl>(BDR->getDecl())) return MLV_NotBlockQualified; } - // Assigning to a readonly property? - if (getStmtClass() == ObjCPropertyRefExprClass) { - const ObjCPropertyRefExpr* PropExpr = cast<ObjCPropertyRefExpr>(this); - if (ObjCPropertyDecl *PDecl = PropExpr->getProperty()) { - QualType BaseType = PropExpr->getBase()->getType(); - if (const PointerType *PTy = BaseType->getAsPointerType()) - if (const ObjCInterfaceType *IFTy = - PTy->getPointeeType()->getAsObjCInterfaceType()) - if (ObjCInterfaceDecl *IFace = IFTy->getDecl()) - if (IFace->isPropertyReadonly(PDecl)) - return MLV_ReadonlyProperty; - } - } + // Assigning to an 'implicit' property? else if (getStmtClass() == ObjCKVCRefExprClass) { const ObjCKVCRefExpr* KVCExpr = cast<ObjCKVCRefExpr>(this); |