Files
swift-mirror/test/Interop/Cxx/class/Inputs/pimpl.h
Egor Zhdan 738c8fb6c6 [cxx-interop] Skip type metadata for C++ types that are only used in private C++ fields
This fixes compiler errors for C++ types that use pimpl idiom:
```
invalid application of 'sizeof' to an incomplete type
```

rdar://141960396
2025-01-13 12:03:35 +00:00

25 lines
366 B
C++

#include <memory>
// C++ types that use pointer-to-implementation idiom.
struct HasPIMPL {
private:
struct I;
I *ptr;
};
HasPIMPL createHasPIMPL();
struct HasSmartPIMPL {
private:
struct I;
std::unique_ptr<I> smart_ptr;
public:
HasSmartPIMPL();
HasSmartPIMPL(const HasSmartPIMPL &other);
~HasSmartPIMPL();
};
HasSmartPIMPL createHasSmartPIMPL();