Argyrios Kyrtzidis | 3084a61 | 2010-08-11 22:55:12 +0000 | [diff] [blame] | 1 | // Test this without pch. |
Nico Weber | b10c920 | 2014-09-24 03:28:54 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fms-extensions -include %S/cxx-traits.h -std=c++11 -fsyntax-only -verify %s |
Argyrios Kyrtzidis | 3084a61 | 2010-08-11 22:55:12 +0000 | [diff] [blame] | 3 | |
Nico Weber | b10c920 | 2014-09-24 03:28:54 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -fms-extensions -x c++-header -std=c++11 -emit-pch -o %t %S/cxx-traits.h |
| 5 | // RUN: %clang_cc1 -fms-extensions -std=c++11 -include-pch %t -DPCH -fsyntax-only -verify %s |
Argyrios Kyrtzidis | 3084a61 | 2010-08-11 22:55:12 +0000 | [diff] [blame] | 6 | |
Alp Toker | 47642d2 | 2013-12-03 06:13:01 +0000 | [diff] [blame] | 7 | #ifdef PCH |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 8 | // expected-no-diagnostics |
Alp Toker | 47642d2 | 2013-12-03 06:13:01 +0000 | [diff] [blame] | 9 | #endif |
Andy Gibbs | c6e68da | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 10 | |
Nico Weber | 7c3c5be | 2014-09-23 04:09:56 +0000 | [diff] [blame] | 11 | bool _Is_pod_comparator = n::__is_pod<int>::__value; |
| 12 | bool _Is_empty_check = n::__is_empty<int>::__value; |
Douglas Gregor | 29c42f2 | 2012-02-24 07:38:34 +0000 | [diff] [blame] | 13 | |
Nico Weber | 7c3c5be | 2014-09-23 04:09:56 +0000 | [diff] [blame] | 14 | bool default_construct_int = n::is_trivially_constructible<int>::value; |
| 15 | bool copy_construct_int = n::is_trivially_constructible<int, const int&>::value; |
| 16 | |
| 17 | // The built-ins should still work too: |
Nico Weber | b10c920 | 2014-09-24 03:28:54 +0000 | [diff] [blame] | 18 | bool _is_abstract_result = __is_abstract(int); |
| 19 | bool _is_arithmetic_result = __is_arithmetic(int); |
| 20 | bool _is_array_result = __is_array(int); |
| 21 | bool _is_base_of_result = __is_base_of(int, int); |
| 22 | bool _is_class_result = __is_class(int); |
| 23 | bool _is_complete_type_result = __is_complete_type(int); |
| 24 | bool _is_compound_result = __is_compound(int); |
| 25 | bool _is_const_result = __is_const(int); |
| 26 | bool _is_constructible_result = __is_constructible(int); |
| 27 | bool _is_convertible_result = __is_convertible(int, int); |
| 28 | bool _is_convertible_to_result = __is_convertible_to(int, int); |
| 29 | bool _is_destructible_result = __is_destructible(int); |
Nico Weber | 7c3c5be | 2014-09-23 04:09:56 +0000 | [diff] [blame] | 30 | bool _is_empty_result = __is_empty(int); |
Nico Weber | b10c920 | 2014-09-24 03:28:54 +0000 | [diff] [blame] | 31 | bool _is_enum_result = __is_enum(int); |
| 32 | bool _is_floating_point_result = __is_floating_point(int); |
| 33 | bool _is_final_result = __is_final(int); |
| 34 | bool _is_function_result = __is_function(int); |
| 35 | bool _is_fundamental_result = __is_fundamental(int); |
| 36 | bool _is_integral_result = __is_integral(int); |
| 37 | bool _is_interface_class_result = __is_interface_class(int); |
| 38 | bool _is_literal_result = __is_literal(int); |
| 39 | bool _is_lvalue_expr_result = __is_lvalue_expr(0); |
| 40 | bool _is_lvalue_reference_result = __is_lvalue_reference(int); |
| 41 | bool _is_member_function_pointer_result = __is_member_function_pointer(int); |
| 42 | bool _is_member_object_pointer_result = __is_member_object_pointer(int); |
| 43 | bool _is_member_pointer_result = __is_member_pointer(int); |
| 44 | bool _is_nothrow_assignable_result = __is_nothrow_assignable(int, int); |
| 45 | bool _is_nothrow_constructible_result = __is_nothrow_constructible(int); |
| 46 | bool _is_nothrow_destructible_result = __is_nothrow_destructible(int); |
| 47 | bool _is_object_result = __is_object(int); |
| 48 | bool _is_pod_result = __is_pod(int); |
| 49 | bool _is_pointer_result = __is_pointer(int); |
| 50 | bool _is_polymorphic_result = __is_polymorphic(int); |
| 51 | bool _is_reference_result = __is_reference(int); |
| 52 | bool _is_rvalue_expr_result = __is_rvalue_expr(0); |
| 53 | bool _is_rvalue_reference_result = __is_rvalue_reference(int); |
| 54 | bool _is_same_result = __is_same(int, int); |
| 55 | bool _is_scalar_result = __is_scalar(int); |
| 56 | bool _is_sealed_result = __is_sealed(int); |
| 57 | bool _is_signed_result = __is_signed(int); |
| 58 | bool _is_standard_layout_result = __is_standard_layout(int); |
| 59 | bool _is_trivial_result = __is_trivial(int); |
| 60 | bool _is_trivially_assignable_result = __is_trivially_assignable(int, int); |
| 61 | bool _is_trivially_constructible_result = __is_trivially_constructible(int); |
| 62 | bool _is_trivially_copyable_result = __is_trivially_copyable(int); |
| 63 | bool _is_union_result = __is_union(int); |
| 64 | bool _is_unsigned_result = __is_unsigned(int); |
| 65 | bool _is_void_result = __is_void(int); |
| 66 | bool _is_volatile_result = __is_volatile(int); |