mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SourceEntityWalker: Add a parameter to visitDeclReference() describing the kind of the reference under visit. NFC
This commit is contained in:
@@ -771,7 +771,8 @@ public:
|
||||
: SM(SM), BufferID(BufferID) {}
|
||||
|
||||
bool visitDeclReference(ValueDecl *D, CharSourceRange Range,
|
||||
TypeDecl *CtorTyRef, Type T) override {
|
||||
TypeDecl *CtorTyRef, Type T,
|
||||
SemaReferenceKind Kind) override {
|
||||
if (isa<VarDecl>(D) && D->hasName() && D->getName().str() == "self")
|
||||
return true;
|
||||
|
||||
@@ -788,7 +789,8 @@ public:
|
||||
bool visitSubscriptReference(ValueDecl *D, CharSourceRange Range,
|
||||
bool IsOpenBracket) override {
|
||||
// We should treat both open and close brackets equally
|
||||
return visitDeclReference(D, Range, nullptr, Type());
|
||||
return visitDeclReference(D, Range, nullptr, Type(),
|
||||
SemaReferenceKind::SubscriptRef);
|
||||
}
|
||||
|
||||
void annotate(const Decl *D, bool IsRef, CharSourceRange Range) {
|
||||
|
||||
Reference in New Issue
Block a user