llvm-project/clang/test/Driver/darwin-invalid-os-versions.c
Cyndy Ishida 88f041f3e0
[clang][Darwin] Align all OS Versions for 26 (#143548)
* Translate the following versions to 26.
  * watchOS 12 -> 26
  * visionOS 3 -> 26
  * macos 16 -> 26
  * iOS 19 -> 26
  * tvOS 19 -> 26

* Emit diagnostics, but allow conversion when clients attempt to use
invalid gaps in OS versioning in availability.

* For target-triples, only allow "valid" versions for implicit
conversions.
2025-06-10 09:50:46 -07:00

23 lines
1.3 KiB
C

/// Verify invalid OSVersions are diagnosed.
// RUN: not %clang -target arm64-apple-ios20 -c %s 2>&1 | FileCheck %s --check-prefix=IOS
// IOS: error: invalid version number in '-target arm64-apple-ios20'
// RUN: not %clang -target arm64-apple-watchos20 -c %s 2>&1 | FileCheck %s --check-prefix=WATCHOS
// WATCHOS: error: invalid version number in '-target arm64-apple-watchos20'
// RUN: not %clang -target arm64-apple-macosx19 -c %s 2>&1 | FileCheck %s --check-prefix=MAC
// MAC: error: invalid version number in '-target arm64-apple-macosx19'
// RUN: not %clang -target arm64-apple-ios22-macabi -c %s 2>&1 | FileCheck %s --check-prefix=IOSMAC
// IOSMAC: error: invalid version number in '-target arm64-apple-ios22-macabi'
// RUN: not %clang -target arm64-apple-macosx16 -darwin-target-variant arm64-apple-ios22-macabi -c %s 2>&1 | FileCheck %s --check-prefix=ZIPPERED
// ZIPPERED: error: invalid version number in 'arm64-apple-ios22-macabi'
// RUN: not %clang -target arm64-apple-visionos5 -c %s 2>&1 | FileCheck %s --check-prefix=VISION
// VISION: error: invalid version number in '-target arm64-apple-visionos5'
// RUN: not %clang -target arm64-apple-tvos21 -c %s 2>&1 | FileCheck %s --check-prefix=TV
// TV: error: invalid version number in '-target arm64-apple-tvos21'