From: Richard Smith Date: Fri, 18 Dec 2020 21:11:01 +0000 (-0800) Subject: Add tests for the absence of feature test macros for features we don't X-Git-Tag: llvmorg-13-init~2924 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=939ba0b501b27a2535c9bb62b6f6dc027d49f76d;p=platform%2Fupstream%2Fllvm.git Add tests for the absence of feature test macros for features we don't support yet. --- diff --git a/clang/test/Lexer/cxx-features.cpp b/clang/test/Lexer/cxx-features.cpp index afc3b56..852c534 100644 --- a/clang/test/Lexer/cxx-features.cpp +++ b/clang/test/Lexer/cxx-features.cpp @@ -28,16 +28,30 @@ // --- C++20 features --- +#if check(aggregate_paren_init, 0, 0, 0, 0, 0) +// FIXME: 201902 in C++20 +#error "wrong value for __cpp_aggregate_paren_init" +#endif + #if defined(CHAR8_T) ? check(char8_t, 201811, 201811, 201811, 201811, 201811) : \ defined(NO_CHAR8_T) ? check(char8_t, 0, 0, 0, 0, 0) : \ check(char8_t, 0, 0, 0, 0, 201811) #error "wrong value for __cpp_char8_t" #endif +#if check(concepts, 0, 0, 0, 0, 201907) +#error "wrong value for __cpp_concepts" +#endif + #if check(conditional_explicit, 0, 0, 0, 0, 201806) #error "wrong value for __cpp_conditional_explicit" #endif +#if check(consteval, 0, 0, 0, 0, 0) +// FIXME: 201811 in C++20 +#error "wrong value for __cpp_consteval" +#endif + // constexpr checked below #if check(constexpr_dynamic_alloc, 0, 0, 0, 0, 201907) @@ -52,6 +66,8 @@ #error "wrong value for __cpp_constinit" #endif +// deduction_guides checked below + #if check(designated_initializers, 0, 0, 0, 0, 201707) #error "wrong value for __cpp_designated_initializers" #endif @@ -68,8 +84,14 @@ // init_captures checked below -#if check(concepts, 0, 0, 0, 0, 201907) -#error "wrong value for __cpp_concepts" +#if check(modules, 0, 0, 0, 0, 0) +// FIXME: 201907 in C++20 +#error "wrong value for __cpp_modules" +#endif + +#if check(using_enum, 0, 0, 0, 0, 0) +// FIXME: 201907 in C++20 +#error "wrong value for __cpp_using_enum" #endif // --- C++17 features --- @@ -113,6 +135,7 @@ // static_assert checked below #if check(deduction_guides, 0, 0, 0, 201703, 201703) +// FIXME: 201907 in C++20 #error "wrong value for __cpp_deduction_guides" #endif