Skip to content

Commit ba4d6ed

Browse files
committed
AST: Remove unused NamedDeclConsumer class
1 parent dec9bf6 commit ba4d6ed

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

include/swift/AST/NameLookup.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -396,31 +396,6 @@ class VectorDeclConsumer : public VisibleDeclConsumer {
396396
}
397397
};
398398

399-
/// A consumer that inserts found decls with a matching name into an
400-
/// externally-owned SmallVector.
401-
class NamedDeclConsumer : public VisibleDeclConsumer {
402-
virtual void anchor() override;
403-
public:
404-
DeclNameRef name;
405-
SmallVectorImpl<LookupResultEntry> &results;
406-
bool isTypeLookup;
407-
408-
NamedDeclConsumer(DeclNameRef name,
409-
SmallVectorImpl<LookupResultEntry> &results,
410-
bool isTypeLookup)
411-
: name(name), results(results), isTypeLookup(isTypeLookup) {}
412-
413-
virtual void foundDecl(ValueDecl *VD, DeclVisibilityKind Reason,
414-
DynamicLookupInfo dynamicLookupInfo = {}) override {
415-
// Give clients an opportunity to filter out non-type declarations early,
416-
// to avoid circular validation.
417-
if (isTypeLookup && !isa<TypeDecl>(VD))
418-
return;
419-
if (VD->getName().matchesRef(name.getFullName()))
420-
results.push_back(LookupResultEntry(VD));
421-
}
422-
};
423-
424399
/// A consumer that filters out decls that are not accessible from a given
425400
/// DeclContext.
426401
class AccessFilteringDeclConsumer final : public VisibleDeclConsumer {

lib/AST/NameLookup.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ using namespace swift::namelookup;
4444

4545
void VisibleDeclConsumer::anchor() {}
4646
void VectorDeclConsumer::anchor() {}
47-
void NamedDeclConsumer::anchor() {}
4847

4948
ValueDecl *LookupResultEntry::getBaseDecl() const {
5049
if (BaseDC == nullptr)

0 commit comments

Comments
 (0)