swift
swift copied to clipboard
[5.9][cxx-interop] evaluate default constructor's unevaluated exception sp…
…ec if needed when emitting C++ constructor call
Fixes https://github.com/apple/swift/issues/65891
- Explanation:
Swift needs to understand if C++ functions are
noexceptto elide exception traps. Some C++ class members, like the implicit default constructor, delay the evaluation of exception specifier. This delay causes Swift to crash on an unevaluated exception specifier. The fix forces Swift to evaluate unevaluated exception specifier for a C++ function that has such an unevaluated specifier. - Scope: Swift's IRGen, C++ interoperability
- Risk: Low, these checks are only done when C++ interoperability is enabled , and exceptions are not disabled
- Testing: Swift unit tests.
- PR: https://github.com/apple/swift/pull/65922
@swift-ci please test
@swift-ci please test source compatibility