diff options
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e481e5ce211..f0e20496469 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -1470,7 +1470,8 @@ ExprResult Sema::ActOnIdExpression(Scope *S, Expr *Ex = E.takeAs<Expr>(); if (Ex) return Owned(Ex); // Synthesize ivars lazily - if (getLangOptions().ObjCNonFragileABI2) { + if (getLangOptions().ObjCDefaultSynthProperties && + getLangOptions().ObjCNonFragileABI2) { if (SynthesizeProvisionalIvar(*this, R, II, NameLoc)) { if (const ObjCPropertyDecl *Property = canSynthesizeProvisionalIvar(II)) { @@ -1527,7 +1528,8 @@ ExprResult Sema::ActOnIdExpression(Scope *S, if (VarDecl *Var = R.getAsSingle<VarDecl>()) { if (getLangOptions().ObjCNonFragileABI && IvarLookupFollowUp && - !getLangOptions().ObjCNonFragileABI2 && + !(getLangOptions().ObjCDefaultSynthProperties && + getLangOptions().ObjCNonFragileABI2) && Var->isFileVarDecl()) { ObjCPropertyDecl *Property = canSynthesizeProvisionalIvar(II); if (Property) { |