mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[index] Fix dynamicMemberLookup subscript reference implicit role
When building the implicit subscript expression, set the "implicit" bit correctly and pass it through in the indexer so that we get implicit refernces to the subscript. This would be useful for e.g. searching for all uses of the dynamic subscript.
This commit is contained in:
@@ -1038,11 +1038,10 @@ public:
|
||||
}
|
||||
|
||||
bool visitSubscriptReference(ValueDecl *D, CharSourceRange Range,
|
||||
Optional<AccessKind> AccKind,
|
||||
ReferenceMetaData Data,
|
||||
bool IsOpenBracket) override {
|
||||
// Treat both open and close brackets equally
|
||||
return visitDeclReference(D, Range, nullptr, nullptr, Type(),
|
||||
ReferenceMetaData(SemaReferenceKind::SubscriptRef, AccKind));
|
||||
return visitDeclReference(D, Range, nullptr, nullptr, Type(), Data);
|
||||
}
|
||||
|
||||
bool isLocal(Decl *D) const {
|
||||
|
||||
Reference in New Issue
Block a user