Skip to content

Surface EnumDecl.IsFixed, FieldDecl.IsZeroLengthBitField, and CXXMethodDecl.RefQualifier#815

Merged
tannergooding merged 2 commits into
dotnet:mainfrom
tannergooding:tannergooding-v22-misc-decls
Jul 17, 2026
Merged

Surface EnumDecl.IsFixed, FieldDecl.IsZeroLengthBitField, and CXXMethodDecl.RefQualifier#815
tannergooding merged 2 commits into
dotnet:mainfrom
tannergooding:tannergooding-v22-misc-decls

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Surfaces three long-standing clangsharp_* decl predicates that were bridged natively but never exposed on the managed AST:

  • EnumDecl.IsFixed -- whether the enum has a fixed underlying type (scoped enums, or enum E : T).
  • FieldDecl.IsZeroLengthBitField -- whether the field is a zero-length bit-field (int : 0;).
  • CXXMethodDecl.RefQualifier -- the method's ref-qualifier (& / && / none) as a CXRefQualifierKind.

Each is threaded through the CXCursor mid-layer so the unsafe struct layer stays in step with the managed API. DeclTest.EnumFieldMethodPredicatesTest covers all three, including the negative cases.

Note

Authored with Copilot.

tannergooding and others added 2 commits July 16, 2026 21:59
…odDecl.RefQualifier

Wires the existing Cursor_getIsFixed, Cursor_getIsZeroLengthBitField, and Cursor_getRefQualifier bridges through the CXCursor mid-layer and onto the managed EnumDecl, FieldDecl, and CXXMethodDecl.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tannergooding
tannergooding merged commit 6036f69 into dotnet:main Jul 17, 2026
12 checks passed
@tannergooding
tannergooding deleted the tannergooding-v22-misc-decls branch July 17, 2026 05:21
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.

1 participant