Skip to content

Commit 0ddd093

Browse files
committed
Sema: Fix unqualified lookup performed for DefineMemberBasedOnUnintendedGenericParam fix
We want to look for protocols at the top level, and not names visible from the function body. Previously we were passing the function's parent DeclContext and the source location of the parameter, but this will no longer work, so pass the SourceFile and an empty source location instead.
1 parent c80477b commit 0ddd093

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Sema/CSSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7289,8 +7289,8 @@ ConstraintSystem::SolutionKind ConstraintSystem::simplifyMemberConstraint(
72897289

72907290
auto descriptor = UnqualifiedLookupDescriptor(
72917291
DeclNameRef(param->getName()),
7292-
paramDecl->getDeclContext()->getParentForLookup(),
7293-
paramDecl->getStartLoc(),
7292+
paramDecl->getDeclContext()->getParentSourceFile(),
7293+
SourceLoc(),
72947294
UnqualifiedLookupFlags::KnownPrivate |
72957295
UnqualifiedLookupFlags::TypeLookup);
72967296
auto lookup = evaluateOrDefault(

0 commit comments

Comments
 (0)