From 069ace5adc444a159003c29e85e166cee491ad39 Mon Sep 17 00:00:00 2001 From: John McCall Date: Thu, 11 Mar 2010 09:33:17 +0000 Subject: [PATCH] Fix a self-host problem caused by this over-eager assertion. I'm not sure there's a good equivalent that's actually true, unfortunately. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98253 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/TreeTransform.h | 2 -- test/SemaTemplate/instantiate-function-1.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h index 61091cdcc0..d6f3352266 100644 --- a/lib/Sema/TreeTransform.h +++ b/lib/Sema/TreeTransform.h @@ -2569,8 +2569,6 @@ bool TreeTransform:: ParmVarDecl *NewParm; if (OldParm) { - assert(OldParm->getTypeSourceInfo()->getType() == T->getArgType(i)); - NewParm = getDerived().TransformFunctionTypeParam(OldParm); if (!NewParm) return true; diff --git a/test/SemaTemplate/instantiate-function-1.cpp b/test/SemaTemplate/instantiate-function-1.cpp index 7b4c53cfe0..6e0d711590 100644 --- a/test/SemaTemplate/instantiate-function-1.cpp +++ b/test/SemaTemplate/instantiate-function-1.cpp @@ -214,3 +214,9 @@ template struct X; template struct Y : public X { Y& x() { return *this; } }; + +// Make sure our assertions don't get too uppity. +namespace test0 { + template class A { void foo(T array[10]); }; + template class A; +} -- 2.40.0