Files
swift-mirror/test/Interop/Cxx/namespace/bridging-header-module-interface.swift
Egor Zhdan 782f26e726 [cxx-interop] Fix printing of namespaces declared in bridging headers
If a C++ namespace has redeclarations in a bridging header, printing AST for the namespace would crash the compiler. This is because such a redeclaration would not have an owning Clang module, and the AST printer did not account for that.

This change fixes the crash.

rdar://151715540
(cherry picked from commit cc9c51deea)
2025-06-23 18:56:19 +01:00

5 lines
287 B
Swift

// RUN: %target-swift-ide-test -print-header -header-to-print %S/Inputs/bridging-header.h -import-objc-header %S/Inputs/bridging-header.h -source-filename=%s -cxx-interoperability-mode=upcoming-swift | %FileCheck %s
// CHECK: struct InBridgingHeader1
// CHECK: struct InBridgingHeader2