tighten this up, the decl *must* be a declcontext, no need for the dynamic check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67978 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 8809eb9..d84a0d1 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1409,7 +1409,7 @@
ObjCMethodDecl* ObjCMethod =
ObjCMethodDecl::Create(Context, MethodLoc, EndLoc, Sel, resultDeclType,
- dyn_cast<DeclContext>(ClassDecl),
+ cast<DeclContext>(ClassDecl),
MethodType == tok::minus, isVariadic,
false,
MethodDeclKind == tok::objc_optional ?