[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.
Shoaib Meenai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 2 09:55:00 PST 2018
smeenai 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".
How about range-limit-compare or range-edge-compare or range-bound-compare or something of that nature, that explicitly captures the fact that it's the range limit?
More information about the cfe-commits