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

Sam McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 13 04:28:06 PDT 2018


On Tue, Sep 11, 2018 at 3:43 PM Ilya Biryukov via Phabricator <
reviews at reviews.llvm.org> wrote:

> ilya-biryukov added a comment.
>
> In https://reviews.llvm.org/D51747#1229066, @sammccall wrote:
>
> > A few thoughts here:
> >
> > - does CDB describe user or project preferences? unclear.
>
>
> Agree, it's a mix, defaults are from the project but users can add extra
> flags.
>
> > - "show this warning for code I build" is a higher bar than "show this
> warning for code I edit". So CDB probably enables too few warnings.
> > - Some warnings play well with -Werror (like uninit warnings), some
> don't (like deprecated). -Werror projects often disable interesting
> warnings.
>
> Agreed, editors are different from build.
>
> > I'm not sure we should strictly follow the CDB, but the bar to override
> it should probably be high.
>
> WDYT in the long term about a more general mechanism (to allow users
> override compiler or warning flags at the clangd level?
> So that even if clangd is opinionated about the default warnings it
> enables, users have an option to override according to their preferences.
>
Yeah, I can see making "extra clang flags" a clangd flag (at some point we
really need .clangd config file or something...)

The scary thing about the extra flags is how they interact with driver mode
(clang-cl vs clang), but maybe that's the user's problem.


> In https://reviews.llvm.org/D51747#1230420, @kadircet wrote:
>
> > if user wants to see all diagnostics as a list suddenly they will get
> deprecations in that list as well :(.
>
>
> Yeah, some level of noise is probably inevitable.
>
>
> Repository:
>   rCTE Clang Tools Extra
>
> https://reviews.llvm.org/D51747
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180913/3826ef98/attachment.html>


More information about the cfe-commits mailing list