Code review feedback from @davidungar

This commit is contained in:
Slava Pestov
2020-09-04 16:20:34 -04:00
parent 4a6280074d
commit 193cf0de87
3 changed files with 20 additions and 15 deletions

View File

@@ -2337,6 +2337,12 @@ bool SourceFile::hasDelayedBodyParsing() const {
return true;
}
/// Add a hoisted declaration. See Decl::isHoisted().
void SourceFile::addHoistedDecl(Decl *d) {
assert(d->isHoisted());
Hoisted.push_back(d);
}
ArrayRef<Decl *> SourceFile::getTopLevelDecls() const {
auto &ctx = getASTContext();
auto *mutableThis = const_cast<SourceFile *>(this);