Simplify setting of DeclContext for @catch variable
(per Doug's comment).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95169 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8c217f8..d203376 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3936,15 +3936,7 @@
 
 void Sema::ActOnObjCCatchParam(DeclPtrTy D) {
   ParmVarDecl *Param = cast<ParmVarDecl>(D.getAs<Decl>());
-  
-  if (FunctionDecl *Function = dyn_cast<FunctionDecl>(CurContext))
-    Param->setDeclContext(Function);
-  else if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(CurContext))
-    Param->setDeclContext(MD);
-  else if (BlockDecl *BD = dyn_cast<BlockDecl>(CurContext))
-    Param->setDeclContext(BD);
-  // FIXME. Other contexts?
-  
+  Param->setDeclContext(CurContext);
 }
 
 void Sema::ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D,