[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-12 Thread A. Jiang via cfe-commits
@@ -320,6 +321,69 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===--===// +static bool namedTypeToLengthModifierKind(QualType QT, +

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-11 Thread A. Jiang via cfe-commits
@@ -6726,17 +6726,67 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { return getTypeDeclType(const_cast(Decl)); } +// Inject __size_t, __signed_size_t, and __ptrdiff_t to provide portable hints +// and diagnostics. In C and C++, expressions of type size_t

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t literals be typedefs instead of built-in types (PR #143653)

2025-06-11 Thread A. Jiang via cfe-commits
@@ -6726,17 +6726,67 @@ QualType ASTContext::getTagDeclType(const TagDecl *Decl) const { return getTypeDeclType(const_cast(Decl)); } +// Inject __size_t, __signed_size_t, and __ptrdiff_t to provide portable hints +// and diagnostics. In C and C++, expressions of type size_t

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

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

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

2025-06-03 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > I am assuming you want to handle the libc++ changes separately? (They would > need tests/status update) Yeah. I guess it's better to separate the changes in two PRs, as combination of another library implementation with Clang will benefit slightly more quickly. https:

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

2025-06-03 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/142554 >From bb6bba3dd7f58c08043a91ee56e9e219f5185668 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 3 Jun 2025 17:40:30 +0800 Subject: [PATCH] [Clang] Implement LWG3819 for `__reference_meows_from_tempo

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

2025-06-03 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/142554 >From 4a98b75bcabd0f524988fbd63caedd0ecbad5810 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 3 Jun 2025 17:40:30 +0800 Subject: [PATCH] [Clang] Implement LWG3819 for `__reference_meows_from_tempo

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

2025-06-03 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/142554 >From 81d30c987905ad7bdfbc6c92939a7e80a45d3a79 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Tue, 3 Jun 2025 16:46:32 +0800 Subject: [PATCH] [Clang] Implement LWG3819 for `__reference_meows_from_tempo

[clang] [Clang] Implement LWG3819 for `__reference_meows_from_temporary` (PR #142554)

2025-06-03 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/142554 Also fix use cases for function reference binding (`__reference_binds_to_temporary` is also affected despite being deprecated). Fixes #114344. Towards #105079. >From ebef8016c92db485b1efe359c576a479709

[clang] [clang][docs] Fix docs-clang-html. (PR #142387)

2025-06-02 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: I wonder whether it would be better to modify `.github/workflows/docs.yml` together. It seems that modification of some transitively included td files doesn't trigger CI for documentation. https://github.com/llvm/llvm-project/pull/142387 _

[clang] [Clang] Properly deprecate `__reference_binds_to_temporary` (PR #141909)

2025-05-29 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: It seems that we should avoid using `__reference_binds_to_temporary` in libc++'s `` first. https://github.com/llvm/llvm-project/pull/141909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [Clang] Properly deprecate `__reference_binds_to_temporary` (PR #141909)

2025-05-29 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/141909 At the time `__reference_constructs_from_temporary` got implemented, `__reference_binds_to_temporary` was mentioned as deprecated in `LanguageExtensions.rst`, but no deprecation warning was emitted. Thi

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-26 Thread A. Jiang via cfe-commits
@@ -17,16 +17,37 @@ #include <__type_traits/is_reference.h> #include <__type_traits/remove_cvref.h> #include <__type_traits/remove_reference.h> +#include <__type_traits/type_identity.h> #include <__utility/declval.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pra

[clang] [libcxx] [Clang] Add __builtin_common_reference (PR #121199)

2025-05-25 Thread A. Jiang via cfe-commits
@@ -3231,6 +3241,230 @@ static QualType builtinCommonTypeImpl(Sema &S, TemplateName BaseTemplate, } } +static QualType CopyCV(QualType From, QualType To) { + if (From.isConstQualified()) +To.addConst(); + if (From.isVolatileQualified()) +To.addVolatile(); + retur

[clang] [Clang][AST] Fix HandleLValueBase to deal with references (PR #140105)

2025-05-25 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > @frederick-vs-ja Were you able to create a PR for this backport? I created #140246 for this backport, and that PR is already merged. https://github.com/llvm/llvm-project/pull/140105 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Fix a regression introduced by #140576 (PR #140859)

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

[clang] [Clang] Set the final date for workaround for libstdc++'s `format_kind` (PR #140831)

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

[clang] [Clang] Set the final date for workaround for libstdc++'s `format_kind` (PR #140831)

2025-05-20 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/140831 We can use 20250520 as the final date, see the following commits. - GCC releases/gcc-15 branch: - https://gcc.gnu.org/g:fedf81ef7b98e5c9ac899b8641bb670746c51205 - https://gcc.gnu.org/g:53680c1aa92d9f7

[clang] [Clang][AST] Fix HandleLValueBase to deal with references (PR #140105)

2025-05-16 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: /cherry-pick 136f2ba2a7bca015ef831c91fb0db5e5e31b7632 https://github.com/llvm/llvm-project/pull/140105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AST] Fix HandleLValueBase to deal with references (PR #140105)

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

[clang] [Clang][Sema] Handle invalid variable template specialization whose type depends on itself (PR #134522)

2025-05-09 Thread A. Jiang via cfe-commits
@@ -47,3 +47,21 @@ namespace InvalidInsertPos { template<> int v; int k = v; } + +namespace GH51347 { + template + auto p = p; // expected-error {{the type of variable template specialization 'p'}} frederick-vs-ja wrote: It seems that [[temp.res.gener

[clang] [llvm] [Clang][C++23] Core language changes from P1467R9 extended floating-point types and standard names. (PR #78503)

2025-04-24 Thread A. Jiang via cfe-commits
@@ -470,8 +470,16 @@ static void InitializeStandardPredefinedMacros(const TargetInfo &TI, if (LangOpts.CPlusPlus26) // FIXME: Use correct value for C++26. Builder.defineMacro("__cplusplus", "202400L"); -else if (LangOpts.CPlusPlus23) +else if (LangOpts.

[clang] [llvm] Branch1 (PR #136834)

2025-04-23 Thread A. Jiang via cfe-commits
https://github.com/frederick-vs-ja requested changes to this pull request. IIUC the changes should go to some test file, not `clang/lib/AST/ASTConsumer.cpp`. https://github.com/llvm/llvm-project/pull/136834 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang] Make the result type of sizeof/pointer subtraction/size_t lit… (PR #136542)

2025-04-21 Thread A. Jiang via cfe-commits
@@ -4026,10 +4026,20 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { // Does it fit in size_t? if (ResultVal.isIntN(SizeTSize)) { // Does it fit in ssize_t? - if (!Literal.isUnsigned && ResultVal[SizeTSize - 1] =

[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

  1   2   >