Handle local enum types too.

Thanks to John McCall for pointing this out.

llvm-svn: 182182
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index cbd55889..8a523d6 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -298,11 +298,8 @@
   if (!TT)
     return LI;
 
-  const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(TT->getDecl());
-  if (!RD)
-    return LI;
-
-  const FunctionDecl *FD = getOutermostFunctionContext(RD);
+  const Decl *D = TT->getDecl();
+  const FunctionDecl *FD = getOutermostFunctionContext(D);
   if (!FD)
     return LI;