[cfe-dev] [PATCH] Apply calling conventions to function types

Charles Davis cdavis at mymail.mines.edu
Tue Feb 2 11:02:10 PST 2010

My last patch allows function types to hold a calling convention. This
patch has Sema actually apply them if a calling-convention attribute is

It also fixes some issues with the last patch:
- Calling conventions are now printed in the TypePrinter.
- The calling convention is now factored into the FoldingSetNode ID.

I'm posting it here because there's something really wrong with it.
Specifically, trying to apply the cdecl calling convention to a function
pointer type fails miserably. Interestingly enough, the function type,
when canonicalized, is not actually canonical.

NOTE: To fully understand what's going on, you might need to look at r93726.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: callconv-in-types-2.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100202/ae0ff165/attachment.ksh>

More information about the cfe-dev mailing list