AST: Add 'hoisted' flag to Decl

This commit is contained in:
Slava Pestov
2020-09-02 23:02:59 -04:00
parent 923b1fbedf
commit fae8f944b8
4 changed files with 39 additions and 2 deletions

View File

@@ -2342,6 +2342,10 @@ ArrayRef<Decl *> SourceFile::getTopLevelDecls() const {
{}).TopLevelDecls;
}
ArrayRef<Decl *> SourceFile::getHoistedDecls() const {
return Hoisted;
}
bool FileUnit::walk(ASTWalker &walker) {
SmallVector<Decl *, 64> Decls;
getTopLevelDecls(Decls);