summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-01-03 18:08:02 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-01-03 18:08:02 +0000
commitc63f1c5ab65b0318a0daf85bf02b936a07dd1921 (patch)
tree0ecb0bf075ac3071ac0e8af19f075c380f7caafb /clang/lib/Sema/SemaExpr.cpp
parent7cd69249fa0d4b55da0731e451940caa17711af1 (diff)
downloadbcm5719-llvm-c63f1c5ab65b0318a0daf85bf02b936a07dd1921.tar.gz
bcm5719-llvm-c63f1c5ab65b0318a0daf85bf02b936a07dd1921.zip
Guard lazy synthesis of provisional ivars under the new
-fobjc-default-synthesize-properties flag. llvm-svn: 122757
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
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) {
OpenPOWER on IntegriCloud