[clang] [llvm] [Arm] Generate explicit bitcasts in NeonEmitter (PR #121802)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...27c8a1e77e90645013be2b1c93f3d6eb4cd2e11f llvm/

[clang] [llvm] [Arm] Regenerate tests (NFC) (PR #121801)

2025-01-06 Thread David Green via cfe-commits
davemgreen wrote: > This patch adds instcombine to some tests that were passing This patch sounds good, but the intent of the clang tests is that they should not be dependant on the mid-end optimizations in llvm. At least for fast-changing parts like instcombine, where you don't want to have t

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootParamter`s (PR #121803)

2025-01-06 Thread Finn Plummer via cfe-commits
inbelic wrote: Ignore the first commit, it is simply included to build until https://github.com/llvm/llvm-project/pull/121799 is merged. https://github.com/llvm/llvm-project/pull/121803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootParamter`s (PR #121803)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff f739aa4004165dc64d3a1f418d5ad3c84886f01a 8ed0186a9e3a9cf2af45eb102dff77fabcc4cb97 --e

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootParamter`s (PR #121803)

2025-01-06 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/121803 >From bee90e659e647df21d1f1e65f95fffefa57eadce Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Mon, 6 Jan 2025 16:21:33 + Subject: [PATCH 1/2] [HLSL] Implement parsing of `RootFlags` - Define the Parser c

[clang] [llvm] [AArch64] Implement FP8 Neon reinterpret intrinsics (PR #121804)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 7cb6e6bced8ca5767c3e609f4826982638fd9543 a6354f2b7d2d061ef92c604b66325ed0ff665061 --e

[clang] [llvm] [AArch64] Implement FP8 Neon reinterpret intrinsics (PR #121804)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...a6354f2b7d2d061ef92c604b66325ed0ff665061 llvm/

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootFlags` (PR #121799)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-hlsl Author: Finn Plummer (inbelic) Changes ```- Define the Parser class that will contain all the parsing methods in ParseHLSLRootSignature.h - Implement the dispatch behaviour of Parse and ParseRootElement in ParseHLSLRootS

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootFlags` (PR #121799)

2025-01-06 Thread Finn Plummer via cfe-commits
https://github.com/inbelic ready_for_review https://github.com/llvm/llvm-project/pull/121799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { ARMInterruptAttr(getASTContext(), AL, Kind)); } +// Check if the function definition uses any AArch64 SME features without +// having the '+sme' feature enabled and warn

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { ARMInterruptAttr(getASTContext(), AL, Kind)); } +// Check if the function definition uses any AArch64 SME features without +// having the '+sme' feature enabled and warn

[clang] [clang][NFC] clean up the handling of convergence control tokens (PR #121738)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sameer Sahasrabuddhe (ssahasra) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/121738.diff 3 Files Affected: - (modified) clang/lib/CodeGen/CGCall.cpp (+2-2) - (modified) clang/lib/CodeGen/CGStmt.cpp (+20-26)

[clang] [compiler-rt] [Clang] Adjust pointer-overflow sanitizer for N3322 (PR #120719)

2025-01-06 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/120719 >From cf1a8ee68d10668c1031a21daa251108c4fca98c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 20 Dec 2024 12:41:01 +0100 Subject: [PATCH 1/4] [Clang] Adjust pointer-overflow sanitizer for N3322 N3322 make

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/121550 From fe4adf2f95aeb72436eead3567767c8c539811c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Fri, 3 Jan 2025 08:58:23 +0100 Subject: [PATCH 1/7] [c

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/121550 From fe4adf2f95aeb72436eead3567767c8c539811c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Fri, 3 Jan 2025 08:58:23 +0100 Subject: [PATCH 1/6] [c

[clang] eff1265 - [clang][NFC] Fix expected directives in C++ DRs

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T12:29:31+03:00 New Revision: eff126501efc3981727ef0e918c4dca0fa2eb778 URL: https://github.com/llvm/llvm-project/commit/eff126501efc3981727ef0e918c4dca0fa2eb778 DIFF: https://github.com/llvm/llvm-project/commit/eff126501efc3981727ef0e918c4dca0fa2eb778.

[clang] 2a593bb - [clang][NFC] Stop testing CWG2917 in C++98 mode

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T12:24:18+03:00 New Revision: 2a593bbcf3b022a4ac11a76e03883d6aae2f000c URL: https://github.com/llvm/llvm-project/commit/2a593bbcf3b022a4ac11a76e03883d6aae2f000c DIFF: https://github.com/llvm/llvm-project/commit/2a593bbcf3b022a4ac11a76e03883d6aae2f000c.

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/121550 From fe4adf2f95aeb72436eead3567767c8c539811c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Fri, 3 Jan 2025 08:58:23 +0100 Subject: [PATCH 1/6] [c

[clang] [llvm] [AArch64][SME] Disable inlining of callees with new ZT0 state (PR #121338)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. LGTM :+1: You could maybe add a test to `clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c` too (which tests `flatten`/`always_inline` statements. https://github.com/llvm/llvm-project/pull/121338 __

[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

2025-01-06 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/121598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

2025-01-06 Thread Nathan Gauër via cfe-commits
@@ -20440,6 +20442,26 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, } } +Value *CodeGenFunction::EmitSPIRVBuiltinExpr(unsigned BuiltinID, + const CallExpr *E) { + switch (BuiltinID) { + case SPIRV::BI__bui

[clang] 3edbe36 - [clang] Fix missing check for nullptr in CallExpr::getUnusedResultAttr (#118636)

2025-01-06 Thread via cfe-commits
Author: Yihe Li Date: 2025-01-06T13:25:40+01:00 New Revision: 3edbe36c3eb01d1c35ac1761da108e3a493258ee URL: https://github.com/llvm/llvm-project/commit/3edbe36c3eb01d1c35ac1761da108e3a493258ee DIFF: https://github.com/llvm/llvm-project/commit/3edbe36c3eb01d1c35ac1761da108e3a493258ee.diff LOG:

[clang] [clang] Fix missing check for nullptr in CallExpr::getUnusedResultAttr (PR #118636)

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

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-06 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/119423 >From 3f007d702922db63e128e3c0f72dff2f600e0879 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 10 Dec 2024 17:41:07 + Subject: [PATCH 1/4] [clang] Fix sub-integer __builtin_elementwise_(add|sub

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicm (Conditional Move) extension (PR #121752)

2025-01-06 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/121752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Fixes] Added option to readability-implicit-bool-conversion check to allow implicit conversion *to bool* (PR #121761)

2025-01-06 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne created https://github.com/llvm/llvm-project/pull/121761 This Pull Request is for fixing the failed build-bot checks for the PR(#120087). >From 03f536888ddc5b7be2514c2d880c6d3119b7f4ee Mon Sep 17 00:00:00 2001 From: 4m4n-x-B4w4ne <125849251+4m4n-x-b4w...@users.

[clang-tools-extra] [Fixes] Added option to readability-implicit-bool-conversion check to allow implicit conversion *to bool* (PR #121761)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

2025-01-06 Thread Nathan Gauër via cfe-commits
@@ -0,0 +1,59 @@ +//===- SemaSPIRV.cpp - Semantic Analysis for SPIRV constructs +//---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [clang] Expose -f(no-)wrapv as clang-cl option (PR #120787)

2025-01-06 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/120787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add float type support to __builtin_reduce_add and __builtin_reduce_multipy (PR #120367)

2025-01-06 Thread Csanád Hajdú via cfe-commits
Il-Capitano wrote: `__builtin_reduce_add/mul` is defined to do _recursive even-odd pairwise reduction_ in Clang, and the `@llvm.vector.reduce.fadd` intrinsic doesn't do that. I'm not sure if there's any benefit to this definition over a sequential reduction. The only thing I can think that co

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/3] [clang] Add test for CWG203 "Type of address-of-member

[clang] [llvm] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (PR #120265)

2025-01-06 Thread Nicholas Guy via cfe-commits
https://github.com/NickGuy-Arm updated https://github.com/llvm/llvm-project/pull/120265 >From 898c30b5b97e80b8bdeb024aec30d0e530d39d42 Mon Sep 17 00:00:00 2001 From: Nick Guy Date: Fri, 13 Dec 2024 13:39:24 + Subject: [PATCH 1/5] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode int

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/114086 >From 5a5495d010fb1715b0e711376767d5ff3cd5cc98 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Mon, 9 Sep 2024 10:15:20 + Subject: [PATCH 1/6] [clang] Add sincos builtin using `llvm.sincos` intrinsic T

[clang] [clang] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
alejandro-alvarez-sonarsource wrote: Thanks for the review! Would you mind doing the merge? I do not have permission. https://github.com/llvm/llvm-project/pull/121550 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/114086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, return RValue::get(emitUnaryMaybeConstrainedFPBuiltin( *this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh)); +case Builtin::BIsincos:

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2025-01-06 Thread Pierre van Houtryve via cfe-commits
Pierre-vh wrote: I'm trying to understand this. Is the function being changed a generic util called by multiple builtins, and this change is just to make `one-as` exclusive to the OpenCL variant of those builtins ? Can an identical builtin have different behavior depending on the input languag

[clang] 81fae0d - [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (#120095)

2025-01-06 Thread via cfe-commits
Author: Joseph Huber Date: 2025-01-06T08:11:08-06:00 New Revision: 81fae0d5e3d3378959483ccd7709a212731bff3f URL: https://github.com/llvm/llvm-project/commit/81fae0d5e3d3378959483ccd7709a212731bff3f DIFF: https://github.com/llvm/llvm-project/commit/81fae0d5e3d3378959483ccd7709a212731bff3f.diff

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2025-01-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-06 Thread Fraser Cormack via cfe-commits
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) { _2, _3, _4)); } +static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) { + // Don't promote integer types + if (QualType Ty = E->getType(); S.getASTContext().is

[clang] [Clang][AMDGPU] Stop defaulting to `one-as` for all atomic scopes (PR #120095)

2025-01-06 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I'm trying to understand this. Is the function being changed a generic util > called by multiple builtins, and this change is just to make `one-as` > exclusive to the OpenCL variant of those builtins ? Can an identical builtin > have different behavior depending on the input l

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2025-01-06 Thread Brandon Wu via cfe-commits
@@ -3013,6 +3013,7 @@ enum CXCallingConv { CXCallingConv_M68kRTD = 19, CXCallingConv_PreserveNone = 20, CXCallingConv_RISCVVectorCall = 21, + CXCallingConv_RISCVVLSCall = 22, 4vtomat wrote: Let me clarify this, do you mean using different calling conven

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread via cfe-commits
@@ -1255,8 +1264,13 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, }, EllipsisLoc); if (ImmediatelyDeclaredConstraint.isInvalid() || - !ImmediatelyDeclaredConstraint.isUsable()) + !ImmediatelyDeclaredConstraint.isUsable()) { +NewConstrainedParm->

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread via cfe-commits
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, << NewConstrainedParm->getTypeSourceInfo() ->getTypeLoc() .getSourceRange(); +NewConstrainedParm->setPlaceholderTypeConstraint( +RecoveryExpr::Create(Contex

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread via cfe-commits
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, << NewConstrainedParm->getTypeSourceInfo() ->getTypeLoc() .getSourceRange(); +NewConstrainedParm->setPlaceholderTypeConstraint( +RecoveryExpr::Create(Contex

[clang] [NFC][analyzer][docs] Document MallocChecker's ownership attributes (PR #121759)

2025-01-06 Thread Kristóf Umann via cfe-commits
@@ -1389,6 +1389,68 @@ Query for this attribute with ``__has_attribute(overloadable)``. }]; } +def OwnershipDocs : Documentation { + let Heading = "ownership_holds, ownership_returns, ownership_takes (Clang " +"Static Analyzer)"; + let Category = DocCatFun

[clang] [NFC][analyzer][docs] Document MallocChecker's ownership attributes (PR #121759)

2025-01-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/121759 From 24b15119f476bf8c981618132b05357a87d98476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Mon, 6 Jan 2025 13:14:37 +0100 Subject: [PATCH 1/2] [analyzer][docs] Document MallocChecker's

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2025-01-06 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From fd914cc82688b122654d2d7ada72007541b197c0 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH 01/20] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTid

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-01-06 Thread Michael Jabbour via cfe-commits
michael-jabbour-sonarsource wrote: Gentle ping, and I wish you all a happy new year. :smile: https://github.com/llvm/llvm-project/pull/114240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [HLSL][RootSignature] Implement parsing of `RootFlags` (PR #121799)

2025-01-06 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/121799 ```- Define the Parser class that will contain all the parsing methods in ParseHLSLRootSignature.h - Implement the dispatch behaviour of Parse and ParseRootElement in ParseHLSLRootSignature.cpp - Define the gen

[clang] [NFC][analyzer][docs] Document MallocChecker's ownership attributes (PR #121759)

2025-01-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/121759 From 24b15119f476bf8c981618132b05357a87d98476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Mon, 6 Jan 2025 13:14:37 +0100 Subject: [PATCH 1/3] [analyzer][docs] Document MallocChecker's

[clang] [NFC][analyzer][docs] Document MallocChecker's ownership attributes (PR #121759)

2025-01-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus updated https://github.com/llvm/llvm-project/pull/121759 From 24b15119f476bf8c981618132b05357a87d98476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Umann?= Date: Mon, 6 Jan 2025 13:14:37 +0100 Subject: [PATCH 1/4] [analyzer][docs] Document MallocChecker's

[clang] d00f65c - [Driver][SYCL] Add initial SYCL offload compilation support (#117268)

2025-01-06 Thread via cfe-commits
Author: Michael Toguchi Date: 2025-01-06T11:52:46-05:00 New Revision: d00f65c6acd9f0e1ddae83391f55eb9d232d2f9e URL: https://github.com/llvm/llvm-project/commit/d00f65c6acd9f0e1ddae83391f55eb9d232d2f9e DIFF: https://github.com/llvm/llvm-project/commit/d00f65c6acd9f0e1ddae83391f55eb9d232d2f9e.dif

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #117268)

2025-01-06 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann closed https://github.com/llvm/llvm-project/pull/117268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower non-builtin sincos[f|l] calls to llvm.sincos.* when -fno-math-errno is set (PR #121763)

2025-01-06 Thread Matt Arsenault via cfe-commits
@@ -1,5 +1,19 @@ -// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -O1 %s -o - | FileCheck --check-prefix=NO-MATH-ERRNO %s -// RUN: %clang_cc1 -triple=aarch64-gnu-linux -emit-llvm -fmath-errno %s -o - | FileCheck --check-prefix=MATH-ERRNO %s +// RUN: %clang_cc1 -triple=aa

[clang] [llvm] [HLSL] Move length support out of the DirectX Backend (PR #121611)

2025-01-06 Thread Farzon Lotfi via cfe-commits
@@ -33,6 +41,23 @@ constexpr enable_if_t bit_cast(T F) { return __builtin_bit_cast(U, F); } +template +constexpr enable_if_t::value || is_same::value, T> +length_impl(T X) { + return __builtin_elementwise_abs(X); +} + +template +enable_if_t::value || is_same::value, T> +

[clang] [llvm] [AArch64] Add Neon FP8 conversion intrinsics (PR #119033)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...997ee58b444f4bc52f8c0334ad9ec4002863c3b2 llvm/

[clang] [llvm] [AArch64] Add FP8 Neon intrinsics for dot-product (PR #119911)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...e1a3e8fa0896fb87aced430c5f9ba9c9df07aadc llvm/

[clang] [llvm] [Clang][AArch64] Allow FP8 Neon vector types to be used by __builtin_shufflevector (PR #119031)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...dbfe4c9ed5cceb5936b2353ec65ddb5ac44e40fc llvm/

[clang] [NFC][analyzer][docs] Document MallocChecker's ownership attributes (PR #121759)

2025-01-06 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus edited https://github.com/llvm/llvm-project/pull/121759 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Implement NEON FP8 intrinsics for fused multiply-add (indexed) (PR #120403)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...7e2cd37d491d5c5dfd9af39ddc319fd399573691 llvm/

[clang] [llvm] [AArch64] Refactor implementation of FP8 types (NFC) (PR #118969)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...2692deb39488d5b4eaaf56159aa08587128319fe llvm/

[clang] [llvm] [AArch64] Implement NEON FP8 fused multiply-add intrinsics (non-indexed) (PR #120273)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...23059d18cd208478fd5d0d2fee7e68ab47cf0e7d llvm/

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-testing-tools @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes For some ABIs `update_cc_test_checks.py` is unable to generate tests because of the mismatch between the mangled function names reported by clang's `-asd-dump` a

[clang] [llvm] [HLSL] Move length support out of the DirectX Backend (PR #121611)

2025-01-06 Thread Farzon Lotfi via cfe-commits
@@ -33,6 +41,21 @@ constexpr enable_if_t bit_cast(T F) { return __builtin_bit_cast(U, F); } +template +constexpr enable_if_t::value || is_same::value, T> +length_impl(T X) { + return __builtin_elementwise_abs(X); +} + +template +enable_if_t::value || is_same::value, T> +

[clang] [llvm] [HLSL] Move length support out of the DirectX Backend (PR #121611)

2025-01-06 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/121611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 7cb6e6bced8ca5767c3e609f4826982638fd9543...4ca33ab1931d406fe34b04816eac53645e9877cf llvm/

[clang] [llvm] [Arm] Regenerate tests (NFC) (PR #121801)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes This patch adds `instcombine` to some tests that were passing Clang's output to `opt -S --passes=mem2reg`, and converts some other tests to using `update_cc_test_checks.py`. Assembly part of some t

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2025-01-06 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From fd914cc82688b122654d2d7ada72007541b197c0 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH 01/18] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTid

[clang] [Clang] Make passing incomplete types to builtin type-traits a non-sfinae-friendly error (PR #121333)

2025-01-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/8555 Here is the relevant piece of the

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-06 Thread Fraser Cormack via cfe-commits
@@ -68,15 +66,18 @@ void test_builtin_elementwise_add_sat(float f1, float f2, double d1, double d2, long long int i2, si8 vi1, si8 vi2, unsigned u1, unsigned u2, u4 vu1, u4 vu2,

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/121768 ...when there are invalid constraints. When attaching a `TypeConstraint`, in case of error, the trailing pointer that is supposed to point to the constraint is left uninitialized. Sometime

[clang] [llvm] [AArch64] Add FP8 Neon intrinsics for dot-product (PR #119911)

2025-01-06 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/119911 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/121687 >From bca2bfe17b71faeebf65eba11adcb70927f878fd Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Sun, 5 Jan 2025 13:58:16 +0300 Subject: [PATCH 1/4] [clang] Add test for CWG203 "Type of address-of-member

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Add test for CWG203 "Type of address-of-member expression" (PR #121687)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -41,6 +42,141 @@ namespace cwg202 { // cwg202: 3.1 template struct X; } +namespace cwg203 { // cwg203: 3.0 +namespace ex1 { +struct B { + int i; +}; +struct D1 : B {}; +struct D2 : B {}; + +int(D1::*pmD1) = &D2::i; +} // namespace ex1 + +#if __cplusplus >= 202002L +names

[clang] [clang] Restrict use of scalar types in vector builtins (PR #119423)

2025-01-06 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/119423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode intrinsic (PR #120265)

2025-01-06 Thread Nicholas Guy via cfe-commits
https://github.com/NickGuy-Arm updated https://github.com/llvm/llvm-project/pull/120265 >From 898c30b5b97e80b8bdeb024aec30d0e530d39d42 Mon Sep 17 00:00:00 2001 From: Nick Guy Date: Fri, 13 Dec 2024 13:39:24 + Subject: [PATCH 1/6] [clang][llvm][aarch64] Add aarch64_sme_in_streaming_mode int

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Younan Zhang via cfe-commits
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, << NewConstrainedParm->getTypeSourceInfo() ->getTypeLoc() .getSourceRange(); +NewConstrainedParm->setPlaceholderTypeConstraint( +RecoveryExpr::Create(Contex

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Younan Zhang via cfe-commits
@@ -0,0 +1,54 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t + +// RUN: %clang_cc1 -std=c++20 mod.cppm -emit-module-interface -o mod.pcm -fallow-pcm-with-compiler-errors -verify +// RUN: %clang_cc1 -std=c++20 main.cpp -fmodule-file=mod=mod.pcm -verify -fallow-pcm

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/121768 From da2bbf99b8430d8b6aa6bf7969c9825b4d94219b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Mon, 18 Nov 2024 11:36:03 +0100 Subject: [PATCH 1/2] [

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, << NewConstrainedParm->getTypeSourceInfo() ->getTypeLoc() .getSourceRange(); +NewConstrainedParm->setPlaceholderTypeConstraint( +RecoveryExpr::Create(Contex

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -0,0 +1,54 @@ +// RUN: rm -rf %t +// RUN: split-file %s %t +// RUN: cd %t + +// RUN: %clang_cc1 -std=c++20 mod.cppm -emit-module-interface -o mod.pcm -fallow-pcm-with-compiler-errors -verify +// RUN: %clang_cc1 -std=c++20 main.cpp -fmodule-file=mod=mod.pcm -verify -fallow-pcm

[clang] [clang][Sema] Fix initialization of `NonTypeTemplateParmDecl`... (PR #121768)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -1235,15 +1235,24 @@ bool Sema::AttachTypeConstraint(AutoTypeLoc TL, << NewConstrainedParm->getTypeSourceInfo() ->getTypeLoc() .getSourceRange(); +NewConstrainedParm->setPlaceholderTypeConstraint( +RecoveryExpr::Create(Contex

[clang] [analyzer] Retry UNDEF Z3 queries at most "crosscheck-with-z3-retries-on-timeout" times (PR #120239)

2025-01-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/120239 >From f7041f5f6f0127f335bedf081f648e769007a827 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 17 Dec 2024 15:35:27 +0100 Subject: [PATCH 1/5] [analyzer] Retry UNDEF Z3 queries at most "crosscheck-with

[clang] [analyzer] Retry UNDEF Z3 queries at most "crosscheck-with-z3-retries-on-timeout" times (PR #120239)

2025-01-06 Thread Balázs Benics via cfe-commits
@@ -77,16 +80,32 @@ void Z3CrosscheckVisitor::finalizeVisitor(BugReporterContext &BRC, RefutationSolver->addConstraint(SMTConstraints); } - // And check for satisfiability - llvm::TimeRecord Start = llvm::TimeRecord::getCurrentTime(/*Start=*/true); - std::optional Is

[clang] [analyzer] Retry UNDEF Z3 queries at most "crosscheck-with-z3-retries-on-timeout" times (PR #120239)

2025-01-06 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource deleted https://github.com/llvm/llvm-project/pull/120239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [llvm] [libc++] implement views::concat (PR #120920)

2025-01-06 Thread Nhat Nguyen via cfe-commits
@@ -0,0 +1,623 @@ +// -*- C++ -*- +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm created https://github.com/llvm/llvm-project/pull/121777 CheckFunctionDeclaration emits diagnostics if any SME attributes are used by a function definition without the required +sme or +sme2 target features. This patch adds similar diagnostics to CheckConstexpr

[clang] 1229b78 - [clang][NFC] Clean up CWG2396 test

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T18:32:44+03:00 New Revision: 1229b78f1676d56d0d386a5c4cde8f98a78d0989 URL: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989 DIFF: https://github.com/llvm/llvm-project/commit/1229b78f1676d56d0d386a5c4cde8f98a78d0989.

[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. Yes, you handled the creation of `SemaSPIRV` perfectly. (I'm the one who introduced the rest of `Sema*` parts.) https://github.com/llvm/llvm-project/pull/121598 ___ cfe-commits mailing list cfe-com

[clang] [NFC] [analyzer] Factor out SymbolManager::get<*> (PR #121781)

2025-01-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/121781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [analyzer] Factor out SymbolManager::get<*> (PR #121781)

2025-01-06 Thread Donát Nagy via cfe-commits
@@ -224,6 +224,8 @@ class SymbolMetadata : public SymbolData { const Stmt *S; QualType T; const LocationContext *LCtx; + /// Count can be used to differentiate regions corresponding to + /// different loop iterations, thus, making the symbol path-dependent.

[clang] [NFC] [analyzer] Factor out SymbolManager::get<*> (PR #121781)

2025-01-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I'm grateful for this code quality improvement, it's nice to see that you got rid of 180 lines of boilerplate :smile: I have one minor inline suggestion that it would be nice to document the purpose of this new template method; but otherwise the change i

[clang] [NFC] [analyzer] Factor out SymbolManager::get<*> (PR #121781)

2025-01-06 Thread Donát Nagy via cfe-commits
@@ -525,14 +527,14 @@ class SymbolManager { static bool canSymbolicate(QualType T); - /// Make a unique symbol for MemRegion R according to its kind. - const SymbolRegionValue* getRegionValueSymbol(const TypedValueRegion* R); + template const T *get(Args &&...args); ---

[clang] [analyzer] Retry UNDEF Z3 queries 2 times by default (PR #120239)

2025-01-06 Thread Donát Nagy via cfe-commits
@@ -213,6 +215,15 @@ ANALYZER_OPTION( "400'000 should on average make Z3 queries run for up to 100ms on modern " "hardware. Set 0 for unlimited.", 0) +ANALYZER_OPTION( +unsigned, Z3CrosscheckRetriesOnTimeout, +"crosscheck-with-z3-retries-on-timeout", +"Set

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Sander de Smalen via cfe-commits
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { ARMInterruptAttr(getASTContext(), AL, Kind)); } +// Check if the function definition uses any AArch64 SME features without +// having the '+sme' feature enabled and warn

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Sander de Smalen via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -std=c++23 -fsyntax-only -verify %s sdesmalen-arm wrote: What about this change requires c++23? https://github.com/llv

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Sander de Smalen via cfe-commits
@@ -48,3 +48,9 @@ void streaming_compatible_def2(void (*streaming_fn_ptr)(void) __arm_streaming, // Also test when call-site is not a function. int streaming_decl_ret_int() __arm_streaming; int x = streaming_decl_ret_int(); // expected-error {{call to a streaming function req

<    1   2   3   4   5   6   >