[PATCH] Deprecated attribute on namespaces

Aaron Ballman aaron at aaronballman.com
Fri Nov 14 13:53:24 PST 2014


On Thu, Nov 13, 2014 at 9:13 PM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Sat, Nov 8, 2014 at 4:05 PM, Aaron Ballman <aaron at aaronballman.com>
> wrote:
>>
>> C++1z now allows attributes on namespace and enumerators. We already
>> supported deprecated enumerators, but we do not support namespaces.
>> This patch addresses that.
>>
>> A few notes:
>>
>> It was decided that the deprecated attribute only applies to things
>> with names (this makes reporting diagnostics a bit more sane), so this
>> patch disallows deprecating an anonymous namespace.
>>
>> Since the declaration context can now cause deprecations, this
>> requires updating some other test cases.
>
>
> This wasn't the intention when this was discussed with EWG; the idea was
> that using a deprecated name would result in a warning, but merely naming
> something that's in a deprecated context would not.

Ahh, thank you for the further clarification. I've attached a revised
patch which I think captures the intent a bit better.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deprecated_v2.patch
Type: application/octet-stream
Size: 5699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141114/3113b8fc/attachment.obj>


More information about the cfe-commits mailing list