mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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)
5 lines
287 B
Swift
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
|