[PATCH] D65706: [docs] Better documentation for -Weverything

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 09:51:02 PDT 2019


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang/docs/UsersManual.rst:999-1000
+diagnostics contradict each other, users of :option:`-Weverything` therefore
+often disable many diagnostics such as :option:`-Wno-c++98-compat`
+:option:`-Wno-c++-compat`.
+
----------------
jfb wrote:
> aaron.ballman wrote:
> > jfb wrote:
> > > aaron.ballman wrote:
> > > > Would you care to propose a more exhaustive list of conflicting diagnostics? (Perhaps in a follow-up patch.)
> > > I looked a bit and I'm worried that providing a list won't be particularly satisfying for people looking at this. I think it's better to have some warning, and let folks figure out what works for their particular situation. Here I'm assuming that they don't use C++98 and that seems reasonable, but figuring out what side of contradictions they're on doesn't seem like it'll work out.
> > One of the primary concerns with enabling `-Weverything` is the fact that we know this enables conflicting diagnostics. Telling the user "we know there are conflicting diagnostics, but we want you to have the joy of figuring out which ones conflict for yourself" seems even more unsatisfying, to me. I agree that we don't want to tell users which of the conflicting options they should disable, but was thinking of something more along the lines of:
> > ```
> > The following sets of options are known to have some possibly unfortunate interactions when enabled together:
> >   * -Wfoo, -Wbar
> >   * -Wbaz, -Wquux
> >   * ...
> > Note that there may be other conflicting diagnostic flags not listed above.
> > ```
> > I figure that gives users a bit more of an idea of what they're signing up for when they enable -Weverything, which seems useful.
> OK I can do that as a follow-up.
Awesome, thank you!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65706/new/

https://reviews.llvm.org/D65706





More information about the cfe-commits mailing list