@@ -1497,9 +1497,9 @@ namespace {
1497
1497
computeBaseNLOptions (const LegacyUnqualifiedLookup::Options options,
1498
1498
const bool isOriginallyTypeLookup);
1499
1499
1500
- bool resolveIsCascadingUse (const DeclContext *const dc,
1501
- Optional<bool > isCascadingUse,
1502
- bool onlyCareAboutFunctionBody);
1500
+ static bool resolveIsCascadingUse (const DeclContext *const dc,
1501
+ Optional<bool > isCascadingUse,
1502
+ bool onlyCareAboutFunctionBody);
1503
1503
};
1504
1504
} // namespace
1505
1505
@@ -2007,8 +2007,6 @@ UnqualifiedLookupFactory::lookupInFunctionDecl(AbstractFunctionDecl *AFD,
2007
2007
namelookup::FindLocalVal localVal (SM, Loc, Consumer);
2008
2008
localVal.visit (AFD->getBody ());
2009
2009
if (isFinishedWithLookupNowThatIsAboutToLookForOuterResults ())
2010
- // clang-format off
2011
- // TODO: when returning finished, return nulls?
2012
2010
return None;
2013
2011
2014
2012
if (auto *P = AFD->getImplicitSelfDecl ())
@@ -2030,6 +2028,7 @@ UnqualifiedLookupFactory::lookupInFunctionDecl(AbstractFunctionDecl *AFD,
2030
2028
addGenericParametersForFunction (AFD);
2031
2029
if (isFinishedWithLookupNowThatIsAboutToLookForOuterResults ())
2032
2030
return None;
2031
+ // clang-format off
2033
2032
return PerScopeLookupState{
2034
2033
false ,
2035
2034
fnParent,
@@ -2039,9 +2038,11 @@ UnqualifiedLookupFactory::lookupInFunctionDecl(AbstractFunctionDecl *AFD,
2039
2038
// might be type checking a default argument expression and
2040
2039
// performing name lookup from there), the base declaration
2041
2040
// is the nominal type, not 'self'.
2042
- isOutsideBodyOfFunction (AFD) ? fnDeclContext : AFD, fnDeclContext,
2041
+ isOutsideBodyOfFunction (AFD) ? fnDeclContext : AFD,
2042
+ fnDeclContext,
2043
2043
AFD->getDeclContext ()),
2044
2044
returnValueForIsCascadingUse};
2045
+ // clang-format on
2045
2046
}
2046
2047
// Look in the generic parameters after checking our local declaration.
2047
2048
addGenericParametersForFunction (AFD);
0 commit comments