Skip to content

[5.4] [Type checker] Ensure we sort semantic members properly. #35385

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

Closed

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jan 12, 2021

When evaluating the semantic members request, we would sort the members
before we return them to ensure a stable ordering for (e.g.) vtable
layout. However, when not in a source file, we would assume that the
resulting members were always sorted. However, they are not always
sorted, because we write the iterative decl contexts directly rather
than writing the semantic members.

Fixes rdar://72833032.

When evaluating the semantic members request, we would sort the members
before we return them to ensure a stable ordering for (e.g.) vtable
layout. However, when not in a source file, we would assume that the
resulting members were always sorted. However, they are not always
sorted, because we write the iterative decl contexts directly rather
than writing the semantic members.

Fixes rdar://72833032.

(cherry picked from commit 5426117)
@DougGregor DougGregor requested a review from a team as a code owner January 12, 2021 22:44
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

Windows failure doesn't make sense:

S:\jenkins\workspace\swift-PR-windows\llvm-project\clang\include\clang/AST/CommentCommandTraits.h(131,10): fatal error: 'clang/AST/CommentCommandList.inc' file not found
#include "clang/AST/CommentCommandList.inc"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@DougGregor
Copy link
Member Author

Obsoleted in favor of #35540

@DougGregor DougGregor closed this Jan 22, 2021
@DougGregor DougGregor deleted the sort-semantic-members-5.4 branch January 22, 2021 21:25
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