From: David Blaikie Date: Mon, 21 Nov 2022 23:59:21 +0000 (+0000) Subject: pr59000: Clarify packed-non-pod warning that it's pod-for-the-purposes-of-layout X-Git-Tag: upstream/17.0.6~26931 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9df8ba631d4612eb8f930c9fe7c6cf39e5deb3af;p=platform%2Fupstream%2Fllvm.git pr59000: Clarify packed-non-pod warning that it's pod-for-the-purposes-of-layout --- diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index 15bd9d7..6a2d15e 100644 --- a/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -960,8 +960,11 @@ def warn_padded_struct_size : Warning< InGroup, DefaultIgnore; def warn_unnecessary_packed : Warning< "packed attribute is unnecessary for %0">, InGroup, DefaultIgnore; -def warn_unpacked_field : Warning< - "not packing field %0 as it is non-POD">, InGroup, DefaultIgnore; +def warn_unpacked_field + : Warning< + "not packing field %0 as it is non-POD for the purposes of layout">, + InGroup, + DefaultIgnore; // -Wunaligned-access def warn_unaligned_access : Warning< diff --git a/clang/test/CodeGenCXX/warn-padded-packed.cpp b/clang/test/CodeGenCXX/warn-padded-packed.cpp index 60cf5e4..cf4890e 100644 --- a/clang/test/CodeGenCXX/warn-padded-packed.cpp +++ b/clang/test/CodeGenCXX/warn-padded-packed.cpp @@ -154,7 +154,7 @@ struct S28 { char c1; short s1; char c2; - S28_non_pod p1; // expected-warning {{not packing field 'p1' as it is non-POD}} + S28_non_pod p1; // expected-warning {{not packing field 'p1' as it is non-POD for the purposes of layout}} } __attribute__((packed)); struct S29_non_pod_align_1 {