[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-24 Thread Corentin Jabot via cfe-commits
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1); } + +if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnost

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash on invalid concept (PR #150186)

2025-07-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/150186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash on invalid concept (PR #150186)

2025-07-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/150186 Fixes #149986 >From 44e0a15203f0d579c6c78ddf135a4f76e164b642 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 23 Jul 2025 10:31:49 +0200 Subject: [PATCH] [Clang] Fix a crash on invalid concept Fixes #

[clang] [Clang][RFC] Do not eat SFINAE diagnostics for explicit template arguments (PR #139066)

2025-07-23 Thread Corentin Jabot via cfe-commits
@@ -12166,6 +12174,15 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, diag::note_ovl_candidate_explicit_arg_mismatch_unnamed) << (index + 1); } + +if (PartialDiagnosticAt *PDiag = DeductionFailure.getSFINAEDiagnost

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-23 Thread Corentin Jabot via cfe-commits
@@ -983,6 +983,7 @@ Bug Fixes to C++ Support non-empty initializer list. (#GH147949) - Fixed constant evaluation of equality comparisons of constexpr-unknown references. (#GH147663) - Diagnose binding a reference to ``*nullptr`` during constant evaluation. (#GH48665) +- Sup

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-23 Thread Corentin Jabot via cfe-commits
@@ -547,6 +547,12 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: +// Suppress -Wdeprecated-declarations in purely implicit special-member cor3ntin wrote: ```suggestion // Suppress -Wdeprec

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-07-23 Thread Corentin Jabot via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: @@ -98,7 +100,11 @@ class FrontendAction { /// /// This is guaranteed to only be called following a successful call to /// BeginSourceFileAction (and

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-07-23 Thread Corentin Jabot via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/cor3ntin approved this pull request. LGTM. Please wait ~20h in case @AaronBallman @erichkeane have further comments https://github.com/llvm/llvm-project/pu

[clang] [clang][bytecode] Only implicitly start lifetime of trivially-default-constructible union members (PR #149835)

2025-07-21 Thread Corentin Jabot via cfe-commits
@@ -25,11 +25,18 @@ using APSInt = llvm::APSInt; namespace clang { namespace interp { +static bool hasTrivialDefaultCtorParent(const FieldDecl *FD) { + assert(FD); + assert(FD->getParent()->isUnion()); + const auto *CXXRD = dyn_cast(FD->getParent()); + return !CXXRD || CXX

[clang] [Clang] Fix a partial ordering bug involving CTAD injected template arguments (PR #149782)

2025-07-21 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/149782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Be less strict about diagnosing null pointer dereference. (PR #149648)

2025-07-19 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: /cherry-pick c43f828 https://github.com/llvm/llvm-project/pull/149648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Be less strict about diagnosing null pointer dereference. (PR #149648)

2025-07-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin milestoned https://github.com/llvm/llvm-project/pull/149648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Be less strict about diagnosing null pointer dereference. (PR #149648)

2025-07-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/149648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Be less strict about diagnosing null pointer dereference. (PR #149648)

2025-07-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/149648 >From 5cbf868adba8682cc20e4647085ce6361d61455e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Sat, 19 Jul 2025 12:38:20 +0200 Subject: [PATCH 1/2] [Clang] Be less strict about diagnosing null pointer dere

[clang] [Clang] Be less strict about diagnosing null pointer dereference. (PR #149648)

2025-07-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/149648 In #143667, we made constant evaluation fail on `*null_ptr`, as this is UB. However, `&(*(foo*)0)` seems to be a common pattern, which made #143667 too disruptive. So instead of failing the evaluation, we not

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -8392,17 +8392,19 @@ def ext_default_init_const : ExtWarn< "is a Microsoft extension">, InGroup; def err_delete_operand : Error<"cannot delete expression of type %0">; +def err_delete_void_ptr_operand : Error< + "cannot delete expression with pointer-to-'void' type %0">

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/149406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/149406

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -8392,17 +8392,19 @@ def ext_default_init_const : ExtWarn< "is a Microsoft extension">, InGroup; def err_delete_operand : Error<"cannot delete expression of type %0">; +def err_delete_void_ptr_operand : Error< + "cannot delete expression with pointer-to-'void' type %0">

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -8392,17 +8392,19 @@ def ext_default_init_const : ExtWarn< "is a Microsoft extension">, InGroup; def err_delete_operand : Error<"cannot delete expression of type %0">; +def err_delete_void_ptr_operand : Error< + "cannot delete expression with pointer-to-'void' type %0">

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -8392,17 +8392,19 @@ def ext_default_init_const : ExtWarn< "is a Microsoft extension">, InGroup; def err_delete_operand : Error<"cannot delete expression of type %0">; +def err_delete_void_ptr_operand : Error< + "cannot delete expression with pointer-to-'void' type %0">

[clang] More fixes for P3144R2 implementation (PR #149406)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/149406 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/149504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Use bytecode interpreter in isPotentialConstantExprU… (PR #149462)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/149462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/149504 >From f34d340f59e742f6e75397043b0bed8faed7d94a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 18 Jul 2025 10:27:44 +0200 Subject: [PATCH 1/2] [Clang] Do not assume a perfect match is a better match t

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/149504 This fixes a regression introduced by the "perfect match" overload resolution mechanism introduced in 8c5a307. [This does regress the performance noticeably (-0.7% for a stage 2 build)](https://llvm-compile-t

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. There is still unaddressed feedback https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -547,6 +547,15 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: +// Suppress -Wdeprecated-declarations in purely implicit special-member functions. +if (auto *MD = dyn_cast_if_present(S.getCurFunctionDecl

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Corentin Jabot via cfe-commits
@@ -24,3 +24,8 @@ constexpr void other_func() { throw 12; } + +// Make sure these don't trigger the diagnostic. +extern const bool& b; +constexpr bool fun1() { return b; } +constexpr bool fun2(const bool& b) { return b; } cor3ntin wrote: Can you reference t

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Corentin Jabot via cfe-commits
@@ -357,3 +357,27 @@ namespace pointer_comparisons { static_assert(!f4()); // expected-error {{static assertion expression is not an integral constant expression}} \ // expected-note {{in call to 'f4()'}} } + +namespace enable_if_1 { + template <__SI

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/149227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix potential constant expression checking with constexpr-unknown. (PR #149227)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM (presumably, we want to backport that) https://github.com/llvm/llvm-project/pull/149227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Clang] Ensure correct parameters are in the scope for constraint equivalence checking (PR #149264)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/149264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Diagnose dereferencing a null pointer (PR #149330)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks. (Note that this does not cover the case of forming a reference to a one-past-the-end object, which is covered by the same wording, but if you don't already do that, it can be a separate pr. https://github.com/llvm/llvm-proje

[clang] Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (PR #149272)

2025-07-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: /cherry-pick 28e1e7e https://github.com/llvm/llvm-project/pull/149272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (PR #149272)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin milestoned https://github.com/llvm/llvm-project/pull/149272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Improve clarity of the implicit declaration diagnostic (PR #149314)

2025-07-17 Thread Corentin Jabot via cfe-commits
@@ -816,11 +816,12 @@ def warn_unreachable_association : Warning< /// Built-in functions. def ext_implicit_lib_function_decl : ExtWarn< - "implicitly declaring library function '%0' with type %1">, - InGroup; + "implicitly declaring library function '%0' with%select{| stan

[clang] Improve clarity of the implicit declaration diagnostic (PR #149314)

2025-07-17 Thread Corentin Jabot via cfe-commits
@@ -716,6 +716,10 @@ Improvements to Clang's diagnostics Added a new warning in this group for the case where the attribute is missing/implicit on an override of a virtual method. + - Reworded the ``-Wimplicit-function-declaration`` diagnostic to make it more + clear th

[clang] Improve clarity of the implicit declaration diagnostic (PR #149314)

2025-07-17 Thread Corentin Jabot via cfe-commits
@@ -376,6 +376,33 @@ class Context { return getInfo(ID).Header.getName(); } + /// Returns true if a library function is declared within a C or C++ standard + /// header (like stdio.h) or POSIX header (like malloc.h), false if the + /// function is not declared within

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Sorry for the inconvenience. It was clearly not the right solution in hindsight. It may take me a while to figure out how to approach a fix to https://github.com/llvm/llvm-project/issues/147374 https://github.com/llvm/llvm-project/pull/148613 ___

[clang] Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (PR #149272)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/149272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang] Do not treat Foo -> const Foo conversion sequences as perfect" (PR #149272)

2025-07-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/149272 Reverts llvm/llvm-project#148613 Considering object argument conversion qualifications perfect leads to situations where we prefer a non-template const qualified function over a non-qualified template functio

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks for the heads up! I'm looking into it. Reduced to ```cpp struct TmsException { int _what; const char* what() const; template int& what() & { return _what; } }; int main() { TmsException E; E.what() = 42; }``` https://github.com/llvm/llvm-project/pull/148613

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/143667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks! I'll merge this later today, unless @Bigcheese has opinions https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > Should I submit another PR to convert the spaces in these two places? > @cor3ntin No, please add a commit to your branch (and push), it will update this PR! Thanks https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits ma

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo whitespaces changes. Thanks for the fix https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
@@ -10642,7 +10642,7 @@ def warn_dangling_reference_captured_by_unknown : Warning< "the full-expression">, InGroup; def warn_experimental_lifetime_safety_dummy_warning : Warning< - "todo: remove this warning after we have atleast one warning based on the lifetime analys

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo the whitespace-only changes https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
@@ -12540,7 +12540,7 @@ def warn_zero_as_null_pointer_constant : Warning< InGroup>, DefaultIgnore; def warn_not_eliding_copy_on_return : Warning< - "not eliding copy on return">, + "not eliding copy on return">, cor3ntin wrote: Can you revert this whites

[clang] [Clang] Fix export declaration diagnostic message (PR #149059)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/149059 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143667 >From a3f85983a8ab50de52c1e4825f490120e8ecdac2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 2 Jul 2025 15:55:41 +0200 Subject: [PATCH 1/7] Diagnose all dereferences of null pointers --- clang/docs

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143667 >From a3f85983a8ab50de52c1e4825f490120e8ecdac2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 2 Jul 2025 15:55:41 +0200 Subject: [PATCH 1/7] Diagnose all dereferences of null pointers --- clang/docs

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143667 >From a3f85983a8ab50de52c1e4825f490120e8ecdac2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 2 Jul 2025 15:55:41 +0200 Subject: [PATCH 1/7] Diagnose all dereferences of null pointers --- clang/docs

[clang] Check if clang::FieldDecl has constant-integer bit width before getting the width (PR #148692)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++] Fix a failed assertion with nullability checking (PR #148881)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash when parsing an invalid `decltype` (PR #148798)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Diagnose forming references to nullptr (PR #143667)

2025-07-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @AaronBallman @philnik777 you have more feedback? https://github.com/llvm/llvm-project/pull/143667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a crash when parsing an invalid `decltype` (PR #148798)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/148798 >From c80347a825264474a51ee6e638434d3454a0a7e3 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 15 Jul 2025 09:38:59 +0200 Subject: [PATCH 1/2] [Clang] Fix a crash when parsing an invalid `decltype` We

[clang] [Clang] Remove explicit object from non member function. (PR #148807)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove explicit object from non member function. (PR #148807)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/148807 >From 25d5589b47b39779958c94011814cb68fd7ea374 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 15 Jul 2025 11:06:03 +0200 Subject: [PATCH] [Clang] Remove explicit object from non member function. To a

[clang] [Clang] Remove explicit object from non member function. (PR #148807)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/148807 To avoid crashing later (as we assume only member functions can have explicit parameters) Fixes #113185 >From bf204f023a4f84732c5876ff86e7de603fd95aac Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue,

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reduce the size of ParsedAttributesView and AttributePool (PR #148726)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reduce the small vector size for DeclTypeInfo. (PR #148788)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Check if clang::FieldDecl has constant-integer bit width before getting the width (PR #148692)

2025-07-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can you add tests (and a release note) Thanks! https://github.com/llvm/llvm-project/pull/148692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an issue where we erroneously diagnose a `[[noreturn]]` function with `warn_suggest_noreturn_function` (PR #148695)

2025-07-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix an issue where we erroneously diagnose a `[[noreturn]]` function with `warn_suggest_noreturn_function` (PR #148695)

2025-07-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > It seems that #148552 has fixed this issue. Indeed. We appreciate the work you put in the PR though, thanks :) https://github.com/llvm/llvm-project/pull/148695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [clang][NFC] Fix typos and grammar in comments in ASTDiagnostic (PR #148359)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/148613 >From d782c0b1ab000d3ff8573a60ed978cced4df3a66 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 14 Jul 2025 13:34:26 +0200 Subject: [PATCH] [Clang] Do not treat Foo -> const Foo conversion sequences as

[clang] [clang][NFC] Add header comment for OSLog.cpp (PR #148537)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit -Wmissing-noreturn when [[noreturn]] is present (PR #148552)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/148552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/148613 For implicit object arguments. This fixes a regression introduced by the "perfect match" overload resolusion mechanism introduced in #8c5a307. Note that GCC allows the ambiguity between a const and non-const c

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
@@ -133,7 +133,8 @@ C++2c Feature Support - Implemented `P0963R3 Structured binding declaration as a condition `_. -- Implemented `P2719R4 Type-aware allocation and deallocation functions `_. +- Implemented `P2719R5 Type-a

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
@@ -10081,11 +10081,8 @@ def err_destroying_operator_delete_not_usual : Error< def err_type_aware_destroying_operator_delete : Error< "destroying delete is not permitted to be type aware">; -def ext_cxx26_type_aware_allocators : ExtWarn< - "type aware allocators are a C++2c

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Can you update the release notes? The entry is in C++2c support, it should be... under New Feature, perhaps? > - Implemented `P2719R4 Type-aware allocation and deallocation functions > `_ **as an extension** in all(?) C++ language

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Consider default template arguments when synthesizing CTAD guides (PR #147675)

2025-07-13 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/147675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-07-13 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I opened #148552 https://github.com/llvm/llvm-project/pull/146234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit -Wmissing-noreturn when [[noreturn]] is present (PR #148552)

2025-07-13 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/148552 Fix a false positve warning which was introduced by #146234. >From 97211f696179361a2d64d533aa727e3ec1d00b53 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 14 Jul 2025 00:13:52 +0200 Subject: [PATCH]

[clang] [clang] [Sema] Suggest [[noreturn]] for void functions that always throw (PR #146234)

2025-07-13 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This fails for templates https://compiler-explorer.com/z/x6a8G13Ms Presumably because of #37650 @snarang181 @erichkeane https://github.com/llvm/llvm-project/pull/146234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Sema] Remove an unnecessary cast (NFC) (PR #148531)

2025-07-13 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Fix template arguments in local classes (PR #121225)

2025-07-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/121225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][P1061] Fix template arguments in local classes (PR #121225)

2025-07-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/121225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Remove unnecessary casts (NFC) (PR #148338)

2025-07-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix typos and grammar in comments in ASTDiagnostic (PR #148359)

2025-07-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/148359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-07-11 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM once the changelog is updated https://github.com/llvm/llvm-project/pull/144270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

2025-07-11 Thread Corentin Jabot via cfe-commits
@@ -690,6 +690,9 @@ Improvements to Clang's diagnostics - Clang now tries to avoid printing file paths that contain ``..``, instead preferring the canonical file path if it ends up being shorter. +- Improve the diagnostics for placement new expression when const-qualified +

[clang] [clang-tools-extra] [lldb] [Clang][AST][NFC] (`RecordDecl` -> `CXXRecordDecl`)`::isInjectedClassName` (PR #148195)

2025-07-11 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can you provide a more detailed description? Thanks! https://github.com/llvm/llvm-project/pull/148195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Build argument string for clang::warn_unused_result (PR #148090)

2025-07-11 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM with a release note Please give some time for @AaronBallman to look at this change too https://github.com/llvm/llvm-project/pull/148090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Build argument string for clang::warn_unused_result (PR #148090)

2025-07-11 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the most adapted to the change, and referencing any Github issue this change fixes. Thanks! https://github.com/llvm/llvm-project/pull/148090 ___

[clang] [Clang][Doc] Add Changelog line for (#144886) (PR #147978)

2025-07-11 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/147978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Ignore invalid base classes (PR #147213)

2025-07-10 Thread Corentin Jabot via cfe-commits
@@ -2252,7 +2252,7 @@ void Parser::ParseBaseClause(Decl *ClassDecl) { while (true) { // Parse a base-specifier. BaseResult Result = ParseBaseSpecifier(ClassDecl); -if (Result.isInvalid()) { +if (!Result.isUsable()) { cor3ntin wrote: Result ca

  1   2   3   4   5   6   >