[sourcekit] Fix assertion hit when doing cursor-info on a subscript parameter declaration.

Fixes rdar:/30060622
This commit is contained in:
Argyrios Kyrtzidis
2017-01-17 14:56:36 -08:00
parent 29b59342f8
commit da1328f04b
2 changed files with 9 additions and 0 deletions

View File

@@ -454,6 +454,9 @@ void walkRelatedDecls(const ValueDecl *VD, const FnTy &Fn) {
++NamesSeen[VD->getFullName()];
SmallVector<ValueDecl *, 8> RelatedDecls;
if (isa<ParamDecl>(VD))
return; // Parameters don't have interesting related declarations.
// FIXME: Extract useful related declarations, overloaded functions,
// if VD is an initializer, we should extract other initializers etc.
// For now we use UnqualifiedLookup to fetch other declarations with the same