blob: edca17819222253183d841dbda38d2737dfd8650 [file] [log] [blame]
Chris Lattner148772a2009-06-13 07:13:28 +00001// RUN: clang-cc %s --triple=i686-apple-darwin9
2#ifndef __has_feature
3#error Should have __has_feature
4#endif
5
6
7#if __has_feature(something_we_dont_have)
8#error Bad
9#endif
10
11#if !__has_builtin(__builtin_huge_val) || \
12 !__has_builtin(__builtin_shufflevector) || \
13 !__has_builtin(__builtin_trap) || \
14 !__has_feature(attribute_analyzer_noreturn) || \
15 !__has_feature(attribute_overloadable)
16#error Clang should have these
17#endif
18
19#if __has_builtin(__builtin_insanity)
20#error Clang should not have this
21#endif
22
23
24
25// Make sure we have x86 builtins only (forced with target triple).
26
27#if !__has_builtin(__builtin_ia32_emms) || \
28 __has_builtin(__builtin_altivec_abs_v4sf)
29#error Broken handling of target-specific builtins
30#endif