diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-16 17:51:01 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-16 17:51:01 +0000 |
commit | 105ec4bb8e969eee18b4c2f503b46b17f3e2f364 (patch) | |
tree | 41645e70955705f49deb6bc12ec6e067669faae3 /lib/Sema/SemaDeclObjC.cpp | |
parent | 5bc60d0c324a1b3984cd4a32acb587c8f873ab5f (diff) |
Patch to check for ObjC's property type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 417803e5c1..7b6059415a 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1437,6 +1437,10 @@ Sema::DeclTy *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, } } + Type *t = T.getTypePtr(); + if (t->isArrayType() || t->isFunctionType()) + Diag(AtLoc, diag::err_property_type) << T; + ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, AtLoc, FD.D.getIdentifier(), T); // Regardless of setter/getter attribute, we save the default getter/setter |