From 897e345042cdf2b3c1dffd234d1b593205f69a32 Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Thu, 2 Feb 2023 05:58:04 +0530 Subject: [PATCH] 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. --- clang/docs/ReleaseNotes.rst | 3 --- clang/include/clang/Basic/DiagnosticGroups.td | 1 - clang/test/Sema/tautological-constant-compare.c | 4 ++-- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst index 9d9c5c6..9cc2a72 100644 --- a/clang/docs/ReleaseNotes.rst +++ b/clang/docs/ReleaseNotes.rst @@ -61,9 +61,6 @@ Bug Fixes templates. This fixes `Issue 60344 `_. -- ``-Wtype-limits`` was added to ``-Wextra`` for GCC compatibility. This fixes - `Issue 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 39e6c94..6c997c3 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 5909418..04b8a14 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 -- 2.7.4