[PATCH] D51747: [clangd] Implement deprecation diagnostics with lower severity.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 7 14:17:23 PDT 2018


ioeric added a comment.

In https://reviews.llvm.org/D51747#1227089, @ilya-biryukov wrote:

> Not sure if it's fine to hijack our own diagnostic-specific flags in to clang command args.
>
> Cons that I see:
>
> 1. There is no way for the users to turn them off if they find them non-useful. If we add a way, it would be more config parameters which overlap with other mechanism that we have - compiler flags.
> 2. Users who are used to having them as warnings will now see them as notes. Again, no way to tweak this behavior.
>
>   What's our use-case? Maybe we should ask the clients to add -Wdeprecated if they care about those?
>
>   PS In case I'm missing the context here, please let me know.


Instead of

In https://reviews.llvm.org/D51747#1227719, @kadircet wrote:

> In https://reviews.llvm.org/D51747#1227089, @ilya-biryukov wrote:
>
> > Not sure if it's fine to hijack our own diagnostic-specific flags in to clang command args.
> >
> > Cons that I see:
> >
> > 1. There is no way for the users to turn them off if they find them non-useful. If we add a way, it would be more config parameters which overlap with other mechanism that we have - compiler flags.
> > 2. Users who are used to having them as warnings will now see them as notes. Again, no way to tweak this behavior.
> >
> >   What's our use-case? Maybe we should ask the clients to add -Wdeprecated if they care about those?
> >
> >   PS In case I'm missing the context here, please let me know.
>
>
> Agree with you, I think it would be better to provide it as an option. https://reviews.llvm.org/D51724 with this one we added a way to show deprecated symbols on code completion responses and wanted to move forward with showing the ones that are already in existing code.


I also agree with you regarding options. A pattern I've observed (in some infamous large codebase ;) is that warnings for deprecated symbols are disabled in the compile command as they can introduce too much noise during build, although it would make sense to show these warnings when user edits the code (most of the time). I think there can be other diagnostics that are more desirable as editor diagnostics than as compiler warnings/errors.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51747





More information about the cfe-commits mailing list