aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-15 18:26:13 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-15 18:26:13 +0000
commitf882574cf640d5c8355965e1c486f9d8d8ffcf47 (patch)
treee0b8576b5ac8f5fb9510316d3594c2e0a6bd0963 /lib/Sema/SemaTemplateDeduction.cpp
parent24c411b2c4c9bbbed73183ac44a885f737c67164 (diff)
Add an assertion and a test case, in a fruitless attempt to track down an existing bug
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81885 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index da64b55d82..24246e5734 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/lib/Sema/SemaTemplateDeduction.cpp
@@ -1244,6 +1244,9 @@ Sema::FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate,
if (!Specialization)
return TDK_SubstitutionFailure;
+ assert(Specialization->getPrimaryTemplate()->getCanonicalDecl() ==
+ FunctionTemplate->getCanonicalDecl());
+
// If the template argument list is owned by the function template
// specialization, release it.
if (Specialization->getTemplateSpecializationArgs() == DeducedArgumentList)