X Tutup
The Wayback Machine - https://web.archive.org/web/20221107201710/https://github.com/github/codeql/pull/11131
Skip to content
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

Swift: deal with incomplete ASTs #11131

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Conversation

redsun82
Copy link
Contributor

@redsun82 redsun82 commented Nov 4, 2022

No description provided.

@github-actions github-actions bot added the Swift label Nov 4, 2022
redsun82 added 8 commits Nov 7, 2022
Optional label have been integrated into the `TrapLabel` type by
using the undefined id, which is now returned by `fetchLabel` on
`nullptr` entities.

At trap emission time however, if the field was expected not to be
optional, a `missing_properties` trap entry is emitted.
The test was inspired by locally running the query against files in
https://github.com/apple/swift/tree/main/test/Parse

An interesting byproduct was finding a problematic `assert` in the
Swift headers. An incomplete `FallthroughStmt` was asserting on having
a destination. I did not find any other sensible way of getting rid of
the crash when running in debug mode than to patch the header.
@redsun82 redsun82 force-pushed the redsun82/swift-incomplete-ast branch from fb186a1 to eb2b5d1 Compare Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant
X Tutup