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

2025-07-08 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] Do not mark ambiguous specialization invalid. (PR #147275)

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

[clang] [Clang] Fix crash on `void{}` (PR #147514)

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

[clang] [Clang] Set the FTM for trivial relocation (PR #142936)

2025-07-08 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > @cor3ntin I think Apple Clang still complicates version detection, and we > can't use __has_builtin, because that's returned true for versions of Clang > where it's "broken" from libc++'s perspective. `__builtin_is_cpp_trivially_relocatable` is new in 21, it was never shipped

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147514 >From 17b593283e1a95ca12ee314140910b3f634a2a33 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH 1/3] [Clang] Fix crash on `void{}` Caused by an incorrect asser

[clang] [Clang] Better handle overload of explicit object member functions (PR #147498)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147498 >From 90648944f6e27de2b150f33887798c221bbb19b4 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 11:53:21 +0200 Subject: [PATCH 1/2] [Clang] Better handle overload of explicit object member f

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH 1/4] [Clang] Do not mark ambiguous specialization invalid. When

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH 1/3] [Clang] Do not mark ambiguous specialization invalid. When

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147514 >From 4b536efe500f3b9099d1cf1a1a8775633e193249 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH 1/3] [Clang] Fix crash on `void{}` Caused by an incorrect asser

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -13,4 +13,7 @@ void f() { void(); } +// CHECK: define{{.*}} void @_ZN8GH1164401fEv() cor3ntin wrote: oups! https://github.com/llvm/llvm-project/pull/147514 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147514 >From 4b536efe500f3b9099d1cf1a1a8775633e193249 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH 1/2] [Clang] Fix crash on `void{}` Caused by an incorrect asser

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

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

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -4111,7 +4111,10 @@ static ActionResult getPatternForClassTemplateSpecialization( if (Ambiguous) { // Partial ordering did not produce a clear winner. Complain. Inst.Clear(); - ClassTemplateSpec->setInvalidDecl(); + + if (!S.isS

[clang] [Clang] Fix crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -5,3 +5,12 @@ void f() // CHECK: store i32 0 int i{}; } + + +namespace GH116440 { +void f() { + void{}; + void(); +} cor3ntin wrote: What do you want me to check? noting is emitted https://github.com/llvm/llvm-project/pull/147514 ___

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

2025-07-08 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 crash on `void{}` (PR #147514)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147514 Caused by an incorrect assertion. Fixes #116440 >From 4b536efe500f3b9099d1cf1a1a8775633e193249 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Tue, 8 Jul 2025 14:34:16 +0200 Subject: [PATCH] [Clang] Fix c

[clang] [clang][bytecode] Fix __builtin_is_within_lifetime in initializers (PR #147480)

2025-07-08 Thread Corentin Jabot via cfe-commits
@@ -2208,15 +2208,27 @@ static bool interp__builtin_is_within_lifetime(InterpState &S, CodePtr OpPC, if (Ptr.isOnePastEnd()) return Error(1); - bool Result = true; + bool Result = Ptr.getLifetime() != Lifetime::Ended; if (!Ptr.isActive()) { Result = false;

[clang] [libcxx] [libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

2025-07-08 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks! https://github.com/llvm/llvm-project/pull/144220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libc++][Clang] Added explanation why is_constructible evaluated to false. Updated the diagnostics checks in libc++ tests. (PR #144220)

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

[clang] [Clang] Fix template arguments collection for out-of-line declarations (PR #147463)

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

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

2025-07-08 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] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-08 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] [Clang] Better handle overload of explicit object member functions (PR #147498)

2025-07-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147498 ```cpp struct A { constexpr int f() const { return 1; } // #1 }; struct B : A { using A::f; constexpr int f(this A) { return 2; } }; static_assert(B{}.f() == 1); ``` In the above scenario, we fai

[clang] Report wider source range for unsafe buffers warnings (PR #147363)

2025-07-07 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/147363 ___

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: There is divergence between C and C++, I sent a mail to core https://lists.isocpp.org/liaison/2025/07/1549.php https://github.com/llvm/llvm-project/pull/147308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147046 >From a54b4f8120460c4374422c9847c22aed0ef8665f Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 4 Jul 2025 12:16:02 +0200 Subject: [PATCH 1/2] [Clang] Correctly handle taking the address of an explicit

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -477,3 +477,8 @@ namespace P2361 { } alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}} + +namespace GH147217 { + [[clang::annotate(#)]] void a(); // expected-error {{'#' is not allowed in attribute argument

[clang] [Clang] disallow # operators in attribute argument lists (PR #147308)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -488,6 +488,13 @@ unsigned Parser::ParseAttributeArgsCommon( bool AttributeHasVariadicIdentifierArg = attributeHasVariadicIdentifierArg(*AttrName, Form.getSyntax(), ScopeName); + if (Tok.is(tok::hash) || Tok.is(tok::hashhash)) { cor3ntin wrote: W

[clang] [clang] more useful error message for decomposition declaration missing initializer (PR #127924)

2025-07-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @kbrav Are you still working on this? @AaronBallman left a few comments https://github.com/llvm/llvm-project/pull/127924 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH 1/2] [Clang] Do not mark ambiguous specialization invalid. When

[clang] [Clang] A lone `[` does not an attribute make (PR #147306)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147306 In some tentative parses, we would always consider `[` as the start of an attribute - only `[[` should be. Fixes #63880 >From b47ae00ae1971d0d57d2a4b5da1cf8f02a0c1194 Mon Sep 17 00:00:00 2001 From: Corentin J

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147275 >From 346ac892d7575ac779295b9db11bc895f37f160e Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 7 Jul 2025 12:41:53 +0200 Subject: [PATCH] [Clang] Do not mark ambiguous specialization invalid. When a s

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

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

[clang] [clang] Fix manual memory management with SmallVector in ConceptRef (PR #147231)

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

[clang] [clang] Remove source range from CXXOperatorCallExpr (PR #147028)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. I'm happy to approve as is then https://github.com/llvm/llvm-project/pull/147028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang][modules-driver] Add scanner to detect C++20 module presence" (PR #147286)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147286 Reverts llvm/llvm-project#145220 This breaks CI when building the documentation ``` Included from /home/runner/work/llvm-project/llvm-project/clang/docs/../include/clang/Basic/Diagnostic.td:74: /home/runner/w

[clang] [clang-cl] Support /stdc:latest (PR #147284)

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

[clang] [clang-cl] Support /stdc:latest (PR #147284)

2025-07-07 Thread Corentin Jabot via cfe-commits
@@ -248,7 +248,9 @@ C Language Changes not valid in C++. - The ``[[clang::assume()]]`` attribute is now correctly recognized in C. The ``__attribute__((assume()))`` form has always been supported, so the fix is - specific to the attribute syntax used. + specific to the at

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

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

[clang] [Clang] Do not mark ambiguous specialization invalid. (PR #147275)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147275 When a specialization was ambiguous, we would mark it as invalid, even if the specialization occured in an immediate context. This would subsequently lead to scenarios where invalid specialization produced no

[clang] [Clang] accept @tparam on variable template partial specializations (PR #147219)

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

[clang] Sema: filter out invalid base-specifiers before attaching (PR #147213)

2025-07-07 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this Did you try to use `!isUsable` instead of IsInvalid in `ParseBaseSpecifier` ? I think that might be a simpler fix. --- This change needs a release note. Please add an entry to `clang/docs/ReleaseNotes.rst` in the section the mo

[clang] [clang] Fix manual memory management with SmallVector in ConceptRef (PR #147231)

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

[clang] [clang][diagnostics] Refactor "warn_doc_container_decl_mismatch" to use enum_select (PR #147120)

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

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

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

[clang] [clang][diagnostics] Refactor "warn_doc_api_container_decl_mismatch" to use enum_select (PR #146433)

2025-07-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. thanks. will you need us to merge that for you? https://github.com/llvm/llvm-project/pull/146433 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

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

[clang] [clang] Remove source range from CXXOperatorCallExpr (PR #147028)

2025-07-04 Thread Corentin Jabot via cfe-commits
@@ -158,9 +158,9 @@ class CXXOperatorCallExpr final : public CallExpr { : getOperatorLoc(); } - SourceLocation getBeginLoc() const { return Range.getBegin(); } - SourceLocation getEndLoc() const { return Range.getEnd(); } - SourceRange getSourceRange() cons

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-04 Thread Corentin Jabot via cfe-commits
@@ -750,6 +750,8 @@ Bug Fixes in This Version - Fixed an infinite recursion when checking constexpr destructors. (#GH141789) - Fixed a crash when a malformed using declaration appears in a ``constexpr`` function. (#GH144264) - Fixed a bug when use unicode character name in mac

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

2025-07-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: LGTM but please give @AaronBallman a chance to comment, as this reverts a previous patch of his (which I think was too clever)! https://github.com/llvm/llvm-project/pull/147030 ___ cfe-commits mailing list cfe-co

[clang] [win][clang] Do not inject static_assert macro definition (PR #147030)

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

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-04 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > but causes a crash ([example](https://godbolt.org/z/oo198z8Gh)). So I haven't > added those cases, but left a `TODO`. Should I leave a `TODO: PR 146649` > instead? I opened [147046](https://github.com/llvm/llvm-project/pull/147046) https://github.com/llvm/llvm-project/pul

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

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

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/147046 >From a54b4f8120460c4374422c9847c22aed0ef8665f Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 4 Jul 2025 12:16:02 +0200 Subject: [PATCH] [Clang] Correctly handle taking the address of an explicit obj

[clang] [Clang] Correctly handle taking the address of an explicit object member function template (PR #147046)

2025-07-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/147046 When implementing #93430, I failed to consider some cases involving function templates. ``` struct A { template void a(this T self); }; (&A::a)(A{}); ``` This fixes that >From a6a16e1ac8ed9324f6efb

[clang] [Clang][NFC] Avoid copies by using std::move (PR #146960)

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

[clang] [Clang][Sema] Do not perform error recovery for invalid member using-declaration in C++20+ mode (PR #147003)

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

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

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

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-04 Thread Corentin Jabot via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146890 >From c138801c212f69f4dee83c7516e0e77eb876a9f0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 14:26:59 +0200 Subject: [PATCH 1/4] [Clang] Correctly handle allocations in the condition of a

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

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

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146890 >From c138801c212f69f4dee83c7516e0e77eb876a9f0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 14:26:59 +0200 Subject: [PATCH 1/3] [Clang] Correctly handle allocations in the condition of a

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -20629,6 +20629,9 @@ Sema::ConditionResult Sema::ActOnCondition(Scope *S, SourceLocation Loc, case ConditionKind::ConstexprIf: Cond = CheckBooleanCondition(Loc, SubExpr, true); +assert(isa(Cond.get()) && cor3ntin wrote: Actually the assert was i

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146890 >From c138801c212f69f4dee83c7516e0e77eb876a9f0 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 14:26:59 +0200 Subject: [PATCH 1/2] [Clang] Correctly handle allocations in the condition of a

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -1931,15 +1931,13 @@ Parser::ParseCXXCondition(StmtResult *InitStmt, SourceLocation Loc, return ParseCXXCondition(nullptr, Loc, CK, MissingOK); } -ExprResult Expr = [&] { - EnterExpressionEvaluationContext Eval( - Actions, Sema::ExpressionEvalua

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
@@ -20629,6 +20629,9 @@ Sema::ConditionResult Sema::ActOnCondition(Scope *S, SourceLocation Loc, case ConditionKind::ConstexprIf: Cond = CheckBooleanCondition(Loc, SubExpr, true); +assert(isa(Cond.get()) && cor3ntin wrote: Good catch! https://gith

[clang] [Clang] Correctly handle allocations in the condition of a `if constexpr` (PR #146890)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/146890 Deal with the following scenario ```cpp struct S { char* c = new char; constexpr ~S() { delete c; } }; if constexpr((S{}, true)){}; ``` There were two issues - We need to produce a full ex

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/146857 >From 4ee72df191e9792be38195b00b0f6422de3a767a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Thu, 3 Jul 2025 13:00:46 +0200 Subject: [PATCH 1/2] [Clang] Fix evaluation context of lambdas appearing in dis

[clang] [Clang] Fix evaluation context of lambdas appearing in discarded statements (PR #146857)

2025-07-03 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/146857 Fixes 2 bugs reported in #146063 - The body of a lambda appearing in a discarded statement was sometimes considered discarded itself - A lambda conversion operator that was not odr-used was sometimes not def

[clang] [clang][test] Avoid some C++14 warnings in discrim-union.cpp (PR #146829)

2025-07-03 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can we add -verify to the runline (+ expected-no-diagnostics)? https://github.com/llvm/llvm-project/pull/146829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] [clang] Use range-based for loops (NFC) (PR #146811)

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

[clang] [clang-tools-extra] [Clang] Add builtins that deduplicate and sort types (PR #106730)

2025-07-02 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @ilya-biryukov Great to hear. Please ping me when you are ready, I'll do my best to prioritize this https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

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

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

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

2025-07-02 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > Per [CWG2823](https://cplusplus.github.io/CWG/issues/2823.html), would it be > more meaningful to diagnose dereferencing null pointers? Yes, done! https://github.com/llvm/llvm-project/pull/143667 ___ cfe-commits mailing list cfe-com

[clang] [clang-tools-extra] [clang][CodeComplete] skip explicit obj param in SignatureHelp (PR #146649)

2025-07-02 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: How does completion handle things like this? ```cpp struct S { void f(this S, int); }; int main() { (&S::f)(S{}, 0); } ``` https://github.com/llvm/llvm-project/pull/146649 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] Docs: ambiguous use of "explicitly" in [[clang::no_specializaiton]] (PR #143839)

2025-07-02 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Let's go with @frederick-vs-ja if that makes people happier! https://github.com/llvm/llvm-project/pull/143839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -2403,3 +2403,75 @@ SourceManagerForFile::SourceManagerForFile(StringRef FileName, assert(ID.isValid()); SourceMgr->setMainFileID(ID); } + +StringRef +SourceManager::getNameForDiagnostic(StringRef Filename, +const DiagnosticOptions &O

[clang] [NFC][C++][Modules] Mark P2788R0(DR) as implemented and added more test (PR #144214)

2025-07-02 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Adding @hubert-reinterpretcast I think some / most of the tests are unrelated to the paper, but there seem to be sufficient tests in 62a16d5e2069542351c164aa0e3b216dc8e153c4 https://github.com/llvm/llvm-project/pull/144214 ___ cfe-c

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-07-02 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. Can you add a changelog entry? LGTM otherwiswe https://github.com/llvm/llvm-project/pull/144970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -35,6 +35,7 @@ namespace clang { class TextDiagnostic : public DiagnosticRenderer { raw_ostream &OS; const Preprocessor *PP; + llvm::StringMap> SimplifiedFileNameCache; cor3ntin wrote: Is this used? https://github.com/llvm/llvm-project/pull/143520 ___

[clang] [Clang] [Diagnostics] Simplify filenames that contain '..' (PR #143520)

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -2403,3 +2403,75 @@ SourceManagerForFile::SourceManagerForFile(StringRef FileName, assert(ID.isValid()); SourceMgr->setMainFileID(ID); } + +StringRef +SourceManager::getNameForDiagnostic(StringRef Filename, +const DiagnosticOptions &O

[clang] [clang] [modules] Add err_main_in_named_module (PR #146635)

2025-07-02 Thread Corentin Jabot via cfe-commits
@@ -1062,6 +1062,10 @@ def err_constexpr_main : Error< "'main' is not allowed to be declared %select{constexpr|consteval}0">; def err_deleted_main : Error<"'main' is not allowed to be deleted">; def err_mainlike_template_decl : Error<"%0 cannot be a template">; +def warn_main

[clang] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

2025-06-26 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: There are still a few test failures, including in libc++, but I think we are are at the stage where this could benefit from more eyes https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

2025-06-26 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

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

[clang] [clang] Revise relnote for int->enum conversion. (PR #145755)

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

[clang] Guard against self-assignment; NFC (PR #145743)

2025-06-25 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. approving this because it's a nice code cleaning, however defaulting operator= does not protect against self assignment afaik https://github.com/llvm/llvm-project/pull/145743 ___ cfe-commits mail

[clang] Cap IntRange::Width to MaxWidth (PR #145356)

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

[clang] [Clang] Fix replaceability/relocatability computation (PR #145655)

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

[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-25 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/144161 ___ 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-06-25 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/143667 >From 39b9a098f086958e4f71cce3126b27168c74e0e2 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 9 Jun 2025 17:22:06 +0200 Subject: [PATCH 1/7] [Clang] Diagnose forming references to nullptr Per [decl.r

[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-25 Thread Corentin Jabot via cfe-commits
@@ -644,6 +644,11 @@ Improvements to Clang's diagnostics #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490, #GH36703, #GH32903, #GH23312, #GH69874. +- Enhanced `__is_standard_layout` and `std::is_standard_layout` diagnostics to + provide more detailed i

[clang] [Clang][WIP] Normalize constraints before checking for satisfaction (PR #141776)

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

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-25 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. I am happy with that if @AaronBallman is https://github.com/llvm/llvm-project/pull/145044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-25 Thread Corentin Jabot via cfe-commits
@@ -644,6 +644,10 @@ Improvements to Clang's diagnostics #GH69470, #GH59391, #GH58172, #GH46215, #GH45915, #GH45891, #GH44490, #GH36703, #GH32903, #GH23312, #GH69874. +- Clang now gives pinpointed diagnostics for std::is_empty failures—emitting a “not empty” error + plu

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-25 Thread Corentin Jabot via cfe-commits
@@ -1787,6 +1788,10 @@ def note_unsatisfied_trait_reason "%NonReplaceableField{has a non-replaceable member %1 of type %2}|" "%NTCBase{has a non-trivially-copyable base %1}|" "%NTCField{has a non-trivially-copyable member %1 of type %2}|" +

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

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

  1   2   3   4   >