[clang] [Clang] CWG2749: relational operators involving pointers to void (PR #93046)

2025-04-08 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/93046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-04 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > (LMK if I've got that wrong!) Given that, how is the C11 change a breaking > change? It seems like the C99 rule was just bogus, and we should forget it > ever existed? IIUC, the "breaking change" is that in C99 a pointer value to a temporary array element never become

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-04-04 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja approved this pull request. Thanks! I modified the PR description so GitHub can automatically associate this PR with the issue. https://github.com/llvm/llvm-project/pull/132372 ___ cfe-commits mailing list cfe-commit

[clang] [C11] Implement WG14 N1285 (temporary lifetimes) (PR #133472)

2025-04-04 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > That is unimplementable without dynamically allocating and leaking memory, > which we certainly should not do and which nobody would thank us for doing. Ah, I think [DR452](https://www.open-std.org/jtc1/sc22/wg14/issues/c11c17/issue0452.html) (adding "Such an object n

[clang] Fixes: Can not use C99 function names as variable names in C89 (PR #129979)

2025-04-01 Thread A. Jiang via cfe-commits
@@ -135,6 +137,24 @@ bool Builtin::Context::isBuiltinFunc(llvm::StringRef FuncName) { return false; } +static bool isSymbolAvailableInC89(const llvm::StringTable &Strings, + const Builtin::Info &BuiltinInfo) { + + auto NameStr = Strings[Bu

[clang] Add more tests for _Countof (PR #133333)

2025-03-27 Thread A. Jiang via cfe-commits
@@ -81,6 +89,22 @@ void test_with_function_param(int array[12], int (*array_ptr)[12], int static_ar (void)_Countof(static_array); // expected-error {{'_Countof' requires an argument of array type; 'int *' invalid}} } +void test_func_fix_fix(int i, char (*a)[3][5], int (*x)

[clang] [C2y] Implement WG14 N3369 and N3469 (_Countof) (PR #133125)

2025-03-27 Thread A. Jiang via cfe-commits
@@ -141,6 +141,12 @@ C2y Feature Support paper also introduced octal and hexadecimal delimited escape sequences (e.g., ``"\x{12}\o{12}"``) which are also supported as an extension in older C language modes. +- Implemented `WG14 N3369

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-25 Thread A. Jiang via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - frederick-vs-ja wrote: I found that

[clang] Minor unused variable error for sanitizer builds (PR #132372)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > It looks like this is similar to `__builtin_constant_p` - what is the > proposed behavior wrt. side effects in the evaluated expression? gcc and > clang disagree about this a lot currently: https://godbolt.org/z/rbneznT9z IIUC this intrinsic shouldn't be similar to `__

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/132524 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Introduce __builtin_is_modifiable_lvalue() (PR #132524)

2025-03-22 Thread A. Jiang via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s + frederick-vs-ja wrote: Would it make more sense to use `_Static_assert(__builtin_is_modifiable_lvalue(...), "")`? Also, I think it would be valuable to cover more types. N1570 6.3.2.1/1,

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-22 Thread A. Jiang via cfe-commits
@@ -534,11 +534,6 @@ C23 implementation status Clang 16 - - String functions for freestanding implementations - https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2524.htm";>N2524 - No - frederick-vs-ja wrote: Although the

[clang] [Clang][RFC] Intrododuce a builtin to determine the structure binding size (PR #131515)

2025-03-16 Thread A. Jiang via cfe-commits
@@ -434,6 +434,36 @@ __datasizeof ``__datasizeof`` behaves like ``sizeof``, except that it returns the size of the type ignoring tail padding. +.. _builtin_structured_binding_size-doc: + +__builtin_structured_binding_size (C++) +--- +``__bu

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-15 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Oh, there seem to be a few remaning bugs. Now I've added some FIXME comments to the most related test files. @Endilll https://github.com/llvm/llvm-project/pull/127166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-14 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127166 >From a2fc3d0550ab22e1a4273dc2debfda23df7cad6f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 14 Feb 2025 14:03:23 +0800 Subject: [PATCH 1/4] [clang][docs] Fix DR staus for P2280R4 P2280R4 is offi

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja closed https://github.com/llvm/llvm-project/pull/127568 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/4] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/3] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-12 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/3] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] Better diagnostics when assertion fails in `consteval` (PR #130458)

2025-03-12 Thread A. Jiang via cfe-commits
@@ -107,6 +107,8 @@ def err_ice_too_large : Error< "integer constant expression evaluates to value %0 that cannot be " "represented in a %1-bit %select{signed|unsigned}2 integer type">; def err_expr_not_string_literal : Error<"expression is not a string literal">; +def note

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-03-11 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/3] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-11 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > > Ideally, the C++23 behavior should also be present in C++11~20 modes. Did > > you want to add FIXME to these checks? > > Yes, this would be an improvement. I'd wait for @tbaederr's backport #129646. Once that lands, IIUC this PR will only contain pure documentation

[clang] [clang][docs] Reflect the implementation status for P2280R4 (PR #127166)

2025-03-11 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127166 >From a2fc3d0550ab22e1a4273dc2debfda23df7cad6f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 14 Feb 2025 14:03:23 +0800 Subject: [PATCH 1/3] [clang][docs] Fix DR staus for P2280R4 P2280R4 is offi

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-06 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > While `log` does exist since C89 _within _, it should be allowed for > a `.c` to define `int log = 0;` because the `math.h` has not been included. > Thereby, even if `double log(double);` exists in C89 (in `math.h`), it's not > been declared in the current translation

[clang] [C2y] Implement WG14 N3411 (PR #130180)

2025-03-06 Thread A. Jiang via cfe-commits
@@ -3192,23 +3192,22 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { if (CurPtr != BufferStart && (CurPtr[-1] != '\n' && CurPtr[-1] != '\r')) { DiagnosticsEngine &Diags = PP->getDiagnostics(); SourceLocation EndLoc = getSourceLocation(BufferEnd); -

[clang] C89 doesn't have `math.h` functions (PR #129979)

2025-03-05 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > Essentially all of math.h doesn't exist until `C99`: > https://en.cppreference.com/w/c/numeric/math/log You seemed to misread the page. `logf` and `logl` exist since C99, while `log` exists since C89. https://github.com/llvm/llvm-project/pull/129979 __

[clang] [clang] Reject constexpr-unknown values as constant expressions more consistently (PR #129952)

2025-03-05 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja milestoned https://github.com/llvm/llvm-project/pull/129952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bump `__cpp_constexpr` to `202002L` in C++20 mode (PR #129814)

2025-03-05 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja closed https://github.com/llvm/llvm-project/pull/129814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-03-04 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: /cherry-pick 27757fb87429c89a65bb5e1f619ad700928db0fd https://github.com/llvm/llvm-project/pull/128409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Treat constexpr-unknown value as invalid in `EvaluateAsInitializer` (PR #128409)

2025-03-04 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja milestoned https://github.com/llvm/llvm-project/pull/128409 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bump `__cpp_constexpr` to `202002L` in C++20 mode (PR #129814)

2025-03-04 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/129814 Per P2493R0 and SD6, `__cpp_constexpr` of value `202002L` indicates that P1330R0 "Changing the active member of a union inside constexpr" is implemented, which is true for Clang 9 and later. Fixes #129

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -69,7 +69,7 @@ "`LWG4074 `__","``compatible-joinable-ranges`` is underconstrained","2024-06 (St. Louis)","","","" "`LWG4076 `__","``concat_view`` should be freestanding","2024-06 (St. Louis)","","","" "`LWG4079

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-25 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread A. Jiang via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-22 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/3] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-21 Thread A. Jiang via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -verify -fms-compatibility frederick-vs-ja wrote: Added. I decided to add the positive and negative tests together. Luckily, UCRT's `` selects `__builtin_offsetof` when `_MSC_VER` isn't

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-21 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH 1/2] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-co

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-20 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-20 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-19 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-19 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-19 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-19 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-19 Thread A. Jiang via cfe-commits
@@ -0,0 +1,646 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/127525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-18 Thread A. Jiang via cfe-commits
@@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++23 %s -emit-llvm -o - | FileCheck %s frederick-vs-ja wrote: This should be tested in old modes to prevent potential regressions. P2280R4 is a defect report (ideally, against C++11/14/17/20

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From 2c9e6e45944891af54cba9648297a996bb4d8cca Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 14:03:35 +0800 Subject: [PATCH] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compat

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127568 >From f10028a540d277e255a3c12e4ce6deb20a4165b8 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 18 Feb 2025 13:57:30 +0800 Subject: [PATCH] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compat

[clang] [clang] Predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes (PR #127568)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/127568 This patch makes Clang predefine `_CRT_USE_BUILTIN_OFFSETOF` in MS-compatible modes. The macro can make the `offsetof` provided by MS UCRT's `` to select the `__builtin_offsetof` version, so with it Cla

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-17 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-17 Thread A. Jiang via cfe-commits
@@ -0,0 +1,70 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-17 Thread A. Jiang via cfe-commits
@@ -0,0 +1,70 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
@@ -0,0 +1,644 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
@@ -0,0 +1,644 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
@@ -0,0 +1,638 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-16 Thread A. Jiang via cfe-commits
@@ -0,0 +1,638 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-14 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > > > @frederick-vs-ja just follow up on this, is there anything else I need to > > > address for this PR? > > > > > > It looks like you are missing the Release Notes entry, FTM is not set, etc. > > house keeping stuff. Please check some other complete PRs for what else

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-02-14 Thread A. Jiang via cfe-commits
@@ -0,0 +1,638 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

2025-02-14 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: @Endilll These checks (modified by #95474) and the newly added [`clang/test/SemaCXX/constant-expression-p2280r4.cpp`](https://github.com/llvm/llvm-project/blob/d3d2ea67585f119c99af66a343f19f237891890e/clang/test/SemaCXX/constant-expression-p2280r4.cpp) are relevant. http

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

2025-02-14 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/127166 >From a2fc3d0550ab22e1a4273dc2debfda23df7cad6f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Fri, 14 Feb 2025 14:03:23 +0800 Subject: [PATCH 1/2] [clang][docs] Fix DR staus for P2280R4 P2280R4 is offi

[clang] [clang][docs] Fix DR status for P2280R4 (PR #127166)

2025-02-14 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/127166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Fix DR staus for P2280R4 (PR #127166)

2025-02-13 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/127166 P2280R4 is officially a defect report. Although Clang 20 only implementated it for C++23 and later, and #95474 accidently removed the DR status in `cxx_status.html`. I think we should mention that it is

[clang] Update __cpp_concepts macro (PR #87998)

2025-02-06 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/87998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Clarify the tail padding considered by `__datasizeof` (PR #125981)

2025-02-05 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/125981 Some tail padding are not reusable due to the ABI specification, and `__datasizeof` intentionally doesn't consider them. Closes #125863. >From 0577594d4ecbbae6e61e087ce16609469d5f459c Mon Sep 17 00:00:

[clang] [Clang] use constant evaluation context for constexpr if conditions (PR #123667)

2025-01-20 Thread A. Jiang via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -std=c++26 -verify %s frederick-vs-ja wrote: I think it would be better to verify that this is OK since C++20. https://github.com/llvm/llvm-project/pull/123667 ___ cfe-commits maili

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-19 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > > This seems related to #85995. Do you plan to fix that issue together? > > I wasn't planning on fixing Clang's ``, I thought it would be > better handled by the maintainers of the standard library, but I can do it if > you want. > > Do you want me to do it? Oh, I di

[clang] [Clang] Add predefined macros for integer constants to implement section 7.18.4 of ISO/IEC 9899:1999 in `` in a safe way (PR #123514)

2025-01-19 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: This seems related to #85995. Do you plan to fix that issue together? https://github.com/llvm/llvm-project/pull/123514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-11 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-09 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++][ranges] P2542R8: Implement `views::concat` (PR #120920)

2025-01-09 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-08 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Do we want to add some workaround to libc++'s ``? https://github.com/llvm/llvm-project/pull/102857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,71 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,38 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,79 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-07 Thread A. Jiang via cfe-commits
@@ -0,0 +1,637 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-06 Thread A. Jiang via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-05 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: We also need to export `std::ranges::concat_view` and `std::ranges::views::concat` in `main/libcxx/modules/std/ranges.inc`. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-05 Thread A. Jiang via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-05 Thread A. Jiang via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [Clang][Headers] Workaround for UCRT's `` in `` (PR #121650)

2025-01-04 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/121650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Headers] Workaround for UCRT's `` in `` (PR #121650)

2025-01-04 Thread A. Jiang via cfe-commits
@@ -28,6 +28,30 @@ #define _TG_ATTRSp __attribute__((__overloadable__)) #define _TG_ATTRS __attribute__((__overloadable__, __always_inline__)) +// https://github.com/llvm/llvm-project/issues/45552 +// workaround for MS UCRT's +#if defined(_VCRUNTIME_H) && defined(_C_COMPLEX_T

[clang] [Clang][Headers] Workaround for UCRT's `` in `` (PR #121650)

2025-01-04 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/121650 This patch uses `__builtin_bit_cast` as workaround to make MS UCRT's non-conforming functions `` usable for ``. Fixes #45552. >From 0366072ca42ec9773897daabf7946eb37c631623 Mon Sep 17 00:00:00 2001 Fro

[clang] [Clang][Sema] fix deducing auto& from const int in template parameters is impossible in partial specializations (PR #79733)

2025-01-03 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/79733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2024-12-31 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. https://github.com/llvm/llvm-project/pull/120920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2024-12-31 Thread A. Jiang via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [Clang] CWG722: nullptr to ellipses (PR #104704)

2024-12-30 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/104704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG2351 `void{}` (PR #78060)

2024-12-30 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja edited https://github.com/llvm/llvm-project/pull/78060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2024-12-30 Thread A. Jiang via cfe-commits
@@ -0,0 +1,626 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2024-12-30 Thread A. Jiang via cfe-commits
@@ -0,0 +1,626 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

  1   2   >