Now that we are passing back "free standing decls", make sure -ast-dump works like -ast-print.
Also added a cast to be safe...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44209 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp
index bd6307f..2c3b335 100644
--- a/Sema/SemaDecl.cpp
+++ b/Sema/SemaDecl.cpp
@@ -347,7 +347,7 @@
   // TODO: emit error on 'typedef int;'
   // if (!DS.isMissingDeclaratorOk()) Diag(...);
   
-  return DS.getTypeRep();
+  return dyn_cast_or_null<TagDecl>(static_cast<Decl *>(DS.getTypeRep()));
 }
 
 bool Sema::CheckSingleInitializer(Expr *&Init, bool isStatic,