[all-commits] [llvm/llvm-project] f341c7: [Clang] Handle structs with inner structs and no f...

Bill Wendling via All-commits all-commits at lists.llvm.org
Mon Apr 29 15:50:25 PDT 2024


  Branch: refs/heads/release/18.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f341c76b946142366d2b4eabcb1190347be4665b
      https://github.com/llvm/llvm-project/commit/f341c76b946142366d2b4eabcb1190347be4665b
  Author: Bill Wendling <5993918+bwendling at users.noreply.github.com>
  Date:   2024-04-29 (Mon, 29 Apr 2024)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    A clang/test/CodeGen/attr-counted-by-pr88931.c
    A clang/test/CodeGen/attr-counted-by-pr88931.cpp

  Log Message:
  -----------
  [Clang] Handle structs with inner structs and no fields (#89126)

A struct that declares an inner struct, but no fields, won't have a
field count. So getting the offset of the inner struct fails. This
happens in both C and C++:

  struct foo {
    struct bar {
      int Quantizermatrix[];
    };
  };

Here 'struct foo' has no fields.

Closes: https://github.com/llvm/llvm-project/issues/88931



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list