|
@@ -2701,7 +2701,7 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result,
|
|
D != DEnd; ++D) {
|
|
D != DEnd; ++D) {
|
|
if (NamedDecl *ND = dyn_cast<NamedDecl>(*D)) {
|
|
if (NamedDecl *ND = dyn_cast<NamedDecl>(*D)) {
|
|
if (Result.isAcceptableDecl(ND)) {
|
|
if (Result.isAcceptableDecl(ND)) {
|
|
- Consumer.FoundDecl(ND, Visited.checkHidden(ND), InBaseClass);
|
|
|
|
|
|
+ Consumer.FoundDecl(ND, Visited.checkHidden(ND), Ctx, InBaseClass);
|
|
Visited.add(ND);
|
|
Visited.add(ND);
|
|
}
|
|
}
|
|
} else if (ObjCForwardProtocolDecl *ForwardProto
|
|
} else if (ObjCForwardProtocolDecl *ForwardProto
|
|
@@ -2712,14 +2712,15 @@ static void LookupVisibleDecls(DeclContext *Ctx, LookupResult &Result,
|
|
P != PEnd;
|
|
P != PEnd;
|
|
++P) {
|
|
++P) {
|
|
if (Result.isAcceptableDecl(*P)) {
|
|
if (Result.isAcceptableDecl(*P)) {
|
|
- Consumer.FoundDecl(*P, Visited.checkHidden(*P), InBaseClass);
|
|
|
|
|
|
+ Consumer.FoundDecl(*P, Visited.checkHidden(*P), Ctx, InBaseClass);
|
|
Visited.add(*P);
|
|
Visited.add(*P);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (ObjCClassDecl *Class = dyn_cast<ObjCClassDecl>(*D)) {
|
|
} else if (ObjCClassDecl *Class = dyn_cast<ObjCClassDecl>(*D)) {
|
|
ObjCInterfaceDecl *IFace = Class->getForwardInterfaceDecl();
|
|
ObjCInterfaceDecl *IFace = Class->getForwardInterfaceDecl();
|
|
if (Result.isAcceptableDecl(IFace)) {
|
|
if (Result.isAcceptableDecl(IFace)) {
|
|
- Consumer.FoundDecl(IFace, Visited.checkHidden(IFace), InBaseClass);
|
|
|
|
|
|
+ Consumer.FoundDecl(IFace, Visited.checkHidden(IFace), Ctx,
|
|
|
|
+ InBaseClass);
|
|
Visited.add(IFace);
|
|
Visited.add(IFace);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2861,7 +2862,7 @@ static void LookupVisibleDecls(Scope *S, LookupResult &Result,
|
|
D != DEnd; ++D) {
|
|
D != DEnd; ++D) {
|
|
if (NamedDecl *ND = dyn_cast<NamedDecl>(*D))
|
|
if (NamedDecl *ND = dyn_cast<NamedDecl>(*D))
|
|
if (Result.isAcceptableDecl(ND)) {
|
|
if (Result.isAcceptableDecl(ND)) {
|
|
- Consumer.FoundDecl(ND, Visited.checkHidden(ND), false);
|
|
|
|
|
|
+ Consumer.FoundDecl(ND, Visited.checkHidden(ND), 0, false);
|
|
Visited.add(ND);
|
|
Visited.add(ND);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -3043,7 +3044,8 @@ public:
|
|
delete I->second;
|
|
delete I->second;
|
|
}
|
|
}
|
|
|
|
|
|
- virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, bool InBaseClass);
|
|
|
|
|
|
+ virtual void FoundDecl(NamedDecl *ND, NamedDecl *Hiding, DeclContext *Ctx,
|
|
|
|
+ bool InBaseClass);
|
|
void FoundName(StringRef Name);
|
|
void FoundName(StringRef Name);
|
|
void addKeywordResult(StringRef Keyword);
|
|
void addKeywordResult(StringRef Keyword);
|
|
void addName(StringRef Name, NamedDecl *ND, unsigned Distance,
|
|
void addName(StringRef Name, NamedDecl *ND, unsigned Distance,
|
|
@@ -3074,7 +3076,7 @@ public:
|
|
}
|
|
}
|
|
|
|
|
|
void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
|
|
void TypoCorrectionConsumer::FoundDecl(NamedDecl *ND, NamedDecl *Hiding,
|
|
- bool InBaseClass) {
|
|
|
|
|
|
+ DeclContext *Ctx, bool InBaseClass) {
|
|
// Don't consider hidden names for typo correction.
|
|
// Don't consider hidden names for typo correction.
|
|
if (Hiding)
|
|
if (Hiding)
|
|
return;
|
|
return;
|