Commit Graph

8 Commits

Author SHA1 Message Date
Becca Royal-Gordon
da07ff577c [PrintAsClang] Warn about unstable decl order
PrintAsClang is supposed to emit declarations in the same order regardless of the compiler’s internal state, but we have repeatedly found that our current criteria are inadequate, resulting in non-functionality-affecting changes to generated header content. Add a diagnostic that’s emitted when this happens soliciting a bug report.

Since there *should* be no cases where the compiler fails to order declarations, this diagnostic is never actually emitted. Instead, we test this change by enabling `-verify` on nearly all PrintAsClang tests to make sure they are unaffected.

This did demonstrate a missing criterion that only mattered in C++ mode: extensions that varied only in their generic signature were not sorted stably. Add a sort criterion for this.
2025-02-14 21:41:36 -08:00
Alex Lorenz
bcdfb8da28 [interop][SwiftToCxx] dispatch 'class' methods directly to avoid broken header generation
rdar://102393950
2023-11-07 14:33:54 -08:00
Alex Lorenz
8305c7d5de [interop][SwiftToCxx] add C++ bindings for static methods 2023-02-08 10:25:17 -08:00
Alex Lorenz
3a9b6dce9d [interop][SwiftToCxx] add support for emitting Swift stdlib dependency in one header file
This is the default behavior. You can disable this by specifying the -clang-header-expose-decls= flag explicitly when generating the header
2022-09-28 08:08:48 -07:00
Alex Lorenz
c0bda0617a [interop][SwiftToCxx] emit class method bindings 2022-08-03 13:03:45 +01:00
Alex Lorenz
5b05d3dc67 [interop][SwiftToCxx] arm64e: authenticate value witness table in C++
Fixes arm64e test failures for C++ interop tests
2022-07-18 13:50:32 +01:00
Alex Lorenz
8fa37c214d Mark SwiftToCxx execution tests as unsupported on arm64e for now 2022-06-22 22:19:10 +01:00
Alex Lorenz
f2b4a43c06 [interop][SwiftToCxx] emit non-mutating instance methods for structs 2022-06-15 07:35:13 -07:00