зеркало из https://github.com/microsoft/clang-1.git
Don't error when setting a sub-structure variable via objc properties
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
This commit is contained in:
Родитель
a5c6c5814b
Коммит
2d901df394
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче