summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-12-16 18:03:30 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-12-16 18:03:30 +0000
commit00857fc376a5b896caf8176c016eea334cb3d788 (patch)
tree3326b21ed5b6567e823e09b7fc77ba1428a8e18c /clang/lib/Sema/SemaDeclObjC.cpp
parentd681a29ac0cb889f34ebd377eaeb48b34a1819d6 (diff)
downloadbcm5719-llvm-00857fc376a5b896caf8176c016eea334cb3d788.tar.gz
bcm5719-llvm-00857fc376a5b896caf8176c016eea334cb3d788.zip
Diagnose property of reference type as unsupported
instead of crashing for now. llvm-svn: 91546
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index a768e1bdf78..ea7d9a93858 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -1950,6 +1950,10 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
!(Attributes & ObjCDeclSpec::DQ_PR_retain) &&
!(Attributes & ObjCDeclSpec::DQ_PR_copy)));
QualType T = GetTypeForDeclarator(FD.D, S);
+ if (T->isReferenceType()) {
+ Diag(AtLoc, diag::error_reference_property);
+ return DeclPtrTy();
+ }
Decl *ClassDecl = ClassCategory.getAs<Decl>();
ObjCInterfaceDecl *CCPrimary = 0; // continuation class's primary class
// May modify Attributes.
OpenPOWER on IntegriCloud