Skip to content

[code-completion] Avoid a tentantive parse when in code-completion mode and make sure CodeCompletionExpr has a token range #6087

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 1 commit into from
Dec 6, 2016

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Dec 6, 2016

The tentantive parse is used for diagnostic purposes but can cause code-completion to delay the same decl twice.
The range of CodeCompletionExpr was previously character range which invalidated invariants of the AST.

Fixes:
validation-test/IDE/crashers/084-swift-parser-consumedecl.swift
validation-test/IDE/crashers/104-swift-gettypeofcompletioncontextexpr.swift

rdar://problem/28822221

…de and make sure CodeCompletionExpr has a token range.

The tentantive parse is used for diagnostic purposes but can cause code-completion to delay the same decl twice.
The range of CodeCompletionExpr was previously character range which invalidated invariants of the AST.

Fixes:
	validation-test/IDE/crashers_fixed/084-swift-parser-consumedecl.swift
	validation-test/IDE/crashers_fixed/104-swift-gettypeofcompletioncontextexpr.swift
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Dec 6, 2016

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit de85804 into swiftlang:master Dec 6, 2016
@akyrtzi akyrtzi deleted the fix-ide-crash-084 branch December 6, 2016 01:54
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