[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-14 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] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 471f034 - [clang-tidy][NFC] clean ReleaseNotes.rst (#130626)

2025-03-14 Thread via cfe-commits
Author: Baranov Victor Date: 2025-03-14T23:31:50+01:00 New Revision: 471f034b1cdaaa7748719efb848684e5d2c6b923 URL: https://github.com/llvm/llvm-project/commit/471f034b1cdaaa7748719efb848684e5d2c6b923 DIFF: https://github.com/llvm/llvm-project/commit/471f034b1cdaaa7748719efb848684e5d2c6b923.diff

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
dong-miao wrote: > This should fix your failures > > ``` > diff --git a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp > b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp > index 214378d4b554..59ab59703ac7 100644 > --- a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cp

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
dong-miao wrote: > commented Thanks for your help. I have successfully solved the problem. https://github.com/llvm/llvm-project/pull/131094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/25] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: In hindsight, I wish I made this a stacked diff against the real repo. I have an implementation that addresses this in https://github.com/c

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/24] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/131175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/23] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [C++20][Modules] Prevent premature calls to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
cyndyishida wrote: > I have a similar concern to @jansvoboda11 that we probably need to check the > invocation paths as well. > The situation this covers is how likely is it that the build system is going > to determine this needs to be rebuilt, and that happens (in most cases) > purely based

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread Craig Topper via cfe-commits
topperc wrote: This should fix your failures ``` diff --git a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp b/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp index 214378d4b554..59ab59703ac7 100644 --- a/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp +++ b/llvm/lib

[clang] [clang] Fix UEFI Target info (PR #127290)

2025-03-14 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: Would this unblock #131376? https://github.com/llvm/llvm-project/pull/127290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/24] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-14 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/23] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [clang-tools-extra] [Clang] Implement CWG2813: Class member access with prvalues (PR #120223)

2025-03-14 Thread Shafik Yaghmour via cfe-commits
shafik wrote: It looks like this is linked to: https://github.com/llvm/llvm-project/issues/131410 and it is not clear to me the diagnostic in these cases makes a lot of sense or at least the motivation does not feel strong to me. This new approach feels evolutionary to me and if this was the

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-14 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/131057 >From 255050e6d1e3ebbf25b30c17a10be14d29e5dae7 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Tue, 4 Mar 2025 12:47:24 -0500 Subject: [PATCH] [clang][CIR] Add missing dependency on MLIR headers - Add depend

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/129751 >From 7dadb10f4e63e419a230270b5f26a145d7015ae7 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 12 Mar 2025 10:20:16 -0700 Subject: [PATCH] [clang][deps] Implement efficient in-process `ModuleCache` -

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-14 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 deleted https://github.com/llvm/llvm-project/pull/129751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-14 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski edited https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-14 Thread Michal Paszkowski via cfe-commits
@@ -0,0 +1,501 @@ +//===- LowerGPUIntrinsic.cpp --===// +// +// 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: Ap

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-14 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski requested changes to this pull request. https://github.com/llvm/llvm-project/pull/131190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix uefi target for aarch64 & x86_64 (PR #120632)

2025-03-14 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/120632 >From e0d525f801f65588aa6b22a2827036a4c2d9c91c Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 19 Dec 2024 10:54:58 -0800 Subject: [PATCH 1/4] [clang] fix uefi data layout on x86 & aarch64 --- c

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Ben Langmuir via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-14 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From a1448c6ded1ee42677125b3c3dfdf24148eb12a0 Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-14 Thread Donát Nagy via cfe-commits
@@ -485,16 +485,60 @@ class Call { } // end eval namespace class CheckerBase : public ProgramPointTag { - CheckerNameRef Name; + /// A single checker class (i.e. a subclass of `CheckerBase`) can implement + /// multiple user-facing checkers that have separate names and can

[clang] [clang][modules][deps] Add mutex as an alternative to file lock (PR #129751)

2025-03-14 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I rebased this on top of the other PRs I've recently landed. This is ready for another round of reviews. https://github.com/llvm/llvm-project/pull/129751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [flang] [llvm] [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (PR #131379)

2025-03-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian created https://github.com/llvm/llvm-project/pull/131379 This is an extension of #131357. Hopefully this would be the last one. >From 59bc234d4a5c343e093417150688a3231a230961 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 14 Mar 2025 15:06:30 -0400 Subject: [

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { cyndyishida wrote: Added a test for this, modified from the working patch. https://github.com/llvm/llvm-project/pull/130634/files#diff-06c3b647f63ed03628260e6d

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida updated https://github.com/llvm/llvm-project/pull/130634 >From aca254a154489fda68292f6d06a866ae7011a7f6 Mon Sep 17 00:00:00 2001 From: Cyndy Ishida Date: Mon, 10 Mar 2025 09:06:32 -0700 Subject: [PATCH 1/4] [clang][DependencyScanning] Track modules that resolve f

[clang] [clang] Avoid doing C++20 aggregate init during copy-initialization (PR #131320)

2025-03-14 Thread via cfe-commits
@@ -6714,7 +6714,8 @@ void InitializationSequence::InitializeFrom(Sema &S, OverloadCandidateSet::iterator Best; OverloadingResult OR = getFailedCandidateSet().BestViableFunction( S, Kind.getLocation(), Best); -if (OR != OverloadingResult::OR_

[clang] befb52d - [Clang] Remove use of 'temporary' toolchains for offload deduction (#131332)

2025-03-14 Thread via cfe-commits
Author: Joseph Huber Date: 2025-03-14T11:08:31-05:00 New Revision: befb52db94cc63558981baac5e58d86ed2ec1f37 URL: https://github.com/llvm/llvm-project/commit/befb52db94cc63558981baac5e58d86ed2ec1f37 DIFF: https://github.com/llvm/llvm-project/commit/befb52db94cc63558981baac5e58d86ed2ec1f37.diff

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir edited https://github.com/llvm/llvm-project/pull/130634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
mpark wrote: > Thanks, the explanation and code change makes sense to me. ❤️ > Should this bugfix have a release note? I've added a couple of bullet points in the release notes. Please let me know if this is along the lines of what's expected. https://github.com/llvm/llvm-project/pull/129982

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-14 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129939 >From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 4 Mar 2025 09:53:56 -0800 Subject: [PATCH 01/13] extra scalar vector overloads for clamp --- .../lib/Headers/h

[clang-tools-extra] [clang-tidy][NFC] clean ReleaseNotes.rst (PR #130626)

2025-03-14 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/130626 >From 7aed54659acfc32a041cb71dd865d76c6bf44c0e Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 10 Mar 2025 18:54:53 +0300 Subject: [PATCH] [clang-tidy] NFS-clean release notes --- clang-tools-extra/d

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Richard Smith via cfe-commits
zygoloid wrote: Thank you! I can imagine figuring out what was wrong here was not easy! https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-14 Thread via cfe-commits
choikwa wrote: > Are you trying to do an IR lowering? It'd probably make more sense to handle > that in LLVM than clang, but I guess Matt would be the expert there. I had considered it but it has the issue of name aliasing since it just appears as an external call in LLVM after it's emitted by

[clang-tools-extra] [clang-tidy] Fixed bugprone-non-zero-enum-to-bool-conversion (PR #131407)

2025-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Improved bugprone-non-zero-enum-to-bool-conversion check to ignore enums without enumerators and enums with bool as underlying type. Fixes #130762 --- Full diff: https://github.com/llvm/llvm-project/pu

[clang-tools-extra] [clang-tidy] Fixed bugprone-non-zero-enum-to-bool-conversion (PR #131407)

2025-03-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/131407 Improved bugprone-non-zero-enum-to-bool-conversion check to ignore enums without enumerators and enums with bool as underlying type. Fixes #130762 >From f54b035af44fca80ac52e3661680d50fff5b64e5 Mon Sep 17 00:

[clang] 8f011e2 - [Sema] Avoid repeated hash lookups (NFC) (#131263)

2025-03-14 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-03-14T07:20:22-07:00 New Revision: 8f011e2c7f003f3e9823c057109d603ca698a4be URL: https://github.com/llvm/llvm-project/commit/8f011e2c7f003f3e9823c057109d603ca698a4be DIFF: https://github.com/llvm/llvm-project/commit/8f011e2c7f003f3e9823c057109d603ca698a4be.diff L

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-14 Thread Hans Wennborg via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunnecessary-virtual-specifier %s + +struct Foo final { + Foo() = default; + virtual ~Foo() = default; // expected-warning {{virtual method}} + virtual Foo& operator=(Foo& other) = default; // ex

[clang] 2a09523 - [clang] Add diagnostic for unresolved using declaration that shadows template parameters (#131328)

2025-03-14 Thread via cfe-commits
Author: NewSigma Date: 2025-03-14T15:30:01+01:00 New Revision: 2a09523480fc8320c4039e91592d99120e9ae6e7 URL: https://github.com/llvm/llvm-project/commit/2a09523480fc8320c4039e91592d99120e9ae6e7 DIFF: https://github.com/llvm/llvm-project/commit/2a09523480fc8320c4039e91592d99120e9ae6e7.diff LOG:

[clang-tools-extra] [clang-tidy] Add IgnoreMacros to readability-function-size (PR #131406)

2025-03-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/131406 Extend readability-function-size check by adding IgnoreMacros option. Fixes #112835 >From 95b3e21c8712d9489cdff8bc2ce78b447d894837 Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 7 Jan 2025 16:21:12 +00

[clang] [CIR] Don't generate ClangIR after an unrecoverable error occured (PR #130971)

2025-03-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/130971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark ready_for_review https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-14 Thread Andy Kaylor via cfe-commits
@@ -568,6 +568,128 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMUnaryOpLowering::matchAndRewrite( +cir::UnaryOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Michael Spencer via cfe-commits
@@ -843,7 +864,7 @@ void ModuleDepCollectorPP::addModuleDep( !MDC.isPrebuiltModule(Import)) { Bigcheese wrote: I think that's fine as long as the current patch says that pre built modules means it's not in sysroot, as I think that's a small addition and

[clang] [flang] [llvm] [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (PR #131379)

2025-03-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I wonder if we should just make all of these `isAMDGPU()` as well. https://github.com/llvm/llvm-project/pull/131379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] cb64a36 - [HLSL] Make sure `isSigned` flag is set on target type for `TypedBuffer` resources with signed int vectors (#130223)

2025-03-14 Thread via cfe-commits
Author: Helena Kotas Date: 2025-03-14T13:09:21-07:00 New Revision: cb64a363ca71033937108763b078906b86c7fb04 URL: https://github.com/llvm/llvm-project/commit/cb64a363ca71033937108763b078906b86c7fb04 DIFF: https://github.com/llvm/llvm-project/commit/cb64a363ca71033937108763b078906b86c7fb04.diff

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks, the explanation and code change makes sense to me. Should this bugfix have a release note? https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] Move const qualification of array to its elements (PR #131366)

2025-03-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Non-canonical types, are, as the name suggests, non-canonical: they can have all kinds of type sugar, and type qualifiers at all levels. Please don't try to change that; just fix getCommonSugaredType so it can tolerate a const qualifier in this position. https://github.c

[clang] [clang] Allow constexpr-unknown values pre C++23 (PR #129646)

2025-03-14 Thread Eli Friedman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: efriedma-quic wrote: The other test changes look mostly okay, but worth investigating to see if we can improve the diagnostic notes for illegal uses of constexpr-unknown variables. https://github.com/llvm/llvm-project/pull/129646 _

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ayush Pareek (ayushpareek2003) Changes for the functions- insertEntryForFilename() , insertRealPathForFilename() Replaced `Cache.insert()` with `Cache.try_emplace()` to reduce redundant lookups Improved efficiency by avoiding unnecessary

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-14 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,162 @@ +// EntryPointStats.h - Tracking statistics per entry point --*- C++ -*-// necto wrote: Fixed a93cac41b87d [NFC] Fix header comment widths https://github.com/llvm/llvm-project/pull/131175 ___ cfe-com

[clang] [clang] Allow constexpr-unknown values pre C++23 (PR #129646)

2025-03-14 Thread Eli Friedman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: efriedma-quic wrote: Reduced testcase for the microsoft-abi-member-pointers.cpp failure: ``` constinit int &b = b; ``` This should produce an error; clang -std=c++23 currently accepts it. https://github.com/llvm/llvm-project/pull/129646 _

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-14 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 created https://github.com/llvm/llvm-project/pull/131402 for the functions- insertEntryForFilename() , insertRealPathForFilename() Replaced `Cache.insert()` with `Cache.try_emplace()` to reduce redundant lookups Improved efficiency by avoiding unnecessary co

[clang-tools-extra] [clang-tidy][NFC] clean ReleaseNotes.rst (PR #130626)

2025-03-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/130626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/130634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. LGTM with one very minor nit https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,100 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -DCIR_ONLY %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-llvm %

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-14 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem commented: Code and test lgtm, but I think we should consider enabling it by default. https://github.com/llvm/llvm-project/pull/131188 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2025-03-14 Thread James Y Knight via cfe-commits
@@ -9242,3 +9242,15 @@ Declares that a function potentially allocates heap memory, and prevents any pot of ``nonallocating`` by the compiler. }]; } + +def ValueTypeDocs : Documentation { + let Category = DocCatDecl; + let Content = [{ +The ``value_type`` attribute can be u

[clang] [Clang] emit -Wunused-variable warning for unused structured bindings without the [[maybe_unused]] attribute (PR #127061)

2025-03-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/127061 >From a76ee008bdb87655da465e21d09c840edecc2b1b Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 13 Feb 2025 15:24:09 +0200 Subject: [PATCH 1/2] [Clang] emit -Wunused-variable warning for unused structur

[clang] [HLSL] Make sure `isSigned` flag is set on target type for `TypedBuffer` resources with signed int vectors (PR #130223)

2025-03-14 Thread Helena Kotas via cfe-commits
hekota wrote: > LGTM for DXIL. Is there a plan to do this with SPIR-V too? SPIR-V is generating different target type and it does not seem to have the 'signed' flag: See https://github.com/llvm/llvm-project/blob/fbf0276b6a7a7a4508c373cf87fc349569652659/clang/lib/CodeGen/Targets/SPIR.cpp#L396

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Prevent premature call to PassInterestingDeclsToConsumer() within FinishedDeserializing(). (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-14 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 fbf0276b6a7a7a4508c373cf87fc349569652659 fb2de5d3725588acace54cfa62785e480c2666e0 --e

[clang] [C++20][Modules] Do not update the declaration generation number if the redeclaration chain completion was delayed. (PR #129982)

2025-03-14 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/129982 >From ebf6cd9c13ae6dbd9bfcece78491bdf01f0f170f Mon Sep 17 00:00:00 2001 From: Michael Park Date: Wed, 5 Mar 2025 18:46:10 -0800 Subject: [PATCH 1/3] [clang][modules] Add a unit test for the assertion failure in b

[clang] [HLSL] Add support for SV_GroupIndex in SPIR-V (PR #130672)

2025-03-14 Thread Cassandra Beckley via cfe-commits
https://github.com/cassiebeckley edited https://github.com/llvm/llvm-project/pull/130672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-14 Thread Cyndy Ishida via cfe-commits
@@ -739,6 +748,12 @@ ModuleDepCollectorPP::handleTopLevelModule(const Module *M) { MDC.ScanInstance.getASTReader()->visitInputFileInfos( *MF, /*IncludeSystem=*/true, [&](const serialization::InputFileInfo &IFI, bool IsSystem) { +if (MD.IsInSysroot) { +

[clang] [flang] [llvm] [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (PR #131379)

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

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-14 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From 635cbb75bb966088ffc4145dbc640ee1c9c1048f Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] dccc0a8 - [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (#131379)

2025-03-14 Thread via cfe-commits
Author: Shilei Tian Date: 2025-03-14T17:02:15-04:00 New Revision: dccc0a836c20914549fa375905615db49d2f813b URL: https://github.com/llvm/llvm-project/commit/dccc0a836c20914549fa375905615db49d2f813b DIFF: https://github.com/llvm/llvm-project/commit/dccc0a836c20914549fa375905615db49d2f813b.diff L

[clang] [flang] [llvm] [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (PR #131379)

2025-03-14 Thread Shilei Tian via cfe-commits
shiltian wrote: * **#131379** https://app.graphite.dev/github/pr/llvm/llvm-project/131379?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/131

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-14 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From adfb9c08cf1d62cd2c6596520e65ef9f299d3cdc Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-14 Thread Morris Hafner via cfe-commits
@@ -121,29 +364,173 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-14 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Nit: specific in the commit message title that this is about clang-tidy-diff.py. Otherwise it seems you are adding warnings as errors to clang-tidy itself. https://github.com/llvm/llvm-project/pull/128221 ___ cfe-commits mailing

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-14 Thread David Goldman via cfe-commits
@@ -605,12 +607,12 @@ findAllSelectorPieces(llvm::ArrayRef Tokens, auto PieceCount = SelectorPieces.size(); if (PieceCount < NumArgs && isMatchingSelectorName(Tok, Tokens[Index + 1], SM, - Sel.getNameForSlot(PieceCount))) {

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-14 Thread Morris Hafner via cfe-commits
@@ -0,0 +1,79 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +unsigned char cxxstaticcast_0(unsigned int x) { + return static_cast(x); +} + +// CHECK: cir.func @cxxstaticcast_0 +// C

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-14 Thread Andy Kaylor via cfe-commits
@@ -568,6 +568,128 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMUnaryOpLowering::matchAndRewrite( +cir::UnaryOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I still have the open question on that comment I'd like an answer to, but 1 suggestion here. Else this LGTM. https://github.com/llvm/llvm-project/pull/131369 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [llvm] IR: Store the default subtarget info in named metadata instead of the context. (PR #98673)

2025-03-14 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Sorry, I meant to get back to this sooner. I'm not sure it makes sense to distinguish between "compile-time" and "link-time" in the sense this patch is doing: whether an instrumentation pass runs at compile-time or link-time is more a matter of what's convenient for a giv

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-14 Thread David Goldman via cfe-commits
https://github.com/DavidGoldman edited https://github.com/llvm/llvm-project/pull/82061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-14 Thread Erich Keane via cfe-commits
@@ -165,6 +165,54 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { + UnaryOperatorKind op = e->getOpcode(); + + // __extension__ doesn't affect lvalue-ness. + if (op

[clang] e9fc768 - [CIR] Upstream basic support for sizeof and alignof (#130847)

2025-03-14 Thread via cfe-commits
Author: Amr Hesham Date: 2025-03-14T19:12:27+01:00 New Revision: e9fc7683a54d9e5233cff5d016d6f2cdcaf2b2c3 URL: https://github.com/llvm/llvm-project/commit/e9fc7683a54d9e5233cff5d016d6f2cdcaf2b2c3 DIFF: https://github.com/llvm/llvm-project/commit/e9fc7683a54d9e5233cff5d016d6f2cdcaf2b2c3.diff LO

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-14 Thread Andy Kaylor via cfe-commits
@@ -165,6 +165,54 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr *e) { return LValue(); } +LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { + UnaryOperatorKind op = e->getOpcode(); + + // __extension__ doesn't affect lvalue-ness. + if (op

[clang-tools-extra] [clangd] Use `SymbolName` to represent Objective-C selectors (PR #82061)

2025-03-14 Thread David Goldman via cfe-commits
@@ -35,6 +35,56 @@ struct RenameOptions { bool RenameVirtual = true; }; +/// A name of a symbol that should be renamed. +/// +/// Symbol's name can be composed of multiple strings. For example, Objective-C +/// methods can contain multiple argument labels: +/// +/// \code +/

[clang] [Fuchsia] Support PGO (PR #128680)

2025-03-14 Thread Paul Kirth via cfe-commits
@@ -165,33 +175,57 @@ endif() set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") -set(_FUCHSIA_BOOTSTRAP_TARGETS - check-all - check-clang - check-lld - check-llvm - check-polly - llvm-config - clang-test-depends - lld-test-

[clang] [HLSL] Make sure `isSigned` flag is set on target type for `TypedBuffer` resources with signed int vectors (PR #130223)

2025-03-14 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/130223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Fuchsia] Support PGO (PR #128680)

2025-03-14 Thread Paul Kirth via cfe-commits
@@ -165,33 +175,57 @@ endif() set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "") set(BOOTSTRAP_LLVM_ENABLE_LTO ON CACHE BOOL "") -set(_FUCHSIA_BOOTSTRAP_TARGETS - check-all - check-clang - check-lld - check-llvm - check-polly - llvm-config - clang-test-depends - lld-test-

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-14 Thread Julian Ruess via cfe-commits
https://github.com/juru1234 updated https://github.com/llvm/llvm-project/pull/128221 >From 534f33d19ce72b299789db9a2497ba2b6d5a9e47 Mon Sep 17 00:00:00 2001 From: Julian Ruess Date: Fri, 21 Feb 2025 20:42:46 +0100 Subject: [PATCH] [clang-tidy-diff.py] Add an option to treat warnings as errors

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-03-14 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From 2da966db9ae5837b6fca0a6afc84e4258756e0df Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] Avoid Assertion Failure Using -fcs-profile-generate with distributed thin-lto (PR #129736)

2025-03-14 Thread Nuri Amari via cfe-commits
https://github.com/NuriAmari updated https://github.com/llvm/llvm-project/pull/129736 >From fc06ad49b1b166dd1ef09c8babe65c337487ee65 Mon Sep 17 00:00:00 2001 From: Nuri Amari Date: Mon, 3 Mar 2025 16:10:54 -0800 Subject: [PATCH 1/2] Move Clang distributd thin-lto codegen tests into their own d

  1   2   3   4   >