[clang] 53333c8 - Revert "[clang][diagnostics] Add -Wpacked-non-pod to -Wall"

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 11:51:26 PDT 2023


Author: Aaron Ballman
Date: 2023-05-25T14:51:16-04:00
New Revision: 53333c8d44d690f6e8fd6f31803aecb17329cdb5

URL: https://github.com/llvm/llvm-project/commit/53333c8d44d690f6e8fd6f31803aecb17329cdb5
DIFF: https://github.com/llvm/llvm-project/commit/53333c8d44d690f6e8fd6f31803aecb17329cdb5.diff

LOG: Revert "[clang][diagnostics] Add -Wpacked-non-pod to -Wall"

This reverts commit 9ed3d85e26d8594440bca84fe868a62ac6560ac8.

It broke some bots:
https://lab.llvm.org/buildbot/#/builders/245/builds/8876

Added: 
    clang/test/CodeGenCXX/warn-padded-packed.cpp

Modified: 
    clang/docs/ReleaseNotes.rst
    clang/include/clang/Basic/DiagnosticGroups.td
    clang/test/Misc/warning-wall.c

Removed: 
    clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index d88d66be0c860..6ee73aa3c96fe 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -307,8 +307,6 @@ Improvements to Clang's diagnostics
   (`#62850: <https://github.com/llvm/llvm-project/issues/62850>`_).
 - Clang now warns when any predefined macro is undefined or redefined, instead
   of only some of them.
-- ``-Wpacked-non-pod`` is now included in ``-Wall``.
-  (`#60832: <https://github.com/llvm/llvm-project/issues/60832>`_)
 
 Bug Fixes in This Version
 -------------------------

diff  --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td
index 9944fa87aba23..08b8f02460c16 100644
--- a/clang/include/clang/Basic/DiagnosticGroups.td
+++ b/clang/include/clang/Basic/DiagnosticGroups.td
@@ -1060,7 +1060,7 @@ def Consumed       : DiagGroup<"consumed">;
 // warning should be active _only_ when -Wall is passed in, mark it as
 // DefaultIgnore in addition to putting it here.
 def All : DiagGroup<"all", [Most, Parentheses, Switch, SwitchBool,
-                            MisleadingIndentation, PackedNonPod]>;
+                            MisleadingIndentation]>;
 
 // Warnings that should be in clang-cl /w4.
 def : DiagGroup<"CL4", [All, Extra]>;

diff  --git a/clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp b/clang/test/CodeGenCXX/warn-padded-packed.cpp
similarity index 90%
rename from clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp
rename to clang/test/CodeGenCXX/warn-padded-packed.cpp
index 6ec842a38d7b0..c51a6c9443f6e 100644
--- a/clang/test/CodeGenCXX/warn-all-padded-packed-packed-non-pod.cpp
+++ b/clang/test/CodeGenCXX/warn-padded-packed.cpp
@@ -1,10 +1,5 @@
-// RUN: %clang_cc1 -Wpadded -Wpacked -verify=expected,top %s -emit-llvm-only
-// RUN: %clang_cc1 -Wpadded -Wpacked -verify=expected,abi15 -fclang-abi-compat=15 %s -emit-llvm-only
-// -Wpacked-non-pod itself should not emit the "packed attribute is unnecessary" warnings.
-// RUN: %clang_cc1 -Wpacked-non-pod -verify=top %s -emit-llvm-only
-// -Wall should not emit the "packed attribute is unnecessary" warnings without -Wpacked.
-// RUN: %clang_cc1 -Wall -verify=top %s -emit-llvm-only
-
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpadded -Wpacked -verify=expected,top %s -emit-llvm-only
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpadded -Wpacked -verify=expected,abi15 -fclang-abi-compat=15 %s -emit-llvm-only
 
 struct S1 {
   char c;

diff  --git a/clang/test/Misc/warning-wall.c b/clang/test/Misc/warning-wall.c
index 1c74759ce6161..e57c5d6d501da 100644
--- a/clang/test/Misc/warning-wall.c
+++ b/clang/test/Misc/warning-wall.c
@@ -99,7 +99,6 @@ CHECK-NEXT:    -Wdangling-else
 CHECK-NEXT:  -Wswitch
 CHECK-NEXT:  -Wswitch-bool
 CHECK-NEXT:  -Wmisleading-indentation
-CHECK-NEXT:  -Wpacked-non-pod
 
 
 CHECK-NOT:-W


        


More information about the cfe-commits mailing list