@@ -1388,21 +1388,21 @@ namespace {
1388
1388
nonoperatorScopeForASTScopeLookup (DeclContext *dc,
1389
1389
Optional<bool > isCascadingUse) const ;
1390
1390
1391
- struct lookInScopeForASTScopeLookupResult {
1391
+ struct LookInScopeForASTScopeLookupResult {
1392
1392
bool isDone; // Searching outers
1393
1393
DeclContext *selfDC;
1394
1394
DeclContext *dc;
1395
1395
Optional<bool >isCascadingUse;
1396
1396
};
1397
1397
1398
1398
// / Return status and new selfDC and new DC
1399
- Optional<lookInScopeForASTScopeLookupResult >
1399
+ Optional<LookInScopeForASTScopeLookupResult >
1400
1400
lookInScopeForASTScopeLookup (const ASTScope *const currentScope,
1401
1401
DeclContext *selfDC, DeclContext *dc,
1402
1402
const Optional<bool > isCascadingUse);
1403
1403
1404
1404
// / Returns status and selfDC and DC
1405
- Optional<lookInScopeForASTScopeLookupResult >
1405
+ Optional<LookInScopeForASTScopeLookupResult >
1406
1406
lookIntoDeclarationContextForASTScopeLookup (DeclContext *dc,
1407
1407
DeclContext *selfDC,
1408
1408
DeclContext *wasDC,
@@ -1700,7 +1700,7 @@ UnqualifiedLookupFactory::nonoperatorScopeForASTScopeLookup(
1700
1700
return std::make_pair (lookupScope, isCascadingUse);
1701
1701
}
1702
1702
1703
- Optional<UnqualifiedLookupFactory::lookInScopeForASTScopeLookupResult >
1703
+ Optional<UnqualifiedLookupFactory::LookInScopeForASTScopeLookupResult >
1704
1704
UnqualifiedLookupFactory::lookInScopeForASTScopeLookup (
1705
1705
const ASTScope *const currentScope, DeclContext *selfDC, DeclContext *dc,
1706
1706
const Optional<bool > isCascadingUse) {
@@ -1721,7 +1721,7 @@ UnqualifiedLookupFactory::lookInScopeForASTScopeLookup(
1721
1721
->getDeclContext ()
1722
1722
->isTypeContext ()) {
1723
1723
selfDC = currentScope->getAbstractFunctionDecl ();
1724
- return lookInScopeForASTScopeLookupResult {false , selfDC, dc,
1724
+ return LookInScopeForASTScopeLookupResult {false , selfDC, dc,
1725
1725
isCascadingUse};
1726
1726
}
1727
1727
@@ -1730,10 +1730,10 @@ UnqualifiedLookupFactory::lookInScopeForASTScopeLookup(
1730
1730
if (auto scopeDC = currentScope->getDeclContext ())
1731
1731
return lookIntoDeclarationContextForASTScopeLookup (scopeDC, selfDC, dc,
1732
1732
isCascadingUse);
1733
- return lookInScopeForASTScopeLookupResult {false , selfDC, dc, isCascadingUse};
1733
+ return LookInScopeForASTScopeLookupResult {false , selfDC, dc, isCascadingUse};
1734
1734
}
1735
1735
1736
- Optional<UnqualifiedLookupFactory::lookInScopeForASTScopeLookupResult >
1736
+ Optional<UnqualifiedLookupFactory::LookInScopeForASTScopeLookupResult >
1737
1737
UnqualifiedLookupFactory::lookIntoDeclarationContextForASTScopeLookup (
1738
1738
DeclContext *dc, DeclContext *selfDC, DeclContext *wasDC,
1739
1739
Optional<bool > isCascadingUse) {
@@ -1750,54 +1750,54 @@ UnqualifiedLookupFactory::lookIntoDeclarationContextForASTScopeLookup(
1750
1750
if (bindingInit->getImplicitSelfDecl ())
1751
1751
selfDC = bindingInit;
1752
1752
1753
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1753
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1754
1754
isCascadingUseResult};
1755
1755
}
1756
1756
1757
1757
// Default arguments only have 'static' access to the members of the
1758
1758
// enclosing type, if there is one.
1759
1759
if (isa<DefaultArgumentInitializer>(dc))
1760
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1760
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1761
1761
isCascadingUseResult};
1762
1762
1763
1763
// Functions/initializers/deinitializers are only interesting insofar as
1764
1764
// they affect lookup in an enclosing nominal type or extension thereof.
1765
1765
if (isa<AbstractFunctionDecl>(dc))
1766
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1766
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1767
1767
isCascadingUseResult};
1768
1768
1769
1769
// Subscripts have no lookup of their own.
1770
1770
if (isa<SubscriptDecl>(dc))
1771
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1771
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1772
1772
isCascadingUseResult};
1773
1773
1774
1774
// Closures have no lookup of their own.
1775
1775
if (isa<AbstractClosureExpr>(dc))
1776
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1776
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1777
1777
isCascadingUseResult};
1778
1778
1779
1779
// Top-level declarations have no lookup of their own.
1780
1780
if (isa<TopLevelCodeDecl>(dc))
1781
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1781
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1782
1782
isCascadingUseResult};
1783
1783
1784
1784
// Typealiases have no lookup of their own.
1785
1785
if (isa<TypeAliasDecl>(dc))
1786
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1786
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1787
1787
isCascadingUseResult};
1788
1788
1789
1789
// Lookup in the source file's scope marks the end.
1790
1790
if (isa<SourceFile>(dc)) {
1791
1791
// FIXME: A bit of a hack.
1792
- return lookInScopeForASTScopeLookupResult {true , selfDC, dc,
1792
+ return LookInScopeForASTScopeLookupResult {true , selfDC, dc,
1793
1793
isCascadingUseResult};
1794
1794
}
1795
1795
1796
1796
// We have a nominal type or an extension thereof. Perform lookup into
1797
1797
// the nominal type.
1798
1798
auto nominal = dc->getSelfNominalTypeDecl ();
1799
1799
if (!nominal)
1800
- return lookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1800
+ return LookInScopeForASTScopeLookupResult {false , selfDC, wasDC,
1801
1801
isCascadingUseResult};
1802
1802
1803
1803
// Dig out the type we're looking into.
@@ -1849,7 +1849,7 @@ UnqualifiedLookupFactory::lookIntoDeclarationContextForASTScopeLookup(
1849
1849
// Forget the 'self' declaration.
1850
1850
selfDC = nullptr ;
1851
1851
1852
- return lookInScopeForASTScopeLookupResult {false , selfDC, dc,
1852
+ return LookInScopeForASTScopeLookupResult {false , selfDC, dc,
1853
1853
isCascadingUseResult};
1854
1854
}
1855
1855
0 commit comments