Fix overly restrictive assertion, for -dump-scope-maps case

This commit is contained in:
David Ungar
2019-09-14 13:41:59 -07:00
parent 03a89c7c8a
commit c7e603ddf7

View File

@@ -1745,8 +1745,7 @@ StringRef SourceFile::getFilename() const {
}
ASTScope &SourceFile::getScope() {
assert(getASTContext().LangOpts.EnableASTScopeLookup &&
isSuitableForASTScopes() && "Should not be creating scope tree");
assert(isSuitableForASTScopes() && "Should not be creating scope tree");
if (!Scope)
Scope = std::unique_ptr<ASTScope>(new (getASTContext()) ASTScope(this));
return *Scope.get();