when a typedef name is parsed as part of declspecs, remember the decl for the
typedef.

llvm-svn: 39188
diff --git a/clang/AST/SemaDecl.cpp b/clang/AST/SemaDecl.cpp
index 22c69c9..5f53e47 100644
--- a/clang/AST/SemaDecl.cpp
+++ b/clang/AST/SemaDecl.cpp
@@ -21,9 +21,8 @@
 using namespace clang;
 
 
-bool Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
-  Decl *D = II.getFETokenInfo<Decl>();
-  return D != 0 && isa<TypeDecl>(D);
+Sema::DeclTy *Sema::isTypeName(const IdentifierInfo &II, Scope *S) const {
+  return dyn_cast_or_null<TypeDecl>(II.getFETokenInfo<Decl>());
 }
 
 void Sema::PopScope(SourceLocation Loc, Scope *S) {