[PATCH] D142826: [Clang] Add -Wtype-limits to -Wextra for GCC compatibility

Shivam Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 28 20:51:31 PST 2023


xgupta created this revision.
xgupta added reviewers: aaron.ballman, dblaikie.
Herald added a project: All.
xgupta requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

GCC added the -Wtype-limits warning group to -Wextra around
GCC 4.4 and the group has some very helpful extra warnings
like tautological comparison type limit warnings
(comparingan unsigned int to see if it's positive, etc).

Fix https://github.com/llvm/llvm-project/issues/58375


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142826

Files:
  clang/include/clang/Basic/DiagnosticGroups.td


Index: clang/include/clang/Basic/DiagnosticGroups.td
===================================================================
--- clang/include/clang/Basic/DiagnosticGroups.td
+++ clang/include/clang/Basic/DiagnosticGroups.td
@@ -992,6 +992,7 @@
     EmptyInitStatement,
     StringConcatation,
     FUseLdPath,
+    TypeLimits,
   ]>;
 
 def Most : DiagGroup<"most", [


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142826.493059.patch
Type: text/x-patch
Size: 365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230129/4efb2087/attachment.bin>


More information about the cfe-commits mailing list