@@ -279,7 +279,6 @@ class UnqualifiedLookupFactory {
279
279
const Optional<bool > isCascadingUseArg);
280
280
281
281
struct LookupInOneDeclContextResult {
282
- bool isDone;
283
282
DeclContext *dc;
284
283
Optional<bool > isCascadingUse;
285
284
};
@@ -676,11 +675,8 @@ UnqualifiedLookupFactory::nonASTScopeBasedLookup(
676
675
auto r = lookupInOneDeclContext (nextDC, isCascadingUse);
677
676
if (!r.hasValue ())
678
677
return None;
679
- const bool isDone = r.getValue ().isDone ;
680
678
nextDC = r.getValue ().dc ;
681
679
isCascadingUse = r.getValue ().isCascadingUse ;
682
- if (isDone)
683
- break ;
684
680
assert (nextDC != priorDC && " non-termination" );
685
681
priorDC = nextDC;
686
682
}
@@ -706,7 +702,7 @@ UnqualifiedLookupFactory::lookupInOneDeclContext(
706
702
auto isCascadingUse = r.getValue ().isCascadingUse ;
707
703
708
704
if (isDone)
709
- return LookupInOneDeclContextResult{false , childOfNextDC, isCascadingUse};
705
+ return LookupInOneDeclContextResult{childOfNextDC, isCascadingUse};
710
706
711
707
if (addGenericParametersHereAndInEnclosingScopes (childOfNextDC))
712
708
return None;
@@ -719,7 +715,7 @@ UnqualifiedLookupFactory::lookupInOneDeclContext(
719
715
}
720
716
// TODO: What if !BaseDC && lookupDecls non-empty?
721
717
DeclContext *nextDC = childOfNextDC->getParentForLookup ();
722
- return LookupInOneDeclContextResult{false , nextDC, isCascadingUse};
718
+ return LookupInOneDeclContextResult{nextDC, isCascadingUse};
723
719
}
724
720
// clang-format on
725
721
@@ -1604,7 +1600,6 @@ LegacyUnqualifiedLookup::LegacyUnqualifiedLookup(DeclName Name, DeclContext *DC,
1604
1600
1605
1601
DC = DC->getParentForLookup ();
1606
1602
}
1607
-
1608
1603
if (!isCascadingUse.hasValue ())
1609
1604
isCascadingUse = true ;
1610
1605
}
0 commit comments