swift
13ce4cc3 - [Macros] Improve visitation of auxiliary decls

Commit
1 year ago
[Macros] Improve visitation of auxiliary decls Use the same pattern as 'getAllMembers()'. This supports nested macro expansion: ``` std::function<void(Decl *)> visit; visit = [&](Decl *d) { doIt(d); d->visitAuxiliaryDecls(visit); }; for (auto *d : decls) visit(d); ``` Don't visit auxiliary decls in `PrintAST::visit(Decl *)` this function is only intended for single decl printing. The caller should visit them separately. For that, add `ModuleDecl::getTopLevelDeclsWithAuxiliaryDecls()` (cherry picked from commit 6f5283ebfc5bfe6426641297566864f2943a1490) (cherry picked from commit 03bf34977835c4f080495c5cf50b22a1362b8bea) (cherry picked from commit 55144fb302c3f2caa583d35904fb431ec04fbe2d)
Author
Committer
Parents
Loading