aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-09-17 18:48:50 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-09-17 18:48:50 +0000
commit898f284d3777b6880b6a7051cccd0d11db7d5457 (patch)
tree2aed1983a4bbd29e5650e64648ceed3f02091519 /lib/Sema/SemaObjCProperty.cpp
parent62ec1f2fd7368542bb926c04797fb07023547694 (diff)
objc: Don't crash with decl context for property impl.
is missing. // rdar//10127639 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index 33c5e71b5e..a4f782227a 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/lib/Sema/SemaObjCProperty.cpp
@@ -508,7 +508,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
IdentifierInfo *PropertyIvar,
SourceLocation PropertyIvarLoc) {
ObjCContainerDecl *ClassImpDecl =
- cast_or_null<ObjCContainerDecl>(CurContext);
+ dyn_cast_or_null<ObjCContainerDecl>(CurContext);
// Make sure we have a context for the property implementation declaration.
if (!ClassImpDecl) {
Diag(AtLoc, diag::error_missing_property_context);