mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Clean up a few general patterns that are now obviated by canImport This aligns more generally with the cleanup that the Swift Package Manager has already done in their automated XCTest-plumbing tool in apple/swift-package-manager#1826.
19 lines
447 B
Swift
19 lines
447 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
#if canImport(Darwin)
|
|
import Darwin
|
|
#elseif canImport(Glibc)
|
|
import Glibc
|
|
#elseif os(Windows)
|
|
import MSVCRT
|
|
#else
|
|
#error("Unsupported platform")
|
|
#endif
|
|
|
|
_ = M_PI // expected-warning {{is deprecated}}
|
|
_ = M_PI_2 // expected-warning {{is deprecated}}
|
|
_ = M_PI_4 // expected-warning {{is deprecated}}
|
|
|
|
_ = M_SQRT2 // expected-warning {{is deprecated}}
|
|
_ = M_SQRT1_2 // expected-warning {{is deprecated}}
|