mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
RangeInfo: Report RValue type if a decl reference is of read-only LValue type. (#8300)
This commit is contained in:
@@ -777,7 +777,7 @@ public:
|
||||
|
||||
bool visitDeclReference(ValueDecl *D, CharSourceRange Range,
|
||||
TypeDecl *CtorTyRef, ExtensionDecl *ExtTyRef, Type T,
|
||||
SemaReferenceKind Kind) override {
|
||||
ReferenceMetaData Data) override {
|
||||
if (isa<VarDecl>(D) && D->hasName() && D->getName().str() == "self")
|
||||
return true;
|
||||
|
||||
@@ -795,7 +795,7 @@ public:
|
||||
bool IsOpenBracket) override {
|
||||
// We should treat both open and close brackets equally
|
||||
return visitDeclReference(D, Range, nullptr, nullptr, Type(),
|
||||
SemaReferenceKind::SubscriptRef);
|
||||
ReferenceMetaData(SemaReferenceKind::SubscriptRef, None));
|
||||
}
|
||||
|
||||
void annotate(const Decl *D, bool IsRef, CharSourceRange Range) {
|
||||
|
||||
Reference in New Issue
Block a user