Implement type checking of Objective-C property attributes.
 - readonly and readwrite are mutually exclusive.
 - assign, copy, and retain are mutually exclusive.
 - copy and retain are invalid on non-object types.
 - Warn about using default 'assign' property on object types
   (attempting to follow gcc behavior).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56507 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 4fbd735..ef5954b 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -723,6 +723,12 @@
                                        unsigned NumProtocols,
                                    llvm::SmallVectorImpl<DeclTy *> &Protocols);
   
+  /// Ensure attributes are consistent with type. 
+  /// \param [in, out] Attributes The attributes to check; they will
+  /// be modified to be consistent with \arg PropertyTy.
+  void CheckObjCPropertyAttributes(QualType PropertyTy, 
+                                   SourceLocation Loc,
+                                   unsigned &Attributes);
   void DiagnosePropertyMismatch(ObjCPropertyDecl *Property, 
                                 ObjCPropertyDecl *SuperProperty,
                                 const char *Name);