Skip to content

[indexer] Fix crash in initVarRefIndexSymbols by handling references from 'import var ...' #7072

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
Jan 27, 2017

Conversation

nathawes
Copy link
Contributor

IndexSwiftASTWalker::initVarRefIndexSymbols wasn't handling getCurrentExpr() returning a nullptr (passed via the CurrentE param), but this happens whenever we're processing a reference within an import, e.g. someVar in:
import var SomeModule.someVar

This patch fixes the crash and adds support for indexing import var/func references.

Resolves rdar://problem/30118572

Nathan Hawes added 2 commits January 26, 2017 16:36
…ferences in ImportDecls

IndexSwiftASTWalker::initVarRefIndexSymbols wasn't handling getCurrentExpr() returning a nullptr
as it does when processing a reference to someVar in the below import:
import var SomeModule.someVar

This patch fixes rdar://problem/30118572 and adds tests for import var/func references.
@nathawes
Copy link
Contributor Author

@swift-ci Please smoke test

@nathawes
Copy link
Contributor Author

@swift-ci Please test

@akyrtzi akyrtzi merged commit 5f15bf4 into swiftlang:swift-3.1-branch Jan 27, 2017
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