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)
16 lines
203 B
C++
16 lines
203 B
C++
namespace NS1 {
|
|
namespace NS2 {
|
|
|
|
struct InBridgingHeader1 {};
|
|
|
|
} // namespace NS2
|
|
} // namespace NS1
|
|
|
|
namespace NS1 {
|
|
namespace NS2 {
|
|
|
|
struct InBridgingHeader2 {};
|
|
|
|
} // namespace NS2
|
|
} // namespace NS1
|