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

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Jul 20 20:11:52 PDT 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: 986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120720/42cb804f/attachment.obj>


More information about the cfe-commits mailing list