[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / is_target_os_darwin.c
blob4c807ce19499fc190789cb0d0d1338cb222a0c47
1 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macos -DMAC -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-ios -verify %s
3 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-tvos -verify %s
4 // RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-watchos -verify %s
5 // expected-no-diagnostics
7 #if !__is_target_os(darwin)
8 #error "mismatching os"
9 #endif
11 // macOS matches both macOS and macOSX.
12 #ifdef MAC
14 #if !__is_target_os(macos)
15 #error "mismatching os"
16 #endif
18 #if !__is_target_os(macosx)
19 #error "mismatching os"
20 #endif
22 #if __is_target_os(ios)
23 #error "mismatching os"
24 #endif
26 #endif