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

Bill Wendling via All-commits all-commits at lists.llvm.org
Thu Apr 25 15:19:38 PDT 2024


  Branch: refs/heads/users/bwendling/fix-pr89456
  Home:   https://github.com/llvm/llvm-project
  Commit: 504a17cc62a5c333f6228de0a70f04420da3efcc
      https://github.com/llvm/llvm-project/commit/504a17cc62a5c333f6228de0a70f04420da3efcc
  Author: Bill Wendling <5993918+bwendling at users.noreply.github.com>
  Date:   2024-04-25 (Thu, 25 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