Now that we have declared/defined tag types within DeclGroups,
instantiation of tags local to member functions of class templates
(and, eventually, function templates) works when the tag is defined as
part of the decl-specifier-seq, e.g.,

  struct S { T x, y; } s1;

Also, make sure that we don't try to default-initialize a dependent
type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72568 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8bd753a..abae9f0 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2701,7 +2701,7 @@
       if (const ArrayType *Array = Context.getAsArrayType(Type))
         InitType = Array->getElementType();
       if ((!Var->hasExternalStorage() && !Var->isExternC(Context)) &&
-           InitType->isRecordType()) {
+          InitType->isRecordType() && !InitType->isDependentType()) {
         CXXRecordDecl *RD = 
           cast<CXXRecordDecl>(InitType->getAsRecordType()->getDecl());
         CXXConstructorDecl *Constructor = 0;