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