diff options
author | Manman Ren <manman.ren@gmail.com> | 2016-01-29 19:16:39 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2016-01-29 19:16:39 +0000 |
commit | dfef4069e3a02b8e1461434971ff0060afa89a4e (patch) | |
tree | b78b0cd17ef6d100ae9f2e22ef2049a2aca7e212 /clang/lib/Sema/SemaObjCProperty.cpp | |
parent | 0fe61f868865c4c643cc5576e5ee63f94f382d8a (diff) | |
download | bcm5719-llvm-dfef4069e3a02b8e1461434971ff0060afa89a4e.tar.gz bcm5719-llvm-dfef4069e3a02b8e1461434971ff0060afa89a4e.zip |
Class Property: warn for synthesize on a class property.
rdar://23891898
llvm-svn: 259226
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index ec057c94377..c9d2da880e1 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/lib/Sema/SemaObjCProperty.cpp @@ -933,6 +933,10 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S, Diag(PropertyLoc, diag::error_bad_property_decl) << IDecl->getDeclName(); return nullptr; } + if (property->isClassProperty() && Synthesize) { + Diag(PropertyLoc, diag::error_synthesize_on_class_property) << PropertyId; + return nullptr; + } unsigned PIkind = property->getPropertyAttributesAsWritten(); if ((PIkind & (ObjCPropertyDecl::OBJC_PR_atomic | ObjCPropertyDecl::OBJC_PR_nonatomic) ) == 0) { |