[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

[clang] [Basic] Remove getVirtualFile (PR #151086)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/151086 ___ 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-28 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > I don't quite get what is happening here yet, can you give a summary of what > is being accomplished, and how you're doing so? Let me try to see if I can enlighten you a bit. P2841 very simply extends the notion of template template parameters to variable templates and conce

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

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited 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] [lldb] Variable template and concept template parameters (PR #150823)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin ready_for_review 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] [lldb] Variable template and concept template parameters (PR #150823)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited 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] [lldb] Variable template and concept template parameters (PR #150823)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited 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] Implement instantiation context note for checking template parameters (PR #126088)

2025-07-28 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @mizvekov are you still working on that? Thanks https://github.com/llvm/llvm-project/pull/126088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix a regression introduced by #147046 (PR #150893)

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

[clang] [Clang] Fix a regression introduced by #147046 (PR #150893)

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

[clang] [Clang] Fix a regression introduced by #147046 (PR #150893)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/150893 >From 8af7ce05012ca6e0047fc452196befc056eadf40 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Mon, 28 Jul 2025 09:20:28 +0200 Subject: [PATCH] [Clang] Fix a regression introduced by #147046 Static functio

[clang] [Clang] Fix a regression introduced by #147046 (PR #150893)

2025-07-28 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/150893 We should not skip the first argument of static member functions when initalizing a conversion sequence for a non-deducible parameter. >From a8fb90c5f2c87dff630259117ee2fd6d435b709d Mon Sep 17 00:00:00 2001 Fr

[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

  1   2   3   4   5   6   >