RangeInfo: Report RValue type if a decl reference is of read-only LValue type. (#8300)

This commit is contained in:
Xi Ge
2017-03-23 15:52:54 -07:00
committed by GitHub
parent f7562e42b6
commit 1827fb1436
11 changed files with 77 additions and 44 deletions

View File

@@ -988,7 +988,7 @@ public:
bool visitDeclReference(ValueDecl *D, CharSourceRange Range,
TypeDecl *CtorTyRef, ExtensionDecl *ExtTyRef, Type Ty,
SemaReferenceKind Kind) override {
ReferenceMetaData Data) override {
unsigned StartOffset = getOffset(Range.getStart());
References.emplace_back(D, StartOffset, Range.getByteLength(), Ty);
return true;
@@ -998,7 +998,7 @@ public:
bool IsOpenBracket) override {
// Treat both open and close brackets equally
return visitDeclReference(D, Range, nullptr, nullptr, Type(),
SemaReferenceKind::SubscriptRef);
ReferenceMetaData(SemaReferenceKind::SubscriptRef, None));
}
bool isLocal(Decl *D) const {