Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Clang] Handle structs with inner structs and no fields #8926

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

ahatanaka
Copy link

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: llvm#88931 (cherry picked from commit c32712d)

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: llvm#88931
(cherry picked from commit c32712d)
@ahatanaka ahatanaka changed the title [Clang] Handle structs with inner structs and no fields (#89126) [Clang] Handle structs with inner structs and no fields Jun 25, 2024
@ahatanaka ahatanaka merged commit d8b9223 into stable/20240408 Jun 25, 2024
@ahatanaka ahatanaka deleted the fix-FindFlexibleArrayMemberField branch June 25, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants