Files
swift-mirror/test/Interop/Cxx/class/inheritance/Inputs/inherited-lookup.h
Gábor Horváth b51b58db30 [6.2][cxx-interop] Fix unqualified name lookup failure
Explanation: C++ interop synthesizes certain forwarding functions in an
_ObjC module. This confuses MemberImportVisibility. This patch adds
logic to work this around by keeping a mapping between the synthesized
and the original function and looks up where the synthesized functions
belong to based on the original functions' parent module.
Scope: C++ forward interop when MemberImportVisibility is enabled.
Issues: rdar://154887575
Original PRs: #82840
Risk: Low, a narrow change makes getModuleContextForNameLookupForCxxDecl more
precise, and it is only used with MemberImportVisibility.
Testing: Added a compiler test.
Reviewers: @egorzhdan, @tshortli, @hnrklssn
2025-07-09 17:59:11 +01:00

28 lines
456 B
C++

#pragma once
struct One {
int method(void) const { return 1; }
int operator[](int i) const { return 1; }
};
struct IOne : One {
int methodI(void) const { return -1; }
};
struct IIOne : IOne {
int methodII(void) const { return -11; }
};
struct IIIOne : IIOne {
int methodIII(void) const { return -111; }
};
class Base {
public:
bool baseMethod() const { return true; }
};
namespace Bar {
class Derived : public Base {};
} // namespace Bar