<div dir="ltr">Looks good, thanks!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Nov 19, 2013 at 11:42 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@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 class="im">> Yes, the calling convention can always change at decl merging time due to<br>
> static methods or declarations with explicit conventions.  Templates make<br>
> that redeclaration lookup complicated.<br>
<br>
</div>Yes, this is pretty horrible :-(<br>
<div class="im"><br>
> Use castAs<> if you're going to dereference unconditionally.<br>
<br>
</div>Done.<br>
<div class="im"><br>
> +    if (ArgFunctionTypeP->getCallConv() != CC) {<br>
> +      FunctionType::ExtInfo EI =<br>
> +          ArgFunctionTypeP->getExtInfo().withCallingConv(CC);<br>
> +      ArgFunctionTypeP = cast<FunctionProtoType>(<br>
> +          Context.adjustFunctionType(ArgFunctionTypeP, EI));<br>
> +      ArgFunctionType = QualType(ArgFunctionTypeP, 0);<br>
> +    }<br>
> +  }<br>
><br>
> This looks like the logic I added to<br>
> Sema::CheckFunctionTemplateSpecialization() in r190377.  If you add this,<br>
> can we remove it?  If not, can we share it?  See also the related ExactlyInt<br>
> test case.<br>
<br>
</div>Yes, looks like we can also handle noreturn in here. An updated patch<br>
is attached.<br>
<br>
Cheers,<br>
Rafale<br>
</blockquote></div><br></div>