[PATCH] D151162: Add -Wpacked-non-pod to -Wall

Denis Nikitin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 24 11:32:22 PDT 2023


denik added inline comments.


================
Comment at: clang/test/CodeGenCXX/warn-padded-packed.cpp:4
+// -Wpacked-non-pod itself should not emit the "packed attribute is unnecessary" warnings.
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpacked-non-pod -verify=top %s -emit-llvm-only
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpacked-non-pod -fclang-abi-compat=15 %s -emit-llvm-only
----------------
This one is a very neat test. I think it does what we want :)


================
Comment at: clang/test/CodeGenCXX/warn-padded-packed.cpp:5
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpacked-non-pod -verify=top %s -emit-llvm-only
+// RUN: %clang_cc1 -triple=x86_64-none-none -Wpacked-non-pod -fclang-abi-compat=15 %s -emit-llvm-only
+
----------------
Probably we don't need this one. But I'm not sure if there is any impact of the abi on`packed-non-pod`. According to the original test it checks only `-Wpacked` `packed attribute is unnecessary` warning.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151162/new/

https://reviews.llvm.org/D151162



More information about the cfe-commits mailing list