Skip to content

Commit 4d920f0

Browse files
authored
Merge pull request #76503 from DougGregor/unused-ifconfig-walk
Remove unused shouldWalkInactiveConfigRegion
2 parents a1c2745 + 4c4a70f commit 4d920f0

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

include/swift/IDE/SourceEntityWalker.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ class SourceEntityWalker {
196196
/// This method is called when a Module is referenced in source.
197197
virtual bool visitModuleReference(ModuleEntity Mod, CharSourceRange Range);
198198

199-
/// Whether walk into the inactive region in a #if config statement.
200-
virtual bool shouldWalkInactiveConfigRegion() { return false; }
201-
202199
virtual bool shouldWalkIntoGenericParams() { return true; }
203200

204201
/// Only walk the arguments of a macro, to represent the source as written.

lib/IDE/SourceEntityWalker.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,8 @@ ASTWalker::PreWalkAction SemaAnnotator::walkToDeclPreProper(Decl *D) {
209209
if (Loc.isValid())
210210
NameLen = PrecD->getName().getLength();
211211

212-
} else if (auto *ICD = dyn_cast<IfConfigDecl>(D)) {
213-
if (SEWalker.shouldWalkInactiveConfigRegion()) {
214-
for (auto Clause : ICD->getClauses()) {
215-
for (auto Member : Clause.Elements) {
216-
Member.walk(*this);
217-
}
218-
}
219-
return Action::SkipNode();
220-
}
212+
} else if (isa<IfConfigDecl>(D)) {
213+
// Nothing to do here.
221214
} else if (auto *MD = dyn_cast<MacroExpansionDecl>(D)) {
222215
if (auto *macro =
223216
dyn_cast_or_null<MacroDecl>(MD->getMacroRef().getDecl())) {

0 commit comments

Comments
 (0)