From: John McCall Date: Thu, 11 Mar 2010 09:33:17 +0000 (+0000) Subject: Fix a self-host problem caused by this over-eager assertion. I'm not sure X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=069ace5adc444a159003c29e85e166cee491ad39;p=clang 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 --- 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; +}