Home | History | Annotate | Download | only in Preprocessor
      1 // RUN: %clang_cc1 %s -E -fms-compatibility
      2 
      3 bool f() {
      4   // Check that operators still work before redefining them.
      5 #if compl 0 bitand 1
      6   return true and false;
      7 #endif
      8 }
      9 
     10 // All c++ keywords should be #define-able in ms mode.
     11 // (operators like "and" aren't normally, the rest always is.)
     12 #define and
     13 #define and_eq
     14 #define alignas
     15 #define alignof
     16 #define asm
     17 #define auto
     18 #define bitand
     19 #define bitor
     20 #define bool
     21 #define break
     22 #define case
     23 #define catch
     24 #define char
     25 #define char16_t
     26 #define char32_t
     27 #define class
     28 #define compl
     29 #define const
     30 #define constexpr
     31 #define const_cast
     32 #define continue
     33 #define decltype
     34 #define default
     35 #define delete
     36 #define double
     37 #define dynamic_cast
     38 #define else
     39 #define enum
     40 #define explicit
     41 #define export
     42 #define extern
     43 #define false
     44 #define float
     45 #define for
     46 #define friend
     47 #define goto
     48 #define if
     49 #define inline
     50 #define int
     51 #define long
     52 #define mutable
     53 #define namespace
     54 #define new
     55 #define noexcept
     56 #define not
     57 #define not_eq
     58 #define nullptr
     59 #define operator
     60 #define or
     61 #define or_eq
     62 #define private
     63 #define protected
     64 #define public
     65 #define register
     66 #define reinterpret_cast
     67 #define return
     68 #define short
     69 #define signed
     70 #define sizeof
     71 #define static
     72 #define static_assert
     73 #define static_cast
     74 #define struct
     75 #define switch
     76 #define template
     77 #define this
     78 #define thread_local
     79 #define throw
     80 #define true
     81 #define try
     82 #define typedef
     83 #define typeid
     84 #define typename
     85 #define union
     86 #define unsigned
     87 #define using
     88 #define virtual
     89 #define void
     90 #define volatile
     91 #define wchar_t
     92 #define while
     93 #define xor
     94 #define xor_eq
     95 
     96 // Check this is all properly defined away.
     97 and
     98 and_eq
     99 alignas
    100 alignof
    101 asm
    102 auto
    103 bitand
    104 bitor
    105 bool
    106 break
    107 case
    108 catch
    109 char
    110 char16_t
    111 char32_t
    112 class
    113 compl
    114 const
    115 constexpr
    116 const_cast
    117 continue
    118 decltype
    119 default
    120 delete
    121 double
    122 dynamic_cast
    123 else
    124 enum
    125 explicit
    126 export
    127 extern
    128 false
    129 float
    130 for
    131 friend
    132 goto
    133 if
    134 inline
    135 int
    136 long
    137 mutable
    138 namespace
    139 new
    140 noexcept
    141 not
    142 not_eq
    143 nullptr
    144 operator
    145 or
    146 or_eq
    147 private
    148 protected
    149 public
    150 register
    151 reinterpret_cast
    152 return
    153 short
    154 signed
    155 sizeof
    156 static
    157 static_assert
    158 static_cast
    159 struct
    160 switch
    161 template
    162 this
    163 thread_local
    164 throw
    165 true
    166 try
    167 typedef
    168 typeid
    169 typename
    170 union
    171 unsigned
    172 using
    173 virtual
    174 void
    175 volatile
    176 wchar_t
    177 while
    178 xor
    179 xor_eq
    180