[cfe-commits] [patch][pr13396] Apply the regparm attribute to destructors

Rafael Espíndola rafael.espindola at gmail.com
Fri Jul 20 22:11:52 CDT 2012


If I understand it correctly, the attribute in

__attribute__ ((regparm (3))) void bar(int x) ...

First gets applied to 'void' and then to the function type. This fails
for destructors since they don't have a return type so we never call
ConvertDeclSpecToType on them (which is the function that eventually
calls processTypeAttrs).

The attached patch fixes the bug by calling processTypeAttrs when
processing destructors in GetDeclSpecTypeForDeclarator. Is that the
correct fix?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr13396.patch
Type: application/octet-stream
Size: 985 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/cfe-commits/attachments/20120720/42cb804f/attachment.obj 


More information about the cfe-commits mailing list