Some cleanup and renaming. No functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68140 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index c9f0d4f..2f12716 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -853,13 +853,12 @@
     assert(TTP->getDepth() == 0 && 
            "Cannot reduce depth of a template template parameter");
     assert(TTP->getPosition() < NumTemplateArgs && "Wrong # of template args");
-    assert(dyn_cast_or_null<ClassTemplateDecl>(
-                          TemplateArgs[TTP->getPosition()].getAsDecl()) &&
+    assert(TemplateArgs[TTP->getPosition()].getAsDecl() &&
            "Wrong kind of template template argument");
     ClassTemplateDecl *ClassTemplate 
       = dyn_cast<ClassTemplateDecl>(
                                TemplateArgs[TTP->getPosition()].getAsDecl());
-
+    assert(ClassTemplate && "Expected a class template");
     if (QualifiedTemplateName *QTN = Name.getAsQualifiedTemplateName()) {
       NestedNameSpecifier *NNS 
         = InstantiateNestedNameSpecifier(QTN->getQualifier(),