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

Douglas Gregor dgregor at apple.com
Mon Jul 30 22:56:41 PDT 2012


Yes, this looks fine. Thanks!

Sent from my iPhone

On Jul 20, 2012, at 8:11 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

> 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
> <pr13396.patch>




More information about the cfe-commits mailing list