kadircet 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.


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.



================
Comment at: clangd/Diagnostics.cpp:299
+    D.Severity =
+        D.Category == "Deprecations" ? DiagnosticsEngine::Note : DiagLevel;
     return D;
----------------
ioeric wrote:
> kadircet wrote:
> > Couldn't find a better way to check for this one. Category types are coming 
> > from tablegen file 
> > https://github.com/llvm-mirror/clang/blob/master/include/clang/Basic/DiagnosticGroups.td#L128
> >  which does not expose category id, at least I couldn't find even if it 
> > does.
> Have you tried the Diagnostic ID (i.e. `Info.getID()`)? It matches the diag 
> kinds defined in `DiagnosticSemaKinds.inc` (e.g. `warn_deprecated`).
Unfortunately these are also internal, 
https://github.com/llvm-mirror/clang/blob/master/lib/Basic/DiagnosticIDs.cpp#L97


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51747



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to