diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-16 18:03:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-12-16 18:03:30 +0000 |
commit | 00857fc376a5b896caf8176c016eea334cb3d788 (patch) | |
tree | 3326b21ed5b6567e823e09b7fc77ba1428a8e18c /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | d681a29ac0cb889f34ebd377eaeb48b34a1819d6 (diff) | |
download | bcm5719-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.cpp | 4 |
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. |