Files
swift-mirror/validation-test/SILOptimizer/rdar137960229.swift
Nate Chandler ce368e8220 [DiagnoseUnreachable] Ignore dead_end destroys.
Such destroys mark the lifetime end of their operands along their
availability boundary.  They are currently inserted in this test case
by the ClosureLifetimeFixup pass, but in the fullness of time they will
be present for every value which is not explicitly destroyed (that's
what complete OSSA lifetimes is mostly about).

Currently, such destroys are diagnosed by DiagnoseUnreachable.  Fix the
diagnostic pass not to diagnose these valid instructions.

rdar://137960229
2024-10-15 21:00:16 -07:00

10 lines
185 B
Swift

// RUN: %target-swift-frontend -c %s -verify
func testFatalError(_ message: @autoclosure () -> String = String()) -> Never {
Swift.fatalError()
}
func test() {
testFatalError()
}