[clang] 897e345 - Revert "[Clang] Add -Wtype-limits to -Wextra for GCC compatibility"

Shivam Gupta via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 1 16:29:51 PST 2023


Author: Shivam Gupta
Date: 2023-02-02T05:59:27+05:30
New Revision: 897e345042cdf2b3c1dffd234d1b593205f69a32

URL: https://github.com/llvm/llvm-project/commit/897e345042cdf2b3c1dffd234d1b593205f69a32
DIFF: https://github.com/llvm/llvm-project/commit/897e345042cdf2b3c1dffd234d1b593205f69a32.diff

LOG: Revert "[Clang] Add -Wtype-limits to -Wextra for GCC compatibility"

This reverts commit 95668c0d97e6184729f3a3e9621a58d9edffb6b0.

This discovers a warning in
https://reviews.llvm.org/rGa68d4b11465f5b3326be1dd820f59fac275b7581.

and broke the x86_64-linux sanitizer
buildbot: https://lab.llvm.org/buildbot/#/builders/37/builds/19910.

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst
    clang/include/clang/Basic/DiagnosticGroups.td
    clang/test/Sema/tautological-constant-compare.c

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 9d9c5c6cd3f34..9cc2a72f4c864 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -61,9 +61,6 @@ Bug Fixes
   templates. This fixes
   `Issue 60344 <https://github.com/llvm/llvm-project/issues/60344>`_.
 
-- ``-Wtype-limits`` was added to ``-Wextra`` for GCC compatibility. This fixes
-  `Issue 58375 <https://github.com/llvm/llvm-project/issues/58375>`_.
-
 Improvements to Clang's diagnostics
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - We now generate a diagnostic for signed integer overflow due to unary minus

diff  --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 39e6c94fe6e29..6c997c37cc5cd 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -992,7 +992,6 @@ def Extra : DiagGroup<"extra", [
     EmptyInitStatement,
     StringConcatation,
     FUseLdPath,
-    TypeLimits,
   ]>;
 
 def Most : DiagGroup<"most", [

diff  --git a/clang/test/Sema/tautological-constant-compare.c b/clang/test/Sema/tautological-constant-compare.c
index 59094186899dd..04b8a1416be0b 100644
--- a/clang/test/Sema/tautological-constant-compare.c
+++ b/clang/test/Sema/tautological-constant-compare.c
@@ -4,8 +4,8 @@
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtautological-type-limit-compare -DTEST -verify -x c++ %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtype-limits -DTEST -verify %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wtype-limits -DTEST -verify -x c++ %s
-// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -DTEST -verify %s
-// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -DTEST -verify -x c++ %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -verify=silent %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wextra -Wno-sign-compare -verify=silent -x c++ %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wall -verify=silent %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -Wall -verify=silent -x c++ %s
 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -verify=silent %s


        


More information about the cfe-commits mailing list