<div dir="ltr">Hans, it looked like you might have wanted PR24483 fixed for 3.7. If so, this patch is safe for branch.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 20, 2015 at 1:45 PM, Richard Smith via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: rsmith<br>
Date: Thu Aug 20 15:45:25 2015<br>
New Revision: 245609<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=245609&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=245609&view=rev</a><br>
Log:<br>
PR24483: Delete some dead/incorrect code that triggered assertions.<br>
<br>
Modified:<br>
cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=245609&r1=245608&r2=245609&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=245609&r1=245608&r2=245609&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Thu Aug 20 15:45:25 2015<br>
@@ -2469,25 +2469,6 @@ DeclResult Sema::ActOnVarTemplateSpecial<br>
false, Converted))<br>
return true;<br>
<br>
- // Check that the type of this variable template specialization<br>
- // matches the expected type.<br>
- TypeSourceInfo *ExpectedDI;<br>
- {<br>
- // Do substitution on the type of the declaration<br>
- TemplateArgumentList TemplateArgList(TemplateArgumentList::OnStack,<br>
- Converted.data(), Converted.size());<br>
- InstantiatingTemplate Inst(*this, TemplateKWLoc, VarTemplate);<br>
- if (Inst.isInvalid())<br>
- return true;<br>
- VarDecl *Templated = VarTemplate->getTemplatedDecl();<br>
- ExpectedDI =<br>
- SubstType(Templated->getTypeSourceInfo(),<br>
- MultiLevelTemplateArgumentList(TemplateArgList),<br>
- Templated->getTypeSpecStartLoc(), Templated->getDeclName());<br>
- }<br>
- if (!ExpectedDI)<br>
- return true;<br>
-<br>
// Find the variable template (partial) specialization declaration that<br>
// corresponds to these arguments.<br>
if (IsPartialSpecialization) {<br>
<br>
Modified: cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp?rev=245609&r1=245608&r2=245609&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp?rev=245609&r1=245608&r2=245609&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp (original)<br>
+++ cfe/trunk/test/SemaTemplate/instantiate-var-template.cpp Thu Aug 20 15:45:25 2015<br>
@@ -34,3 +34,9 @@ namespace InstantiationDependent {<br>
static_assert(a<sizeof(sizeof(f(T())))> == 0, ""); // expected-error {{static_assert failed}}<br>
}<br>
}<br>
+<br>
+namespace PR24483 {<br>
+ template<typename> struct A;<br>
+ template<typename... T> A<T...> models;<br>
+ template<> struct B models<>; // expected-error {{incomplete type 'struct B'}} expected-note {{forward declaration}}<br>
+}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>