[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

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

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-24 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: can you fix the formatting? thanks! https://github.com/llvm/llvm-project/pull/152888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

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

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Corentin Jabot via cfe-commits
@@ -301,9 +302,34 @@ std::vector HeuristicResolverImpl::resolveMemberExpr( return {}; } + // check if member expr is in the context of an explicit object method + // If so, it's safe to assume the templated arg is of type of the record cor3ntin wrote:

[clang] [clang-tools-extra] [clang] Heuristic resolution for explicit object parameter (PR #155143)

2025-08-24 Thread Corentin Jabot via cfe-commits
@@ -301,9 +302,34 @@ std::vector HeuristicResolverImpl::resolveMemberExpr( return {}; } + // check if member expr is in the context of an explicit object method + // If so, it's safe to assume the templated arg is of type of the record + const auto ExplicitMemberHeur

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

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

[clang] [clang] Diagnose misplaced array bounds with non-identifier declarators. (PR #155064)

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

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-23 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Hey folks, Thanks for the work. Please note that adding a new attribute should go through an RFC. I know @yuxuanchen1997 proposed something in the same design space a while ago - but we never seem to have reached consensus https://discourse.llvm.org/t/language-extension-for-bet

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-08-23 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @yronglin Please ping me when you need reviews. Thanks! https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add diagnostic when scoped enumeration requires an explicit conversion for binary operations (PR #152698)

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

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-23 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can you fix the merge conflicts? Thanks! https://github.com/llvm/llvm-project/pull/152888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

2025-08-23 Thread Corentin Jabot via cfe-commits
@@ -4030,9 +4030,13 @@ findSubobject(EvalInfo &Info, const Expr *E, const CompleteObject &Obj, if (ObjType->isArrayType()) { // Next subobject is an array element. const ConstantArrayType *CAT = Info.Ctx.getAsConstantArrayType(ObjType); - assert(CAT && "vl

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

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

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-23 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. Let's make sure we don't merge that accidentally https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang] Diagnose misplaced array bounds with non-identifier declarators. (PR #155064)

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

[clang] [Clang] Add diagnostic when scoped enumeration requires an explicit conversion for binary operations (PR #152698)

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

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-23 Thread Corentin Jabot via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; cor

[clang] [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (PR #154490)

2025-08-21 Thread Corentin Jabot via cfe-commits
@@ -1438,6 +1438,10 @@ void CXXRecordDecl::addedMember(Decl *D) { data().StructuralIfLiteral = false; } +if (!data().HasTrivialSpecialMembers && +T.hasAddressDiscriminatedPointerAuth()) + data().HasTrivialSpecialMembers = true; cor

[clang] [NFC] Remove unneeded forward declaration of diagnoseUncapturableValueReferenceOrBinding() (PR #154591)

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

[clang] [Clang] correct error message when assigning to const reference captured in lambda (PR #105647)

2025-08-20 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM. sorry for the delay https://github.com/llvm/llvm-project/pull/105647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Reapply "Only remove lambda scope after computing evaluation context" (PR #154458)

2025-08-20 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/154458 ___ 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 a builtin that deduplicate types into a pack (PR #106730)

2025-08-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM Please give it another ~24h in case someone else has anything to add. Thanks for the huge amount of work done here, this will be super useful. https://github.com/llvm/llvm-project/pull/106730 _

[clang] [Clang] [Sema] Always rebuild `this` if captured by value in a lambda with a dependent explicit object parameter (PR #154276)

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

[clang] [Clang] [Sema] Always rebuild `this` if captured by value in a lambda with a dependent explicit object parameter (PR #154276)

2025-08-19 Thread Corentin Jabot via cfe-commits
@@ -264,3 +264,28 @@ void test() { // CHECK: call void @_ZNH5P27971C1cERKS0_ // CHECK: call void @_ZN5P27971C1cEi } + +// This used to crash because we weren’t instantiating a dependent 'this'. +namespace GH154054 { +struct S { + int x; + auto byval() { +return [*this](th

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

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

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

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

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

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

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > @cor3ntin One thing I'm trying to work out in tests is whether there is any > way to get a discarded block that should cause an error in the containing > scope but not if it occurred in the lamda instantiation. There are never any errors ignored in discarded statements. If th

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

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

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

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

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

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

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

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

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Corentin Jabot via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); cor3ntin wrote: there is also __ARM_FEATURE_PAC_DEFAULT, apparently. But t

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @ojhunt `PushExpressionEvaluationContextForFunction` should set everything correctly - maybe we are (incorrectly) using `PushExpressionEvaluationContext` instead somewhere? https://github.com/llvm/llvm-project/pull/153921 ___ cfe-comm

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This should work ```diff diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index f02a295220ef..6b423ce06523 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Corentin Jabot via cfe-commits
@@ -1528,6 +1528,9 @@ static void InitializePredefinedMacros(const TargetInfo &TI, #undef TARGET_OS } + if (LangOpts.PointerAuthIntrinsics) +Builder.defineMacro("__PTRAUTH__"); cor3ntin wrote: Did we synchronize with GCC here (or does gcc not support

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Corentin Jabot via cfe-commits
@@ -1089,6 +1089,7 @@ static void ComputeDATE_TIME(SourceLocation &DATELoc, SourceLocation &TIMELoc, /// specified by the identifier as a standard language feature. static bool HasFeature(const Preprocessor &PP, StringRef Feature) { const LangOptions &LangOpts = PP.getLangOp

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Can you add a blurb in the release note saying _has_feature(ptrauth_qualifier) is deprecated and __PTRAUTH__ should be used instead? https://github.com/llvm/llvm-project/pull/153912 ___ cfe-commits mailing list c

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

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

[clang] [Clang][Sema] Check the return value of DiagnoseClassNameShadow in ActOnEnumConstant (PR #143754)

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

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-15 Thread Corentin Jabot via cfe-commits
@@ -2595,6 +2597,97 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-15 Thread Corentin Jabot via cfe-commits
@@ -2595,6 +2597,97 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-15 Thread Corentin Jabot via cfe-commits
@@ -2595,6 +2597,97 @@ static void DiagnoseNonStandardLayoutReason(Sema &SemaRef, SourceLocation Loc, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAggregateReason(Sema &SemaRef, SourceLocation Loc, +

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-15 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: I'm sorry for the delay. Thanks for the ping. I think this looks good. Can you add tests for arrays? (arrays are aggregate https://eel.is/c++draft/dcl.init.aggr#1) https://github.com/llvm/llvm-project/pull/152488 ___

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

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

[clang] [clang] fix comment lexing of special command names (PR #152943)

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

[clang] [clang] fix comment lexing of special command names (PR #152943)

2025-08-14 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: The tests look fine to me, I'll merge! https://github.com/llvm/llvm-project/pull/152943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

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

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

2025-08-14 Thread Corentin Jabot via cfe-commits
@@ -6,3 +6,15 @@ void f(...) { } void h(int n..., int m); // expected-error {{expected ')'}} expected-note {{to match}} + + +namespace GH153445 { +void f(int = {}...); + +struct S { + void f(int = {}...); + void g(int...); +}; + +void S::g(int = {}...) {} c

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

2025-08-14 Thread Corentin Jabot via cfe-commits
@@ -131,3 +131,12 @@ void Test_TemplatedFunctionVariadic(int arg, ...); // CHECK:ParamCommandComment{{.*}} [in] implicitly Param="..." // CHECK-NEXT: ParagraphComment // CHECK-NEXT: TextComment{{.*}} Text=" More arguments" + +/// \param[out] Aaa Short summary

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

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

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

2025-08-14 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/152944

[clang] [clang] fix skipped parsing of late parsed attributes (PR #153558)

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

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

2025-08-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/153496 >From e7fdb9f9c9d8a58658f89330dea99006b078c2e7 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 13 Aug 2025 22:54:07 +0200 Subject: [PATCH 1/2] [Clang] Do not consider a variadic function ellipsis part

[clang] [Clang] Do not consider a variadic function ellipsis part of a default arg (PR #153496)

2025-08-13 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/153496 When stashing the tokens of a parameter of a member function, we would munch an ellipsis, as the only considered terminal conditions were `,` and `)`. Fixes #153445 >From e7fdb9f9c9d8a58658f89330dea99006b078c

[clang] [lang] unrecognized html tag causing undesirable comment lexing.) (PR #152944)

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

[clang] [Clang] unrecognized html tag causing undesirable comment lexing (PR #152944)

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

[clang] [Clang] Fixed a crash when parsing #embed parameters with unmatched closing brackets (PR #152877)

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

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-08-10 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks for working on that; I will review later. I have some concerns about exposing that more widely than in C2y for _now_ We are quite early in the C2y cycle, there have been proposals altering the design, and C++ has express interest in doing something maybe similar. We shoul

[clang] [Clang] Add detailed notes explaining why is_aggregate evaluates to false (PR #152488)

2025-08-08 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I am mostly afk, I will look at this over the weekend. maybe @AaronBallman can help https://github.com/llvm/llvm-project/pull/152488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang-tools-extra] [Clang] Add a builtin that deduplicate types into a pack (PR #106730)

2025-08-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Some nits, but I like where this is going. I'll be away for the rest of the week, but I'm sure @erichkeane @mizvekov and @zyn0217 can help progress the review :) https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing

[clang] Fix crash when doing special member lookup on forward-declared classes (Fixes llvm/llvm-project#144642) (PR #144828)

2025-08-06 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Closing at author's request https://github.com/llvm/llvm-project/pull/144828 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash when doing special member lookup on forward-declared classes (Fixes llvm/llvm-project#144642) (PR #144828)

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

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

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

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/151935 >From 866ca17651c56897ac4d3ea1f766ca97d13d2c13 Mon Sep 17 00:00:00 2001 From: Shamshura Egor <164661612+egorshamsh...@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:58:34 +0300 Subject: [PATCH 1/4] [libc++][

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/151935 >From 866ca17651c56897ac4d3ea1f766ca97d13d2c13 Mon Sep 17 00:00:00 2001 From: Shamshura Egor <164661612+egorshamsh...@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:58:34 +0300 Subject: [PATCH 1/3] [libc++][

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

2025-08-04 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @codemzs Sometimes around January. But it would be best not to wait until the last moment - especially if someone (or you!) is interested in working on the library bits of that paper https://github.com/llvm/llvm-project/pull/78503 ___

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

2025-08-04 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: My preference would be to be maximally useful (ie accept almost any token), but a few tokens are problematic. namely `#` and `\`. Consider [[foo(#\)]] [[foo( # \ )]] ``` Given that, I think it's fairly safe to disable `#` and go with this PR. On the flip side, I don't

[clang] [C] static_assert in a for loop is not an extension (PR #151955)

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

[clang] [C] static_assert in a for loop is not an extension (PR #151955)

2025-08-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. Thanks, I hate it. LGTM, but please add a changelog entry! https://github.com/llvm/llvm-project/pull/151955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [lldb] [clang][Attr] Remove 'literal label' form of AsmLabelAttr (PR #151858)

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

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/151935 >From 866ca17651c56897ac4d3ea1f766ca97d13d2c13 Mon Sep 17 00:00:00 2001 From: Shamshura Egor <164661612+egorshamsh...@users.noreply.github.com> Date: Tue, 8 Jul 2025 13:58:34 +0300 Subject: [PATCH 1/2] [libc++][

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @egorshamshura FYI https://github.com/llvm/llvm-project/pull/151935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add detailed notes explaining why `is_constructible` evaluates to false (Revert 16d5db7) (PR #151935)

2025-08-04 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/151935 Adds explanation why `is_constructible` evaluates to false. This reapplies as-is e476f968bc8e438a0435d10934f148de570db8eb. This was reverted in 16d5db71b3c38f21aa17783a8758f947dca5883f because of a test failur

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

2025-08-04 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @codemzs No worries! There is no chance that this could make Clang 21, sorry (the release is in a few weeks and we are past the point where we can backport large features) But there would be value in making progress on this feature on main soon so that it has time to mature fo

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

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

[clang] [clang] Proofread LanguageExtensions.rst (PR #151802)

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

[clang] [AST] Use llvm::iterator_range::empty (NFC) (PR #151800)

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

[clang] [clang] Avoid inheriting [[noreturn]] in explicit function template specializations (PR #150003)

2025-08-02 Thread Corentin Jabot via cfe-commits
@@ -3267,6 +3267,14 @@ void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old, if (isa(I) || isa(I)) continue; +if (isa(I)) { + if (auto *FD = dyn_cast(New)) { +if (FD->getTemplateSpecializationKind() == TSK_ExplicitSpecialization)

[clang] [clang][diagnostics] Fix fix-it hint parenthesis placement for fold expressions (PR #151790)

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

[clang] [clang][diagnostics] Fix fix-it hint parenthesis placement for fold expressions (PR #151790)

2025-08-02 Thread Corentin Jabot via cfe-commits
@@ -123,6 +123,8 @@ Improvements to Clang's diagnostics Moved the warning for a missing (though implied) attribute on a redeclaration into this group. Added a new warning in this group for the case where the attribute is missing/implicit on an override of a virtual meth

[clang] [clang][diagnostics] Fix fix-it hint parenthesis placement for fold expressions (PR #151790)

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

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-08-01 Thread Corentin Jabot via cfe-commits
@@ -160,7 +160,7 @@ class alignas(8) InitializedEntity { struct VD { /// The VarDecl, FieldDecl, or BindingDecl being initialized. -ValueDecl *VariableOrMember; +NamedDecl *VariableOrMember; cor3ntin wrote: It was (after your feedback)! https:/

[clang] [clang][sema] Remove unused local SourceLocation (PR #151455)

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

[clang] Switch sanity check to assert; NFC (PR #151181)

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

[clang] [C23] Handle type compatibility for enumerations better (PR #150282)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -870,7 +870,29 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, else if (T1->getTypeClass() == Type::FunctionNoProto && T2->getTypeClass() == Type::FunctionProto) TC = Type::FunctionNoProto; -else +else if (Contex

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -1746,6 +1754,16 @@ class TemplateTemplateParmDecl final return SourceRange(getTemplateParameters()->getTemplateLoc(), End); } + TemplateNameKind kind() const { cor3ntin wrote: Oh, I somehow completely misread your point. I will think about it. No

[clang] [NFC] [Sema] [Modules] Use DynamicRecursiveASTVisitor to reduce generted code size (PR #151074)

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

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -1162,12 +1179,32 @@ static ExprResult formImmediatelyDeclaredConstraint( // constraint of T. [...] CXXScopeSpec SS; SS.Adopt(NS); - ExprResult ImmediatelyDeclaredConstraint = S.CheckConceptTemplateId( - SS, /*TemplateKWLoc=*/SourceLocation(), NameInfo, -

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -4694,6 +4759,28 @@ ExprResult Sema::CheckVarTemplateId( return BuildDeclarationNameExpr(SS, NameInfo, Var, FoundD, TemplateArgs); } +ExprResult Sema::CheckVarOrConceptTemplateTemplateId( +const CXXScopeSpec &, const DeclarationNameInfo &, +TemplateTemplateParmDec

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -26,115 +27,116 @@ #include namespace clang { - /// Represents the parsed form of a C++ template argument. - class ParsedTemplateArgument { - public: -/// Describes the kind of template argument that was parsed. -enum KindType { - /// A template type parame

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -2187,6 +2189,27 @@ TemplateName TemplateInstantiator::TransformTemplateName( AllowInjectedClassName); } +TemplateArgument TemplateInstantiator::TransformNamedTemplateTemplateArgument( +CXXScopeSpec &SS, TemplateName Name, Sourc

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -2187,6 +2189,27 @@ TemplateName TemplateInstantiator::TransformTemplateName( AllowInjectedClassName); } +TemplateArgument TemplateInstantiator::TransformNamedTemplateTemplateArgument( +CXXScopeSpec &SS, TemplateName Name, Sourc

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -9034,11 +9225,11 @@ void Sema::CheckConceptRedefinition(ConceptDecl *NewDecl, Context.setPrimaryMergedDecl(NewDecl, OldConcept->getCanonicalDecl()); } -bool Sema::CheckConceptUseInDefinition(ConceptDecl *Concept, - SourceLocation Lo

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -4694,6 +4759,28 @@ ExprResult Sema::CheckVarTemplateId( return BuildDeclarationNameExpr(SS, NameInfo, Var, FoundD, TemplateArgs); } +ExprResult Sema::CheckVarOrConceptTemplateTemplateId( +const CXXScopeSpec &, const DeclarationNameInfo &, +TemplateTemplateParmDec

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -5144,6 +5163,56 @@ bool TreeTransform::TransformTemplateArguments( } +template +template +bool TreeTransform::TransformConceptTemplateArguments( +InputIterator First, InputIterator Last, TemplateArgumentListInfo &Outputs, +bool Uneval) { cor3nti

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -235,7 +237,7 @@ void TemplateParameterList::getAssociatedConstraints( ACs.emplace_back(E); } } - if (HasRequiresClause) + if (HasRequiresClause && getRequiresClause()) cor3ntin wrote: This is not needed! https://github.com/llvm/llvm-

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -5144,6 +5163,56 @@ bool TreeTransform::TransformTemplateArguments( } +template +template +bool TreeTransform::TransformConceptTemplateArguments( +InputIterator First, InputIterator Last, TemplateArgumentListInfo &Outputs, +bool Uneval) { + + auto isConcept = []

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -339,6 +339,18 @@ bool TemplateArgument::isPackExpansion() const { llvm_unreachable("Invalid TemplateArgument Kind!"); } +bool TemplateArgument::isConceptOrConceptTemplateParameter() const { + bool isConcept = false; + if (getKind() == TemplateArgument::Template) { +

[clang] [lldb] [Clang] Initial support for P2841 (Variable template and concept template parameters) (PR #150823)

2025-07-29 Thread Corentin Jabot via cfe-commits
@@ -1746,6 +1754,16 @@ class TemplateTemplateParmDecl final return SourceRange(getTemplateParameters()->getTemplateLoc(), End); } + TemplateNameKind kind() const { cor3ntin wrote: `TemplateNameKind` is pre-existing. It's the kind of a `TemplateName`. N

  1   2   3   4   5   6   7   >