[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Preprocessor / optimize.c
blobd7da1056ae46c3195df47bd3c757bf0c1b8a8895
1 // RUN: %clang_cc1 -Eonly %s -DOPT_O2 -O2 -verify
2 #ifdef OPT_O2
3 // expected-no-diagnostics
4 #ifndef __OPTIMIZE__
5 #error "__OPTIMIZE__ not defined"
6 #endif
7 #ifdef __OPTIMIZE_SIZE__
8 #error "__OPTIMIZE_SIZE__ defined"
9 #endif
10 #endif
12 // RUN: %clang_cc1 -Eonly %s -DOPT_O0 -verify
13 #ifdef OPT_O0
14 // expected-no-diagnostics
15 #ifdef __OPTIMIZE__
16 #error "__OPTIMIZE__ defined"
17 #endif
18 #ifdef __OPTIMIZE_SIZE__
19 #error "__OPTIMIZE_SIZE__ defined"
20 #endif
21 #endif
23 // RUN: %clang_cc1 -Eonly %s -DOPT_OS -Os -verify
24 #ifdef OPT_OS
25 // expected-no-diagnostics
26 #ifndef __OPTIMIZE__
27 #error "__OPTIMIZE__ not defined"
28 #endif
29 #ifndef __OPTIMIZE_SIZE__
30 #error "__OPTIMIZE_SIZE__ not defined"
31 #endif
32 #endif