[PATCH] D69518: [Diagnostics] Warn for std::is_constant_evaluated in constexpr mode

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 18:42:09 PDT 2019


rsmith added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:8410
+  "'std::is_constant_evaluated' will always evaluate to "
+  "'true' in constexpr mode">, InGroup<TautologicalCompare>;
 def warn_comparison_bitwise_always : Warning<
----------------
xbolva00 wrote:
> rsmith wrote:
> > "constexpr mode" isn't a thing. Maybe just "in this context"?
> > 
> > I think this should have its own warning group, not be grouped under `-Wtautological-compare`.
> I agree. just... gcc put it under -Wtautological-compare. So should I create a new subgroup of -Wtautological-compare? Or just a new group?
I don't really imagine many people wanting to turn this warning (or `-Wtautological-compare`) off, so I don't think it matters all that much. But making this a subgroup of `-Wtautological-compare` is cheap and would preserve GCC compatibility, so let's do that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69518





More information about the cfe-commits mailing list