Skip to content

[clang][modules] Cherry-picks for minor fixes #10854

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
Jun 18, 2025

Conversation

cyndyishida
Copy link

@cyndyishida cyndyishida commented Jun 17, 2025

Two commits in the PR:

[clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (llvm#142452)

Sometimes, when a user writes invalid code, the minimization used for scanning can create a stream of tokens that is invalid at lex time. This patch protects against the case where there are valid (non-c++20) import directives discovered in the middle of an invalid import declaration.

Mostly authored by: @akyrtzi
resolves: rdar://152335844

(cherry picked from commit 897b030)

and

[clang] Rename diag notes that assumed precompiled dependencies are pch's, NFCI (llvm#142161)

(cherry picked from commit 883130e33325282cfd31b68f5db52891442c20b7)

…okens (llvm#142452)

Sometimes, when a user writes invalid code, the minimization used for
scanning can create a stream of tokens that is invalid at lex time. This
patch protects against the case where there are valid (non-c++20) import
directives discovered in the middle of an invalid `import` declaration.

Mostly authored by: @akyrtzi
resolves: rdar://152335844

(cherry picked from commit 897b030)
@cyndyishida cyndyishida requested a review from akyrtzi June 17, 2025 15:49
@cyndyishida cyndyishida requested a review from a team as a code owner June 17, 2025 15:49
@cyndyishida
Copy link
Author

@swift-ci please test

@cyndyishida cyndyishida changed the title [clang][dep-scan] Resolve lexer crash from a permutation of invalid tokens (#142452) [clang][modules] Cherry-picks for minor fixes Jun 17, 2025
@cyndyishida
Copy link
Author

@swift-ci please test

@cyndyishida cyndyishida merged commit 2a5645a into swiftlang:swift/release/6.2 Jun 18, 2025
3 checks passed
@cyndyishida cyndyishida deleted the eng/ScannerCrash branch June 18, 2025 00:32
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