<div dir="ltr">Thanks, fixed up slightly and committed as r180708.<br><div><br></div><div style>Do we need a similar change for the calls to ActOnReenterTemplateScope in Parser::ParseLexedAttribute(s) ?</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Apr 28, 2013 at 9:31 PM, Faisal Vali <span dir="ltr"><<a href="mailto:faisalv@gmail.com" target="_blank">faisalv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>Here is a patch for calculating the TemplateParameterDepth correctly, built upon Will Wilson's patch (and includes his code - i hope that's ok to do?).<br></div>Please let me know what you think - or if you need me to submit it a different way ....<br>
</div>Thanks!<span class="HOEnZb"><font color="#888888"><br></font></span></div><div class="gmail_extra"><span class="HOEnZb"><font color="#888888"><br clear="all"><div>Faisal Vali<br><br></div></font></span><div><div class="h5">
<br><br><div class="gmail_quote">On Sat, Apr 27, 2013 at 7:46 PM, Faisal Vali <span dir="ltr"><<a href="mailto:faisalv@gmail.com" target="_blank">faisalv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div>On Sat, Apr 27, 2013 at 5:52 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>+ assert( Actions.getDiagnostics().hasErrorOccurred() || </div><div>+ (!dyn_cast<FunctionTemplateDecl>(LM.D) || </div>
<div>+ (dyn_cast<FunctionTemplateDecl>(LM.D)->getTemplateParameters()-></div>
<div>+ getDepth() < TemplateParameterDepth)) && "TemplateParameterDepth"</div><div>+ " should be greater than the depth of current template being"</div><div>+ " instantiated!");</div>
<div><br></div><div>No space after (, extra space on the next line, and this will generate a || versus && precedence warning. Also, would be more consistent to reflow the string literal to start on its own line.</div>
<div><br></div><div><div>+ // getNumTemplateParameterLists returns the number of TPLs </div><div>+ // minus the TPL of the actual function being instantiated</div><div>+ // i.e. consider a nested member class template with</div>
<div>+ // a template member of a function defined out of class ... its</div><div>+ // associated TPLs</div><div>+ // Therefore we add 1 to the depth for the Declarator itself</div><div>+ // and the rest for the outer TPLs returned by getNumTPLs</div>
<div><br></div><div>Something seems to be missing from the first part of this comment. In any case, IIRC there's a patch in flight which removes this code and makes it call ActOnReenterTemplateScope the right number of times.</div>
</div><div><br></div><div></div></div></blockquote><div><br></div></div><div>ok - I shall wait for you to commit that patch, then update my code against trunk - and then incorporate all your comments and resubmit this patch.<br>
<br></div><div>Any thoughts on the dependent bases patch for ms-compatibility?<br><br></div><div>Also can I start emailing you some interim patches for generic-lambdas, even though they are not entirely functional - but I could use feedback on the approach and the API's used early on before I go down the wrong rabbit hole?<br>
<br></div><div>thanks!<br><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>