[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -1454,6 +1567,12 @@ static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, QualType Owner2Type) { const auto *Owner2 = cast(Field2->getDeclContext()); + // In C23 mode, check for structural equivalence of attribu

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -450,6 +453,116 @@ class StmtComparer { }; } // namespace +static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, + const Attr *Attr1, const Attr *Attr2) { + // Two attributes are structurally equivalent if they are

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-03-26 Thread via cfe-commits
@@ -43,6 +43,9 @@ struct StructuralEquivalenceContext { /// key: (from, to, IgnoreTemplateParmDepth) using NonEquivalentDeclSet = llvm::DenseSet>; + /// The language options to use for making a structural equivalence check. + const LangOptions &LangOpts; + --

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @ilya-biryukov, would you mind giving this PR a test on your infrastructure and if it works maybe share some performance results? https://github.com/llvm/llvm-project/pull/133057 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Pierre van Houtryve via cfe-commits
@@ -3368,7 +3368,8 @@ bool AMDGPUInstructionSelector::selectG_INSERT_VECTOR_ELT( } bool AMDGPUInstructionSelector::selectBufferLoadLds(MachineInstr &MI) const { - assert(!AMDGPU::isGFX12Plus(STI)); + if (!Subtarget->hasLDSBufferLoad()) Pierre-vh wrote: Can

[clang] [analyzer] Fix format attribute handling in GenericTaintChecker (PR #132765)

2025-03-26 Thread Donát Nagy via cfe-commits
@@ -161,3 +161,45 @@ void top() { clang_analyzer_isTainted(A.data); // expected-warning {{YES}} } } // namespace gh114270 + + +namespace format_attribute { +__attribute__((__format__ (__printf__, 1, 2))) +void log_nonmethod(const char *fmt, ...); NagyDonat wr

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-03-26 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: > While I may not able to look into them in detail recently, it may be helpful > to split this into seperate patches to review and to land. I initially considered this, but @vgvassilev said in https://github.com/root-project/root/pull/17722#issuecomment-2706555950 he prefers a s

[clang] [flang] [llvm] [AMDGPU] Add "lds-buffer-load-insts" attribute for all targets < gfx11 (PR #133055)

2025-03-26 Thread Pierre van Houtryve via cfe-commits
@@ -10104,7 +10104,8 @@ SDValue SITargetLowering::LowerINTRINSIC_VOID(SDValue Op, case Intrinsic::amdgcn_raw_ptr_buffer_load_lds: case Intrinsic::amdgcn_struct_buffer_load_lds: case Intrinsic::amdgcn_struct_ptr_buffer_load_lds: { -assert(!AMDGPU::isGFX12Plus(*Subtarg

[clang] [clang][bytecode] Print more info in Block::dump() (PR #133062)

2025-03-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/133062 None >From 7a6c4284aa576e29e83b50a121ba2df4e8909079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 26 Mar 2025 10:49:02 +0100 Subject: [PATCH] [clang][bytecode] Print more info in Bloc

[clang] [Clang][Driver] Override complex number calculation method by -fno-fa… (PR #132680)

2025-03-26 Thread via cfe-commits
@@ -2997,6 +2997,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, LangOptions::ComplexRangeKind Range = LangOptions::ComplexRangeKind::CX_None; std::string ComplexRangeStr = ""; std::string GccRangeComplexOption = ""; + std::string LastC

[clang] [clang][bytecode] Fail on mutable reads from revisited variables (PR #133064)

2025-03-26 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/133064 When revisiting a variable, we do that by simply calling visitDecl() for it, which means it will end up with the same EvalID as the rest of the evaluation - but this way we end up allowing reads from mutable v

[clang] [llvm] [AArch64] Add FEAT_FPAC to Grace (PR #133054)

2025-03-26 Thread Ricardo Jesus via cfe-commits
@@ -1067,7 +1067,8 @@ def ProcessorFeatures { FeatureDotProd, FeatureFPARMv8, FeatureMatMulInt8, FeatureSSBS, FeatureCCIDX, FeatureJS, FeatureLSE, FeatureRAS, Featur

[clang] [clang][bytecode] Fail on mutable reads from revisited variables (PR #133064)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes When revisiting a variable, we do that by simply calling visitDecl() for it, which means it will end up with the same EvalID as the rest of the evaluation - but this way we end up allowing reads from mutable

[clang] [clang]: fix overload resolution in case of bind rvalue ref to const lvalue ref (PR #133035)

2025-03-26 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung edited https://github.com/llvm/llvm-project/pull/133035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 64046e9 - [Driver] Use a range constructor of StringSet (NFC) (#133201)

2025-03-26 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-26T20:54:08-07:00 New Revision: 64046e9d2628ce421682eea8465e41554b46c96d URL: https://github.com/llvm/llvm-project/commit/64046e9d2628ce421682eea8465e41554b46c96d DIFF: https://github.com/llvm/llvm-project/commit/64046e9d2628ce421682eea8465e41554b46c96d.diff L

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
https://github.com/imdj edited https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3386156 - [clang][ExtractAPI] fix a couple crashes when used via libclang (#132297)

2025-03-26 Thread via cfe-commits
Author: QuietMisdreavus Date: 2025-03-26T17:46:21-06:00 New Revision: 3386156b1e8418083e99833d3d22420cf439c039 URL: https://github.com/llvm/llvm-project/commit/3386156b1e8418083e99833d3d22420cf439c039 DIFF: https://github.com/llvm/llvm-project/commit/3386156b1e8418083e99833d3d22420cf439c039.dif

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Cai (jzc) Changes This PR adds support for AOT compilation for Intel CPUs and GPUs in clang-sycl-linker. When no `-arch` is passed to `clang-sycl-linker`, the output of the tool will be the resulting linked SPIR-V bytecode. If the

[clang] [Driver] Use *Set::insert_range (NFC) (PR #133201)

2025-03-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133201 This patch uses a range constructor to collapse: llvm::StringSet<> Dest; for (const auto &S : Src) Dest.insert(S); down to: llvm::StringSet<> Dest(llvm::from_range, Src); >From 5f536050eb4df

[clang] [llvm] [HLSL] Implement the `smoothstep` intrinsic (PR #132288)

2025-03-26 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng edited https://github.com/llvm/llvm-project/pull/132288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use *Set::insert_range (NFC) (PR #133201)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Kazu Hirata (kazutakahirata) Changes This patch uses a range constructor to collapse: llvm::StringSet<> Dest; for (const auto &S : Src) Dest.insert(S); down to: llvm::StringSet<> Dest(llvm::from_range, Src); --- Full d

[clang] [Clang] Implement CWG2517 Useless restriction on use of parameter in constraint-expression (PR #132919)

2025-03-26 Thread Imad Aldij via cfe-commits
https://github.com/imdj edited https://github.com/llvm/llvm-project/pull/132919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use a range constructor of StringSet (NFC) (PR #133201)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls` running on `linaro-g3-03` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/143/builds/6485 Here is the relevant piece of the bui

[clang] 16d1942 - [RISCV] Drop '-x c' from riscv-target-features.c. NFC

2025-03-26 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2025-03-26T21:20:04-07:00 New Revision: 16d1942c069a7572efceba884452f08a157cb684 URL: https://github.com/llvm/llvm-project/commit/16d1942c069a7572efceba884452f08a157cb684 DIFF: https://github.com/llvm/llvm-project/commit/16d1942c069a7572efceba884452f08a157cb684.diff

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-03-26 Thread Ibraim Ganiev via cfe-commits
olologin wrote: > It would feel safer if the custom check was passed via command-line instead, > similar to --config But then you will not be able to properly disable such checks for subfolders (modules) of some huge project, right? https://github.com/llvm/llvm-project/pull/131804

[clang] [Clang][SYCL] Add support AOT compilation support for Intel GPUs in clang-sycl-linker (PR #133194)

2025-03-26 Thread Justin Cai via cfe-commits
https://github.com/jzc created https://github.com/llvm/llvm-project/pull/133194 This PR adds support for AOT compilation for Intel CPUs and GPUs in clang-sycl-linker. When no `-arch` is passed to `clang-sycl-linker`, the output of the tool will be the resulting linked SPIR-V bytecode. If the `-

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/133212 The instantiation of a VarDecl's initializer might be deferred until the variable is actually used. However, we were still building the DeclRefExpr with a type that could later be changed by the initializer's i

[clang] [Clang] Correct the DeclRefExpr's Type after the initializer gets instantiated (PR #133212)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes The instantiation of a VarDecl's initializer might be deferred until the variable is actually used. However, we were still building the DeclRefExpr with a type that could later be changed by the initializer'

[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)

2025-03-26 Thread Congcong Cai via cfe-commits
@@ -89,6 +89,8 @@ void ConstCorrectnessCheck::registerMatchers(MatchFinder *Finder) { const auto ConstReference = hasType(references(isConstQualified())); HerrCai0907 wrote: I think the comment means check the constness of pointer and array instead of const

[clang] [llvm] [HLSL] Implement dot2add intrinsic (PR #131237)

2025-03-26 Thread Sumit Agarwal via cfe-commits
https://github.com/sumitsays updated https://github.com/llvm/llvm-project/pull/131237 >From 6d5c4053c90975d64e378e52779dab9c3ffb64cd Mon Sep 17 00:00:00 2001 From: Sumit Agarwal Date: Thu, 13 Mar 2025 16:02:32 -0700 Subject: [PATCH 01/12] dot2add working for dxil without sema check --- clang/

[clang] [Driver] Use *Set::insert_range (NFC) (PR #133201)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes This patch uses a range constructor to collapse: llvm::StringSet<> Dest; for (const auto &S : Src) Dest.insert(S); down to: llvm::StringSet<> Dest(llvm::from_range, Src); --- Full diff: ht

[clang] [X86][AVX10] Re-target mavx10.1 and emit warning for mavx10.x-256/512 (PR #132542)

2025-03-26 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/132542 >From 9a8d9b7d5d3f07685579c3d1336e146755bb7efa Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Sat, 22 Mar 2025 19:15:01 +0800 Subject: [PATCH 1/2] [X86][AVX10] Re-target mavx10.1 and emit warning for ma

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-26 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good. Thanks for the updates! https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133205 This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through the d

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-adt Author: Kazu Hirata (kazutakahirata) Changes This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through

[clang] [llvm] [ADT] Remove old range constructors of SmallSet and StringSet (PR #133205)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes This patch removes the old range constructors of SmallSet and StringSet that do not take the llvm::from_range tag. Since there are so few uses, this patch directly removes them without going through the

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
@@ -44,23 +44,19 @@ MDNode *LoopInfo::createPipeliningMetadata(const LoopAttributes &Attrs, else if (Attrs.PipelineInitiationInterval != 0) Enabled = true; + SmallVector Args; + Args.append(LoopProperties.begin(), LoopProperties.end()); + if (Enabled != true) { -

[clang] [llvm] [clang][CodeGen] Generate follow-up metadata for loops in correct format (PR #131985)

2025-03-26 Thread Ryotaro Kasuga via cfe-commits
https://github.com/kasuga-fj commented: Thanks for your review! https://github.com/llvm/llvm-project/pull/131985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Use a range constructor of StringSet (NFC) (PR #133201)

2025-03-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-sve-vls-2stage` running on `linaro-g3-02` while building `clang` at step 12 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/4/builds/5888 Here is the relevant piece of

[clang] Add guard to for loop test clang/test/Sema/for.c (PR #133169)

2025-03-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (Ariel-Burton) Changes Commit 20b7f5982622f includes a case that checks diagnostics for for loops using thread locals. This fails on platforms which do not support TLS. This change adds guards to run this part of the test iff the feat

[clang] 80f216d - [C++20] [Modules] Add a test

2025-03-26 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-03-27T14:04:41+08:00 New Revision: 80f216db530eda98a444bc1994c7d69a7107c3c6 URL: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6 DIFF: https://github.com/llvm/llvm-project/commit/80f216db530eda98a444bc1994c7d69a7107c3c6.diff LO

<    1   2   3   4   5   6