[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Driver / incompatible_sysroot.c
blobb490f57b90ef552b44674e7df8c5062bd2e096a1
1 // REQUIRES: x86-registered-target
2 // REQUIRES: aarch64-registered-target
4 // RUN: %clang -target x86_64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/MacOSX10.9.sdk -mios-version-min=9.0 -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-OSX-IOS %s
5 // RUN: %clang -target arm64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/iPhoneOS9.2.sdk -mwatchos-version-min=2.0 -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-IOS-WATCHOS %s
6 // RUN: %clang -target arm64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/iPhoneOS9.2.sdk -mtvos-version-min=9.0 -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-IOS-TVOS %s
7 // RUN: %clang -target x86_64-apple-driverkit19.0 -Wincompatible-sysroot -isysroot SDKs/MacOSX10.9.sdk -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-OSX-DRIVERKIT %s
8 // RUN: %clang -target x86_64-apple-driverkit19.0 -Wincompatible-sysroot -isysroot SDKs/iPhoneOS9.2.sdk -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-IOS-DRIVERKIT %s
9 // RUN: %clang -target x86_64-apple-darwin -Wincompatible-sysroot -isysroot SDKs/iPhoneSimulator9.2.sdk -mios-version-min=9.0 -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-IOS-IOSSIM %s
10 // RUN: %clang -target x86_64-apple-darwin -Wno-incompatible-sysroot -isysroot SDKs/MacOSX10.9.sdk -mios-version-min=9.0 -S -o - %s 2>&1 | FileCheck -check-prefix CHECK-OSX-IOS-DISABLED %s
12 int main() { return 0; }
13 // CHECK-OSX-IOS: warning: using sysroot for 'MacOSX' but targeting 'iPhone'
14 // CHECK-IOS-WATCHOS: warning: using sysroot for 'iPhoneOS' but targeting 'Watch'
15 // CHECK-IOS-TVOS: warning: using sysroot for 'iPhoneOS' but targeting 'AppleTV'
16 // CHECK-OSX-DRIVERKIT: warning: using sysroot for 'MacOSX' but targeting 'DriverKit'
17 // CHECK-IOS-DRIVERKIT: warning: using sysroot for 'iPhoneOS' but targeting 'DriverKit'
18 // CHECK-IOS-IOSSIM-NOT: warning: using sysroot for '{{.*}}' but targeting '{{.*}}'
19 // CHECK-OSX-IOS-DISABLED-NOT: warning: using sysroot for '{{.*}}' but targeting '{{.*}}'