Revert r276069: MSVC bots not happy

llvm-svn: 276074
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 05b30a4..e54c88f 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -651,10 +651,6 @@
                                            cast<TemplateTemplateParmDecl>(*P)));
   }
 
-  assert(!TTP->getRequiresClause() &&
-         "Unexpected requires-clause on template template-parameter");
-  LLVM_CONSTEXPR Expr *const CanonRequiresClause = nullptr;
-
   TemplateTemplateParmDecl *CanonTTP
     = TemplateTemplateParmDecl::Create(*this, getTranslationUnitDecl(), 
                                        SourceLocation(), TTP->getDepth(),
@@ -664,8 +660,7 @@
                          TemplateParameterList::Create(*this, SourceLocation(),
                                                        SourceLocation(),
                                                        CanonParams,
-                                                       SourceLocation(),
-                                                       CanonRequiresClause));
+                                                       SourceLocation()));
 
   // Get the new insert position for the node we care about.
   Canonical = CanonTemplateTemplateParms.FindNodeOrInsertPos(ID, InsertPos);
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp
index 76b495f8..bc1f9f9 100644
--- a/clang/lib/AST/ASTImporter.cpp
+++ b/clang/lib/AST/ASTImporter.cpp
@@ -2262,21 +2262,11 @@
     ToParams.push_back(cast<NamedDecl>(To));
   }
   
-  Expr *ToRequiresClause;
-  if (Expr *const R = Params->getRequiresClause()) {
-    ToRequiresClause = Importer.Import(R);
-    if (!ToRequiresClause)
-      return nullptr;
-  } else {
-    ToRequiresClause = nullptr;
-  }
-
   return TemplateParameterList::Create(Importer.getToContext(),
                                        Importer.Import(Params->getTemplateLoc()),
                                        Importer.Import(Params->getLAngleLoc()),
                                        ToParams,
-                                       Importer.Import(Params->getRAngleLoc()),
-                                       ToRequiresClause);
+                                       Importer.Import(Params->getRAngleLoc()));
 }
 
 TemplateArgument 
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp
index bcc8878..37943cd 100644
--- a/clang/lib/AST/DeclTemplate.cpp
+++ b/clang/lib/AST/DeclTemplate.cpp
@@ -31,11 +31,9 @@
 TemplateParameterList::TemplateParameterList(SourceLocation TemplateLoc,
                                              SourceLocation LAngleLoc,
                                              ArrayRef<NamedDecl *> Params,
-                                             SourceLocation RAngleLoc,
-                                             Expr *RequiresClause)
+                                             SourceLocation RAngleLoc)
   : TemplateLoc(TemplateLoc), LAngleLoc(LAngleLoc), RAngleLoc(RAngleLoc),
-    NumParams(Params.size()), ContainsUnexpandedParameterPack(false),
-    HasRequiresClause(static_cast<bool>(RequiresClause)) {
+    NumParams(Params.size()), ContainsUnexpandedParameterPack(false) {
   assert(this->NumParams == NumParams && "Too many template parameters");
   for (unsigned Idx = 0; Idx < NumParams; ++Idx) {
     NamedDecl *P = Params[Idx];
@@ -54,21 +52,15 @@
       // template parameter list does too.
     }
   }
-  if (RequiresClause) {
-    *getTrailingObjects<Expr *>() = RequiresClause;
-  }
 }
 
-TemplateParameterList *
-TemplateParameterList::Create(const ASTContext &C, SourceLocation TemplateLoc,
-                              SourceLocation LAngleLoc,
-                              ArrayRef<NamedDecl *> Params,
-                              SourceLocation RAngleLoc, Expr *RequiresClause) {
-  void *Mem = C.Allocate(totalSizeToAlloc<NamedDecl *, Expr *>(
-                             Params.size(), RequiresClause ? 1u : 0u),
+TemplateParameterList *TemplateParameterList::Create(
+    const ASTContext &C, SourceLocation TemplateLoc, SourceLocation LAngleLoc,
+    ArrayRef<NamedDecl *> Params, SourceLocation RAngleLoc) {
+  void *Mem = C.Allocate(totalSizeToAlloc<NamedDecl *>(Params.size()),
                          llvm::alignOf<TemplateParameterList>());
   return new (Mem) TemplateParameterList(TemplateLoc, LAngleLoc, Params,
-                                         RAngleLoc, RequiresClause);
+                                         RAngleLoc);
 }
 
 unsigned TemplateParameterList::getMinRequiredArguments() const {
@@ -1177,7 +1169,7 @@
   // <typename T, T ...Ints>
   NamedDecl *P[2] = {T, N};
   auto *TPL = TemplateParameterList::Create(
-      C, SourceLocation(), SourceLocation(), P, SourceLocation(), nullptr);
+      C, SourceLocation(), SourceLocation(), P, SourceLocation());
 
   // template <typename T, ...Ints> class IntSeq
   auto *TemplateTemplateParm = TemplateTemplateParmDecl::Create(
@@ -1202,7 +1194,7 @@
 
   // template <template <typename T, T ...Ints> class IntSeq, typename T, T N>
   return TemplateParameterList::Create(C, SourceLocation(), SourceLocation(),
-                                       Params, SourceLocation(), nullptr);
+                                       Params, SourceLocation());
 }
 
 static TemplateParameterList *
@@ -1223,7 +1215,7 @@
   NamedDecl *Params[] = {Index, Ts};
   return TemplateParameterList::Create(C, SourceLocation(), SourceLocation(),
                                        llvm::makeArrayRef(Params),
-                                       SourceLocation(), nullptr);
+                                       SourceLocation());
 }
 
 static TemplateParameterList *createBuiltinTemplateParameterList(