[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread Balazs Benics via cfe-commits
steakhal wrote: Hey, looks like a nice patch! I only have one question. Have you considered overriding some other `getRuntimeDefinition` too? When I'm looking at the [CallEvent ](https://clang.llvm.org/doxygen/classclang_1_1ento_1_1CallEvent.html) inheritance graph, there could be a couple ot

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/144930 Under strict mode, the templated `getTrailingObjects` can be called only when there is > 1 trailing types. The strict mode can be disabled on a per-call basis when its not possible to know statically if there w

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-19 Thread Reid Kleckner via cfe-commits
https://github.com/rnk updated https://github.com/llvm/llvm-project/pull/144428 >From afb050103754e6b4656c68da8ddfb6b1a4e03e5d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 16 Jun 2025 20:08:12 + Subject: [PATCH 1/5] [clang] Register all LLVM targets in AllClangUnitTest main Addr

[clang] 633e740 - [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (#144914)

2025-06-19 Thread via cfe-commits
Author: Shilei Tian Date: 2025-06-19T14:32:20-04:00 New Revision: 633e740e3453bab06bf535830174c759100257f9 URL: https://github.com/llvm/llvm-project/commit/633e740e3453bab06bf535830174c759100257f9 DIFF: https://github.com/llvm/llvm-project/commit/633e740e3453bab06bf535830174c759100257f9.diff L

[clang] [Clang][AMDGPU][Driver] Add `avail-extern-gv-in-addrspace-to-local` option when ThinTLO is enabled (PR #144914)

2025-06-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/144914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Diagnose unsatisfied `std::is_assignable`. (PR #144836)

2025-06-19 Thread Eli Friedman via cfe-commits
@@ -99,6 +127,14 @@ static_assert(std::is_trivially_copyable_v); // expected-note@-1 {{'int &' is not trivially copyable}} \ // expected-note@-1 {{because it is a reference type}} +static_assert(std::is_assignable::value); + +static_assert(std::is_assignable::value); +// expec

[clang] [clang] NFC: introduce UnsignedOrNone as a replacement for std::optional (PR #134142)

2025-06-19 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Just noticed that this is not using `std::optional`. If this is > good, why don't we put this to `llvm/ADT`? I feel that is a better place. I don't disagree in principle, we just don't need to preempt making this available for all of llvm, if no one has the time to make a pat

[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread Oliver Stöneberg via cfe-commits
firewave wrote: The same occurs with assigning to `auto`: https://godbolt.org/z/nofG6cehf Will this also be handled by this change? https://github.com/llvm/llvm-project/pull/144906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-19 Thread Aviral Singh via cfe-commits
https://github.com/aviralsingh2004 created https://github.com/llvm/llvm-project/pull/144935 This patch introduces a new Clang-compatible wrapper tool `clang-omp-pr-desc`, which forwards arguments to `omp-pr-summary describe`. This tool simplifies generation of structured OpenMP pull request su

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-19 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Aviral Singh (aviralsingh2004) Changes This patch introduces a new Clang-compatible wrapper tool `clang-omp-pr-desc`, which forwards arguments to `omp-pr-summary describe`. This tool simplifies generation of structured OpenMP

[clang] [TableGen] Use ListSeparator (NFC) (PR #144936)

2025-06-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/144936 Note that an instance of ListSeparator evaluates to the empty string for the first time and then ", " for subsequent references. >From f0907a039a6de8fe305a5eac1b4e41fd1adff7bd Mon Sep 17 00:00:00 2001 Fr

[clang] [TableGen] Use ListSeparator (NFC) (PR #144936)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes Note that an instance of ListSeparator evaluates to the empty string for the first time and then ", " for subsequent references. --- Full diff: https://github.com/llvm/llvm-project/pull/144936.diff 2

[clang] [llvm] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them (PR #144788)

2025-06-19 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/144788 >From e63c64bb71e99e822557b2d80b26d21648e3e0ec Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 18 Jun 2025 16:05:44 -0400 Subject: [PATCH 1/2] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them

[clang] [llvm] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them (PR #144788)

2025-06-19 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/144788 >From e63c64bb71e99e822557b2d80b26d21648e3e0ec Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 18 Jun 2025 16:05:44 -0400 Subject: [PATCH 1/2] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

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

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

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

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/140962 >From 6ee2563c4b2d69b252467b9896a1d8b943af384d Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Tue, 20 May 2025 19:47:29 + Subject: [PATCH 1/2] rebased original version --- .../clang/Basic/DiagnosticSema

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Finn Plummer via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-06-19 Thread Julian Schmidt via cfe-commits
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check( if (!ND) return; - IdentifierInfo *NDII = ND->getIdentifier(); + addDeclToCheck(ND, cast(ND->getDeclContext() +->getNonTransparentContext())); + + // Associate template p

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-06-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM. Thanks for the quite big performance improvement, and sorry this took a bit until it was reviewed. https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-06-19 Thread Julian Schmidt via cfe-commits
@@ -181,42 +160,105 @@ void ConfusableIdentifierCheck::check( if (!ND) return; - IdentifierInfo *NDII = ND->getIdentifier(); + addDeclToCheck(ND, cast(ND->getDeclContext() +->getNonTransparentContext())); + + // Associate template p

[clang-tools-extra] [clang-tidy] Switch misc-confusable-identifiers check to a faster algorithm. (PR #130369)

2025-06-19 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/130369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a9d175f - [CodeGen] Use range-based for loops (NFC) (#144939)

2025-06-19 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-19T14:57:58-07:00 New Revision: a9d175f1735a508ac05ab48d83a99071ba97c10e URL: https://github.com/llvm/llvm-project/commit/a9d175f1735a508ac05ab48d83a99071ba97c10e DIFF: https://github.com/llvm/llvm-project/commit/a9d175f1735a508ac05ab48d83a99071ba97c10e.diff L

[clang] [CodeGen] Use range-based for loops (NFC) (PR #144939)

2025-06-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/144939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Finn Plummer via cfe-commits
inbelic wrote: Going through the commits 1 by 1 should be easier to read then from top to bottom of this diff. https://github.com/llvm/llvm-project/pull/144813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [AArch64] Add option -msve-streaming-vector-bits= . (PR #144611)

2025-06-19 Thread Pengcheng Wang via cfe-commits
@@ -1034,9 +1034,16 @@ class TargetInfo : public TransferrableTargetInfo, /// set of primary and secondary targets. virtual llvm::SmallVector getTargetBuiltins() const = 0; + enum class ArmStreamingKind { +NotStreaming, +StreamingCompatible, +Streaming, + };

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: The implementation all looks fairly straightforward here, but shouldn't we be naming the `clang-dxc` flag to match `dxc`'s flag that does this? That is, `-force-rootsig-ver`. https://github.com/llvm/llvm-project/pull/144813 _

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -5179,6 +5179,8 @@ class HLSLRootSignatureDecl final llvm::hlsl::rootsig::RootElement> { friend TrailingObjects; + llvm::dxil::RootSignatureVersion RootSigVer; bogner wrote: This is a member of a HLSLRootSignatureDecl

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -99,6 +99,12 @@ enum class SamplerFeedbackType : uint32_t { const unsigned MinWaveSize = 4; const unsigned MaxWaveSize = 128; +// D3D_ROOT_SIGNATURE_VERSION +enum class RootSignatureVersion { + rootsig_1_0 = 0x1, + rootsig_1_1 = 0x2, +}; bogner wrote: Sh

[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)

2025-06-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/144813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/144982 ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::optional is kind

[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::optiona

[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-xtensa Author: Kazu Hirata (kazutakahirata) Changes ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::option

[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Kazu Hirata (kazutakahirata) Changes ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::optiona

[clang] [clang] Migrate away from ArrayRef(std::nullopt) (NFC) (PR #144982)

2025-06-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Stanislav Mekhanoshin (rampitec) Changes This is just a stub for now. --- Patch is 29.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/144965.diff 25 Files Affected: - (modified) c

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Stanislav Mekhanoshin (rampitec) Changes This is just a stub for now. --- Patch is 29.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/144965.diff 25 Files Affected: - (modified) cl

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Stanislav Mekhanoshin (rampitec) Changes This is just a stub for now. --- Patch is 29.12 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/144965.diff 25 Files Affected: - (modified) cla

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/140962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: Looks pretty good. Mostly stylistic comments. https://github.com/llvm/llvm-project/pull/140962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -71,13 +71,17 @@ class MetadataBuilder { SmallVector GeneratedMetadata; }; -// RangeInfo holds the information to correctly construct a ResourceRange -// and retains this information to be used for displaying a better diagnostic struct RangeInfo { - const static uint32_

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here + if (handleRootSignatureDecl(SignatureDecl, Loc)) +return

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -71,13 +71,17 @@ class MetadataBuilder { SmallVector GeneratedMetadata; }; -// RangeInfo holds the information to correctly construct a ResourceRange -// and retains this information to be used for displaying a better diagnostic struct RangeInfo { - const static uint32_

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s -verify + +#define Overlap0 "CBV(b42), CBV(b42)" + +[RootSignature(Overlap0)] // expected-error {{resource ranges b[42;42] and b[42;42] overlap within space = 0 and visibility = All}} ---

[clang] [llvm] [HLSL][RootSignature] Implement validation of resource ranges for `RootDescriptors` (PR #140962)

2025-06-19 Thread Justin Bogner via cfe-commits
@@ -1068,10 +1069,139 @@ void SemaHLSL::ActOnFinishRootSignatureDecl( SemaRef.getASTContext(), /*DeclContext=*/SemaRef.CurContext, Loc, DeclIdent, Elements); + // Perform validation of constructs here bogner wrote: I don't think this comment is h

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/144965 This is just a stub for now. >From a176e3547079ded67ce4b3ed91ca9de6751a920b Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Thu, 19 Jun 2025 15:57:29 -0700 Subject: [PATCH] [AMDGPU] Initial support

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: * **#144965** https://app.graphite.dev/github/pr/llvm/llvm-project/144965?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/144

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec ready_for_review https://github.com/llvm/llvm-project/pull/144965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BUG] Fix : #139514 (PR #144956)

2025-06-19 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Where is the fix? Only test file is modified currently. https://github.com/llvm/llvm-project/pull/144956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread via cfe-commits
flovent wrote: > I only have one question. Have you considered overriding some other > `getRuntimeDefinition` too? When I'm looking at the [CallEvent > ](https://clang.llvm.org/doxygen/classclang_1_1ento_1_1CallEvent.html) > inheritance graph, there could be a couple other options too. Don't g

[clang] [lld] Use the Windows SDK arguments over the environment (PR #144805)

2025-06-19 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > Just to confirm, does this make clang-cl line up with cl's behavior? I suspect not; these options are clang-cl specific. https://github.com/llvm/llvm-project/pull/144805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -195,6 +196,10 @@ class ExternalASTSource : public RefCountedBase { /// module. virtual bool wasThisDeclarationADefinition(const FunctionDecl *FD); + virtual bool hasInitializerWithSideEffects(const VarDecl *VD) const { ChuanqiXu9 wrote: Generally, e

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -1442,6 +1442,10 @@ class ASTReader const StringRef &operator*() && = delete; }; + /// VarDecls with initializers containing side effects must be emitted, + /// but DeclMustBeEmitted is not allowed to deserialize the intializer. + llvm::SmallPtrSet InitSideEffectVa

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -1632,6 +1632,10 @@ RedeclarableResult ASTDeclReader::VisitVarDeclImpl(VarDecl *VD) { VD->NonParmVarDeclBits.PreviousDeclInSameBlockScope = VarDeclBits.getNextBit(); +bool HasInitWithSideEffect = VarDeclBits.getNextBit(); +if (HasInitWithSideEffect) +

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + // Check if we can get the initializer without deserializing + const Expr *E = nullptr; + if (au

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: I just found I forgot pushing pending comments. https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
@@ -2434,6 +2434,31 @@ VarDecl *VarDecl::getInitializingDeclaration() { return Def; } +bool VarDecl::hasInitWithSideEffects() const { + if (!hasInit()) +return false; + + // Check if we can get the initializer without deserializing + const Expr *E = nullptr; + if (au

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-06-19 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Moving them into clc should resolve the concern, but I don't know where is > destination directory in clc. I don't know how to map `opencl/lib/amdgcn` and > `opencl/lib/r600` to `clc/lib/amdgcn` and `clc/lib/amdgpu`. Do you have > suggestions about the mapping? r600 and amdgcn

[clang] [Modules] Record whether VarDecl initializers contain side effects (PR #143739)

2025-06-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/143739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-19 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/144970 This is a simple extension of 443377a9d1a8d4a69a317a1a892184c59dd0aec6 to also handle the implicit expressions created by default initialization. This usually doesn't matter, but it's relevant if the con

[clang] [clang] Handle consteval constructors with default initialization. (PR #144970)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes This is a simple extension of 443377a9d1a8d4a69a317a1a892184c59dd0aec6 to also handle the implicit expressions created by default initialization. This usually doesn't matter, but it's relevant if the

[clang] [llvm] [AMDGPU] Initial support for gfx1250 target. (PR #144965)

2025-06-19 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/144965 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 50c5ecd - [NFC] [Serialization] Remove a useless comment

2025-06-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-20T10:33:35+08:00 New Revision: 50c5ecd35402dc734f2a462df5532e77a5ce12b2 URL: https://github.com/llvm/llvm-project/commit/50c5ecd35402dc734f2a462df5532e77a5ce12b2 DIFF: https://github.com/llvm/llvm-project/commit/50c5ecd35402dc734f2a462df5532e77a5ce12b2.diff LO

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/144934 The current validation checks for numthreads assume that the target is DXIL so the version checks inadvertently issue error when targeting SPIR-V. >From 0b809d5a51a76ef76a68574b8dc447de10d4654a Mon Sep 17 00:0

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang Author: Steven Perron (s-perron) Changes The current validation checks for numthreads assume that the target is DXIL so the version checks inadvertently issue error when targeting SPIR-V. --- Full diff: https://github.co

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: {modernize-use-override.AllowVirtual: true}}" + +struct Base { + virtual ~Base(); + virtual void a(); + virtual void b(); + virtual void c(); +}; + +struct Derived

[clang] [HLSL][SPIRV] Boolean in a RawBuffer should be i32 and Boolean vector in a RawBuffer should be (PR #144929)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Sarah Spall (spall) Changes Instead of converting the type in a RawBuffer to its HLSL type using 'ConvertType', use 'ConvertTypeForMem'. ConvertTypeForMem handles booleans being i32 and boolean vectors being < N x i32 >. Add tests

[clang] [HLSL][SPIRV] Boolean in a RawBuffer should be i32 and Boolean vector in a RawBuffer should be (PR #144929)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Sarah Spall (spall) Changes Instead of converting the type in a RawBuffer to its HLSL type using 'ConvertType', use 'ConvertTypeForMem'. ConvertTypeForMem handles booleans being i32 and boolean vectors being < N x i32 >. Add tests to show

[clang] [HLSL][SPIRV] Boolean in a RawBuffer should be i32 and Boolean vector in a RawBuffer should be (PR #144929)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Instead of converting the type in a RawBuffer to its HLSL type using 'ConvertType', use 'ConvertTypeForMem'. ConvertTypeForMem handles booleans being i32 and boolean vectors being < N x i32 >. Add tests to show

[clang] [lld] Use the Windows SDK arguments over the environment (PR #144805)

2025-06-19 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: Just to confirm, does this make clang-cl line up with cl's behavior? https://github.com/llvm/llvm-project/pull/144805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Boolean in a RawBuffer should be i32 and Boolean vector in a RawBuffer should be (PR #144929)

2025-06-19 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/144929 Instead of converting the type in a RawBuffer to its HLSL type using 'ConvertType', use 'ConvertTypeForMem'. ConvertTypeForMem handles booleans being i32 and boolean vectors being < N x i32 >. Add tests to show b

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-06-19 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 HEAD~1 HEAD --extensions h,c,cpp -- clang/test/OpenMP/fuse_ast_print.cpp clang/test/O

[clang] [Clang] Diagnose unsatisfied `std::is_assignable`. (PR #144836)

2025-06-19 Thread Ross Kirsling via cfe-commits
@@ -99,6 +127,14 @@ static_assert(std::is_trivially_copyable_v); // expected-note@-1 {{'int &' is not trivially copyable}} \ // expected-note@-1 {{because it is a reference type}} +static_assert(std::is_assignable::value); + +static_assert(std::is_assignable::value); +// expec

[clang] [Clang] Diagnose unsatisfied `std::is_assignable`. (PR #144836)

2025-06-19 Thread Ross Kirsling via cfe-commits
https://github.com/rkirsling edited https://github.com/llvm/llvm-project/pull/144836 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-19 Thread via cfe-commits
namazso wrote: > For an SEH exception that occurs within a function due to a CALL (such as a > bogus indirect call), the IP should point to the beginning of the CALL > instruction, so the IP2State tables should point to the correct region. Yes, I was just pointing out that same-frame catch isn

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: {modernize-use-override.AllowVirtual: true}}" + +struct Base { + virtual ~Base(); + virtual void a(); + virtual void b(); + virtual void c(); +}; + +struct Derived

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %check_clang_tidy %s modernize-use-override %t -- \ +// RUN: -config="{CheckOptions: {modernize-use-override.AllowVirtual: true}}" + +struct Base { + virtual ~Base(); + virtual void a(); + virtual void b(); + virtual void c(); +}; + +struct Derived

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/144916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add option to keep virtual in 'modernize-use-override' (PR #144916)

2025-06-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor requested changes to this pull request. Please add your change to ReleaseNotes.rst https://github.com/llvm/llvm-project/pull/144916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-19 Thread Reid Kleckner via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp rnk wrote: Yeah,

[clang] [llvm] Add support for Windows Secure Hot-Patching (PR #138972)

2025-06-19 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/138972 >From 7382ec9923a6ab96cc6c82782dda33ec78c0bc2e Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Thu, 3 Apr 2025 16:10:50 -0700 Subject: [PATCH 1/2] Windows hotpatching support move hotpatch tests to X86 subd

[clang] [CodeGen] Use range-based for loops (NFC) (PR #144939)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/144939.diff 10 Files Affected: - (modified) clang/lib/CodeGen/CGBlocks.cpp (+3-3) - (modified) clang/lib/CodeGen/CGCleanup.cpp (+2-2) - (mo

[clang] [CodeGen] Use range-based for loops (NFC) (PR #144939)

2025-06-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/144939 None >From 2b6ab2eb7a999f2f56ef637b00048388be00a6db Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 15 Jun 2025 21:53:53 -0700 Subject: [PATCH] [CodeGen] Use range-based for loops (NFC) --- clang

[clang] [CodeGen] Use range-based for loops (NFC) (PR #144939)

2025-06-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/144939.diff 10 Files Affected: - (modified) clang/lib/CodeGen/CGBlocks.cpp (+3-3) - (modified) clang/lib/CodeGen/CGCleanup.cpp (+2-2

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-19 Thread Aviral Singh via cfe-commits
https://github.com/aviralsingh2004 reopened https://github.com/llvm/llvm-project/pull/144935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-tools-extra] Add clang-omp-pr-desc wrapper for OpenMP PR summarization (PR #144935)

2025-06-19 Thread Aviral Singh via cfe-commits
https://github.com/aviralsingh2004 closed https://github.com/llvm/llvm-project/pull/144935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Use ListSeparator (NFC) (PR #144936)

2025-06-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul approved this pull request. https://github.com/llvm/llvm-project/pull/144936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-19 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?BĂ€der?= , Timm =?utf-8?q?BĂ€der?= Message-ID: In-Reply-To: tbaederr wrote: Can you try applying ```diff diff --git i/clang/lib/AST/ByteCode/IntegralAP.h w/clang/lib/AST/ByteCode/IntegralAP.h index 0280ea072ca9..4c1fb61e3e15 100644 --- i/clang/lib/AST/ByteCode/IntegralAP.h +++ w

[clang] [llvm] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them (PR #144788)

2025-06-19 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/144788 >From 32b8b89591596f5ddf467c96311fc431656d6cd1 Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 18 Jun 2025 16:05:44 -0400 Subject: [PATCH 1/2] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them

[clang] [llvm] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them (PR #144788)

2025-06-19 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/144788 >From 32b8b89591596f5ddf467c96311fc431656d6cd1 Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 18 Jun 2025 16:05:44 -0400 Subject: [PATCH 1/2] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them

[clang] dc058a3 - [TableGen] Use ListSeparator (NFC) (#144936)

2025-06-19 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-19T13:17:23-07:00 New Revision: dc058a3d84ed1bc4006416023e8b336f3214bdc7 URL: https://github.com/llvm/llvm-project/commit/dc058a3d84ed1bc4006416023e8b336f3214bdc7 DIFF: https://github.com/llvm/llvm-project/commit/dc058a3d84ed1bc4006416023e8b336f3214bdc7.diff L

[clang] [TableGen] Use ListSeparator (NFC) (PR #144936)

2025-06-19 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/144936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them (PR #144788)

2025-06-19 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/144788 >From dcf0054fbfecdf0bede93de8fe526ac2ecfc246b Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 18 Jun 2025 16:05:44 -0400 Subject: [PATCH 1/2] [ObjCARC] Delete empty autoreleasepools with no autoreleases in them

[libclc] [libclc] Declare workitem built-ins in clc, move ptx-nvidiacl workitem built-ins into clc (PR #144333)

2025-06-19 Thread Wenju He via cfe-commits
wenju-he wrote: > Is an issue here perhaps that downstream users may have implemented (e.g.) > `get_global_offset` in their toolchains, but after this change they'll > suddenly see a definition of this function that they're not expecting? > > I suppose they would have to implement CLC function

[clang] [clang][analyzer] Correctly handle lambda-converted function pointers (PR #144906)

2025-06-19 Thread via cfe-commits
flovent wrote: > The same occurs with assigning to `auto`: https://godbolt.org/z/nofG6cehf > > Will this also be handled by this change? If you mean directly calling this lambda, analyzer can already analyze `operator()` correctly before this patch, because neither `CXXConversionDecl` and `__

[clang] 5cbed34 - [X86] Remove CLDEMOTE from Arrowlake and later hybrid processors (#144833)

2025-06-19 Thread via cfe-commits
Author: Phoebe Wang Date: 2025-06-20T08:57:37+08:00 New Revision: 5cbed34404a3862c2d7f18e4b4b24f5ce1516a8d URL: https://github.com/llvm/llvm-project/commit/5cbed34404a3862c2d7f18e4b4b24f5ce1516a8d DIFF: https://github.com/llvm/llvm-project/commit/5cbed34404a3862c2d7f18e4b4b24f5ce1516a8d.diff L

  1   2   3   >