[patch] Further issues when thiscall is the default for methods.
Reid Kleckner
rnk at google.com
Tue Nov 19 13:03:52 PST 2013
Looks good, thanks!
On Tue, Nov 19, 2013 at 11:42 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> > Yes, the calling convention can always change at decl merging time due to
> > static methods or declarations with explicit conventions. Templates make
> > that redeclaration lookup complicated.
>
> Yes, this is pretty horrible :-(
>
> > Use castAs<> if you're going to dereference unconditionally.
>
> Done.
>
> > + if (ArgFunctionTypeP->getCallConv() != CC) {
> > + FunctionType::ExtInfo EI =
> > + ArgFunctionTypeP->getExtInfo().withCallingConv(CC);
> > + ArgFunctionTypeP = cast<FunctionProtoType>(
> > + Context.adjustFunctionType(ArgFunctionTypeP, EI));
> > + ArgFunctionType = QualType(ArgFunctionTypeP, 0);
> > + }
> > + }
> >
> > This looks like the logic I added to
> > Sema::CheckFunctionTemplateSpecialization() in r190377. If you add this,
> > can we remove it? If not, can we share it? See also the related
> ExactlyInt
> > test case.
>
> Yes, looks like we can also handle noreturn in here. An updated patch
> is attached.
>
> Cheers,
> Rafale
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131119/ce98f8a4/attachment.html>
More information about the cfe-commits
mailing list