Skip to content

Commit dfc67d6

Browse files
committed
[NamedLazyMemberLoading] Give up trying to break recursion on clang-imported init for now.
1 parent b32f4f4 commit dfc67d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/AST/NameLookup.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,13 @@ TinyPtrVector<ValueDecl *> NominalTypeDecl::lookupDirect(
13461346
bool useNamedLazyMemberLoading = (ctx.LangOpts.NamedLazyMemberLoading &&
13471347
hasLazyMembers());
13481348

1349+
// FIXME: At present, lazy member loading conflicts with a bunch of other code
1350+
// that appears to special-case initializers (clang-imported initializer
1351+
// sorting, implicit initializer synthesis), so for the time being we have to
1352+
// turn it off for them entirely.
1353+
if (name.getBaseName() == ctx.Id_init)
1354+
useNamedLazyMemberLoading = false;
1355+
13491356
// We check the LookupTable at most twice, possibly treating a miss in the
13501357
// first try as a cache-miss that we then do a cache-fill on, and retry.
13511358
for (int i = 0; i < 2; ++i) {

0 commit comments

Comments
 (0)