aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-02-21 21:48:05 +0000
committerJohn McCall <rjmccall@apple.com>2012-02-21 21:48:05 +0000
commit977ea7864a50eee39f6bef8a5a79154ac9ba4b3e (patch)
treecd1945a9854bce7caf5e4449553e85ea97b5d16f /lib/Sema/SemaObjCProperty.cpp
parentc95d01f838efd729fb7f910f5e551aa7d9a2c442 (diff)
Don't crash on attempts to synthesize an invalid property.
rdar://problem/10904479 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151089 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index f9c064d997..5df214fd9f 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -1777,6 +1777,7 @@ void Sema::CheckObjCPropertyAttributes(Decl *PDecl,
Attributes & ObjCDeclSpec::DQ_PR_copy ? "copy" : "retain (or strong)");
Attributes &= ~(ObjCDeclSpec::DQ_PR_weak | ObjCDeclSpec::DQ_PR_copy |
ObjCDeclSpec::DQ_PR_retain | ObjCDeclSpec::DQ_PR_strong);
+ PropertyDecl->setInvalidDecl();
}
// Check for more than one of { assign, copy, retain }.