]> granicus.if.org Git - clang/commitdiff
Don't error when setting a sub-structure variable via objc properties
authorFariborz Jahanian <fjahanian@apple.com>
Fri, 12 Feb 2010 21:02:28 +0000 (21:02 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Fri, 12 Feb 2010 21:02:28 +0000 (21:02 +0000)
in objective-c++ mode (do it for objective-c only).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96012 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Expr.cpp

index 73a650f346448f3e87c16a7f7ab3bb89c838eb83..22eb28c3599843a25a5f16a30f68f584f937cbd1 100644 (file)
@@ -1068,12 +1068,7 @@ Expr::isLvalueResult Expr::isLvalueInternal(ASTContext &Ctx) const {
       if (isa<FieldDecl>(Member)) {
         if (m->isArrow())
           return LV_Valid;
-        Expr *BaseExp = m->getBase();
-        if (BaseExp->getStmtClass() == ObjCPropertyRefExprClass)
-          return LV_SubObjCPropertySetting;
-        return 
-          (BaseExp->getStmtClass() == ObjCImplicitSetterGetterRefExprClass) ?
-           LV_SubObjCPropertyGetterSetting : BaseExp->isLvalue(Ctx);        
+        return m->getBase()->isLvalue(Ctx);
       }
 
       //   -- If it refers to a static member function [...], then