Skip to content

[index] For extensions, relate the symbol reference that gets extended and base references with the extension symbol. #7622

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
Feb 20, 2017

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Feb 20, 2017

They were getting related with the original extended symbol, which was incorrect.

…d and base references with the extension symbol.

They were getting related with the original extended symbol, which was incorrect.
@akyrtzi
Copy link
Contributor Author

akyrtzi commented Feb 20, 2017

@swift-ci smoke test and merge

if (getNameAndUSR(D, /*ExtD=*/nullptr, Name, USR))
return true;
if (auto *ExtD = dyn_cast<ExtensionDecl>(D)) {
NominalTypeDecl *NTD = ExtD->getExtendedType()->getAnyNominal();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this ever get called with invalid code? getExtendedType() might be null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, in such a case IndexSwiftASTWalker::reportExtension would bail out early and addRelation would not get called.

@swift-ci swift-ci merged commit 243baa1 into swiftlang:master Feb 20, 2017
@akyrtzi akyrtzi deleted the index-extension-relation branch February 20, 2017 03:08
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.

3 participants