Skip to content

Commit d663bb4

Browse files
authored
[cxx-interop] Treat name lookup as successful if we found a C++ member operator
`ClangImporter::Implementation::lookupValue` used to return `false` if it found an overloaded C++ operator that is declared as a member function of a C++ type. This doesn't have any effect now since the return value isn't used under normal conditions, but it might bite us later.
1 parent 60952b8 commit d663bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4074,9 +4074,11 @@ bool ClangImporter::Implementation::lookupValue(SwiftLookupTable &table,
40744074
if (auto func = dyn_cast_or_null<FuncDecl>(
40754075
importDeclReal(entry->getMostRecentDecl(), CurrentVersion))) {
40764076
if (auto synthesizedOperator =
4077-
importer->getCXXSynthesizedOperatorFunc(func))
4077+
importer->getCXXSynthesizedOperatorFunc(func)) {
40784078
consumer.foundDecl(synthesizedOperator,
40794079
DeclVisibilityKind::VisibleAtTopLevel);
4080+
declFound = true;
4081+
}
40804082
}
40814083
}
40824084
}

0 commit comments

Comments
 (0)