зеркало из https://github.com/microsoft/STL.git
Require MSVC 19.26 and Clang 10 in the STL (#708)
* `<yvals_core.h>` changes: * Clang 10 `_HAS_CONDITIONAL_EXPLICIT` in C++14 mode (Only CUDA now requires the `_HAS_CONDITIONAL_EXPLICIT == 0` code paths) * reject Clang < 10 * reject MSVC < 1926 * Unskip libc++ tests that need Concepts and/or `<=>` * `std/tests/P0595R2_is_constant_evaluated`: We no longer need suppress the warning Clang 9 emits when it sees the suppression for the warning Clang 10 emits in this test ;) * `std/tests/VSO_0157762_feature_test_macros`: Remove Clang 9 support * `std/tests/concepts_matrix.lst`: This is now simply a copy of `usual_latest_matrix.lst` with the `/BE` lines (EDG configs) commented out. (i.e., we now run the Concepts tests with Clang as well as MSVC.) * Remove workarounds for LLVM-38491 "clang-cl should accept __declspec(allocator)": Replace uses of `_DECLSPEC_ALLOCATOR` with `__declspec(allocator)`, and suppress Clang's warning when the return type isn't a pointer or reference. * Remove workarounds for LLVM-43531 "clang-format damages 'alternative representations' for operators": Re-enable clang-format in the test which triggered the bug. * Remove workarounds for LLVM-38478 "clang -fno-ms-compatibility rejects Windows.h": Add -fno-ms-compatibility to the XXX_winsdk_XXX.lst files. (Yes, we still need these because the Windows SDK breaks `/Za`.) * Drive-by: unskip libc++ new.version now that we implement destroying delete
This commit is contained in:
Родитель
a0fffa1076
Коммит
ae34ee631f
|
@ -243,7 +243,7 @@ constexpr size_t _Get_least2_chunked_work_chunk_count(const size_t _Hw_threads,
|
|||
|
||||
// STRUCT TEMPLATE _Parallelism_allocator
|
||||
struct _Parallelism_allocate_traits {
|
||||
_DECLSPEC_ALLOCATOR static void* _Allocate(const size_t _Bytes) {
|
||||
__declspec(allocator) static void* _Allocate(const size_t _Bytes) {
|
||||
void* _Result = ::operator new(_Bytes, nothrow);
|
||||
if (!_Result) {
|
||||
_Throw_parallelism_resources_exhausted();
|
||||
|
@ -253,7 +253,7 @@ struct _Parallelism_allocate_traits {
|
|||
}
|
||||
|
||||
#ifdef __cpp_aligned_new
|
||||
_DECLSPEC_ALLOCATOR static void* _Allocate_aligned(const size_t _Bytes, const size_t _Align) {
|
||||
__declspec(allocator) static void* _Allocate_aligned(const size_t _Bytes, const size_t _Align) {
|
||||
void* _Result = ::operator new (_Bytes, align_val_t{_Align}, nothrow);
|
||||
if (!_Result) {
|
||||
_Throw_parallelism_resources_exhausted();
|
||||
|
|
|
@ -217,12 +217,12 @@ public:
|
|||
return static_cast<const _Outer&>(*this);
|
||||
}
|
||||
|
||||
_NODISCARD _DECLSPEC_ALLOCATOR pointer allocate(
|
||||
_CRT_GUARDOVERFLOW size_type _Count) { // allocate array of _Count elements, ignore hint
|
||||
_NODISCARD __declspec(allocator) pointer
|
||||
allocate(_CRT_GUARDOVERFLOW size_type _Count) { // allocate array of _Count elements, ignore hint
|
||||
return _Outer_traits::allocate(outer_allocator(), _Count);
|
||||
}
|
||||
|
||||
_NODISCARD _DECLSPEC_ALLOCATOR pointer allocate(
|
||||
_NODISCARD __declspec(allocator) pointer allocate(
|
||||
_CRT_GUARDOVERFLOW size_type _Count, const_void_pointer _Hint) { // allocate array of _Count elements, with hint
|
||||
return _Outer_traits::allocate(outer_allocator(), _Count, _Hint);
|
||||
}
|
||||
|
|
|
@ -73,12 +73,12 @@ _INLINE_VAR constexpr size_t _New_alignof = (_STD max)(alignof(_Ty),
|
|||
|
||||
// STRUCT _Default_allocate_traits
|
||||
struct _Default_allocate_traits {
|
||||
_DECLSPEC_ALLOCATOR static void* _Allocate(const size_t _Bytes) {
|
||||
__declspec(allocator) static void* _Allocate(const size_t _Bytes) {
|
||||
return ::operator new(_Bytes);
|
||||
}
|
||||
|
||||
#ifdef __cpp_aligned_new
|
||||
_DECLSPEC_ALLOCATOR static void* _Allocate_aligned(const size_t _Bytes, const size_t _Align) {
|
||||
__declspec(allocator) static void* _Allocate_aligned(const size_t _Bytes, const size_t _Align) {
|
||||
return ::operator new (_Bytes, align_val_t{_Align});
|
||||
}
|
||||
#endif // __cpp_aligned_new
|
||||
|
@ -110,7 +110,7 @@ constexpr size_t _Big_allocation_sentinel = 0xFAFAFAFAUL;
|
|||
|
||||
// FUNCTION _Allocate_manually_vector_aligned
|
||||
template <class _Traits>
|
||||
_DECLSPEC_ALLOCATOR void* _Allocate_manually_vector_aligned(const size_t _Bytes) {
|
||||
__declspec(allocator) void* _Allocate_manually_vector_aligned(const size_t _Bytes) {
|
||||
// allocate _Bytes manually aligned to at least _Big_allocation_alignment
|
||||
const size_t _Block_size = _Non_user_size + _Bytes;
|
||||
if (_Block_size <= _Bytes) {
|
||||
|
@ -157,7 +157,7 @@ inline void _Adjust_manually_vector_aligned(void*& _Ptr, size_t& _Bytes) {
|
|||
#ifdef __cpp_aligned_new
|
||||
template <size_t _Align, class _Traits = _Default_allocate_traits,
|
||||
enable_if_t<(_Align > __STDCPP_DEFAULT_NEW_ALIGNMENT__), int> = 0>
|
||||
_DECLSPEC_ALLOCATOR void* _Allocate(const size_t _Bytes) {
|
||||
__declspec(allocator) void* _Allocate(const size_t _Bytes) {
|
||||
// allocate _Bytes when __cpp_aligned_new && _Align > __STDCPP_DEFAULT_NEW_ALIGNMENT__
|
||||
if (_Bytes == 0) {
|
||||
return nullptr;
|
||||
|
@ -194,7 +194,7 @@ void _Deallocate(void* _Ptr, const size_t _Bytes) noexcept {
|
|||
|
||||
template <size_t _Align, class _Traits = _Default_allocate_traits,
|
||||
enable_if_t<(!_HAS_ALIGNED_NEW || _Align <= __STDCPP_DEFAULT_NEW_ALIGNMENT__), int> = 0>
|
||||
_DECLSPEC_ALLOCATOR void* _Allocate(const size_t _Bytes) {
|
||||
__declspec(allocator) void* _Allocate(const size_t _Bytes) {
|
||||
// allocate _Bytes when !_HAS_ALIGNED_NEW || _Align <= __STDCPP_DEFAULT_NEW_ALIGNMENT__
|
||||
#if defined(_M_IX86) || defined(_M_X64)
|
||||
if (_Bytes >= _Big_allocation_threshold) { // boost the alignment of big allocations to help autovectorization
|
||||
|
@ -517,13 +517,13 @@ struct _Normal_allocator_traits { // defines traits for allocators
|
|||
template <class _Other>
|
||||
using rebind_traits = allocator_traits<rebind_alloc<_Other>>;
|
||||
|
||||
_NODISCARD static _DECLSPEC_ALLOCATOR pointer allocate(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count) {
|
||||
_NODISCARD static __declspec(allocator) pointer allocate(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count) {
|
||||
return _Al.allocate(_Count);
|
||||
}
|
||||
|
||||
#if _HAS_IF_CONSTEXPR
|
||||
_NODISCARD static _DECLSPEC_ALLOCATOR pointer allocate(
|
||||
_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint) {
|
||||
_NODISCARD static __declspec(allocator) pointer
|
||||
allocate(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint) {
|
||||
if constexpr (_Has_allocate_hint<_Alloc, size_type, const_void_pointer>::value) {
|
||||
return _Al.allocate(_Count, _Hint);
|
||||
} else {
|
||||
|
@ -532,18 +532,18 @@ struct _Normal_allocator_traits { // defines traits for allocators
|
|||
}
|
||||
}
|
||||
#else // ^^^ _HAS_IF_CONSTEXPR ^^^ // vvv !_HAS_IF_CONSTEXPR vvv
|
||||
static _DECLSPEC_ALLOCATOR pointer _Allocate1(
|
||||
_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint, true_type) {
|
||||
static __declspec(allocator) pointer
|
||||
_Allocate1(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint, true_type) {
|
||||
return _Al.allocate(_Count, _Hint);
|
||||
}
|
||||
|
||||
static _DECLSPEC_ALLOCATOR pointer _Allocate1(
|
||||
_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const_void_pointer, false_type) {
|
||||
static __declspec(allocator) pointer
|
||||
_Allocate1(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const_void_pointer, false_type) {
|
||||
return _Al.allocate(_Count);
|
||||
}
|
||||
|
||||
_NODISCARD static _DECLSPEC_ALLOCATOR pointer allocate(
|
||||
_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint) {
|
||||
_NODISCARD static __declspec(allocator) pointer
|
||||
allocate(_Alloc& _Al, _CRT_GUARDOVERFLOW const size_type _Count, const const_void_pointer _Hint) {
|
||||
return _Allocate1(_Al, _Count, _Hint, _Has_allocate_hint<_Alloc, size_type, const_void_pointer>{});
|
||||
}
|
||||
#endif // _HAS_IF_CONSTEXPR
|
||||
|
@ -678,12 +678,12 @@ struct _Default_allocator_traits { // traits for std::allocator
|
|||
template <class _Other>
|
||||
using rebind_traits = allocator_traits<allocator<_Other>>;
|
||||
|
||||
_NODISCARD static _DECLSPEC_ALLOCATOR pointer allocate(_Alloc&, _CRT_GUARDOVERFLOW const size_type _Count) {
|
||||
_NODISCARD static __declspec(allocator) pointer allocate(_Alloc&, _CRT_GUARDOVERFLOW const size_type _Count) {
|
||||
return static_cast<pointer>(_Allocate<_New_alignof<value_type>>(_Get_size_of_n<sizeof(value_type)>(_Count)));
|
||||
}
|
||||
|
||||
_NODISCARD static _DECLSPEC_ALLOCATOR pointer allocate(
|
||||
_Alloc&, _CRT_GUARDOVERFLOW const size_type _Count, const_void_pointer) {
|
||||
_NODISCARD static __declspec(allocator) pointer
|
||||
allocate(_Alloc&, _CRT_GUARDOVERFLOW const size_type _Count, const_void_pointer) {
|
||||
return static_cast<pointer>(_Allocate<_New_alignof<value_type>>(_Get_size_of_n<sizeof(value_type)>(_Count)));
|
||||
}
|
||||
|
||||
|
@ -806,11 +806,11 @@ public:
|
|||
_Deallocate<_New_alignof<_Ty>>(_Ptr, sizeof(_Ty) * _Count);
|
||||
}
|
||||
|
||||
_NODISCARD _DECLSPEC_ALLOCATOR _Ty* allocate(_CRT_GUARDOVERFLOW const size_t _Count) {
|
||||
_NODISCARD __declspec(allocator) _Ty* allocate(_CRT_GUARDOVERFLOW const size_t _Count) {
|
||||
return static_cast<_Ty*>(_Allocate<_New_alignof<_Ty>>(_Get_size_of_n<sizeof(_Ty)>(_Count)));
|
||||
}
|
||||
|
||||
_CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS _NODISCARD _DECLSPEC_ALLOCATOR _Ty* allocate(
|
||||
_CXX17_DEPRECATE_OLD_ALLOCATOR_MEMBERS _NODISCARD __declspec(allocator) _Ty* allocate(
|
||||
_CRT_GUARDOVERFLOW const size_t _Count, const void*) {
|
||||
return allocate(_Count);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace pmr {
|
|||
public:
|
||||
virtual ~memory_resource() noexcept {}
|
||||
|
||||
_NODISCARD _DECLSPEC_ALLOCATOR void* allocate(_CRT_GUARDOVERFLOW const size_t _Bytes,
|
||||
_NODISCARD __declspec(allocator) void* allocate(_CRT_GUARDOVERFLOW const size_t _Bytes,
|
||||
const size_t _Align = alignof(max_align_t)) { // allocate _Bytes bytes of memory with alignment _Align
|
||||
_STL_ASSERT(_Is_pow_2(_Align), "memory_resource::allocate(): Alignment must be a power of two.");
|
||||
return do_allocate(_Bytes, _Align);
|
||||
|
@ -211,7 +211,7 @@ namespace pmr {
|
|||
|
||||
polymorphic_allocator& operator=(const polymorphic_allocator&) = delete;
|
||||
|
||||
_NODISCARD _DECLSPEC_ALLOCATOR _Ty* allocate(_CRT_GUARDOVERFLOW const size_t _Count) {
|
||||
_NODISCARD __declspec(allocator) _Ty* allocate(_CRT_GUARDOVERFLOW const size_t _Count) {
|
||||
// get space for _Count objects of type _Ty from _Resource
|
||||
void* const _Vp = _Resource->allocate(_Get_size_of_n<sizeof(_Ty)>(_Count), alignof(_Ty));
|
||||
return static_cast<_Ty*>(_Vp);
|
||||
|
|
|
@ -349,11 +349,11 @@
|
|||
#ifndef _HAS_CONDITIONAL_EXPLICIT
|
||||
#ifdef __cpp_conditional_explicit
|
||||
#define _HAS_CONDITIONAL_EXPLICIT 1
|
||||
#elif defined(__clang__) || defined(__CUDACC__) || defined(__INTEL_COMPILER)
|
||||
#define _HAS_CONDITIONAL_EXPLICIT 0 // TRANSITION, LLVM-42694/CUDA/ICC
|
||||
#else // vvv C1XX or IntelliSense vvv
|
||||
#elif defined(__CUDACC__) || defined(__INTEL_COMPILER)
|
||||
#define _HAS_CONDITIONAL_EXPLICIT 0 // TRANSITION, CUDA/ICC
|
||||
#else // vvv C1XX or Clang or IntelliSense vvv
|
||||
#define _HAS_CONDITIONAL_EXPLICIT 1
|
||||
#endif // ^^^ C1XX or IntelliSense ^^^
|
||||
#endif // ^^^ C1XX or Clang or IntelliSense ^^^
|
||||
#endif // _HAS_CONDITIONAL_EXPLICIT
|
||||
|
||||
// warning C4577: 'noexcept' used with no exception handling mode specified;
|
||||
|
@ -425,6 +425,8 @@
|
|||
#endif // _STL_DISABLED_WARNINGS
|
||||
|
||||
// warning: constexpr if is a C++17 extension [-Wc++17-extensions]
|
||||
// warning: ignoring __declspec(allocator) because the function return type '%s' is not a pointer or reference type
|
||||
// [-Wignored-attributes]
|
||||
// warning: user-defined literal suffixes not starting with '_' are reserved [-Wuser-defined-literals]
|
||||
// warning: unknown pragma ignored [-Wunknown-pragmas]
|
||||
#ifndef _STL_DISABLE_CLANG_WARNINGS
|
||||
|
@ -433,6 +435,7 @@
|
|||
#define _STL_DISABLE_CLANG_WARNINGS \
|
||||
_Pragma("clang diagnostic push") \
|
||||
_Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wignored-attributes\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wuser-defined-literals\"") \
|
||||
_Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"")
|
||||
// clang-format on
|
||||
|
@ -479,12 +482,12 @@
|
|||
#ifdef __EDG__
|
||||
// not attempting to detect __EDG_VERSION__ being less than expected
|
||||
#elif defined(__clang__)
|
||||
#if __clang_major__ < 9
|
||||
#error STL1000: Unexpected compiler version, expected Clang 9.0.0 or newer.
|
||||
#if __clang_major__ < 10
|
||||
#error STL1000: Unexpected compiler version, expected Clang 10.0.0 or newer.
|
||||
#endif // ^^^ old Clang ^^^
|
||||
#elif defined(_MSC_VER)
|
||||
#if _MSC_VER < 1925 // Coarse-grained, not inspecting _MSC_FULL_VER
|
||||
#error STL1001: Unexpected compiler version, expected MSVC 19.25 or newer.
|
||||
#if _MSC_VER < 1926 // Coarse-grained, not inspecting _MSC_FULL_VER
|
||||
#error STL1001: Unexpected compiler version, expected MSVC 19.26 or newer.
|
||||
#endif // ^^^ old MSVC ^^^
|
||||
#else // vvv other compilers vvv
|
||||
// not attempting to detect other compilers
|
||||
|
@ -1175,14 +1178,6 @@ compiler option, or define _ALLOW_RTCc_IN_STL to acknowledge that you have recei
|
|||
#endif // _ALLOW_RTCc_IN_STL
|
||||
#endif // _RTC_CONVERSION_CHECKS_ENABLED
|
||||
|
||||
#ifndef _DECLSPEC_ALLOCATOR
|
||||
#ifdef __clang__
|
||||
#define _DECLSPEC_ALLOCATOR
|
||||
#else // ^^^ Clang / non-Clang vvv
|
||||
#define _DECLSPEC_ALLOCATOR __declspec(allocator)
|
||||
#endif // ^^^ non-Clang ^^^
|
||||
#endif // _DECLSPEC_ALLOCATOR
|
||||
|
||||
#define _STRINGIZEX(x) #x
|
||||
#define _STRINGIZE(x) _STRINGIZEX(x)
|
||||
#define _EMPTY_ARGUMENT // for empty macro argument
|
||||
|
|
|
@ -179,7 +179,6 @@ std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.fail.cpp SKI
|
|||
std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.fail.cpp SKIP
|
||||
|
||||
# generate_feature_test_macro_components.py needs to learn about C1XX
|
||||
std/language.support/support.limits/support.limits.general/new.version.pass.cpp SKIP
|
||||
std/language.support/support.limits/support.limits.general/type_traits.version.pass.cpp SKIP
|
||||
std/language.support/support.limits/support.limits.general/version.version.pass.cpp SKIP
|
||||
|
||||
|
@ -532,16 +531,6 @@ std/containers/views/span.cons/ptr_ptr.pass.cpp:0 SKIP
|
|||
# LLVM-33230 "Clang on Windows should define __STDCPP_THREADS__ to be 1"
|
||||
std/thread/macro.pass.cpp:1 SKIP
|
||||
|
||||
# <concepts> hasn't been enabled for Clang yet.
|
||||
std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp:1 SKIP
|
||||
std/iterators/iterator.primitives/std.iterator.tags/contiguous_iterator_tag.pass.cpp:1 SKIP
|
||||
|
||||
# Clang 9 doesn't support comparison rewriting; implemented in Clang 10.
|
||||
std/containers/views/span.iterators/begin.pass.cpp SKIP
|
||||
std/containers/views/span.iterators/end.pass.cpp SKIP
|
||||
std/containers/views/span.iterators/rbegin.pass.cpp SKIP
|
||||
std/containers/views/span.iterators/rend.pass.cpp SKIP
|
||||
|
||||
|
||||
# *** CLANG ISSUES, NOT YET ANALYZED ***
|
||||
# Clang doesn't enable sized deallocation by default. Should we add -fsized-deallocation or do something else?
|
||||
|
|
|
@ -179,7 +179,6 @@ utilities\function.objects\negators\binary_negate.depr_in_cxx17.fail.cpp
|
|||
utilities\function.objects\negators\unary_negate.depr_in_cxx17.fail.cpp
|
||||
|
||||
# generate_feature_test_macro_components.py needs to learn about C1XX
|
||||
language.support\support.limits\support.limits.general\new.version.pass.cpp
|
||||
language.support\support.limits\support.limits.general\type_traits.version.pass.cpp
|
||||
language.support\support.limits\support.limits.general\version.version.pass.cpp
|
||||
|
||||
|
@ -532,16 +531,6 @@ containers\views\span.cons\ptr_ptr.pass.cpp
|
|||
# LLVM-33230 "Clang on Windows should define __STDCPP_THREADS__ to be 1"
|
||||
thread\macro.pass.cpp
|
||||
|
||||
# <concepts> hasn't been enabled for Clang yet.
|
||||
iterators\iterator.primitives\iterator.traits\pointer.pass.cpp
|
||||
iterators\iterator.primitives\std.iterator.tags\contiguous_iterator_tag.pass.cpp
|
||||
|
||||
# Clang 9 doesn't support comparison rewriting; implemented in Clang 10.
|
||||
containers\views\span.iterators\begin.pass.cpp
|
||||
containers\views\span.iterators\end.pass.cpp
|
||||
containers\views\span.iterators\rbegin.pass.cpp
|
||||
containers\views\span.iterators\rend.pass.cpp
|
||||
|
||||
|
||||
# *** CLANG ISSUES, NOT YET ANALYZED ***
|
||||
# Clang doesn't enable sized deallocation by default. Should we add -fsized-deallocation or do something else?
|
||||
|
|
|
@ -23,7 +23,6 @@ int cube(const int x) {
|
|||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunknown-warning-option" // TRANSITION, Clang 10
|
||||
#pragma clang diagnostic ignored "-Wconstant-evaluated"
|
||||
#else // ^^^ clang / other vvv
|
||||
#pragma warning(push)
|
||||
|
|
|
@ -51,15 +51,9 @@ int main() {} // COMPILE-ONLY
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && __clang_major__ < 10 // Clang 9 doesn't yet implement P1771R1
|
||||
#if __has_cpp_attribute(nodiscard) != 201603L
|
||||
#error __has_cpp_attribute(nodiscard) is not 201603L
|
||||
#endif
|
||||
#else
|
||||
#if __has_cpp_attribute(nodiscard) != 201907L
|
||||
#error __has_cpp_attribute(nodiscard) is not 201907L
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __has_cpp_attribute(noreturn) != 200809L
|
||||
#error __has_cpp_attribute(noreturn) is not 200809L
|
||||
|
@ -160,8 +154,7 @@ STATIC_ASSERT(__cpp_conditional_explicit == 201806L);
|
|||
|
||||
#ifndef __cpp_constexpr
|
||||
#error __cpp_constexpr is not defined
|
||||
#elif _HAS_CXX20 \
|
||||
&& (defined(__clang__) && __clang_major__ >= 10 || defined(__EDG__)) // TRANSITION, VSO-951133 and VSO-951142
|
||||
#elif _HAS_CXX20 && (defined(__clang__) || defined(__EDG__)) // TRANSITION, VSO-951133 and VSO-951142
|
||||
#if __cpp_constexpr != 201907L
|
||||
#error __cpp_constexpr is not 201907L
|
||||
#else
|
||||
|
@ -264,7 +257,7 @@ STATIC_ASSERT(__cpp_fold_expressions == 201603L);
|
|||
|
||||
#ifndef __cpp_generic_lambdas
|
||||
#error __cpp_generic_lambdas is not defined
|
||||
#elif _HAS_CXX20 && ((defined(__clang__) && __clang_major__ >= 10) || defined(__EDG__)) // TRANSITION, VSO-951133
|
||||
#elif _HAS_CXX20 && (defined(__clang__) || defined(__EDG__)) // TRANSITION, VSO-951133
|
||||
#if __cpp_generic_lambdas != 201707L
|
||||
#error __cpp_generic_lambdas is not 201707L
|
||||
#else
|
||||
|
@ -334,7 +327,7 @@ STATIC_ASSERT(__cpp_impl_destroying_delete == 201806L);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if _HAS_CXX20 && (!defined(__clang__) || __clang_major__ >= 10)
|
||||
#if _HAS_CXX20
|
||||
#ifndef __cpp_impl_three_way_comparison
|
||||
#error __cpp_impl_three_way_comparison is not defined
|
||||
#else
|
||||
|
@ -369,7 +362,7 @@ STATIC_ASSERT(__cpp_inheriting_constructors == 200802L);
|
|||
|
||||
#ifndef __cpp_init_captures
|
||||
#error __cpp_init_captures is not defined
|
||||
#elif _HAS_CXX20 && defined(__clang__) && __clang_major__ >= 10 // TRANSITION, VSO-951133 and EDG
|
||||
#elif _HAS_CXX20 && defined(__clang__) // TRANSITION, VSO-951133 and EDG
|
||||
#if __cpp_init_captures != 201803L
|
||||
#error __cpp_init_captures is not 201803L
|
||||
#else
|
||||
|
|
|
@ -5,9 +5,22 @@ RUNALL_INCLUDE .\prefix.lst
|
|||
RUNALL_CROSSLIST
|
||||
PM_CL="/w14640 /Zc:threadSafeInit- /EHsc /std:c++latest"
|
||||
RUNALL_CROSSLIST
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /permissive-"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /Zc:char8_t-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=0 /permissive-"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=1"
|
||||
PM_CL="/MD /D_ITERATOR_DEBUG_LEVEL=0 /Zc:char8_t-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=0 /permissive- /Zc:wchar_t-"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=1"
|
||||
PM_CL="/MDd /D_ITERATOR_DEBUG_LEVEL=2 /fp:except"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /await"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=0 /analyze:only"
|
||||
PM_CL="/MT /D_ITERATOR_DEBUG_LEVEL=1"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=0 /fp:strict"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=1"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /await"
|
||||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /analyze:only"
|
||||
PM_CL="/Za /MD /permissive-"
|
||||
PM_CL="/Za /MDd /permissive-"
|
||||
# PM_CL="/BE /c /MD"
|
||||
# PM_CL="/BE /c /MTd /permissive-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /MD"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /MTd /fp:strict"
|
||||
|
|
|
@ -25,6 +25,6 @@ PM_CL="/EHsc /MTd /D_ITERATOR_DEBUG_LEVEL=2 /std:c++latest /analyze:only"
|
|||
PM_CL="/BE /c /EHsc /MD /std:c++14"
|
||||
PM_CL="/BE /c /EHsc /MDd /std:c++17 /permissive-"
|
||||
PM_CL="/BE /c /EHsc /MTd /std:c++latest /permissive-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MD /std:c++14"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MDd /std:c++17"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MTd /std:c++latest"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MD /std:c++14"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MDd /std:c++17"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MTd /std:c++latest"
|
||||
|
|
|
@ -25,6 +25,6 @@ PM_CL="/clr /MDd /std:c++17"
|
|||
PM_CL="/BE /c /EHsc /MD /std:c++latest"
|
||||
PM_CL="/BE /c /EHsc /MDd /std:c++17 /permissive-"
|
||||
PM_CL="/BE /c /EHsc /MTd /std:c++latest /permissive-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MD /std:c++latest"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MDd /std:c++17"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MTd /std:c++latest"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MD /std:c++latest"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MDd /std:c++17"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MTd /std:c++latest"
|
||||
|
|
|
@ -20,5 +20,5 @@ PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /await"
|
|||
PM_CL="/MTd /D_ITERATOR_DEBUG_LEVEL=2 /analyze:only"
|
||||
PM_CL="/BE /c /MD"
|
||||
PM_CL="/BE /c /MTd /permissive-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /MD"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /MTd"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /MD"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /MTd"
|
||||
|
|
|
@ -27,6 +27,6 @@ PM_CL="/clr:pure /MDd /std:c++14"
|
|||
PM_CL="/BE /c /EHsc /MD /std:c++14 /w14640 /Zc:threadSafeInit-"
|
||||
PM_CL="/BE /c /EHsc /MDd /std:c++17 /permissive- /w14640 /Zc:threadSafeInit-"
|
||||
PM_CL="/BE /c /EHsc /MTd /std:c++latest /permissive- /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MD /std:c++14 /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MDd /std:c++17 /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-delayed-template-parsing /EHsc /MTd /std:c++latest /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MD /std:c++14 /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MDd /std:c++17 /w14640 /Zc:threadSafeInit-"
|
||||
PM_COMPILER="clang-cl" PM_CL="-fno-ms-compatibility -fno-delayed-template-parsing /EHsc /MTd /std:c++latest /w14640 /Zc:threadSafeInit-"
|
||||
|
|
|
@ -15,10 +15,7 @@ void test_cpp() { // test C++ header
|
|||
CHECK(i == 0 or not(j == 0));
|
||||
i or_eq j;
|
||||
CHECK(i == 13);
|
||||
// clang-format off
|
||||
// TRANSITION, LLVM-43531
|
||||
j and_eq compl 4;
|
||||
// clang-format on
|
||||
CHECK(j == 8);
|
||||
i xor_eq j xor 9;
|
||||
CHECK(i == 12);
|
||||
|
|
Загрузка…
Ссылка в новой задаче