When performing template argument deduction, ensure that multiple
deductions of the same template parameter are equivalent. This allows
us to implement the is_same type trait (!).
Also, move template argument deduction into its own file and update a
few build systems with this change (grrrr).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72819 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index d3d771b..0400b4c 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -503,6 +503,10 @@
for (TemplateSpecializationType::iterator Arg = T->begin(), ArgEnd = T->end();
Arg != ArgEnd; ++Arg) {
switch (Arg->getKind()) {
+ case TemplateArgument::Null:
+ assert(false && "Should never have a NULL template argument");
+ break;
+
case TemplateArgument::Type: {
QualType T = SemaRef.InstantiateType(Arg->getAsType(),
TemplateArgs,