[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-06 Thread Erich Keane via cfe-commits
@@ -3726,6 +3726,16 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, AlignmentCI, OffsetValue); return RValue::get(PtrValue); } + case Builtin::BI__builtin_assume_dereferenceable: { +const Expr *Ptr = E-

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-06 Thread Erich Keane via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the +know

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-06 Thread Erich Keane via cfe-commits
@@ -2761,6 +2761,41 @@ etc.). Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``. +``__builtin_assume_dereferenceable`` +- + +``__builtin_assume_derefernceable`` is used to provide the optimizer with the +know

[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] [analyzer] Retry UNDEF Z3 queries 2 times by default (PR #120239)

2025-01-06 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited 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] ca603d2 - [AArch64] Regenerate neon-vcmla.c test. NFC

2025-01-06 Thread David Green via cfe-commits
Author: David Green Date: 2025-01-06T16:26:41Z New Revision: ca603d2536f039194141bf3a01e9ee7f60e37406 URL: https://github.com/llvm/llvm-project/commit/ca603d2536f039194141bf3a01e9ee7f60e37406 DIFF: https://github.com/llvm/llvm-project/commit/ca603d2536f039194141bf3a01e9ee7f60e37406.diff LOG: [

[clang] [clang] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

2025-01-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/121785 ___ 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/6] [clang] Fix sub-integer __builtin_elementwise_(add|sub

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

2025-01-06 Thread Fraser Cormack via cfe-commits
@@ -649,7 +649,9 @@ Unless specified otherwise operation(±0) = ±0 and operation(±infinity) = ±in The integer elementwise intrinsics, including ``__builtin_elementwise_popcount``, ``__builtin_elementwise_bitreverse``, ``__builtin_elementwise_add_sat``, -``__builtin_elementwis

[clang] [clang] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

2025-01-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks, the patch looks great https://github.com/llvm/llvm-project/pull/121785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -4593,9 +4593,14 @@ class FunctionType : public Type { SME_ZT0Shift = 5, SME_ZT0Mask = 0b111 << SME_ZT0Shift, +// A bit to tell whether a function is agnostic about sme ZA state. +SME_AgnosticZAStateShift = 8, +SME_AgnosticZAStateMask = 1 << SME_Agnostic

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -7745,6 +7746,38 @@ static bool checkMutualExclusion(TypeProcessingState &state, return true; } +static bool handleArmAgnosticAttribute(Sema &S, + FunctionProtoType::ExtProtoInfo &EPI, + ParsedAt

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -7559,6 +7559,26 @@ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and }]; } +def ArmAgnosticDocs : Documentation { + let Category = DocCatArmSmeAttributes; + let Content = [{ +The ``__arm_agnostic`` keyword applies to prototyped function types an

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -3835,6 +3835,9 @@ def err_sme_unimplemented_za_save_restore : Error< "call to a function that shares state other than 'za' from a " "function that has live 'za' state requires a spill/fill of ZA, which is not yet " "implemented">; +def err_sme_unimplemented_agnostic_

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Benjamin Maxwell via cfe-commits
@@ -7559,6 +7559,26 @@ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and }]; } +def ArmAgnosticDocs : Documentation { + let Category = DocCatArmSmeAttributes; + let Content = [{ +The ``__arm_agnostic`` keyword applies to prototyped function types an

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

2025-01-06 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited 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 Farzon Lotfi via cfe-commits
https://github.com/farzonl closed 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] [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/3] [analyzer] Retry UNDEF Z3 queries at most "crosscheck-with

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

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes ...when there are invalid constraints. When attaching a `TypeConstraint`, in case of error, the trailing pointer that is supposed to point

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-01-06 Thread Alex Voicu via cfe-commits
@@ -21,9 +21,12 @@ ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const { // Records with non-trivial destructors/copy-constructors should not be // passed by value. if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) - return getN

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

2025-01-06 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh approved this pull request. Ah, that makes sense. It's surprising it wasn't like that in the first place https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

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

2025-01-06 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Ah, that makes sense. It's surprising it wasn't like that in the first place But can we now get rid of the -one-as sync scopes and replace them with MMRAs? https://github.com/llvm/llvm-project/pull/120095 ___ cfe-commits mailing list

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
@@ -174,6 +174,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 Endilll wrote: CWG2770 is still open (`clang/www/make_cxx_dr_s

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

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/119031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-debian-cpp20` running on `clang-debian-cpp20` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/108/builds/7783 Here is the r

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

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/119033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b79d3b9 - [clang][NFC] Move CWG273 test into its own file

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T17:30:39+03:00 New Revision: b79d3b9519620e34f0e223fdb4a6731db6cda88f URL: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f DIFF: https://github.com/llvm/llvm-project/commit/b79d3b9519620e34f0e223fdb4a6731db6cda88f.

[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: > > Ah, that makes sense. It's surprising it wasn't like that in the first place > > But can we now get rid of the -one-as sync scopes and replace them with MMRAs? MMRAs are droppable so not currently suited to replace syncscopes like that, but it's a goal. As part of the Vul

[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/19] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTid

[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] [clang] Fix implicit integer conversion for opaque enums declared in class templates (PR #121039)

2025-01-06 Thread Erich Keane via cfe-commits
=?utf-8?q?André?= Brand Message-ID: In-Reply-To: erichkeane wrote: > > Thanks for the PR. Can you update the commit message to be more descriptive? > > I'm not sure the fix is sufficient. > > I think most of the checks done in `ActOnEnumBody` should be (re) performed > > on instantiation. > >

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

2025-01-06 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto updated https://github.com/llvm/llvm-project/pull/121781 >From 08b838adf275f1e0eaf2ab3e3d4b2b6d89bf4ed6 Mon Sep 17 00:00:00 2001 From: Arseniy Zaostrovnykh Date: Mon, 6 Jan 2025 14:37:08 +0100 Subject: [PATCH 01/11] [NFC] Replace getRegionValueSymbol with get This sho

[clang] [libcxx] [Clang] Implement CWG2369 "Ordering between constraints and substitution" (PR #102857)

2025-01-06 Thread Younan Zhang via cfe-commits
@@ -174,6 +174,26 @@ static_assert(!__is_layout_compatible(StructWithAnonUnion, StructWithAnonUnion3) #endif } // namespace cwg2759 +#if __cplusplus >= 202002L +namespace cwg2770 { // cwg2770: 20 zyn0217 wrote: Thanks for the post cleanup! Just learned how t

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

2025-01-06 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/120920 error: too big or took too long to generate ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

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

2025-01-06 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/121598 >From 74f86806bbdf1397973f70043ce0856bc6a4a4a7 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Fri, 3 Jan 2025 14:52:31 -0500 Subject: [PATCH 1/2] [SPIRV] Add Target Builtins using Distance ext as an example

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

2025-01-06 Thread Farzon Lotfi via cfe-commits
farzonl wrote: @Endilll It looks like you are the code owner for `/clang/include/clang/Sema/Sema.h` Are you happy with these changes? https://github.com/llvm/llvm-project/pull/121598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[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/3] [

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

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/121777 >From 00772b871de43a5e30aca2a65a89675117cafbf1 Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 31 Dec 2024 17:22:02 + Subject: [PATCH 1/2] [AArch64][SME] Add diagnostics to CheckConstexpr

[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] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes One of our contributors got confused by the behavior of the script when they incorrectly specified the status of a CWG issue (https://github.com/llvm/llvm-project/pull/102857/files#r1904264872), and th

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

2025-01-06 Thread via cfe-commits
Author: Sameer Sahasrabuddhe Date: 2025-01-06T21:34:11+05:30 New Revision: df67e37e37a7862e1e67f52e01f0c9a019477930 URL: https://github.com/llvm/llvm-project/commit/df67e37e37a7862e1e67f52e01f0c9a019477930 DIFF: https://github.com/llvm/llvm-project/commit/df67e37e37a7862e1e67f52e01f0c9a01947793

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

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

[clang] [clang] Improve `make_cxx_dr_status` behavior when error occurs (PR #121785)

2025-01-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/121785 One of our contributors got confused by the behavior of the script when they incorrectly specified the status of a CWG issue (https://github.com/llvm/llvm-project/pull/102857/files#r1904264872), and this is an

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

2025-01-06 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2025-01-06T20:05:17+04:00 New Revision: 10fb5d2b4be54c779eda80b65a737b9dae2d959b URL: https://github.com/llvm/llvm-project/commit/10fb5d2b4be54c779eda80b65a737b9dae2d959b DIFF: https://github.com/llvm/llvm-project/commit/10fb5d2b4be54c779eda80b65a737b9dae2d959b.

[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 closed https://github.com/llvm/llvm-project/pull/121687 ___ 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 Simon Pilgrim via cfe-commits
@@ -649,7 +649,9 @@ Unless specified otherwise operation(±0) = ±0 and operation(±infinity) = ±in The integer elementwise intrinsics, including ``__builtin_elementwise_popcount``, ``__builtin_elementwise_bitreverse``, ``__builtin_elementwise_add_sat``, -``__builtin_elementwis

[clang] Warn when unique objects might be duplicated in shared libraries (PR #117622)

2025-01-06 Thread Devon Loehr via cfe-commits
DKLoehr wrote: Ping https://github.com/llvm/llvm-project/pull/117622 ___ 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 Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/121777 ___ 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 via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-backend-arm @llvm/pr-subscribers-clang Author: Kerry McLaughlin (kmclaughlin-arm) Changes CheckFunctionDeclaration emits diagnostics if any SME attributes are used by a function definition without the required +sme or

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

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm ready_for_review https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/121788 This adds support for parsing the attribute and codegen to map it to "aarch64_za_state_agnostic" LLVM IR attribute. This attribute is described in the Arm C Language Extensions (ACLE) document: https:/

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Sander de Smalen (sdesmalen-arm) Changes This adds support for parsing the attribute and codegen to map it to "aarch64_za_state_agnostic" LLVM IR attribute. This attribute is described in the Arm C Langu

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-06 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/121789 This patch adds a new __builtin_assume_dereferenceable to encode dereferenceability of a pointer using llvm.assume with an operand bundle. For now the builtin only accepts constant sizes, I am planning to drop th

[clang] [llvm] [Clang] Add __builtin_assume_dereferenceable to encode deref assumption. (PR #121789)

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Florian Hahn (fhahn) Changes This patch adds a new __builtin_assume_dereferenceable to encode dereferenceability of a pointer using llvm.assume with an operand bundle. For now the builtin only accepts co

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

2025-01-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/12282 Here

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

2025-01-06 Thread Craig Topper via cfe-commits
https://github.com/topperc 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] [llvm] [HLSL][RootSignature] Implement parsing of `RootParamter`s (PR #121803)

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

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

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes ``` - Implement the ParseRootParameter methods in ParseHLSLRootSignature - Define the in-memory represenation of the various RootParameters and adds it to the RootElement structure - Add testing of valid input

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-06 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/104661 >From 76db8c65328736fae39bd6f7585f8274e9f34143 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 17 Dec 2024 23:50:06 -0500 Subject: [PATCH] [Clang] Remove 3-element vector load and store special handling

[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)

2025-01-06 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119563 From 659eda3ec76b63418f8b621b004728d9d7bf26ad Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 22:17:51 +0800 Subject: [PATCH 01/11] [clang] Fix crashes when passing VLA to va_arg --- clang/li

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

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-bootstrap-asan` running on `sanitizer-buildbot8` while building `clang,llvm` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/3918 Here is the r

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

2025-01-06 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Is this still worth adding here? I didn't see an equivalent in clang's -Wall. Indeed Clang is missing this check in -Wall. For parity with GCC it probably makes sense to add it to -Wall as well instead of being a clang-tidy check. What do you think @AaronBallman ? https

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-06 Thread Timm Baeder via cfe-commits
@@ -1921,6 +1921,22 @@ static bool EvaluateFixedPointOrInteger(const Expr *E, APFixedPoint &Result, static bool EvaluateFixedPoint(const Expr *E, APFixedPoint &Result, EvalInfo &Info); +/// Support for atomic builtins tbaederr w

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-06 Thread Timm Baeder via cfe-commits
@@ -1921,6 +1921,22 @@ static bool EvaluateFixedPointOrInteger(const Expr *E, APFixedPoint &Result, static bool EvaluateFixedPoint(const Expr *E, APFixedPoint &Result, EvalInfo &Info); +/// Support for atomic builtins +static bool EvaluateAtomic

[clang] [clang] constexpr atomic builtins (__c11_atomic_OP and __atomic_OP) (PR #98756)

2025-01-06 Thread Timm Baeder via cfe-commits
@@ -17893,4 +17996,441 @@ std::optional EvaluateBuiltinIsWithinLifetime(IntExprEvaluator &IEE, IsWithinLifetimeHandler handler{Info}; return findSubobject(Info, E, CO, Val.getLValueDesignator(), handler); } + } // namespace + +static bool EvaluateAtomicOrder(const AtomicE

[clang] [clang] add llvm abi support (PR #121123)

2025-01-06 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: > That said, I tend to agree with the review at [#121123 > (comment)](https://github.com/llvm/llvm-project/pull/121123#discussion_r1900548165) > that this doesn't seem like the right approach. Yeah I agree too, I'm not sure what the right approach is but that's one of th

[clang] 653a547 - [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (#120507)

2025-01-06 Thread via cfe-commits
Author: Ian Anderson Date: 2025-01-06T21:33:51-08:00 New Revision: 653a54727eaa18c43447ad686c987db67f1dda74 URL: https://github.com/llvm/llvm-project/commit/653a54727eaa18c43447ad686c987db67f1dda74 DIFF: https://github.com/llvm/llvm-project/commit/653a54727eaa18c43447ad686c987db67f1dda74.diff

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

2025-01-06 Thread Balazs Benics via cfe-commits
steakhal wrote: I find this really unfortunate that I had to patch the other places where we initialize the AnalyzerOptions table. Just because the we can't assign the default value to the given option. This makes me reconsider my approach because it WILL break all downstream users. Any suggest

[clang] [Clang] [NFC] Refactor more AST visitors (PR #116823)

2025-01-06 Thread Timm Baeder via cfe-commits
@@ -427,42 +423,53 @@ class ParentMapContext::ParentMap::ASTVisitor return Result; } - bool TraverseDecl(Decl *DeclNode) { + bool TraverseDecl(Decl *DeclNode) override { return TraverseNode( -DeclNode, DeclNode, [&] { return VisitorBase::TraverseDecl(DeclN

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

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

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2025-01-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `clang,llvm` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/10589 Here is the rele

[clang] [clang] Fix crashes when passing VLA to va_arg (PR #119563)

2025-01-06 Thread via cfe-commits
https://github.com/amane-ame updated https://github.com/llvm/llvm-project/pull/119563 From 659eda3ec76b63418f8b621b004728d9d7bf26ad Mon Sep 17 00:00:00 2001 From: amane-ame Date: Wed, 11 Dec 2024 22:17:51 +0800 Subject: [PATCH 01/11] [clang] Fix crashes when passing VLA to va_arg --- clang/li

[clang] [clang] [NFC] explicitly check if ParentMap contains key (PR #121736)

2025-01-06 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra updated https://github.com/llvm/llvm-project/pull/121736 >From 2cae10eb0b1e94729c26299af018216e729607de Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Thu, 2 Jan 2025 14:30:07 +0530 Subject: [PATCH 1/2] [clang] explicitly check if ParentMap contains key T

[clang] [clang] [NFC] explicitly check if ParentMap contains key (PR #121736)

2025-01-06 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra updated https://github.com/llvm/llvm-project/pull/121736 >From 2cae10eb0b1e94729c26299af018216e729607de Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Thu, 2 Jan 2025 14:30:07 +0530 Subject: [PATCH 1/2] [clang] explicitly check if ParentMap contains key T

[clang] [clang] [NFC] explicitly check if ParentMap contains key (PR #121736)

2025-01-06 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -78,7 +78,7 @@ static void BuildParentMap(MapTy& M, Stmt* S, // The right thing to do is to give the OpaqueValueExpr its syntactic // parent, then not reassign that when traversing the semantic expressions. OpaqueValueExpr *OVE = cast(S); -if (OVMode == OV_Tr

[clang] [clang] [NFC] explicitly check if ParentMap contains key (PR #121736)

2025-01-06 Thread Sameer Sahasrabuddhe via cfe-commits
@@ -34,13 +34,13 @@ static void BuildParentMap(MapTy& M, Stmt* S, case Stmt::PseudoObjectExprClass: { PseudoObjectExpr *POE = cast(S); -if (OVMode == OV_Opaque && M[POE->getSyntacticForm()]) +if (OVMode == OV_Opaque && M.contains(POE->getSyntacticForm())) ---

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2025-01-06 Thread Shilei Tian via cfe-commits
shiltian wrote: ping @arsenm @topperc https://github.com/llvm/llvm-project/pull/104661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/1215

[clang] Reapply "[clang][analyzer] Stable order for SymbolRef-keyed containers" (PR #121749)

2025-01-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/121749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang][analyzer] Stable order for SymbolRef-keyed containers" (PR #121749)

2025-01-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/121749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: ChuanqiXu9 wrote: > Thanks for the review! Would you mind doing the merge? I do not

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

2025-01-06 Thread via cfe-commits
Author: Alejandro Álvarez Ayllón Date: 2025-01-06T18:52:11+08:00 New Revision: a13bcf3ced35b0df89ac13670690b4482052e47f URL: https://github.com/llvm/llvm-project/commit/a13bcf3ced35b0df89ac13670690b4482052e47f DIFF: https://github.com/llvm/llvm-project/commit/a13bcf3ced35b0df89ac13670690b448205

[clang] Reapply "[clang][analyzer] Stable order for SymbolRef-keyed containers" (PR #121749)

2025-01-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Once the premerge bots are happy, we can merge this. Thanks! https://github.com/llvm/llvm-project/pull/121749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2025-01-06 Thread via cfe-commits
https://github.com/Discookie updated https://github.com/llvm/llvm-project/pull/117165 >From e90ab99dde0945d103959fa73ea2d31852f753e7 Mon Sep 17 00:00:00 2001 From: Viktor Date: Thu, 21 Nov 2024 14:33:24 + Subject: [PATCH 1/5] [clang-tidy] Add C++ member function support to user-defined bug

[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: I see, let me change it to this approach~ https://github.com/l

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2025-01-06 Thread via cfe-commits
Discookie wrote: Removed ``ShowFullyQualifiedNames`` for this PR, once this PR is in I'll open a separate one for it. Added an example for matching all templates to the docs as well. https://github.com/llvm/llvm-project/pull/117165 ___ cfe-commits mai

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

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

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

2025-01-06 Thread via cfe-commits
https://github.com/hchandel created https://github.com/llvm/llvm-project/pull/121752 The Qualcomm uC Xqcicm extension adds 13 conditional move instructions. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/latest This patch adds assembler only support. >From

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

2025-01-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: quic_hchandel (hchandel) Changes The Qualcomm uC Xqcicm extension adds 13 conditional move instructions. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/latest This p

[clang] [Multilib] Custom flags YAML parsing (PR #110657)

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/110657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-06 Thread via cfe-commits
Author: Benjamin Maxwell Date: 2025-01-06T11:07:25Z New Revision: e4e2f5369301d0965343406089d63ddfba4c08d0 URL: https://github.com/llvm/llvm-project/commit/e4e2f5369301d0965343406089d63ddfba4c08d0 DIFF: https://github.com/llvm/llvm-project/commit/e4e2f5369301d0965343406089d63ddfba4c08d0.diff L

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

2025-01-06 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed 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] Do not serialize function definitions without a body (PR #121550)

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -6092,12 +6092,14 @@ void ASTWriter::WriteDeclUpdatesBlocks(ASTContext &Context, // An updated body is emitted last, so that the reader doesn't need // to skip over the lazy body to reach statements for other records. - if (Kind == UPD_CXX_ADDED_FUNCTION_D

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

2025-01-06 Thread via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You c

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

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 approved this pull request. LGTM now. We can land this after you fix the formatting issue.

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

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/121550 ___

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

2025-01-06 Thread Chuanqi Xu via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?=, Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: @@ -7230,6 +7230,9 @@ void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) { if (!D->is

[clang] [C++20][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2025-01-06 Thread via cfe-commits
jijjijj wrote: @ChuanqiXu9 here's the PR: https://github.com/llvm/llvm-project/pull/121739 https://github.com/llvm/llvm-project/pull/118537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

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

2025-01-06 Thread Alejandro Álvarez Ayllón via cfe-commits
@@ -7230,6 +7230,9 @@ void ASTWriter::CompletedImplicitDefinition(const FunctionDecl *D) { if (!D->isFromASTFile()) return; // Declaration not imported from PCH. + if (!D->doesThisDeclarationHaveABody()) +return; // The function definition may not have a body due t

[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

<    1   2   3   4   5   6   >