Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[6.2] RemoteInspection: Support for parameter packs #81379

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

Open
wants to merge 2 commits into
base: release/6.2
Choose a base branch
from

Conversation

slavapestov
Copy link
Contributor

6.2 cherry-pick of #81299.

  • Description: Remote mirrors did not support types containing parameter packs. Add that support.

  • Scope of the issue: This meant that parameter packs defeat lldb's remote mirrors-based code path, forcing the ASTContext to be loaded. This should no longer be necessary.

  • Risk: There is a bunch of new code, and it might have bugs in it. However this doesn't change behavior of existing code.

  • Reviewed by: @adrian-prantl

@slavapestov slavapestov requested a review from a team as a code owner May 8, 2025 20:12
@slavapestov
Copy link
Contributor Author

@swift-ci Please test

Fn handleComponent) {
// Substitute the shape using the baseline substitutions, not the
// current elementwise projections.
auto *substShape = origExpansion->getCount()->subst(Builder, Substitutions);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this fail; do we need to nullptr-check the result of GetCount()?


auto *substPackShape = dyn_cast<PackTypeRef>(substShape);
if (!substPackShape) {
DEBUG_LOG(fprintf(stderr, "Replacement for pack must be another pack"));
Copy link
Contributor

Choose a reason for hiding this comment

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

[We really should upgrade this library to llvm::Expected<> at some point]

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