File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1355,10 +1355,11 @@ TinyPtrVector<ValueDecl *> NominalTypeDecl::lookupDirect(
1355
1355
// will flip the hasLazyMembers() flag to false as well.
1356
1356
if (!useNamedLazyMemberLoading) {
1357
1357
// If we're about to load members here, purge the MemberLookupTable;
1358
- // it will be rebuilt in prepareLookup, below.
1359
- if (hasLazyMembers () && LookupTable.getPointer ()) {
1360
- // We should not have scanned the IDC list yet. Double check.
1361
- assert (!LookupTable.getInt ());
1358
+ // it will be rebuilt in prepareLookup, below. Base this decision on
1359
+ // the LookupTable's int value, not hasLazyMembers(), since the latter
1360
+ // can sometimes change underfoot if some other party calls getMembers
1361
+ // outside of lookup (eg. typo correction).
1362
+ if (LookupTable.getPointer () && !LookupTable.getInt ()) {
1362
1363
LookupTable.getPointer ()->clear ();
1363
1364
}
1364
1365
You can’t perform that action at this time.
0 commit comments