Remove IfConfigDecl from the AST

The swift-syntax tree retains information about the parsed #if
regions. Drop it from the semantic AST.
This commit is contained in:
Doug Gregor
2024-09-18 20:46:57 -07:00
parent d762dd53f8
commit 5b2520e379
38 changed files with 16 additions and 476 deletions

View File

@@ -208,9 +208,6 @@ ASTWalker::PreWalkAction SemaAnnotator::walkToDeclPreProper(Decl *D) {
Loc = PrecD->getLoc();
if (Loc.isValid())
NameLen = PrecD->getName().getLength();
} else if (isa<IfConfigDecl>(D)) {
// Nothing to do here.
} else if (auto *MD = dyn_cast<MacroExpansionDecl>(D)) {
if (auto *macro =
dyn_cast_or_null<MacroDecl>(MD->getMacroRef().getDecl())) {