[clang] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #110501)
@@ -1,2125 +1,2235 @@ -// Main C++ standard library interfaces -module std_algorithm [system] { - header "algorithm" - export * -} -module std_any [system] { - header "any" - export * -} -module std_array [system] { - header "array" - export * -} -module std_atomic [system] { - header "atomic" - export * -} -module std_barrier [system] { - header "barrier" - export * -} -module std_bit [system] { - header "bit" - export * -} -module std_bitset [system] { - header "bitset" - export * -} -module std_charconv [system] { - header "charconv" - module chars_format{ header "__charconv/chars_format.h" } - module from_chars_integral { header "__charconv/from_chars_integral.h" } - module from_chars_result { header "__charconv/from_chars_result.h" } - module tables { header "__charconv/tables.h" } - module to_chars{ header "__charconv/to_chars.h" } - module to_chars_base_10{ header "__charconv/to_chars_base_10.h" } - module to_chars_floating_point { header "__charconv/to_chars_floating_point.h" } - module to_chars_integral { header "__charconv/to_chars_integral.h" } - module to_chars_result { header "__charconv/to_chars_result.h" } - module traits { header "__charconv/traits.h" } - export * -} -module std_chrono [system] { - header "chrono" - export * -} -module std_codecvt [system] { - header "codecvt" - export * -} -module std_compare [system] { - header "compare" - export * -} -module std_complex [system] { - header "complex" - export * -} -module std_concepts [system] { - header "concepts" - export * -} -module std_condition_variable [system] { - header "condition_variable" - module condition_variable { header "__condition_variable/condition_variable.h" } - export * -} -module std_coroutine [system] { - header "coroutine" - module coroutine_handle { header "__coroutine/coroutine_handle.h" } - module coroutine_traits { header "__coroutine/coroutine_traits.h" } - module noop_coroutine_handle { header "__coroutine/noop_coroutine_handle.h" } - module trivial_awaitables{ header "__coroutine/trivial_awaitables.h" } - export * -} -module std_deque [system] { - header "deque" - export * -} -module std_exception [system] { - header "exception" - export * -} -module std_execution [system] { - header "execution" - export * -} -module std_expected [system] { - header "expected" - export * -} -module std_filesystem [system] { - header "filesystem" - module copy_options { header "__filesystem/copy_options.h" } - module directory_entry { header "__filesystem/directory_entry.h" } - module directory_iterator { header "__filesystem/directory_iterator.h" } - module directory_options{ header "__filesystem/directory_options.h" } - module file_status { header "__filesystem/file_status.h" } - module file_time_type { header "__filesystem/file_time_type.h" } - module file_type{ header "__filesystem/file_type.h" } - module filesystem_error { -header "__filesystem/filesystem_error.h" -export std_private_memory_shared_ptr - } - module operations { header "__filesystem/operations.h" } - module path { -header "__filesystem/path.h" -export std_string // returned by various methods - } - module path_iterator{ header "__filesystem/path_iterator.h" } - module perm_options { header "__filesystem/perm_options.h" } - module perms{ header "__filesystem/perms.h" } - module recursive_directory_iterator { header "__filesystem/recursive_directory_iterator.h" } - module space_info { header "__filesystem/space_info.h" } - module u8path { header "__filesystem/u8path.h" } - export * -} -module std_format [system] { - header "format" - export * -} -module std_forward_list [system] { - header "forward_list" - export * -} -module std_fstream [system] { - header "fstream" - export * -} -module std_functional [system] { - header "functional" - export * -} -module std_future [system] { - header "future" - export * -} -module std_initializer_list [system] { - header "initializer_list" - export * -} -module std_iomanip [system] { - header "iomanip" - export * -} -module std_ios [system] { - header "ios" - export * -} -module std_iosfwd [system] { - header "iosfwd" - export * -} -module std_iostream [system] { - header "iostream" - export * -} -module std_istream [system] { - header "istream" - export * -} -module std_iterator [system] { - header "iterator" - export * -} -module std_latch [system] { - header "latch" - export * -} -module std_limits [system] { - header "limits" - export * -} -module std_list [system] { - header "list" - export * -} -module std_locale [syste
[clang] Nameof operator (PR #104777)
frederick-vs-ja wrote: BTW, the PR description perfectly ignored what will be got if the enum value matches no enumerator or more than one enumerators. https://github.com/llvm/llvm-project/pull/104777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)
@@ -1511,6 +1511,43 @@ Attributes (N2335) C2 ``#embed`` (N3017) C23 C89, C++ = = +Builtin type aliases + + +Clang provides a few builtin aliases to improve the throughput of certain metaprogramming facilities. + +__common_type +- + +.. code-block:: c++ + template class BaseTemplate, +template class HasTypeMember, +class HasNoTypeMember, +class... Ts> + using __common_type = ...; + +This alias is used for implementing ``std::common_type``. If ``std::common_type`` should contain a ``type`` member, +it is an alias to ``HasTypeMember``. Otherwise it is an alias to ``HasNoTypeMember``. The +``BaseTemplate`` is usually ``std::common_type``. ``Ts`` are the arguments to ``std::common_type``. + +__type_pack_element +--- + +.. code-block:: c++ + template + using __type_pack_element = ...; + +This alias returns the type at ``Index`` in the parameter pack ``Ts``. + +__make_integer_seq +-- + +.. code-block:: c++ + template class IntSeq, class T, class N> frederick-vs-ja wrote: ```suggestion template class IntSeq, class T, T N> ``` Typo? https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
frederick-vs-ja wrote: @Endilll I think it's ready now. Sorry for late replying again. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From c38259bd70993a96a35ce4f94790e420847786e2 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sun, 23 Jun 2024 01:39:42 +0800 Subject: [PATCH] [Docs][Clang] DR status for C++23-era papers in cxx_status.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List the following C++23-era WG21 papers as Defect Reports in cxx_status.html as per WG21 meeting minutes. - P1949R7 (C++ Identifier Syntax using Unicode Standard Annex 31) - P2156R1 (Allow Duplicate Attributes) - P2036R3 (Change scope of lambda trailing-return-type) - P2468R2 (The Equality Operator You Are Looking For) - P2327R1 (De-deprecating volatile compound operations) - P2493R0 (Missing feature test macros for C++20 core papers) - P2513R3 (char8_t Compatibility and Portability Fix) - P2460R2 (Relax requirements on wchar_t to match existing practices) - P2579R0 (Mitigation strategies for P2036 ”Changing scope for lambda trailing-return-type”) --- clang/www/cxx_status.html | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 65dd31a0fb802..3ae9f5cb65ba8 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -247,7 +247,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -267,7 +267,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -287,11 +287,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -352,12 +352,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -422,12 +422,12 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 Relax requirements on wchar_t to match existing practices - https://wg21.link/P2460R2";>P2460R2 + https://wg21.link/P2460R2";>P2460R2 (DR) Yes @@ -563,7 +563,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)
@@ -3300,6 +3308,11 @@ static bool HandleLValueComplexElement(EvalInfo &Info, const Expr *E, static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, const VarDecl *VD, CallStackFrame *Frame, unsigned Version, APValue *&Result) { + // P2280R4 If we have a reference type and we are in C++23 allow unknown + // references and pointers. + bool AllowConstexprUnknown = + Info.getLangOpts().CPlusPlus23 && VD->getType()->isReferenceType(); frederick-vs-ja wrote: This is a DR per [N4916](https://wg21.link/n4916) (ditto below). ```suggestion // P2280R4 allow unknown references and pointers. bool AllowConstexprUnknown = VD->getType()->isReferenceType(); ``` https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)
@@ -1961,7 +1961,8 @@ namespace ConstexprConstructorRecovery { namespace Lifetime { void f() { -constexpr int &n = n; // expected-error {{constant expression}} expected-note {{use of reference outside its lifetime}} expected-warning {{not yet bound to a value}} +constexpr int &n = n; // expected-error {{constant expression}} cxx23-note {{reference to 'n' is not a constant expression}} cxx23-note {{address of non-static constexpr variable 'n' may differ}} expected-warning {{not yet bound to a value}} + // cxx11_20-note@-1 {{use of reference outside its lifetime is not allowed in a constant expression}} frederick-vs-ja wrote: This looks strange. The old message looks better (see also [CWG453](https://cplusplus.github.io/CWG/issues/453.html)) and the new one is possibly misleading as we perhaps shoudn't say the address of a reference variable. https://github.com/llvm/llvm-project/pull/95474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Implement a bitwise_copyable builtin type trait. (PR #86512)
frederick-vs-ja wrote: IIUC this intrinsic is unrelated to assignment operators. Do you have any plan for `__is_bitwise_assignable`, which should determine whether the assignment operator equivalently copies the value representation, possibly modulo the vptrs? ```C++ struct Cat {}; // bitwise copy assignable struct Leopard : Cat { // is_trivially_assignable_v returns true but not bitwise copy assignable int spots_; Leopard& operator=(Leopard&) = delete; using Cat::operator=; // We can detect this by metaprogramming as operator= overloads have wrong types. }; struct LeopardHouse { // is_trivially_assignable_v returns true but not bitwise copy assignable Leopard _; // Non-bitwise-assignability *can't* be detected by metaprogramming since operator= overloads have right types. }; ``` https://github.com/llvm/llvm-project/pull/86512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang][C++20] Implement constexpr std::bit_cast for bit-fields (PR #74775)
frederick-vs-ja wrote: This PR should fix #54018. https://github.com/llvm/llvm-project/pull/74775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 -DWIN -verify -std=c++23 -fsyntax-only %s +// RUN: %clang_cc1 -verify -std=c++23 -fsyntax-only %s + +// expected-no-diagnostics + + +#ifdef WIN +#define INFINITY ((float)(1e+300 * 1e+300)) +#define NAN (-(float)(INFINITY * 0.0F)) +#else +#define NAN (__builtin_nanf("")) +#define INFINITY (__builtin_inff()) +#endif + +extern "C" void abort() noexcept; +extern "C" int write(int, const void*, unsigned long); + +#define assert(condition) \ + do { \ +if (!(condition)) {\ + write(2, "Assertion failed: ", 18); \ + write(2, #condition, sizeof(#condition) - 1);\ + write(2, "\n", 1); \ + abort(); \ +} \ + } while (false) + +int main() { +int i; + +// fmin +static_assert(__builtin_fmin(15.24, 1.3) == 1.3, ""); +static_assert(__builtin_fmin(-0.0, +0.0) == -0.0, ""); +static_assert(__builtin_fmin(+0.0, -0.0) == -0.0, ""); +assert(__builtin_isnan(__builtin_fminf(NAN,NAN))); +assert(__builtin_isnan(__builtin_fminf(NAN, -1))); +assert(__builtin_isnan(__builtin_fminf(-INFINITY, 0))); +assert(__builtin_iszero(__builtin_fminf(+INFINITY, 0))); + +// frexp +static_assert(__builtin_frexp(123.45, &i) == 0.9644531250002); frederick-vs-ja wrote: It seems that we should write something like ```C++ struct { double num_; int expo_; } result; result.num_ = frexp(x, &result.expo_); return result; ``` https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) - << Entity.getType()->isReferenceType() << DiagRange; +// P2748R5: Disallow Binding a Returned Glvalue to a Temporary. +// [stmt.return]/p6: In a function whose return type is a reference, +// other than an invented function for std::is_convertible ([meta.rel]), +// a return statement that binds the returned reference to a temporary +// expression ([class.temporary]) is ill-formed. frederick-vs-ja wrote: > should we makes `std::is_nothrow_convertible_v` evaluated as > `true`? I don't see any proper motivation for doing so. Implementations consistently match the design in [P0758R1](https://wg21.link/p0758r1). It's the standard wording that failed to reflect the intent, which is perhaps a defect. (Additionally, the pasted sample implementation would exactly reflect the bug in the `noexcept` operator, if any.) And IMO `std::is_nothrow_convertible(_v)` should be implementable without intrinsic (and the implementation strategy would be [quite simple](https://en.cppreference.com/w/cpp/types/is_convertible#Possible_implementation)). The `__is_nothrow_convertible` instrinsic should only be meaningful for acceleration of compilation. https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -std=c++26 -fsyntax-only -verify %s + +auto&& f1() { + return 42; // expected-error{{returning reference to local temporary object}} +} +const double& f2() { + static int x = 42; + return x; // expected-error{{returning reference to local temporary object}} +} +auto&& id(auto&& r) { + return static_cast(r); +} +auto&& f3() { + return id(42);// OK, but probably a bug +} + +static_assert(__is_convertible(int, const int &)); +static_assert(__is_nothrow_convertible(int, const int &)); frederick-vs-ja wrote: I think these should go to `clang/test/SemaCXX/type-traits.cpp` (and be unconditionally tested). Note that test coverage for `__is_convertible` is already present. https://github.com/llvm/llvm-project/blob/4b10ade1a6afa1fcff5752aaebd86a1611d499d7/clang/test/SemaCXX/type-traits.cpp#L2556-L2560 But test coverage for `__is_nothrow_convertible` where destination types are references seems missing. Perhaps we should add it in another PR. https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Implement C++26 P2748R5 "Disallow Binding a Returned Glvalue to a Temporary" (PR #89942)
@@ -8340,8 +8340,17 @@ void Sema::checkInitializerLifetime(const InitializedEntity &Entity, << Entity.getType()->isReferenceType() << CLE->getInitializer() << 2 << DiagRange; } else { -Diag(DiagLoc, diag::warn_ret_local_temp_addr_ref) - << Entity.getType()->isReferenceType() << DiagRange; +// P2748R5: Disallow Binding a Returned Glvalue to a Temporary. +// [stmt.return]/p6: In a function whose return type is a reference, +// other than an invented function for std::is_convertible ([meta.rel]), +// a return statement that binds the returned reference to a temporary +// expression ([class.temporary]) is ill-formed. frederick-vs-ja wrote: > I wanted to implement LWG4028 as well I don't know which part of LWG4028 is "not yet implemented". As the submitter, my intent was just to reflect what implementations actually did and to avoid crux in the core wording. https://github.com/llvm/llvm-project/pull/89942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, const BinaryOperator *E, // If during the evaluation of an expression, the result is not // mathematically defined [...], the behavior is undefined. // FIXME: C++ rules require us to not conform to IEEE 754 here. - if (LHS.isNaN()) { + if (!Info.getLangOpts().CPlusPlus23 && LHS.isNaN()) { frederick-vs-ja wrote: There's an open CWG issue ([CWG2168](https://cplusplus.github.io/CWG/issues/2168.html)) about this. https://github.com/llvm/llvm-project/pull/88978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [C99] Claim conformance for _Complex support (PR #88161)
frederick-vs-ja wrote: > But fails on Windows. This seems because of that MS UCRT's complex math functions are non-conforming. I _guess_ they could work if we write the following before including UCRT's ``. ```C #define _C_COMPLEX_T typedef double _Complex _C_double_complex; typedef float _Complex _C_float_complex; typedef long double _Complex _C_ldouble_complex; ``` https://github.com/llvm/llvm-project/pull/88161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)
frederick-vs-ja wrote: > This does something both useful and correct with `-fno-strict-aliasing`. I'm not sure whether an instrinsic is even needed with `-fno-strict-aliasing`. IIUC `std::start_lifetime_as` mainly tells the compiler that the types of data in the storage can be changed (indeterminately) with the object representations unchanged. This behaves like some fence for TBAA. > we can now observe them and use them to validate e.g. the `llvm.tbaa.fence` > proposal. Yeah. I guess we need to implement `std::start_lifetime_as(_array)` with `llvm.tbaa.fence`. https://github.com/llvm/llvm-project/pull/82776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [libcxx] [libc++] Implement LWG3528 (`make_from_tuple` can perform (the equivalent of) a C-style cast) (PR #85263)
@@ -1386,9 +1386,19 @@ inline _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) apply(_Fn&& __f, _Tuple&& std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) +#if _LIBCPP_STD_VER >= 20 template inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>) + noexcept(noexcept(_Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...))) + requires is_constructible_v<_Tp, decltype(std::get<_Idx>(std::forward<_Tuple>(__t)))...> { + return _Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...); +} +#else +template +inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>, +enable_if_t(std::forward<_Tuple>(__t)))...>> * = nullptr) _LIBCPP_NOEXCEPT_RETURN(_Tp(std::get<_Idx>(std::forward<_Tuple>(__t))...)) +#endif // _LIBCPP_STD_VER >= 20 template frederick-vs-ja wrote: Just making `__make_from_tuple_impl` SFINAE-friendly is insufficient and leads to worse diagnostic messages. I guess we can write the following to make `make_from_tuple` SFINAE-friendly. `(requires` can be used since C++20 to make the implemenation clearer.) ```C++ template >>::type, class = void> inline constexpr bool __can_make_from_tuple = false; template inline constexpr bool __can_make_from_tuple< _Tp, _Tuple, index_sequence<_Idx...>, enable_if_t(std::declval<_Tuple>()))...>>> = true; template , int> = 0> inline _LIBCPP_HIDE_FROM_ABI constexpr _Tp make_from_tuple(_Tuple&& __t) _LIBCPP_NOEXCEPT_RETURN(std::__make_from_tuple_impl<_Tp>( std::forward<_Tuple>(__t), typename __make_tuple_indices>>::type{})) ``` And perhaps we shouldn't touch `__make_from_tuple_impl` if it's OK to constrain `make_from_tuple`. https://github.com/llvm/llvm-project/pull/85263 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] Update value for __cpp_implicit_move (#84216) (PR #84228)
frederick-vs-ja wrote: [This page](https://clang.llvm.org/cxx_status.html) still refers to [P2266R1](https://wg21.link/p2266r1) but the approved revision is [P2266R3](https://wg21.link/p2266r3). Should we fix the citation in this PR or another? https://github.com/llvm/llvm-project/pull/84228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] [Sema] Improve support for `__restrict`-qualified member functions (PR #83855)
frederick-vs-ja wrote: Reported 2 bugs for MSVC. (The first also affects standard cv-qualifiers.) - https://developercommunity.visualstudio.com/t/cv-qualifiers-and-__restrict-in-the-temp/10609457 - https://developercommunity.visualstudio.com/t/__restrict-on-non-static-member-function/10609449 https://github.com/llvm/llvm-project/pull/83855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)
@@ -896,6 +896,12 @@ def Launder : Builtin { let Prototype = "void*(void*)"; } +def StartObjectLifeTime : Builtin { + let Spellings = ["__builtin_start_object_lifetime"]; frederick-vs-ja wrote: IMO if the intent of this intrinsic is to handle polymorphic classes (which is not covered by `std::start_lifetime_as`), its name should diverge from "plain" `start_lifetime`. https://github.com/llvm/llvm-project/pull/82776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Add __builtin_start_object_lifetime builtin. (PR #82776)
frederick-vs-ja wrote: > * with `-fstrict-vtable-pointers` flag, we update the vtpr assumption > correctly (mark the load/store vptr with appropriate invariant group > intrinsics) to prevent incorrect vptr load folding; I _guess_ we want a variant of this intrinsic which doesn't affect analyzation for devirtualization. Such an intrinsic should be sufficient for **C++23** `std::start_lifetime_as(_array)`. > * for now, it is non-constant, thus cannot be executed in constant evaluation; It seems intended that `std::start_lifetime_as(_array)` is not usable in constant evaluation, as the indeterminism of implicit object creation doesn't seem compatible with constant evaluation. https://github.com/llvm/llvm-project/pull/82776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] Implement `__is_layout_compatible` (PR #81506)
@@ -1558,6 +1558,89 @@ void is_standard_layout() int t71[F(__is_standard_layout(HasEmptyIndirectBaseAsSecondUnionMember))]; } +struct CStruct2 { + int one; + int two; +}; + +struct CEmptyStruct2 {}; + +struct CppEmptyStruct2 : CStruct2 {}; +struct CppStructStandard2 : CEmptyStruct2 { + int three; + int four; +}; +struct CppStructNonStandardByBase2 : CStruct2 { + int three; + int four; +}; +struct CppStructNonStandardByVirt2 : CStruct2 { + virtual void method() {} +}; +struct CppStructNonStandardByMemb2 : CStruct2 { + CppStructNonStandardByVirt member; +}; +struct CppStructNonStandardByProt2 : CStruct2 { + int five; +protected: + int six; +}; +struct CppStructNonStandardByVirtBase2 : virtual CStruct2 { +}; +struct CppStructNonStandardBySameBase2 : CEmptyStruct2 { + CEmptyStruct member; +}; +struct CppStructNonStandardBy2ndVirtBase2 : CEmptyStruct2 { + CEmptyStruct member; +}; + +struct CStructWithQualifiers { + const int one; + volatile int two; +}; + +struct CStructNoUniqueAddress { + int one; + [[no_unique_address]] int two; +}; + +struct CStructNoUniqueAddress2 { + int one; + [[no_unique_address]] int two; +}; + +struct CStructAlignment { + int one; + alignas(16) int two; +}; + +struct CStructIncomplete; + +void is_layout_compatible() +{ + static_assert(__is_layout_compatible(void, void), ""); + static_assert(__is_layout_compatible(int, int), ""); + static_assert(__is_layout_compatible(int[], int[]), ""); + static_assert(__is_layout_compatible(int[2], int[2]), ""); + static_assert(__is_layout_compatible(CStruct, CStruct2), ""); + static_assert(__is_layout_compatible(CEmptyStruct, CEmptyStruct2), ""); + static_assert(__is_layout_compatible(CppEmptyStruct, CppEmptyStruct2), ""); + static_assert(__is_layout_compatible(CppStructStandard, CppStructStandard2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardByBase, CppStructNonStandardByBase2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardByVirt, CppStructNonStandardByVirt2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardByMemb, CppStructNonStandardByMemb2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardByProt, CppStructNonStandardByProt2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardByVirtBase, CppStructNonStandardByVirtBase2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardBySameBase, CppStructNonStandardBySameBase2), ""); + static_assert(!__is_layout_compatible(CppStructNonStandardBy2ndVirtBase, CppStructNonStandardBy2ndVirtBase2), ""); + static_assert(!__is_layout_compatible(CStruct, CStructWithQualifiers), ""); // FIXME: this is CWG1719 + static_assert(__is_layout_compatible(CStruct, CStructNoUniqueAddress) == bool(__has_cpp_attribute(no_unique_address)), ""); // FIXME: this is CWG2759 + static_assert(__is_layout_compatible(CStructNoUniqueAddress, CStructNoUniqueAddress2) == bool(__has_cpp_attribute(no_unique_address)), ""); // FIXME: this is CWG2759 + static_assert(__is_layout_compatible(CStruct, CStructAlignment), ""); + static_assert(__is_layout_compatible(CStructIncomplete, CStructIncomplete), ""); + static_assert(!__is_layout_compatible(CStruct, CStructIncomplete), ""); +} frederick-vs-ja wrote: > * That an enumeration type and its underlying type are not layout compatible This is possibly a defect (https://github.com/cplusplus/CWG/issues/39#issuecomment-1184791364, https://github.com/cplusplus/CWG/issues/95#issuecomment-1185260854), but no CWG issue is filed yet. https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)
@@ -598,3 +600,27 @@ namespace B { } void g(B::X x) { A::f(x); } } + +namespace static_operator { +#if __cplusplus >= 201703L frederick-vs-ja wrote: > No way to modify things in a C++11/14 constexpr function (`++x` is not a > constant expression), so no way to make a positive test that the expression > was evaluated. Though I guess I should have done `(non_constexpr_fn(), > X())()` and see if that failed. Oh I see. It's inconvenient that runtime results can't be easily asserted in this test file. I think the related changes of constexpr were made in C++14 ([N3652](https://wg21.link/n3652)). https://github.com/llvm/llvm-project/pull/78356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
frederick-vs-ja wrote: @Endilll Oh, I'm sorry for late replying. I wasn't wating for anybody and think this can be merged. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)
@@ -598,3 +600,27 @@ namespace B { } void g(B::X x) { A::f(x); } } + +namespace static_operator { +#if __cplusplus >= 201703L frederick-vs-ja wrote: Why C++17? https://github.com/llvm/llvm-project/pull/78356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/78356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Clang] fix static operator()/[] call not evaluating object (PR #78356)
https://github.com/frederick-vs-ja commented: It seems that more things are being done #68485. Have you double checked that PR? https://github.com/llvm/llvm-project/pull/78356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang] [SemaCXX] Implement CWG2627 Bit-fields and narrowing conversions (PR #78112)
frederick-vs-ja wrote: > Should this be a SFINAE-able error before C++23? (It isn't currently) I believe this should (in C++11 and later modes). https://github.com/llvm/llvm-project/pull/78112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libcxx] [flang] [clang] [compiler-rt] [llvm] [lldb] [clang-tools-extra] [libc] [lld] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/76447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[libcxx] [flang] [clang] [compiler-rt] [llvm] [lldb] [clang-tools-extra] [libc] [lld] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)
@@ -1273,6 +1293,22 @@ public: __impl_.__swap(__that.__impl_); } +# if _LIBCPP_STD_VER >= 26 + // [variant.visit], visitation + + template frederick-vs-ja wrote: Would it be better to use a special tag type like this ```C++ struct __variant_visit_barrier_tag { // unnamable when using standard library modules explicit __variant_visit_barrier_tag() = default; }; // ... template <__variant_visit_barrier_tag = __variant_visit_barrier_tag{}, class _Self, class _Visitor> // ... ``` to avoid accepting `v.visit<0, T, F>(f)`? https://github.com/llvm/llvm-project/pull/76447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From 9ef23f11f52735976a05080227bb880af3b9cbb6 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 17 Oct 2023 10:41:18 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 621439d0bae9666..a1e9b51c25905b9 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -207,7 +207,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -227,7 +227,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -247,11 +247,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -320,12 +320,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -397,7 +397,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -539,7 +539,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From b2ec5be2a9eb80a4aeaf329ea4aed727b36501a1 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 17 Oct 2023 10:41:18 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index 621439d0bae9666..a1e9b51c25905b9 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -207,7 +207,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -227,7 +227,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -247,11 +247,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -320,12 +320,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -397,7 +397,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -539,7 +539,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From 40dca93d3e1f339f3e756e54687ea5506b3d6f2e Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 17 Oct 2023 10:41:18 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index e2cf9ab25465214..8e2869d3fdf8ac6 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -190,7 +190,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -210,7 +210,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -230,11 +230,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -303,12 +303,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -380,7 +380,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -522,7 +522,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From 07007c384ee57a20ad1dd1b0422c93152bb7f18e Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 17 Oct 2023 10:41:18 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index e2cf9ab25465214..8e2869d3fdf8ac6 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -190,7 +190,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -210,7 +210,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -230,11 +230,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -303,12 +303,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -380,7 +380,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -522,7 +522,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
frederick-vs-ja wrote: @Endilll Thanks for notification! P2280 was already handled, while P2156 was previously missed. @cor3ntin I've add the DR status to P2156R1 and force-pushed. https://github.com/llvm/llvm-project/pull/68846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/68846 >From 00dec85aabcbd2e93fa80aed7b21f7ce02aab589 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 17 Oct 2023 10:41:18 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index e2cf9ab25465214..8e2869d3fdf8ac6 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -190,7 +190,7 @@ C++23 implementation status Allow duplicate attributes - https://wg21.link/P2156R1";>P2156R1 + https://wg21.link/P2156R1";>P2156R1 (DR) Clang 13 @@ -210,7 +210,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -230,11 +230,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -303,12 +303,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -380,7 +380,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -522,7 +522,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [Docs][Clang] Missing DR status for C++23-era papers in cxx_status.html (PR #68846)
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/68846 I'm unsure whether [P2460R2](https://wg21.link/p2460r2) should be listed in the page. The paper seemingly requires no changes. ### References - [N4891](https://wg21.link/n4891) - [P1949R7](https://wg21.link/p1949r7) (C++ Identifier Syntax using Unicode Standard Annex 31) - [N4898](https://wg21.link/n4898) - [P2036R3](https://wg21.link/p2036r3) (Change scope of lambda _trailing-return-type_) - [N4916](https://wg21.link/n4916) - [P2468R2](https://wg21.link/p2468r2) (The Equality Operator You Are Looking For) - [P2327R1](https://wg21.link/p2327r1) (De-deprecating `volatile` compound operations) - [P2493R0](https://wg21.link/p2493r0) (Missing feature test macros for C++20 core papers) - [P2513R3](https://wg21.link/p2513r3) (`char8_t` Compatibility and Portability Fix) - [P2460R2](https://wg21.link/p2460r2) (Relax requirements on `wchar_t` to match existing practices) - [P2579R0](https://wg21.link/p2579r0) (Mitigation strategies for [P2036](https://wg21.link/p2036) ”Changing scope for lambda _trailing-return-type_”) ### Unchanged - [N4884](https://wg21.link/n4884) effectively specifies [P1787R6](https://wg21.link/p1787r6) (Declarations and where to find them) to be a DR, but it seems that we're tracking the DR(s) in [another page](https://clang.llvm.org/cxx_dr_status.html). - [N4940](https://wg21.link/n4940) says [P2706R0](https://wg21.link/p2706r0) (Redundant specification for defaulted functions) is a DR, but it seems that the paper requires no changes. - [P2647R1](https://wg21.link/p2647r1) (Permitting `static` `constexpr` variables in `constexpr` functions) was once specified to be a DR, but it turned out that the DR status was a mistake and then reverted ([N4943](https://wg21.link/n4943)). >From c8013dbdf6acdd0ca29ee871f9fef608c986916a Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Thu, 12 Oct 2023 11:29:08 +0800 Subject: [PATCH] [Docs][Clang] DR status in cxx_status.html --- clang/www/cxx_status.html | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/clang/www/cxx_status.html b/clang/www/cxx_status.html index e2cf9ab25465214..5244c7f666ad363 100755 --- a/clang/www/cxx_status.html +++ b/clang/www/cxx_status.html @@ -210,7 +210,7 @@ C++23 implementation status C++ identifier syntax using UAX 31 - https://wg21.link/P1949R7";>P1949R7 + https://wg21.link/P1949R7";>P1949R7 (DR) Clang 14 @@ -230,11 +230,11 @@ C++23 implementation status Change scope of lambda trailing-return-type - https://wg21.link/P2036R3";>P2036R3 + https://wg21.link/P2036R3";>P2036R3 (DR) Clang 17 - https://wg21.link/P2579R0";>P2579R0 + https://wg21.link/P2579R0";>P2579R0 (DR) Multidimensional subscript operator @@ -303,12 +303,12 @@ C++23 implementation status The Equality Operator You Are Looking For - https://wg21.link/P2468R2";>P2468R2 + https://wg21.link/P2468R2";>P2468R2 (DR) Clang 16 De-deprecating volatile compound operations - https://wg21.link/P2327R1";>P2327R1 + https://wg21.link/P2327R1";>P2327R1 (DR) Clang 15 @@ -380,7 +380,7 @@ C++23 implementation status char8_t Compatibility and Portability Fix - https://wg21.link/P2513R3";>P2513R3 + https://wg21.link/P2513R3";>P2513R3 (DR) Clang 16 @@ -522,7 +522,7 @@ C++20 implementation status https://wg21.link/p2103r0";>P2103R0 -https://wg21.link/p2493r0";>P2493R0 +https://wg21.link/p2493r0";>P2493R0 (DR) https://wg21.link/p2092r0";>P2092R0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang-tools-extra] [libc++] Prevent calling the projection more than three times (PR #66315)
frederick-vs-ja wrote: It seems that we should remove this block because it turns out that `ranges::clamp` needs double moves under some circumstances. https://github.com/llvm/llvm-project/blob/4c1c96e6fc0f704e9e032f87b2cd1e04bb4240dd/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp#L89-L110 https://github.com/llvm/llvm-project/pull/66315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits