brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · e54c16c Raw
61 lines · c
1// RUN: %clang_cc1 -std=c99 -E %s -o - | FileCheck --check-prefix=CHECK-PED-NONE %s2// RUN: %clang_cc1 -std=c99 -pedantic-errors -E %s -o - | FileCheck --check-prefix=CHECK-PED-ERR %s3 4// CHECK-PED-NONE: no_dummy_extension5#if !__has_extension(dummy_extension)6int no_dummy_extension();7#endif8 9// Arbitrary feature to test that has_extension is a superset of has_feature10// CHECK-PED-NONE: attribute_overloadable11#if __has_extension(attribute_overloadable)12int attribute_overloadable();13#endif14 15// CHECK-PED-NONE: has_c_static_assert16// CHECK-PED-ERR: no_c_static_assert17#if __has_extension(c_static_assert)18int has_c_static_assert();19#else20int no_c_static_assert();21#endif22 23// CHECK-PED-NONE: has_c_generic_selections_with_controlling_type24// CHECK-PED-ERR: no_c_generic_selections_with_controlling_type25#if __has_extension(c_generic_selection_with_controlling_type)26int has_c_generic_selections_with_controlling_type();27#else28int no_c_generic_selections_with_controlling_type();29#endif30 31// CHECK-PED-NONE: has_c_generic_selections32// CHECK-PED-ERR: no_c_generic_selections33#if __has_extension(c_generic_selections)34int has_c_generic_selections();35#else36int no_c_generic_selections();37#endif38 39// CHECK-PED-NONE: has_c_alignas40// CHECK-PED-ERR: no_c_alignas41#if __has_extension(c_alignas)42int has_c_alignas();43#else44int no_c_alignas();45#endif46 47// CHECK-PED-NONE: has_c_alignof48// CHECK-PED-ERR: no_c_alignof49#if __has_extension(c_alignof)50int has_c_alignof();51#else52int no_c_alignof();53#endif54 55// Arbitrary feature to test that the extension name can be surrounded with56// double underscores.57// CHECK-PED-NONE: has_double_underscores58#if __has_extension(__c_alignas__)59int has_double_underscores();60#endif61