blob: d1267eaf85d84b23d55c9c4e8cc05ba8e6399570 [file] [log] [blame]
Richard Smithb438e622013-09-28 04:37:56 +00001// RUN: %clang_cc1 -std=c++98 -E %s -o - | FileCheck %s
2// RUN: %clang_cc1 -std=c++11 -E %s -o - | FileCheck %s --check-prefix=CHECK11
Peter Collingbourned5d410f2011-05-13 20:54:45 +00003
4// CHECK: c_static_assert
5#if __has_extension(c_static_assert)
6int c_static_assert();
7#endif
8
9// CHECK: c_generic_selections
10#if __has_extension(c_generic_selections)
11int c_generic_selections();
12#endif
13
14// CHECK: has_deleted_functions
15#if __has_extension(cxx_deleted_functions)
16int has_deleted_functions();
17#endif
18
19// CHECK: has_inline_namespaces
20#if __has_extension(cxx_inline_namespaces)
21int has_inline_namespaces();
22#endif
23
24// CHECK: has_override_control
25#if __has_extension(cxx_override_control)
26int has_override_control();
27#endif
28
Richard Smitha8a5c402011-09-06 18:03:41 +000029// CHECK: has_range_for
30#if __has_extension(cxx_range_for)
31int has_range_for();
32#endif
33
Peter Collingbourned5d410f2011-05-13 20:54:45 +000034// CHECK: has_reference_qualified_functions
35#if __has_extension(cxx_reference_qualified_functions)
36int has_reference_qualified_functions();
37#endif
38
39// CHECK: has_rvalue_references
40#if __has_extension(cxx_rvalue_references)
41int has_rvalue_references();
42#endif
Douglas Gregor97818932012-04-04 00:48:39 +000043
Eric Fiselier7aa0d4a2015-05-12 22:37:23 +000044// CHECK: has_variadic_templates
45#if __has_extension(cxx_variadic_templates)
46int has_variadic_templates();
47#endif
48
Richard Smithdca0c7a2013-09-27 20:19:41 +000049// CHECK: has_local_type_template_args
Douglas Gregor97818932012-04-04 00:48:39 +000050#if __has_extension(cxx_local_type_template_args)
51int has_local_type_template_args();
Douglas Gregor97818932012-04-04 00:48:39 +000052#endif
53
Richard Smithdca0c7a2013-09-27 20:19:41 +000054// CHECK: has_binary_literals
Richard Smith0a715422013-05-07 19:32:56 +000055#if __has_extension(cxx_binary_literals)
56int has_binary_literals();
57#endif
58
Richard Smithdca0c7a2013-09-27 20:19:41 +000059// CHECK: has_variable_templates
60#if __has_extension(cxx_variable_templates)
61int has_variable_templates();
62#endif
Richard Smithb438e622013-09-28 04:37:56 +000063
64// CHECK-NOT: has_init_captures
65// CHECK11: has_init_captures
66#if __has_extension(cxx_init_captures)
67int has_init_captures();
68#endif