r184068 - Add warning group -Wdeprecated-register for C++11 warning on 'register' being

Jordan Rose jordan_rose at apple.com
Mon Jun 17 13:34:47 PDT 2013


On Jun 17, 2013, at 12:33 , Richard Smith <richard at metafoo.co.uk> wrote:

> On Mon, Jun 17, 2013 at 11:40 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>> 
>> On Jun 16, 2013, at 17:01 , Richard Smith <richard-llvm at metafoo.co.uk>
>> wrote:
>> 
>> +// FIXME: Why are DeprecatedImplementations and DeprecatedWritableStr
>> +// not in this group?
>> +def Deprecated : DiagGroup<"deprecated", [DeprecatedDeclarations,
>> +                                          DeprecatedRegister]>,
>> 
>> 
>> As I understand it, because -Wdeprecated is for user deprecations (i.e.
>> __attribute__((deprecated))), not language deprecations.
> 
> That doesn't match our existing practice, which is somewhat
> inconsistent but seems to be closer to using -Wdeprecated-declarations
> for user deprecations, and -Wdeprecated for all deprecations.
> Specifically, prior to my changes:
> 
> -Wdeprecated contained:
>  -Wdeprecated-declarations
>  access declarations
>  bool increment
>  __vector long
>  deprecated driver arguments
> 
> -Wdeprecated-declarations contained:
>  __attribute__((deprecated))
>  "maybe deprecated because receiver type is unknown" (???)
>  use of C-style parameters in objective-C method declarations (???)
> 
> And -Wdeprecated-objc-isa-usage, -Wdeprecated-writable-strings, and
> -Wdeprecated-implementations are not part of any other group.
> 
> Maybe we should move those two (???) warnings out of
> -Wdeprecated-declarations and into -Wdeprecated?

Ah, I didn't notice some of those other bare deprecations. (I just looked in DiagnosticSemaKinds.) I guess I don't care what we do as long as user deprecations are separate from language deprecations, whether that's introducing another flag for those under -Wdeprecated-declarations, moving the ??? warnings up to -Wdeprecated, or moving the language deprecations out of -Wdeprecated. I can see the other deprecation-related warnings being moved under -Wdeprecated in the first two cases.

Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130617/a2e3d877/attachment.html>


More information about the cfe-commits mailing list