[clang] [AST] StructuralEquivalence: avoid diagnostics when Complain=false in CheckStructurallyEquivalentAttributes (PR #157585)

2025-09-11 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can you add a test? Thanks https://github.com/llvm/llvm-project/pull/157585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Match the FoldingSetNodeID computed before and after creating TypedefType (PR #157662)

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

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

2025-09-08 Thread Corentin Jabot via cfe-commits
@@ -6313,30 +6313,38 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext &Context, unsigned i = 0; SmallVector OverloadParams; - for (QualType ParamType : FT->param_types()) { + { +// The lvalue conversions in this loop are only for type resolu

[clang] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

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

[clang] [clang] Rename overloaded virtual member function to prevent shadowing, NFCI (PR #157501)

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

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

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

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

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

[clang] [Clang] [Sema] Make `-Wincompatible-pointer-types` an error by default (PR #157364)

2025-09-08 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM but let's see if other people have opinions in the next few days. That GCC did it first and did not get pushback is reassuring @erichkeane https://github.com/llvm/llvm-project/pull/157364 __

[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

2025-09-08 Thread Corentin Jabot via cfe-commits
@@ -223,6 +223,7 @@ Deprecated Compiler Flags Modified Compiler Flags --- - The `-gkey-instructions` compiler flag is now enabled by default when DWARF is emitted for plain C/C++ and optimizations are enabled. (#GH149509) +- The `-Wnrvo` compiler flag will

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks for working on this. I have some concerns that we do that transformation even in non template contexts, it seems a fairly big hammer. Can you try to find ways to limit how often the cloning is done? id you explore the other suggestion made by @zygoloid at all ? (to do

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-09-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > Is an RFC required? CC @cor3ntin I this so, yes, this is sufficiently weird and novel that it needs an RFC - I am a bit surprised by the motivation, especially in light of MSVC successfully deploying expected with `nodiscard` - Is this a solution in search of a problem? http

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-09-07 Thread Corentin Jabot via cfe-commits
@@ -2452,6 +2452,44 @@ use the annotated ``[[nodiscard]]`` constructor or result in an annotated type. }]; } +def CanDiscardDocs : Documentation { + let Category = DocCatFunction; + let Heading = "candiscard"; + let Content = [{ +A function whose return type is marked w

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-09-07 Thread Corentin Jabot via cfe-commits
@@ -489,6 +567,44 @@ void test() { from_a_template(); // expected-warning {{ignoring return value of type 'NoDiscard' declared with 'nodiscard' attribute}} from_a_template(); // no warning from_a_template(); // expected-warning {{ignoring return value of type 'WarnUnuse

[clang] [clang] Allow attributes on first constructor argument in pre-C++11 (PR #157300)

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

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

2025-09-07 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thanks. Will you need us to merge that for you? https://github.com/llvm/llvm-project/pull/157174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Detect int-to-float narrowing when the back-conversion is unspecified (PR #157174)

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

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

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

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] [clang-tools-extra] [compiler-rt] [flang] [libcxx] [libcxxabi] [lld] [lldb] [llvm] [Inclusive Language] migrate "sanity" checks to "soundness" checks (PR #156995)

2025-09-06 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: As @philnik777 said, regardless of outcome on the RFC, please split in multiple PR (one per subproject), once consensus is reached on the RFC. https://github.com/llvm/llvm-project/pull/156995 ___ cfe-commits mailing list cfe-commits@li

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] Fix incorrect array initialization with string literal (fixes #112189) (PR #156846)

2025-09-06 Thread Corentin Jabot via cfe-commits
@@ -168,16 +168,95 @@ bool Sema::IsStringInit(Expr *Init, const ArrayType *AT) { return ::IsStringInit(Init, AT, Context) == SIF_None; } +static StringLiteral *CloneStringLiteral(const StringLiteral *SL, + ASTContext &C) { + SourceLoc

[clang] [lldb] [clang][Expr] Teach IgnoreUnlessSpelledInSource about implicit calls to std::get free function (PR #122265)

2025-09-03 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I'm still happy with this. I did not notice it was not merged https://github.com/llvm/llvm-project/pull/122265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-02 Thread Corentin Jabot via cfe-commits
@@ -14,7 +14,9 @@ #include "clang/AST/ASTConsumer.h" #include "clang/AST/ASTMutationListener.h" #include "clang/AST/DynamicRecursiveASTVisitor.h" +#include "clang/Basic/SourceLocation.h" #include "clang/Lex/HeaderSearch.h" +#include "clang/Lex/ModuleLoader.h"

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -1178,186 +1289,39 @@ bool Preprocessor::LexAfterModuleImport(Token &Result) { // Figure out what kind of lexer we actually have. recomputeCurLexerKind(); - // Lex the next token. The header-name lexing rules are used at the start of - // a pp-import. - // - // For

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

2025-09-01 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Some nits but I think it looks good overall @erichkeane @Bigcheese https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -1119,43 +1115,158 @@ bool Preprocessor::LexHeaderName(Token &FilenameTok, bool AllowMacroExpansion) { return false; } +// We represent the primary and partition names as 'Paths' which are sections +// of the hierarchical access path for a clang module. However for C++2

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -1776,6 +1801,22 @@ class Preprocessor { /// Lex the parameters for an #embed directive, returns nullopt on error. std::optional LexEmbedParameters(Token &Current, bool ForHasEmbed); + bool LexModuleNameContin

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

2025-09-01 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited 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] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -65,7 +65,7 @@ class PragmaAnnotateHandler : public PragmaHandler { Token Tok; PP.LexUnexpandedToken(Tok); if (Tok.isNot(tok::eod)) - PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "pragma"; + PP.Diag(Tok, diag::ext_pp_extra_tokens_at_eol) << "#pragm

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -2485,11 +2536,12 @@ class Preprocessor { } /// If we're importing a standard C++20 Named Modules. - bool isInImportingCXXNamedModules() const { -// NamedModuleImportPath will be non-empty only if we're importing -// Standard C++ named modules. -return !Nam

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -233,6 +233,9 @@ class Token { PtrData = const_cast(Ptr); } + template T getAnnotationValueAs() const { +return static_cast(getAnnotationValue()); + } cor3ntin wrote: Is that used? https://github.com/llvm/llvm-project/pull/107168

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -1119,43 +1115,158 @@ bool Preprocessor::LexHeaderName(Token &FilenameTok, bool AllowMacroExpansion) { return false; } +// We represent the primary and partition names as 'Paths' which are sections +// of the hierarchical access path for a clang module. However for C++2

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -349,8 +349,9 @@ void IdentifierTable::AddKeywords(const LangOptions &LangOpts) { if (LangOpts.IEEE128) AddKeyword("__ieee128", tok::kw___float128, KEYALL, LangOpts, *this); - // Add the 'import' contextual keyword. + // Add the 'import' and 'module' contextual key

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

2025-09-01 Thread Corentin Jabot via cfe-commits
@@ -17,13 +17,16 @@ #include "clang/AST/DeclTemplate.h" #include "clang/Basic/DiagnosticParse.h" #include "clang/Basic/StackExhaustionHandler.h" +#include "clang/Basic/TokenKinds.h" +#include "clang/Lex/ModuleLoader.h" #include "clang/Parse/RAIIObjectsForParser.h" #include "c

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

2025-09-01 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed 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] correct error message when assigning to const reference captured in lambda (PR #105647)

2025-09-01 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin auto_merge_enabled 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][initlist] handle incomplete array type in Constant Expr Calculation (PR #155080)

2025-08-31 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. This needs a changelog entry. LGTM otherwise. Thanks! https://github.com/llvm/llvm-project/pull/155080 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[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

  1   2   3   4   5   6   7   >