[Heikki Kultala] This patch contains the ABI changes for the TCE target.
[clang.git] / test / Lexer / has_feature_cxx0x.cpp
blob21950148cfecadf9610d6d92a6d07ee312aacfdc
1 // RUN: %clang_cc1 -E -std=c++0x %s -o - | FileCheck --check-prefix=CHECK-0X %s
2 // RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s
4 #if __has_feature(cxx_lambdas)
5 int has_lambdas();
6 #else
7 int no_lambdas();
8 #endif
10 // CHECK-0X: no_lambdas
11 // CHECK-NO-0X: no_lambdas
14 #if __has_feature(cxx_nullptr)
15 int has_nullptr();
16 #else
17 int no_nullptr();
18 #endif
20 // CHECK-0X: no_nullptr
21 // CHECK-NO-0X: no_nullptr
24 #if __has_feature(cxx_decltype)
25 int has_decltype();
26 #else
27 int no_decltype();
28 #endif
30 // CHECK-0X: has_decltype
31 // CHECK-NO-0X: no_decltype
34 #if __has_feature(cxx_auto_type)
35 int has_auto_type();
36 #else
37 int no_auto_type();
38 #endif
40 // FIXME: We don't implement "auto" well enough to turn on this feature test
41 // CHECK-0X: no_auto_type
42 // CHECK-NO-0X: no_auto_type
45 #if __has_feature(cxx_attributes)
46 int has_attributes();
47 #else
48 int no_attributes();
49 #endif
51 // CHECK-0X: has_attributes
52 // CHECK-NO-0X: no_attributes
55 #if __has_feature(cxx_static_assert)
56 int has_static_assert();
57 #else
58 int no_static_assert();
59 #endif
61 // CHECK-0X: has_static_assert
62 // CHECK-NO-0X: no_static_assert
64 #if __has_feature(cxx_deleted_functions)
65 int has_deleted_functions();
66 #else
67 int no_deleted_functions();
68 #endif
70 // CHECK-0X: has_deleted_functions
71 // CHECK-NO-0X: no_deleted_functions
74 #if __has_feature(cxx_rvalue_references)
75 int has_rvalue_references();
76 #else
77 int no_rvalue_references();
78 #endif
80 // CHECK-0X: has_rvalue_references
81 // CHECK-NO-0X: no_rvalue_references
84 #if __has_feature(cxx_variadic_templates)
85 int has_variadic_templates();
86 #else
87 int no_variadic_templates();
88 #endif
90 // CHECK-0X: has_variadic_templates
91 // CHECK-NO-0X: no_variadic_templates
94 #if __has_feature(cxx_inline_namespaces)
95 int has_inline_namespaces();
96 #else
97 int no_inline_namespaces();
98 #endif
100 // CHECK-0X: has_inline_namespaces
101 // CHECK-NO-0X: no_inline_namespaces
103 #if __has_feature(cxx_reference_qualified_functions)
104 int has_reference_qualified_functions();
105 #else
106 int no_reference_qualified_functions();
107 #endif
109 // CHECK-0X: has_reference_qualified_functions
110 // CHECK-NO-0X: no_reference_qualified_functions
112 #if __has_feature(cxx_default_function_template_args)
113 int has_default_function_template_args();
114 #else
115 int no_default_function_template_args();
116 #endif
118 // CHECK-0X: has_default_function_template_args
119 // CHECK-NO-0X: no_default_function_template_args