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

@@ -111,10 +111,11 @@ bool CursorInfoResolver::tryResolve(Stmt *St) {
}
bool CursorInfoResolver::visitSubscriptReference(ValueDecl *D, CharSourceRange Range,
bool IsOpenBracket) {
Optional<AccessKind> AccKind,
bool IsOpenBracket) {
// We should treat both open and close brackets equally
return visitDeclReference(D, Range, nullptr, nullptr, Type(),
ReferenceMetaData(SemaReferenceKind::SubscriptRef, None));
ReferenceMetaData(SemaReferenceKind::SubscriptRef, AccKind));
}
ResolvedCursorInfo CursorInfoResolver::resolve(SourceLoc Loc) {