Skip to content

[lldb] Don't resolve typealiases inside a function-local type's name#13234

Open
augusto2112 wants to merge 1 commit into
swiftlang:swift/release/6.4.xfrom
augusto2112:typealiased-field-lookup-localdecl
Open

[lldb] Don't resolve typealiases inside a function-local type's name#13234
augusto2112 wants to merge 1 commit into
swiftlang:swift/release/6.4.xfrom
augusto2112:typealiased-field-lookup-localdecl

Conversation

@augusto2112

@augusto2112 augusto2112 commented Jun 19, 2026

Copy link
Copy Markdown

A class/struct/enum declared inside a function has that whole function baked into its mangled name, including the function's argument and return types. When one of those is a Clang swift_newtype alias, the compiler keeps the alias spelled out and uses that same spelling in the reflection field descriptor.

By resolving these typealiases we inadvertently made them impossible to find in reflection metadata.

Detect these types (their name is a LocalDeclName) and leave them unchanged.

Assisted-by: claude

rdar://177196779

@augusto2112 augusto2112 requested a review from a team as a code owner June 19, 2026 00:13
A class/struct/enum declared inside a function has that whole function baked
into its mangled name, including the function's argument and return types. When
one of those is a Clang swift_newtype alias, the compiler keeps the alias
spelled out and uses that same spelling in the reflection field descriptor.

By resolving these typealiases we inadvertently made them impossible to
find in reflection metadata.

Detect these types (their name is a LocalDeclName) and leave them unchanged.

Assisted-by: claude

rdar://177196779
@augusto2112 augusto2112 force-pushed the typealiased-field-lookup-localdecl branch from a032437 to 7ff4912 Compare June 19, 2026 00:14
@augusto2112

Copy link
Copy Markdown
Author

@swift-ci test

2 similar comments
@augusto2112

Copy link
Copy Markdown
Author

@swift-ci test

@augusto2112

Copy link
Copy Markdown
Author

@swift-ci test

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