[PATCH] D151264: Test -Wpacked-non-pod does not emit warnings of "packed attribute is unnecessary"
Zenong Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 23 15:11:15 PDT 2023
SlaterLatiao created this revision.
Herald added a project: All.
SlaterLatiao requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D151264
Files:
clang/test/CodeGenCXX/warn-padded-packed.cpp
Index: clang/test/CodeGenCXX/warn-padded-packed.cpp
===================================================================
--- clang/test/CodeGenCXX/warn-padded-packed.cpp
+++ clang/test/CodeGenCXX/warn-padded-packed.cpp
@@ -1,5 +1,9 @@
// 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
+// -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
+
struct S1 {
char c;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151264.524902.patch
Type: text/x-patch
Size: 780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230523/d14822b9/attachment-0001.bin>
More information about the cfe-commits
mailing list