]> granicus.if.org Git - clang/commitdiff
Fix a self-host problem caused by this over-eager assertion. I'm not sure
authorJohn McCall <rjmccall@apple.com>
Thu, 11 Mar 2010 09:33:17 +0000 (09:33 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 11 Mar 2010 09:33:17 +0000 (09:33 +0000)
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
test/SemaTemplate/instantiate-function-1.cpp

index 61091cdcc043d179ee3ce368b7fae3e60491146c..d6f3352266aa896101e2fd1fc26f7a6d3d25087b 100644 (file)
@@ -2569,8 +2569,6 @@ bool TreeTransform<Derived>::
     ParmVarDecl *NewParm;
 
     if (OldParm) {
-      assert(OldParm->getTypeSourceInfo()->getType() == T->getArgType(i));
-
       NewParm = getDerived().TransformFunctionTypeParam(OldParm);
       if (!NewParm)
         return true;
index 7b4c53cfe0d7301812ed11a14a1faedda41752dc..6e0d7115900430c1cf9fd1d31a197ab157308f2f 100644 (file)
@@ -214,3 +214,9 @@ template<typename T> struct X;
 template<typename T> struct Y : public X<T> {
   Y& x() { return *this; }
 };
+
+// Make sure our assertions don't get too uppity.
+namespace test0 {
+  template <class T> class A { void foo(T array[10]); };
+  template class A<int>;
+}