[all-commits] [llvm/llvm-project] a8b0c6: Remove -Wpacked false positive for non-pod types w...

David Blaikie via All-commits all-commits at lists.llvm.org
Mon May 8 17:15:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8b0c6fa28acced71db33e80bd0b51d00422035b
      https://github.com/llvm/llvm-project/commit/a8b0c6fa28acced71db33e80bd0b51d00422035b
  Author: David Blaikie <dblaikie at gmail.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/RecordLayoutBuilder.cpp
    M clang/test/CodeGenCXX/warn-padded-packed.cpp
    M clang/test/Layout/aix-Wpacked-expecting-diagnostics.cpp

  Log Message:
  -----------
  Remove -Wpacked false positive for non-pod types where the layout isn't directly changed

The packed attribute can still be useful in this case if the struct is
then placed inside another packed struct - the non-pod element type's
packed attribute declares that it's OK to misalign this element inside
the packed structure. (otherwise the non-pod element is not packed/its
alignment is preserved, as per D117616/2771233)

Fixes PR62353

Differential Revision: https://reviews.llvm.org/D149182




More information about the All-commits mailing list