[PATCH] D58841: [Diagnostics] Support -Wtype-limits for GCC compatibility
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 1 12:40:01 PST 2019
xbolva00 marked an inline comment as done.
xbolva00 added a comment.
Ok, if concers
Comment at: clang/include/clang/Basic/DiagnosticGroups.td:485
+// For compatibility with GCC; -Wtype-limits = -Wtautological-constant-in-range-compare
+def TypeLimits : DiagGroup<"type-limits", [TautologicalInRangeCompare]>;
def TautologicalOutOfRangeCompare : DiagGroup<"tautological-constant-out-of-range-compare">;
> Is gcc's `-Wtype-limits` *just* `-Wtautological-constant-in-range-compare`, or is something else should be there?
-Wtautological-constant-in-range-compare is enough to diagnose 99% cases from:
One missed case is:
int test (int x)
if ((long long)x <= 0x123456789ABCLL)
Tried -Weverything, no help. We miss this case. I will open PR for that.
But anyway, this missed case should not block this patch.
CHANGES SINCE LAST ACTION
More information about the cfe-commits