[cfe-commits] [PATCH] Accept trailing-return-type in abstract-declarators again
Douglas Gregor
dgregor at apple.com
Mon Feb 21 16:23:12 PST 2011
On Feb 21, 2011, at 4:19 PM, Richard Smith wrote:
> Hi,
>
> The attached patch fixes a few auto-related issues:
>
> * 'auto' was being rejected on abstract-declarators with trailing return
> types and on typedefs with trailing return types. 'auto' is always
> allowed in these cases. This was found while testing the fix for PR 9278.
>
> * A very poor diagnostic was being issued for auto (f() -> int): "return
> type must be 'auto', not 'auto'". This is closely related to PR 9060.
>
> * Trailing return type handling was happening slightly too late,
> resulting in the checks for functions returning arrays and functions
> returning functions being missed.
Why is this part of the test going away?
-typedef auto Fun(int a) -> decltype(a + a);
Otherwise, patch seems fine.
- Doug
More information about the cfe-commits
mailing list