diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-22 21:02:34 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-03-22 21:02:34 +0000 |
commit | 8149a5786def747af783a9e3c22714bb7ab42b9c (patch) | |
tree | 5233fed47b880715ef5281b151df658669c6d57f /lib/Sema/SemaExprObjC.cpp | |
parent | b1332d7a5228600ae86276b12883ec0ac9500ec1 (diff) |
Diagnose miuse of property dot-syntax instead of crashing.
(radar 7634653).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index c98ba435c7..d5a22ca15f 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -289,7 +289,10 @@ Action::OwningExprResult Sema::ActOnClassPropertyRefExpr( IdentifierInfo *receiverNamePtr = &receiverName; ObjCInterfaceDecl *IFace = getObjCInterfaceDecl(receiverNamePtr); - + if (!IFace) { + Diag(receiverNameLoc, diag::err_expected_ident_or_lparen); + return ExprError(); + } // Search for a declared property first. Selector Sel = PP.getSelectorTable().getNullarySelector(&propertyName); |