[patch] Further issues when thiscall is the default for methods.
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Nov 19 11:42:35 PST 2013
> 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 --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 14608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131119/7972752d/attachment.obj>
More information about the cfe-commits
mailing list