swift
7bcd13b8 - [cxx-interop] Avoid crashing when importing functions that take pointers to dependent types

Commit
3 years ago
[cxx-interop] Avoid crashing when importing functions that take pointers to dependent types Importing `type_traits` from libstdc++ currently causes a crash on Linux: ``` swift-ide-test: tools/clang/include/clang/AST/TypeNodes.inc:33: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type *) const: Assertion `!T->isDependentType() && "should not see dependent types here"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump: 0. Program arguments: /home/egorzh/Builds/swift/swift/bin/swift-ide-test -print-module -module-to-print=std -source-filename=x -enable-cxx-interop 1. /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits:1110:10: importing 'std::__do_is_implicitly_default_constructible_impl' 2. /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits:1116:22: importing 'std::__do_is_implicitly_default_constructible_impl::__test' ``` This change fixes the crash by bailing on such functions.
Author
Committer
Parents
Loading