File tree Expand file tree Collapse file tree 5 files changed +12
-11
lines changed
test/tools/clang_tidy_checks Expand file tree Collapse file tree 5 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -504,10 +504,9 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
504
504
# Required flags ==============================================================
505
505
function (cxx_add_basic_build_flags target )
506
506
507
- # Require C++20 for all targets. C++17 is needed to use aligned allocation
508
- # in the dylib. C++20 is needed to use char8_t.
507
+ # Require C++23 for all targets.
509
508
set_target_properties (${target} PROPERTIES
510
- CXX_STANDARD 20
509
+ CXX_STANDARD 23
511
510
CXX_STANDARD_REQUIRED YES
512
511
CXX_EXTENSIONS NO )
513
512
Original file line number Diff line number Diff line change 11
11
#define _LIBCPP_SSO_ALLOCATOR_H
12
12
13
13
#include < __config>
14
+ #include < cstddef>
14
15
#include < memory>
15
16
#include < new>
16
17
#include < type_traits>
@@ -34,7 +35,7 @@ class _LIBCPP_HIDDEN __sso_allocator<void, _Np>
34
35
template <class _Tp , size_t _Np>
35
36
class _LIBCPP_HIDDEN __sso_allocator
36
37
{
37
- typename aligned_storage< sizeof (_Tp) * _Np>::type buf_ ;
38
+ alignas (_Tp) std::byte buf_[ sizeof (_Tp) * _Np] ;
38
39
bool __allocated_;
39
40
public:
40
41
typedef size_t size_type;
Original file line number Diff line number Diff line change 10
10
#include < algorithm>
11
11
#include < clocale>
12
12
#include < codecvt>
13
+ #include < cstddef>
13
14
#include < cstdio>
14
15
#include < cstdlib>
15
16
#include < cstring>
@@ -87,7 +88,7 @@ struct release
87
88
template <class T , class ...Args>
88
89
T& make (Args ...args)
89
90
{
90
- static typename aligned_storage< sizeof (T)>::type buf;
91
+ alignas (T) static std::byte buf[ sizeof (T)] ;
91
92
auto *obj = ::new (&buf) T (args...);
92
93
return *obj;
93
94
}
@@ -541,7 +542,7 @@ const locale&
541
542
locale::__imp::make_classic ()
542
543
{
543
544
// only one thread can get in here and it only gets in once
544
- static aligned_storage< sizeof (locale)>::type buf;
545
+ alignas (locale) static std::byte buf[ sizeof (locale)] ;
545
546
locale* c = reinterpret_cast <locale*>(&buf);
546
547
c->__locale_ = &make<__imp>(1u );
547
548
return *c;
@@ -558,7 +559,7 @@ locale&
558
559
locale::__imp::make_global ()
559
560
{
560
561
// only one thread can get in here and it only gets in once
561
- static aligned_storage< sizeof (locale)>::type buf;
562
+ alignas (locale) static std::byte buf[ sizeof (locale)] ;
562
563
auto *obj = ::new (&buf) locale (locale::classic ());
563
564
return *obj;
564
565
}
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ set(Clang_DIR "${Clang_DIR_SAVE}" CACHE PATH "The directory containing a CMake c
33
33
34
34
message (STATUS "Found system-installed LLVM ${LLVM_PACKAGE_VERSION} with headers in ${LLVM_INCLUDE_DIRS} " )
35
35
36
- set (CMAKE_CXX_STANDARD 20 )
36
+ set (CMAKE_CXX_STANDARD 23 )
37
37
38
38
# Link only against clangTidy itself, not anything that clangTidy uses; otherwise we run setup code multiple times
39
39
# which results in clang-tidy crashing
@@ -58,7 +58,7 @@ add_library(cxx-tidy MODULE ${SOURCES})
58
58
target_link_libraries (cxx-tidy clangTidy )
59
59
60
60
set_target_properties (cxx-tidy PROPERTIES
61
- CXX_STANDARD 20
61
+ CXX_STANDARD 23
62
62
CXX_STANDARD_REQUIRED YES
63
63
CXX_EXTENSIONS NO )
64
64
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ target_link_libraries(cxxabi_shared_objects PUBLIC cxxabi-headers)
171
171
set_target_properties (cxxabi_shared_objects
172
172
PROPERTIES
173
173
CXX_EXTENSIONS OFF
174
- CXX_STANDARD 20
174
+ CXX_STANDARD 23
175
175
CXX_STANDARD_REQUIRED OFF
176
176
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS} "
177
177
DEFINE_SYMBOL ""
@@ -251,7 +251,7 @@ target_link_libraries(cxxabi_static_objects PUBLIC cxxabi-headers)
251
251
set_target_properties (cxxabi_static_objects
252
252
PROPERTIES
253
253
CXX_EXTENSIONS OFF
254
- CXX_STANDARD 20
254
+ CXX_STANDARD 23
255
255
CXX_STANDARD_REQUIRED OFF
256
256
COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS} "
257
257
)
You can’t perform that action at this time.
0 commit comments