Skip to content

Conversation

@rintaro
Copy link
Member

@rintaro rintaro commented Jul 10, 2020

Cherry-pick of #32806 into release/5.3

  • Explanation: Fix a crash in fast-completion. Add a nullptr check to avoid crashes. If it's nullptr, it falls back to normal completion, but it's better than crashing. For debug builds, added pretty stack trace and assertion to see more info when it happens again. I haven't been able to find a reproducer though.
  • Scope: Code completion inside function bodies
  • Risk: Low. Just adding a safe nullptr check
  • Testing: Passes current test suite. No regression test is added because we haven't been able to find a reproducer
  • Issue: rdar://problem/61765124
  • Reviewer: Ben Langmuir (@benlangmuir)

There seems to be case where parentDC->getAsDecl() returns nullptr.
I haven't been able to find a reproducer.

rdar://problem/61765124
(cherry picked from commit 09f461b)
@rintaro rintaro requested a review from a team as a code owner July 10, 2020 17:15
@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2020

@swift-ci Please test

@rintaro rintaro added the r5.3 label Jul 10, 2020
@rintaro rintaro changed the title [CodeCompletion] Safer getEquivalentDeclContextFromSourceFile() [5.3][CodeCompletion] Safer getEquivalentDeclContextFromSourceFile() Jul 10, 2020
@rintaro
Copy link
Member Author

rintaro commented Jul 10, 2020

@swift-ci Please nominate

@akyrtzi akyrtzi merged commit 83b16cf into swiftlang:release/5.3 Jul 10, 2020
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🍒 release cherry pick Flag: Release branch cherry picks swift 5.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants