aboutsummaryrefslogtreecommitdiff
path: root/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
commitdd69aae2851577e4266b62f3430a1fce757b65ae (patch)
treefa94476a4e607c67d85319b4753c26cc8029b7eb /lib/Sema/SemaDeclObjC.cpp
parent4b3e5be334c93c3f48af2a49c0ea7cd9bae2a0e5 (diff)
Diagnose property of reference type as unsupported
instead of crashing for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index a768e1bdf7..ea7d9a9385 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/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.