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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 09:52:04 PST 2018


aaron.ballman added inline comments.


================
Comment at: include/clang/Basic/DiagnosticGroups.td:440
 def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">;
+def TautologicalRangeCompare : DiagGroup<"tautological-constant-range-compare">;
 def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
----------------
lebedev.ri wrote:
> rsmith wrote:
> > "tautological-constant-in-range-compare" would make more sense to me, as the complement of "tautological-constant-out-of-range-compare".
> I did think about it.
> To me "tautological-constant-in-range-compare" may sound as if the constant is //somewhere// in the range,
> while i'd say "tautological-constant-range-compare" better highlights the fact that the constant *is* the range limit.
> No?
I don't have strong opinions on this name, but have a slight preference for "in range" because I'm left wondering how "range compare" relates to "out of range compare".


Repository:
  rC Clang

https://reviews.llvm.org/D41512





More information about the cfe-commits mailing list