Skip to content

Commit 3a744d1

Browse files
committed
Rm LookupInOneDeclContextResult::isDone
1 parent c9576ca commit 3a744d1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/AST/UnqualifiedLookup.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ class UnqualifiedLookupFactory {
279279
const Optional<bool> isCascadingUseArg);
280280

281281
struct LookupInOneDeclContextResult {
282-
bool isDone;
283282
DeclContext *dc;
284283
Optional<bool> isCascadingUse;
285284
};
@@ -676,11 +675,8 @@ UnqualifiedLookupFactory::nonASTScopeBasedLookup(
676675
auto r = lookupInOneDeclContext(nextDC, isCascadingUse);
677676
if (!r.hasValue())
678677
return None;
679-
const bool isDone = r.getValue().isDone;
680678
nextDC = r.getValue().dc;
681679
isCascadingUse = r.getValue().isCascadingUse;
682-
if (isDone)
683-
break;
684680
assert(nextDC != priorDC && "non-termination");
685681
priorDC = nextDC;
686682
}
@@ -706,7 +702,7 @@ UnqualifiedLookupFactory::lookupInOneDeclContext(
706702
auto isCascadingUse = r.getValue().isCascadingUse;
707703

708704
if (isDone)
709-
return LookupInOneDeclContextResult{false, childOfNextDC, isCascadingUse};
705+
return LookupInOneDeclContextResult{childOfNextDC, isCascadingUse};
710706

711707
if (addGenericParametersHereAndInEnclosingScopes(childOfNextDC))
712708
return None;
@@ -719,7 +715,7 @@ UnqualifiedLookupFactory::lookupInOneDeclContext(
719715
}
720716
// TODO: What if !BaseDC && lookupDecls non-empty?
721717
DeclContext *nextDC = childOfNextDC->getParentForLookup();
722-
return LookupInOneDeclContextResult{false, nextDC, isCascadingUse};
718+
return LookupInOneDeclContextResult{nextDC, isCascadingUse};
723719
}
724720
// clang-format on
725721

@@ -1604,7 +1600,6 @@ LegacyUnqualifiedLookup::LegacyUnqualifiedLookup(DeclName Name, DeclContext *DC,
16041600

16051601
DC = DC->getParentForLookup();
16061602
}
1607-
16081603
if (!isCascadingUse.hasValue())
16091604
isCascadingUse = true;
16101605
}

0 commit comments

Comments
 (0)