[clang] [NFC][Clang] Fix typo memody->memory (PR #160141)

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

[clang] [NFC][clang] Quote literal builtin attribute markers in Builtins.def docs (PR #160080)

2025-09-22 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I thought the plan was to get rid of Builtins.def entirely? Maybe it's not worth spending time on it. migrating to td files seems like a better use of time! https://github.com/llvm/llvm-project/pull/160080 ___ cfe-commits mailing list

[clang] [clang-tools-extra] [clang][nfc] Define ConstRecursiveASTVisitor twin of RecursiveASTVisitor (PR #160065)

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

[clang] [clang] Fix crash with -lstdc++ in -ccc-print-phases (PR #160047)

2025-09-22 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Can you add a test, a release note, and a longer PR description? Thanks https://github.com/llvm/llvm-project/pull/160047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an error-recovery crash after d1a80dea (PR #159976)

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

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-20 Thread Corentin Jabot via cfe-commits
@@ -222,7 +222,6 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(declRefExpr); REGISTER_MATCHER(dependentNameType); REGISTER_MATCHER(dependentScopeDeclRefExpr); - REGISTER_MATCHER(dependentTemplateSpecializationType); cor3ntin wrote: I'm happy with t

[clang] [clang][docs] mark v21 as released (PR #158629)

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

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

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

[clang] [clang][ExprConst] Move getLangOpts() to interp::State subclasses (PR #159280)

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

[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

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

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

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

[clang] [Clang]: prevent assertion on empty filename arg in __has_embed (PR #159928)

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

[clang] [clang][bytecode] Compile the definition, not the most recent decl (PR #158093)

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

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

2025-09-20 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. 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] [clang] check constant template parameters in dependent contexts (PR #159463)

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

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

2025-09-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited 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] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

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

[clang] [Clang] Clean up the fix for deferred access checking (PR #141340)

2025-09-19 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This is now https://cplusplus.github.io/CWG/issues/3068.html https://github.com/llvm/llvm-project/pull/141340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Parse] Use consistent Scope::ScopeFlags enum values (NFC) (PR #159275)

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

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2544,6 +2544,19 @@ Stmt *BlockExpr::getBody() { //===--===// // Generic Expression Routines //===--===// +namespace { +/// Helper to det

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2544,6 +2544,19 @@ Stmt *BlockExpr::getBody() { //===--===// // Generic Expression Routines //===--===// +namespace { +/// Helper to det

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

2025-09-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Just as few nits (sorry for the delay and thanks for the pings!) https://github.com/llvm/llvm-project/pull/122265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2544,6 +2544,19 @@ Stmt *BlockExpr::getBody() { //===--===// // Generic Expression Routines //===--===// +namespace { +/// Helper to det

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2544,6 +2544,19 @@ Stmt *BlockExpr::getBody() { //===--===// // Generic Expression Routines //===--===// +namespace { +/// Helper to det

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2544,6 +2544,19 @@ Stmt *BlockExpr::getBody() { //===--===// // Generic Expression Routines //===--===// +namespace { +/// Helper to det

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -10,11 +10,68 @@ // //===--===// +/* + * A note on implementation: + * + * As per the C++ standard, constraints are normalized [temp.constr.normal] cor3ntin wrote: Yes! https://github.co

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -28,10 +28,19 @@ namespace clang { class ConceptDecl; class TemplateDecl; +class ConceptReference; class Expr; class NamedDecl; struct PrintingPolicy; +/// Pairs of unsatisfied atomic constraint expressions along with the +/// substituted constraint expr, if the templa

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -16,130 +16,385 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprConcepts.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Sema/Ownership.h" #include "llvm/ADT/FoldingSet.h" -#include "

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -28,10 +28,19 @@ namespace clang { class ConceptDecl; class TemplateDecl; +class ConceptReference; class Expr; class NamedDecl; struct PrintingPolicy; +/// Pairs of unsatisfied atomic constraint expressions along with the +/// substituted constraint expr, if the templa

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -16,130 +16,385 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprConcepts.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Sema/Ownership.h" #include "llvm/ADT/FoldingSet.h" -#include "

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -51,6 +51,27 @@ class FixedPointSemantics; struct fltSemantics; template class SmallPtrSet; +template <> struct DenseMapInfo { + static FoldingSetNodeID getEmptyKey() { return FoldingSetNodeID{}; } + + static FoldingSetNodeID getTombstoneKey() { +FoldingSetNodeID id;

[clang] [Clang][NFC] Remove duplicated specialization of `llvm::DenseMapInfo` (PR #159718)

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

[clang] [clang] diagnose invalid std::tuple_size sizes (PR #159677)

2025-09-19 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @tbaederr @mizvekov Is the plan for Tim's patch to be backported and for this one to be in 22? This would make sense. I reported a core issue here https://cplusplus.github.io/CWG/issues/3071.html https://github.com/llvm/llvm-project/pull/159677 __

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

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -116,6 +122,19 @@ void ConceptReference::print(llvm::raw_ostream &OS, } } +const StreamingDiagnostic &clang::operator<<(const StreamingDiagnostic &DB, + const ConceptReference *C) { + std::string NameStr; + llvm::raw_string_os

[clang] [WebKit checkers] fix a typo in a message in one of the checkers (PR #159593)

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

[clang] [Clang][NFC] Remove duplicated specialization of `llvm::DenseMapInfo` (PR #159718)

2025-09-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/159718 >From 13e53f843c32d93dd898cc6965e272d077783467 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 19 Sep 2025 10:12:17 +0200 Subject: [PATCH] [Clang][NFC] Remove duplicated specialization of `llvm::Dense

[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

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

[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -2028,7 +2028,9 @@ void StmtPrinter::VisitAtomicExpr(AtomicExpr *Node) { Node->getOp() != AtomicExpr::AO__atomic_load_n && Node->getOp() != AtomicExpr::AO__scoped_atomic_load_n && Node->getOp() != AtomicExpr::AO__opencl_atomic_load && - Node->getOp() !

[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

2025-09-19 Thread Corentin Jabot via cfe-commits
@@ -176,6 +176,17 @@ float test15() { return __builtin_asinf(1.0F); } +// CHECK: void test16() { +// CHECK: char *ptr; +// CHECK: __atomic_test_and_set(ptr, 0); +// CHECK: __atomic_clear(ptr, 0); +// CHECK: } +void test16() { + char *ptr; + __atomic_test_and_set(ptr,

[clang] [Clang][AST] Fix printing for `atomic_test_and_set` and `atomic_clear` (PR #159712)

2025-09-19 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/159712

[clang] [Clang][NFC] Remove duplicated specialization of `llvm::DenseMapInfo` (PR #159718)

2025-09-19 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/159718 In preparation of #141776 >From de3b12cc09c5d5302e0785c1431ff11650a9c9b6 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 19 Sep 2025 10:12:17 +0200 Subject: [PATCH] [Clang][NFC] Remove duplicated spec

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

2025-09-19 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > https://releases.llvm.org/21.1.0/tools/clang/docs/UsersManual.html#cmdoption-f-no-rounding-math. > @AaronBallman, do you know if the design decision has been made and whether > we have documented it? Relevant prior discussion here: > https://discourse.llvm.org/t/rfc-calling-f

[clang] [clang][ExprConst] Allow mutation in `__builtin_constant_p`'s argument (PR #159599)

2025-09-19 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I agree with @shafik here, this needs more motivation. I'm not sure we want to follow GCC's behavior here. In general `__builtin_constant_p` is pretty confusing and I would prefer to be conservative - or at least changing it might warrant a wider discussion / rfc https://github

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

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

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

2025-09-18 Thread Corentin Jabot via cfe-commits
@@ -116,6 +122,19 @@ void ConceptReference::print(llvm::raw_ostream &OS, } } +const StreamingDiagnostic &clang::operator<<(const StreamingDiagnostic &DB, + const ConceptReference *C) { cor3ntin wrote: Yup, this is

[clang] [WebKit checkers] fix a typo in a message in one of the checkers (PR #159593)

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

[clang] [clang][Sema] Reject negative tuple sizes (PR #159579)

2025-09-18 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: We should backport that https://github.com/llvm/llvm-project/pull/159579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Reject negative tuple sizes (PR #159579)

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

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

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -27,13 +27,23 @@ namespace clang { class ConceptDecl; +class ConceptReference; class Expr; class NamedDecl; struct PrintingPolicy; +/// Pairs of unsatisfied atomic constraint expressions along with the +/// substituted constraint expr, if the template arguments could b

[clang] [clang] Remove Diag parameter from Expr::EvaluateKnownConstInt (PR #159512)

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

[clang] Clang AST updates for more details (PR #152372)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: This seems large enough that it might warrant an RFC with a more detailed motivation https://clang.llvm.org/get_involved.html#:~:text=The%20Clang%20community%20uses,will%20proceed%20or%20not. @erichkeane @rnk https://github.com/llvm/llvm-project/pull/152372 _

[clang] [clang][Expr][NFC] Fix some doc comments (PR #159504)

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

[clang] [Clang] Fix an incorrect assertion in `Sema::CheckAddressOfOperand` (PR #159314)

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

[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

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

[clang] [clang][Sema] Avoid warnings when mixing diagnostic categories (NFC) (PR #159316)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @brunodf-snps @mstorsjo Please synchronize to avoid duplicates Duplicate of #159338 https://github.com/llvm/llvm-project/pull/159316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

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

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -543,30 +661,328 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

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

[clang] [clang][Sema] Avoid warnings when mixing diagnostic categories (NFC) (PR #159316)

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

[clang] [clang] Add unreachable after fully covered switches, avoid GCC warnings. NFC. (PR #159330)

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

[clang] [clang] [Parse] Avoid mixing enum and non-enum types in ternary expressions. NFC. (PR #159334)

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

[clang] [NFC] Remove redundant conditions (PR #159349)

2025-09-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/159349 ___ 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-17 Thread Corentin Jabot via cfe-commits
@@ -1778,10 +1778,20 @@ def ext_bit_int : Extension< } // end of Parse Issue category. let CategoryName = "Modules Issue" in { -def err_unexpected_module_decl : Error< - "module declaration can only appear at the top level">; +def err_invalid_module_or_import_directive : Erro

[clang] [clang][ExprConst] Move getLangOpts() to interp::State subclasses (PR #159280)

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -945,6 +945,7 @@ namespace { } ASTContext &getASTContext() const override { return Ctx; } +const LangOptions &getLangOpts() const { return Ctx.getLangOpts(); } cor3ntin wrote: Hum, okay i missed that `EvalInfo` inherits from `interp::State` - t

[clang] [clang] Add unreachable after fully covered switches, avoid GCC warnings. NFC. (PR #159330)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I'm not opposed to this change but we might want to report that to GCC, it is a false positive https://github.com/llvm/llvm-project/pull/159330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang] Avoid warnings about enum mismatch in ternary expressions. NFC. (PR #159338)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: I think it might be cleaner in that case to have two different if statements (one for isRegularKeywordAttribute and one for isDeclspecAttribute) https://github.com/llvm/llvm-project/pull/159338 ___ cfe-commits mailing list cfe-commits@

[clang] [clang] [Parse] Avoid mixing enum and non-enum types in ternary expressions. NFC. (PR #159334)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Duplicate of #159275 https://github.com/llvm/llvm-project/pull/159334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an incorrect assertion in `Sema::CheckAddressOfOperand` (PR #159314)

2025-09-17 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/159314 Not all non-type template arguments are modeled as NonTypeTemplateParmDecl. Fixes #151531 >From 7959f5ef8d3efb7bf742443454255420fa6b5a53 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 17 Sep 2025 12

[clang] [clang][ExprConst] Move getLangOpts() to interp::State subclasses (PR #159280)

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -945,6 +945,7 @@ namespace { } ASTContext &getASTContext() const override { return Ctx; } +const LangOptions &getLangOpts() const { return Ctx.getLangOpts(); } cor3ntin wrote: Is that used? https://github.com/llvm/llvm-project/pull/159280

[clang] [clang] [CUDA] Support calling `consteval` function between different target. (PR #158688)

2025-09-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Thank you for this PR! Will you need us to land it for you? https://github.com/llvm/llvm-project/pull/158688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [CUDA] Support calling `consteval` function between different target. (PR #158688)

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

[clang] [clang] remove workaround for SubstNonTypeTemplateParmExpr transform (PR #158541)

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

[clang] [clang] [CUDA] Support calling consteval function between different target. (PR #158688)

2025-09-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: LGTM but can you add a description to the PR and a release note? thanks https://github.com/llvm/llvm-project/pull/158688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-15 Thread Corentin Jabot via cfe-commits
@@ -16,130 +16,385 @@ #include "clang/AST/ASTContext.h" #include "clang/AST/DeclTemplate.h" #include "clang/AST/Expr.h" +#include "clang/AST/ExprConcepts.h" #include "clang/Basic/SourceLocation.h" +#include "clang/Sema/Ownership.h" #include "llvm/ADT/FoldingSet.h" -#include "

[clang] [clang][sema][NFC] Clean up builtin arg checking functions (PR #158615)

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

[clang] [clang][clang-scan-deps] Add LangOpts.ScanDeps to fix (#88896) (PR #158420)

2025-09-15 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: While I personally favors your approach, I don't think we ever came to a conclusion in https://github.com/llvm/llvm-project/issues/88896 @Sirraide @jansvoboda11 @nishithshah2211 @Bigcheese (Regardless, please update the description of the PR so people understand what we are

[clang] [clang] NFC: non-type template argument check cleanup (PR #158515)

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

[clang] [Clang] Fix the source location of default template arguments in placeholder constraints (PR #158414)

2025-09-13 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, but we need a changelog entry https://github.com/llvm/llvm-project/pull/158414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2025-09-13 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: Younan did a solid half of that patch. We tested the changes with std::exec, ranges v3 and libc++. There may be performance regressions in some cases in concept-heavy code bases, although we do not have definitive benchmarks. We tried to mitigate that with multiple level of cac

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

2025-09-13 Thread Corentin Jabot via cfe-commits
@@ -543,30 +661,328 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

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

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

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

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

2025-09-12 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @erichkeane any objection merging that ? https://github.com/llvm/llvm-project/pull/142936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -222,7 +222,6 @@ RegistryMaps::RegistryMaps() { REGISTER_MATCHER(declRefExpr); REGISTER_MATCHER(dependentNameType); REGISTER_MATCHER(dependentScopeDeclRefExpr); - REGISTER_MATCHER(dependentTemplateSpecializationType); cor3ntin wrote: I was not able t

[clang] [clang-tools-extra] [lldb] [clang] AST: remove DependentTemplateSpecializationType (PR #158109)

2025-09-12 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: This is a neat change. I only did a cursory review for now but I like the direct and did not spot anything jaring. We do need to be a bit more careful about the AST matcher changes though https://github.com/llvm/llvm-project/pull/158109 __

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

2025-09-12 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @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/listinfo/cfe-commits

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

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -164,52 +171,290 @@ struct SatisfactionStackRAII { SatisfactionStackRAII(Sema &SemaRef, const NamedDecl *ND, const llvm::FoldingSetNodeID &FSNID) : SemaRef(SemaRef) { - if (ND) { +if (ND) { SemaRef.PushSatisfactionStackEntry(ND

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

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -1658,31 +2158,61 @@ NormalizedConstraint::fromConstraintExpr(Sema &S, const NamedDecl *D, : FoldExpandedConstraint::FoldOperatorKind::Or; if (FE->getInit()) { - auto LHS = fromConstraintExpr(S, D, FE->getLHS()); - auto RHS = fromConstraintExpr(S,

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

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

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

2025-09-12 Thread Corentin Jabot via cfe-commits
@@ -543,30 +672,330 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

[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

  1   2   3   4   5   6   7   8   >