Peter Collingbourne | c1b5fa4 | 2011-05-13 20:54:45 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -E -std=c1x %s -o - | FileCheck --check-prefix=CHECK-1X %s |
| 2 | // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-1X %s |
| 3 | |
| 4 | #if __has_feature(c_static_assert) |
| 5 | int has_static_assert(); |
| 6 | #else |
| 7 | int no_static_assert(); |
| 8 | #endif |
| 9 | |
| 10 | // CHECK-1X: has_static_assert |
| 11 | // CHECK-NO-1X: no_static_assert |
| 12 | |
| 13 | #if __has_feature(c_generic_selections) |
| 14 | int has_generic_selections(); |
| 15 | #else |
| 16 | int no_generic_selections(); |
| 17 | #endif |
| 18 | |
| 19 | // CHECK-1X: has_generic_selections |
| 20 | // CHECK-NO-1X: no_generic_selections |
Peter Collingbourne | fd5f686 | 2011-10-14 23:44:46 +0000 | [diff] [blame^] | 21 | |
| 22 | #if __has_feature(c_alignas) |
| 23 | int has_alignas(); |
| 24 | #else |
| 25 | int no_alignas(); |
| 26 | #endif |
| 27 | |
| 28 | // CHECK-1X: has_alignas |
| 29 | // CHECK-NO-1X: no_alignas |