[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
Sun Dec 24 15:56:12 PST 2017
rsmith added inline comments.
================
Comment at: include/clang/Basic/DiagnosticGroups.td:439
def TautologicalUnsignedZeroCompare : DiagGroup<"tautological-unsigned-zero-compare">;
def TautologicalUnsignedEnumZeroCompare : DiagGroup<"tautological-unsigned-enum-zero-compare">;
+def TautologicalRangeCompare : DiagGroup<"tautological-constant-range-compare">;
----------------
I forget, are these in-range-compare warnings new too, or just the non-unsigned-enum form? It would make sense to me for these two to be subgroups of `TautologicalRangeCompare`.
================
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">;
----------------
"tautological-constant-in-range-compare" would make more sense to me, as the complement of "tautological-constant-out-of-range-compare".
Repository:
rC Clang
https://reviews.llvm.org/D41512
More information about the cfe-commits
mailing list