diff options
Diffstat (limited to 'test/Lexer/has_extension.c')
-rw-r--r-- | test/Lexer/has_extension.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/Lexer/has_extension.c b/test/Lexer/has_extension.c index 3b08510aa440..b7efece64e83 100644 --- a/test/Lexer/has_extension.c +++ b/test/Lexer/has_extension.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-PED-NONE %s -// RUN: %clang_cc1 -pedantic-errors -E %s -o - | FileCheck --check-prefix=CHECK-PED-ERR %s +// RUN: %clang_cc1 -std=c99 -E %s -o - | FileCheck --check-prefix=CHECK-PED-NONE %s +// RUN: %clang_cc1 -std=c99 -pedantic-errors -E %s -o - | FileCheck --check-prefix=CHECK-PED-ERR %s // CHECK-PED-NONE: no_dummy_extension #if !__has_extension(dummy_extension) @@ -36,6 +36,14 @@ int has_c_alignas(); int no_c_alignas(); #endif +// CHECK-PED-NONE: has_c_alignof +// CHECK-PED-ERR: no_c_alignof +#if __has_extension(c_alignof) +int has_c_alignof(); +#else +int no_c_alignof(); +#endif + // Arbitrary feature to test that the extension name can be surrounded with // double underscores. // CHECK-PED-NONE: has_double_underscores |