Skip to content

Use alternate means of detecting enums in is_udt#157298

Open
Walnut356 wants to merge 1 commit into
rust-lang:mainfrom
Walnut356:msvc_enum
Open

Use alternate means of detecting enums in is_udt#157298
Walnut356 wants to merge 1 commit into
rust-lang:mainfrom
Walnut356:msvc_enum

Conversation

@Walnut356
Copy link
Copy Markdown
Contributor

@Walnut356 Walnut356 commented Jun 2, 2026

This fixes a small regression from #155336

Flat enums are excluded from is_udt since LLDB natively handles them correctly. The previous logic (SBType.IsScopedEnumerationType()) behaved correctly for non-msvc targets, but for some reason on msvc enums don't count as scoped enumerations?

The new logic checks the type returned by SBType.GetEnumerationIntegerType(). If the queried type isn't an enum, the returned type is invalid. This behaves correctly on both msvc and non-msvc targets, and its behavior doesn't conflict with sum-type enums.

As always, testing on msvc isn't really possible atm. That should change soon though =)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 2, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Jun 2, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Mark-Simulacrum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants