1 // RUN: %clang_cc1 %s -triple=i686-apple-darwin9 -verify -DVERIFY
2 // expected-no-diagnostics
3 
4 #ifndef __has_feature
5 #error Should have __has_feature
6 #endif
7 
8 #if __has_feature(something_we_dont_have)
9 #error Bad
10 #endif
11 
12 #if  !__has_builtin(__builtin_huge_val) || \
13      !__has_builtin(__builtin_shufflevector) || \
14      !__has_builtin(__builtin_convertvector) || \
15      !__has_builtin(__builtin_trap) || \
16      !__has_builtin(__c11_atomic_init) || \
17      !__has_builtin(__builtin_launder) || \
18      !__has_feature(attribute_analyzer_noreturn) || \
19      !__has_feature(attribute_overloadable)
20 #error Clang should have these
21 #endif
22 
23 // These are technically implemented as keywords, but __has_builtin should
24 // still return true.
25 #if !__has_builtin(__builtin_LINE) || \
26     !__has_builtin(__builtin_FILE) || \
27     !__has_builtin(__builtin_FUNCTION) || \
28     !__has_builtin(__builtin_COLUMN) || \
29     !__has_builtin(__array_rank) || \
30     !__has_builtin(__underlying_type) || \
31     !__has_builtin(__is_trivial) || \
32     !__has_builtin(__has_unique_object_representations)
33 #error Clang should have these
34 #endif
35 
36 // This is a C-only builtin.
37 #if __has_builtin(__builtin_types_compatible_p)
38 #error Clang should not have this in C++ mode
39 #endif
40 
41 #if __has_builtin(__builtin_insanity)
42 #error Clang should not have this
43 #endif
44