[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 18:10:02 PST 2018

rsmith accepted this revision.
rsmith added inline comments.
This revision is now accepted and ready to land.

Comment at: include/clang/Basic/DiagnosticGroups.td:438
 def StrncatSize : DiagGroup<"strncat-size">;
+def TautologicalTypeLimitCompare : DiagGroup<"tautological-type-limit-compare">;
 def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">;
lebedev.ri wrote:
> Any opinion on this one?
I would *almost* prefer "tautological-min-max-compare", but I'd be worried about confusion with the `std::min` / `std::max` functions. I think this name is good enough. (Ideally, a name that clearly conveys this is about non-zero limiting values would be better, but that's hard to express.)

  rC Clang


More information about the cfe-commits mailing list