IDE: Fix bug in SourceEntityWalker subscript handling

We weren't passing the lvalue access kind to the subscript.
This was causing a test to fail with the next patch.
This commit is contained in:
Slava Pestov
2017-11-13 22:07:59 -08:00
parent 0715eaeaed
commit a70a1f0d36
7 changed files with 22 additions and 10 deletions

View File

@@ -1041,10 +1041,11 @@ public:
}
bool visitSubscriptReference(ValueDecl *D, CharSourceRange Range,
Optional<AccessKind> AccKind,
bool IsOpenBracket) override {
// Treat both open and close brackets equally
return visitDeclReference(D, Range, nullptr, nullptr, Type(),
ReferenceMetaData(SemaReferenceKind::SubscriptRef, None));
ReferenceMetaData(SemaReferenceKind::SubscriptRef, AccKind));
}
bool isLocal(Decl *D) const {