Skip to content

Commit 0838a66

Browse files
author
David Ungar
committed
Provide hook to see if ASTScopes support lookups into inactive clauses
1 parent 4008261 commit 0838a66

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

include/swift/AST/NameLookup.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,8 @@ class ASTScope {
627627
return Mem;
628628
}
629629

630+
static bool areInactiveIfConfigClausesSupported();
631+
630632
private:
631633
static ast_scope::ASTSourceFileScope *createScopeTree(SourceFile *);
632634
};

lib/AST/ASTScopeCreation.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,10 @@ void ASTScope::
731731
impl->buildEnoughOfTreeForTopLevelExpressionsButDontRequestGenericsOrExtendedNominals();
732732
}
733733

734+
bool ASTScope::areInactiveIfConfigClausesSupported() {
735+
return ScopeCreator::includeInactiveIfConfigClauses;
736+
}
737+
734738
ASTSourceFileScope *ASTScope::createScopeTree(SourceFile *SF) {
735739
ScopeCreator *scopeCreator = new (SF->getASTContext()) ScopeCreator(SF);
736740
return scopeCreator->sourceFileScope;

0 commit comments

Comments
 (0)