Files
swift-mirror/lib/PrintAsClang/ModuleContentsWriter.cpp
Tony Allevato eeeb73ad8a [PrintAsClang] Ensure that all macro-generated decls get printed.
Some macro-generated declarations are not being printed in the
Obj-C/C++ generated header. Members introduced by attached `member`
macros on a type appear to be fine, but those introduced by a
attached `peer` or freestanding `declaration` macros don't show up.

This change updates the header writer to call `getAllMembers`
throughout instead of `getMembers`, which makes sure that everything
gets collected. Likewise, we update the top-level logic from
`getTopLevelDecls` to `getTopLevelDeclsWithAuxiliaryDecls` to pick
up freestanding decls introduced at file scope.

Fixes https://github.com/swiftlang/swift/issues/68170.
2024-10-25 10:39:06 -04:00

39 KiB