Skip to content

[IDE] Call into matchWitnessStructure to check if we should inherit a comment from an overridden declaration #75666

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

Merged
merged 2 commits into from
Aug 13, 2024

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 3, 2024

Instead of duplicating logic whether a witness can match a requirement structurally (like static vs. non-static, matching decl kind etc.) call into the type checker to determine that.

This required moving getDocCommentProvidingDecl and getCascadingDocComment from AST to IDE.

Matching the type seemed to work fairly differently between the type checker and for IDE purposes, so we are not sharing that.

@ahoppen
Copy link
Member Author

ahoppen commented Aug 7, 2024

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Aug 7, 2024

@swift-ci Please smoke test

@ahoppen ahoppen force-pushed the share-is-static branch 2 times, most recently from 49daaab to ca3eb38 Compare August 7, 2024 23:05
@ahoppen
Copy link
Member Author

ahoppen commented Aug 7, 2024

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Aug 8, 2024

@swift-ci Please smoke test

llvm::function_ref<RequirementMatch(bool, ArrayRef<OptionalAdjustment>)>
finalize) {

/// Implementation of `matchWitnessStructure` that also sets a few out paramter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Implementation of `matchWitnessStructure` that also sets a few out paramter
/// Implementation of `matchWitnessStructure` that also sets a few out parameters

… from `AST` to `Sema`

This allows use to re-use logic from Sema in those requests.

This commit just moves functions around and does not change any functionality.
@ahoppen
Copy link
Member Author

ahoppen commented Aug 9, 2024

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Aug 12, 2024

@swift-ci Please smoke test

@ahoppen ahoppen enabled auto-merge August 12, 2024 21:38
@ahoppen ahoppen merged commit bdc6fc6 into swiftlang:main Aug 13, 2024
3 checks passed
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