Handle dynamic member lookup in annotation and cursor info

Ensure the various entity walkers handle the implicit subscript
reference correctly (usually by ignoring it) and fall through to the
underlying declarations.

rdar://49028895
This commit is contained in:
Ben Langmuir
2019-04-03 13:13:24 -07:00
parent 6af24d083c
commit effab8c522
7 changed files with 106 additions and 5 deletions

View File

@@ -1032,6 +1032,8 @@ public:
bool visitDeclReference(ValueDecl *D, CharSourceRange Range,
TypeDecl *CtorTyRef, ExtensionDecl *ExtTyRef, Type Ty,
ReferenceMetaData Data) override {
if (Data.isImplicit)
return true;
unsigned StartOffset = getOffset(Range.getStart());
References.emplace_back(D, StartOffset, Range.getByteLength(), Ty);
return true;