[clang] [MS][clang] Add support for vector deleting destructors (PR #126240)

2025-03-19 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: > I've uploaded a stand-alone from-source reproducer of the run time crash > here: https://crbug.com/402425841#comment10 Reproduced. Seems limited to 32-bit build (only reproducible with -m32 option) and lld linker. Fine with either standard linker or 64-bit build. https://gi

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Ayokunle Amodu via cfe-commits
https://github.com/ayokunle321 updated https://github.com/llvm/llvm-project/pull/130868 >From dfc517be06531af965dc51b09a0f1ae7965e3e20 Mon Sep 17 00:00:00 2001 From: Ayokunle Amodu <121697771+ayokunle...@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:13:05 -0600 Subject: [PATCH 1/4] revert

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

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

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This one looks like a good candiate and the application is much clearer. There are 2 comments (1 i think the name could be clearer, and the 2nd, we still need a newline at the end fo the file). Else, let me know how you want to proceed. We can rename t

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-03-19 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Main reason is simple, easy to modify check and add new check in subconfigs. It is also support to add new check in subconfigs, to modify check is thing I did not implement yet. (There are FIXME in merge config part of code) In theory, these two configurations are equivalen

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

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

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

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

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

2025-03-19 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I do not see need for errors, always someone can use warnings as errors. Agree. I will remove it if no one against it. https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-19 Thread Baranov Victor via cfe-commits
@@ -202,19 +202,36 @@ void UseEmplaceCheck::registerMatchers(MatchFinder *Finder) { // overloaded functions and template names. auto SoughtConstructExpr = cxxConstructExpr( - unless(anyOf(IsCtorOfSmartPtr, HasInitList, BitFieldAsArgument, -

[clang] [clang-format] Recognize wait fork in Verilog (PR #132042)

2025-03-19 Thread via cfe-commits
https://github.com/sstwcw created https://github.com/llvm/llvm-project/pull/132042 before ```Verilog wait fork ; wait fork ; wait fork ; ``` after ```Verilog wait fork; wait fork; wait fork; ``` The `wait fork` statement should not start a block. Previously the formatter

[clang] e9988c3 - [clang][Sema] Propagate qualifiers during derived-to-base conversion

2025-03-19 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2025-03-19T09:04:29+01:00 New Revision: e9988c36ed788b2d1ce00b028bed51169bd8b02c URL: https://github.com/llvm/llvm-project/commit/e9988c36ed788b2d1ce00b028bed51169bd8b02c DIFF: https://github.com/llvm/llvm-project/commit/e9988c36ed788b2d1ce00b028bed51169bd8b02c.d

[clang] [clang-format] Recognize wait fork in Verilog (PR #132042)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: None (sstwcw) Changes before ```Verilog wait fork ; wait fork ; wait fork ; ``` after ```Verilog wait fork; wait fork; wait fork; ``` The `wait fork` statement should not start a block. Previously the formatter

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/131995 >From c0eef87f4301a9725b7d81e78875a816d3cdf7cb Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 3 Feb 2025 16:54:17 + Subject: [PATCH 1/2] [clang] Introduce elementwise clz/ctz builtins These bu

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
@@ -1484,6 +1484,18 @@ def ElementwiseSubSat : Builtin { let Prototype = "void(...)"; } +def ElementwiseClz : Builtin { + let Spellings = ["__builtin_elementwise_clz"]; + let Attributes = [NoThrow, Const, CustomTypeChecking, Constexpr]; + let Prototype = "void(...)"; +} +

[clang] [clang][bytecode] Fix initializing array struct fields from an APValue (PR #131983)

2025-03-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/131983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-19 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Do you know how much build times and binary size are affected by this change? Binary size comparison was addressed in discussion on previous PR, here is comment for reference https://github.com/llvm/llvm-project/pull/123734#discussion_r1925090946. However, this may have chang

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -169,6 +169,8 @@ Modified Compiler Flags the behavior of ``-mtp`` in gcc. This changes the default behavior for ARM targets that provide the ``TPIDRURO`` register as this will be used instead of a call to the ``__aeabi_read_tp``. Programs that use ``__aeabi_read_tp`` bu

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This seems reasonable to me. All of the changes look sound. Good job finding room here! https://github.com/llvm/llvm-project/pull/132021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-19 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 614d855 - [OffloadBundler] Expose function to parse compressed bundle headers (#130284)

2025-03-19 Thread via cfe-commits
Author: Juan Manuel Martinez Caamaño Date: 2025-03-19T09:10:40+01:00 New Revision: 614d8557dcd41aae31bd50e93fed3487f235ef11 URL: https://github.com/llvm/llvm-project/commit/614d8557dcd41aae31bd50e93fed3487f235ef11 DIFF: https://github.com/llvm/llvm-project/commit/614d8557dcd41aae31bd50e93fed348

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

2025-03-19 Thread Ibraim Ganiev via cfe-commits
olologin wrote: I like it if it does not break anything :) One small nitpick: Maybe word "custom" is too broad for this. Maybe something that mentions "clang-query" is more specific. But it is just my opinion and I am not related to clang-tidy, so whatever you guys decide. https://github.com/l

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

2025-03-19 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] [llvm] [RISCV] Add Qualcomm uC Xqcibi (Branch Immediate) extension (PR #130779)

2025-03-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang,llvm` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/26078 Here is the relev

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -11,8 +11,9 @@ let Component = "AST" in { // Constant expression diagnostics. These (and their users) belong in Sema. def note_expr_divide_by_zero : Note<"division by zero">; def note_constexpr_invalid_cast : Note< - "%select{reinterpret_cast|dynamic_cast|%select{this conve

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/132016 >From 6e1a50025c75cc5c3835046c66b720a75a6715f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 19 Mar 2025 12:28:49 + Subject: [PATCH] [clang-tidy] Skip system macros in rea

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

2025-03-19 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > However, this may have changed now because of new architecture. It will be too much differences because dependences are the same. only some wrapper code in clangtidy changed. https://github.com/llvm/llvm-project/pull/131804 ___ c

[clang] [clang] ASTContext: flesh out implementation of getCommonNNS (PR #131964)

2025-03-19 Thread Matheus Izvekov via cfe-commits
@@ -13462,13 +13462,114 @@ static ElaboratedTypeKeyword getCommonTypeKeyword(const T *X, const T *Y) { : ElaboratedTypeKeyword::None; } +static NestedNameSpecifier *getCommonNNS(ASTContext &Ctx, +

[clang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Juan Manuel Martinez Caamaño (jmmartinez) Changes CK is using either inline assembly or inline LLVM-IR builtins to generate buffer_load_dword lds instructions. This patch exposes this instruction as a Clang builtin. Limitations in this

[clang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-19 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/132048 CK is using either inline assembly or inline LLVM-IR builtins to generate buffer_load_dword lds instructions. This patch exposes this instruction as a Clang builtin. Limitations in this patch: these instruc

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/132016 >From 0d4f53cefc223a116b25f9106d37dc707c58ec0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 19 Mar 2025 12:28:49 + Subject: [PATCH] [clang-tidy] Skip system macros in rea

[clang] [clang][deps] Implement efficient in-process `ModuleCache` (PR #129751)

2025-03-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-with-thin-lto-ubuntu` running on `as-worker-92` while building `clang` at step 6 "build-stage1-compiler". Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/2777 Here is the relevant pi

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/131997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dd17c64 - [HLSL] Implement min and max overloads using templates (#131666)

2025-03-19 Thread via cfe-commits
Author: Sarah Spall Date: 2025-03-19T09:57:46-07:00 New Revision: dd17c649abbfc7e4052e45d3240b23feb6530a31 URL: https://github.com/llvm/llvm-project/commit/dd17c649abbfc7e4052e45d3240b23feb6530a31 DIFF: https://github.com/llvm/llvm-project/commit/dd17c649abbfc7e4052e45d3240b23feb6530a31.diff L

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-19 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff updated https://github.com/llvm/llvm-project/pull/131649 >From cdf9f1a5b960d2561a7c4415313b397578de0f8b Mon Sep 17 00:00:00 2001 From: Serge Pavlov Date: Mon, 17 Mar 2025 21:33:24 +0700 Subject: [PATCH 1/2] [clang] Fix array types comparison in getCommonSugaredType

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

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Happy when Andy is as well! https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-19 Thread Serge Pavlov via cfe-commits
@@ -14171,6 +14171,15 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X, static auto unwrapSugar(SplitQualType &T, Qualifiers &QTotal) { SmallVector R; while (true) { +if (const auto *ATy = dyn_cast(T.Ty)) { + // C++ 9.3.3.4p3: Any type of t

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Want those nits from my last patch fixed, but forgot to click the 'approve' button. https://github.com/llvm/llvm-project/pull/131945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [HLSL] Implement min and max overloads using templates (PR #131666)

2025-03-19 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131666 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] Reapply "[AMDGPU] Use COV6 by default (#118515)" (PR #130963)

2025-03-19 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/130963 >From 576596fb09e3f497858da0f922d746914a0c5c3d Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 12 Mar 2025 09:39:45 -0400 Subject: [PATCH] Reapply "[AMDGPU] Use COV6 by default (#118515)" This reverts co

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-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 3f62718c4a907125af31faa62365bdf11ddef7b6 9bc13aee5775af148941826b74e5c9fbaab907c7 --e

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/94268 >From 3a2047c273d948d035b50eb486b772d5b3bdc401 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 18 Mar 2025 16:20:14 -0500 Subject: [PATCH 1/5] [PGO][Offload] Allow PGO flags to be used o

[clang] [clang][modules] Fix filesystem races in `ModuleManager` (PR #131354)

2025-03-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/131354 >From 7e5de89fa20b9fe7c07ab0d05a5caaec3ac31255 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 17 Mar 2025 08:11:52 -0700 Subject: [PATCH 1/2] [clang][modules] Fix filesystem races in `ModuleManager`

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-19 Thread Serge Pavlov via cfe-commits
@@ -14171,6 +14171,15 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X, static auto unwrapSugar(SplitQualType &T, Qualifiers &QTotal) { SmallVector R; while (true) { +if (const auto *ATy = dyn_cast(T.Ty)) { + // C++ 9.3.3.4p3: Any type of t

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/132061 (I'll add more details to the description tomorrow) Fixes #123591 Fixes #127539 Fixes #129077 Fixes #129998 >From fb9fa67da10a7dbfb2db5520d2773085585f4c14 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Thu,

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes (I'll add more details to the description tomorrow) Fixes #123591 Fixes #127539 Fixes #129077 Fixes #129998 --- Full diff: https://github.com/llvm/llvm-project/pull/132061.diff 4 Files Affected: - (modifi

[clang] 297f0b3 - [CudaSPIRV] Allow using integral non-type template parameters as attribute args (#131546)

2025-03-19 Thread via cfe-commits
Author: Alexander Shaposhnikov Date: 2025-03-19T10:11:18-07:00 New Revision: 297f0b3f4c05c6ef40183809eac5ccac9ca8c4ce URL: https://github.com/llvm/llvm-project/commit/297f0b3f4c05c6ef40183809eac5ccac9ca8c4ce DIFF: https://github.com/llvm/llvm-project/commit/297f0b3f4c05c6ef40183809eac5ccac9ca8c

[clang] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-19 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov closed https://github.com/llvm/llvm-project/pull/131546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-19 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Sorry for being late for the review. This is a major new feature of clang-tidy, so I believe it would be good to have an RFC before looking at the detailed implementation. What problem does it solve, why should clang-tidy solve it, what the API towards the user should be,

[clang] [clang] Fix array types comparison in getCommonSugaredType (PR #131649)

2025-03-19 Thread Matheus Izvekov via cfe-commits
@@ -14171,6 +14171,15 @@ static QualType getCommonSugarTypeNode(ASTContext &Ctx, const Type *X, static auto unwrapSugar(SplitQualType &T, Qualifiers &QTotal) { SmallVector R; while (true) { +if (const auto *ATy = dyn_cast(T.Ty)) { + // C++ 9.3.3.4p3: Any type of t

[clang] [clang] Remove deprecated `FileManager` APIs (PR #132063)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes This PR removes the `FileManager` APIs that have been deprecated for a while. LLVM 20.1.0 that was released earlier this month contains the formal deprecation of these APIs, so these should be fine to re

[clang] [clang] Remove deprecated `FileManager` APIs (PR #132063)

2025-03-19 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/132063 This PR removes the `FileManager` APIs that have been deprecated for a while. LLVM 20.1.0 that was released earlier this month contains the formal deprecation of these APIs, so these should be fine to remo

[clang] [Clang][NFC] Code cleanup in CGBuiltin.cpp (PR #132060)

2025-03-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/132060 - Use `Intrinsic::` directly instead of `llvm::Intrinsic::`. - Eliminate redundant `nullptr` for some `CreateIntrinsic` calls. - Eliminate redundant `ArrayRef` casts. - Use C++17 structured binding instead of `st

[clang] [clang][modules] Correctly set module map systemness (PR #131940)

2025-03-19 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/131940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
@@ -152,7 +152,7 @@ INSTR_PROF_VALUE_NODE(PtrToNodeT, llvm::PointerType::getUnqual(Ctx), Next, \ #define INSTR_PROF_DATA_DEFINED #endif INSTR_PROF_RAW_HEADER(uint64_t, Magic, __llvm_profile_get_magic()) -INSTR_PROF_RAW_HEADER(uint64_t, Version, __llvm_profile_get_version()) +I

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-19 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: Lets wait another day or two, since someone may have additional comments. Thanks @mgoudar! https://github.com/llvm/llvm-project/pull/130587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-19 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro approved this pull request. https://github.com/llvm/llvm-project/pull/130587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-19 Thread David Tenty via cfe-commits
https://github.com/daltenty edited https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Ayokunle Amodu via cfe-commits
ayokunle321 wrote: @erichkeane Hey! So I was able to change one, could you please take a look. Also for this case: Instruction: %select{classdesign|coclass|dependency|helper" "|helperclass|helps|instancesize|ownership|performance|security|superclass}1 Use: https://github.com/user-attachments

[clang] [compiler-rt] [llvm] [PGO][Offload] Allow PGO flags to be used on GPU targets (PR #94268)

2025-03-19 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/94268 >From 3a2047c273d948d035b50eb486b772d5b3bdc401 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Tue, 18 Mar 2025 16:20:14 -0500 Subject: [PATCH 1/4] [PGO][Offload] Allow PGO flags to be used o

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilb (Long Branch) extension (PR #131996)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: quic_hchandel (hchandel) Changes This extension adds two long branch instructions. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0 This patch adds assembler only support. Co-aut

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilb (Long Branch) extension (PR #131996)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc @llvm/pr-subscribers-clang Author: quic_hchandel (hchandel) Changes This extension adds two long branch instructions. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0 This patch adds assembler only s

[clang] [clang] Introduce elementwise clz/ctz builtins (PR #131995)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/131995 These builtins are modeled on the clzg/ctzg builtins, which accept an optional second argument. This second argument is returned if the first argument is 0. >From c0eef87f4301a9725b7d81e78875a816d3cdf7cb Mo

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-19 Thread Carlos Alberto Enciso via cfe-commits
CarlosAlbertoEnciso wrote: As pointed out by @Michael137 > If we're given the `_vtable$` artificial member, there's nothing useful we > can do with it right? ``` 0x0042: DW_TAG_variable DW_AT_specification (0x005c "_vtable$") DW_AT_alignment (8)

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/131997 None >From 9220b14a8147850a39e2c9bdf1188f2135b7a0ae Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 19 Mar 2025 10:25:07 + Subject: [PATCH] [clang] Do not infer lifetimebound for functions with void

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/131997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/131997.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaAttr.cpp (+1-1) ``diff diff --git a/clang/lib/Sema/SemaAttr.cpp b/clang/li

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/131997 >From 9220b14a8147850a39e2c9bdf1188f2135b7a0ae Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 19 Mar 2025 10:25:07 + Subject: [PATCH] [clang] Do not infer lifetimebound for functions with void retur

[clang] [llvm] [RISC-V] Add support for MIPS P8700 CPU (PR #117865)

2025-03-19 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro closed https://github.com/llvm/llvm-project/pull/117865 ___ 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 Xqcilb (Long Branch) extension (PR #131996)

2025-03-19 Thread via cfe-commits
https://github.com/hchandel created https://github.com/llvm/llvm-project/pull/131996 This extension adds two long branch instructions. The current spec can be found at: https://github.com/quic/riscv-unified-db/releases/tag/Xqci-0.7.0 This patch adds assembler only support. Co-authored-by: Sud

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-19 Thread Richard Smith via cfe-commits
zygoloid wrote: > Would it be possible to provide better fine grained control over the > `-Wsign-compare` so the clang could still flag the the cases like the one in > the summary but ignore the cases where implicit conversion has no side > effects or UB? The warning being produced is a `-Wim

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

2025-03-19 Thread via cfe-commits
Author: Oleksandr T. Date: 2025-03-19T23:06:10+02:00 New Revision: 01d28c1cd7862fb75c8e353b2b18d13f9801b327 URL: https://github.com/llvm/llvm-project/commit/01d28c1cd7862fb75c8e353b2b18d13f9801b327 DIFF: https://github.com/llvm/llvm-project/commit/01d28c1cd7862fb75c8e353b2b18d13f9801b327.diff

[clang] [HLSL] error on out of bounds vector accesses (PR #128952)

2025-03-19 Thread Eli Friedman via cfe-commits
@@ -14054,6 +14054,23 @@ void Sema::CheckCastAlign(Expr *Op, QualType T, SourceRange TRange) { << TRange << Op->getSourceRange(); } +void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) { + const auto *VTy = BaseExpr->getType()->getAs(); + if (!VTy)

[clang] [Offload] Handle `BoundArchitecture` for non-GPU targets (PR #132037)

2025-03-19 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Please take a look at the sanitizer buildbot failure above. I don't know how a clang driver change that only affects SYCL and OpenMP offloading could cause JIT to fail. https://github.com/llvm/llvm-project/pull/132037 ___ cfe-commits

[clang] [C23] Fix compound literals within function prototype (PR #132097)

2025-03-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/132097 >From 7882bfbbe7ada59de91625c5f0365cec1fbe3c5b Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 19 Mar 2025 16:50:12 -0400 Subject: [PATCH 1/4] [C23] Fix compound literals within function prototype

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

2025-03-19 Thread Ibraim Ganiev via cfe-commits
olologin wrote: Splitting config to multiple files is potentially bad because caching wrappers need to be adjusted to take into account this new type of input file (they only know about .clang-tidy file). https://github.com/llvm/llvm-project/pull/131804

[clang] [C23] Fix compound literals within function prototype (PR #132097)

2025-03-19 Thread Aaron Ballman via cfe-commits
@@ -849,13 +849,11 @@ namespace CompoundLiterals { } static_assert(get5() == 5, ""); - constexpr int get6(int f = (int[]){1,2,6}[2]) { // ref-note {{subexpression not valid in a constant expression}} \ - // ref-note {{decl

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-03-19 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi updated https://github.com/llvm/llvm-project/pull/131945 >From ef54ceca65c8a62544651cbbd30967efc7adec36 Mon Sep 17 00:00:00 2001 From: David Olsen Date: Tue, 18 Mar 2025 17:37:26 -0700 Subject: [PATCH 1/2] [CIR] Upstream a basic version of class LexicalScope Upst

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-19 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,55 @@ +; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: OpCapability Int16 +; CHECK: OpCapability Float16 +; CH

[clang] [Clang] Fix UB in #131515 (PR #132091)

2025-03-19 Thread Florian Mayer via cfe-commits
@@ -1681,7 +1681,7 @@ std::optional Sema::GetDecompositionElementCount(QualType T, llvm::APSInt TupleSize(Ctx.getTypeSize(Ctx.getSizeType())); switch (isTupleLike(*this, Loc, T, TupleSize)) { case IsTupleLike::Error: -return {}; +return std::nullopt;

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -1160,6 +1162,12 @@ class SemaOpenMP : public SemaBase { SmallVector AllocClauseModifiersLoc; Expr *AllocateAlignment = nullptr; +struct OpenMPReductionClauseModifiers { + int ExtraModifier; + int OriginalSharingModifier; + OpenMPReductionC

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -3854,6 +3890,7 @@ class OMPReductionClause final /// region with this clause. /// \param PostUpdate Expression that must be executed after exit from the /// OpenMP region with this clause. + /// \pram IsPrivateVarReduction array for private variable reduction flags -

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -3757,6 +3768,31 @@ class OMPReductionClause final /// reduction copies. void setRHSExprs(ArrayRef RHSExprs); + /// Set the list private reduction flags + void setPrivateVariableReductionFlags(ArrayRef Flags) { +assert(Flags.size() == varlist_size() && +

[clang] [compiler-rt] Revert "[Coverage] Fix region termination for GNU statement expressions" (PR #132095)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady created https://github.com/llvm/llvm-project/pull/132095 Reverts llvm/llvm-project#130976 Breaks clang-cmake-x86_64-avx512-linux bot. >From 2f37c9ec685b8ba82fdc3bd8387ce59b3f8a77dc Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 19 Mar 2025 16:45:26 -0400 S

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

2025-03-19 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk deleted https://github.com/llvm/llvm-project/pull/127061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix UB in #131515 (PR #132091)

2025-03-19 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/132091 >From 68ebbf821176dd17a757c32771fa728f21d4dd11 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 19 Mar 2025 21:05:38 +0100 Subject: [PATCH] [Clang] Fix UB in #131515 It turns out trailing objects are u

[clang] [clang-tools-extra] [Clang] [Sema] Make -Wreturn-type an error by default (PR #131207)

2025-03-19 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/131207 >From bff3db4f6a7fdff572b662048f395c280a11d94b Mon Sep 17 00:00:00 2001 From: Sirraide Date: Thu, 13 Mar 2025 21:18:14 +0100 Subject: [PATCH 1/3] [Clang] [Sema] Make -Wreturn-type an error by default --- clan

[clang-tools-extra] [clang-doc] Avoid deref of invalid std::optional (PR #131939)

2025-03-19 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/131939 >From d7fe558c1c7a3f18bc4019e6edcd86e2a98a46a0 Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Tue, 18 Mar 2025 23:38:09 + Subject: [PATCH] [clang-doc] Avoid deref of invalid std::optional Since our existin

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

2025-03-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-19 Thread via cfe-commits
@@ -80,6 +80,34 @@ void asuint(double3, out uint3, out uint3); _HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_splitdouble) void asuint(double4, out uint4, out uint4); +//===--===// +// asint16 builtins +//===-

[clang] 6aeae62 - [CIR] Upstream global initialization for ArrayType (#131657)

2025-03-19 Thread via cfe-commits
Author: Amr Hesham Date: 2025-03-19T21:29:37+01:00 New Revision: 6aeae62aef63c7c11ab67a880716afdc92ac8422 URL: https://github.com/llvm/llvm-project/commit/6aeae62aef63c7c11ab67a880716afdc92ac8422 DIFF: https://github.com/llvm/llvm-project/commit/6aeae62aef63c7c11ab67a880716afdc92ac8422.diff LO

[clang] [CIR] Follow up for addressing style comment (PR #132093)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes Follow up PR to address style comment (https://github.com/llvm/llvm-project/pull/131657#discussion_r2004197917) --- Full diff: https://github.com/llvm/llvm-project/pull/132093.diff 1 Files Affected:

[clang] [CIR] Follow up for addressing style comment (PR #132093)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Follow up PR to address style comment (https://github.com/llvm/llvm-project/pull/131657#discussion_r2004197917) --- Full diff: https://github.com/llvm/llvm-project/pull/132093.diff 1 Files Affected: -

[clang] [clang-format] Recognize wait fork in Verilog (PR #132042)

2025-03-19 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/132042 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang,compiler-rt` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/13131 Here is the

[clang] 0f7bd60 - [NFC] Add a leading comment to boolean arguments. (#131746)

2025-03-19 Thread via cfe-commits
Author: Michael Park Date: 2025-03-19T13:43:16-07:00 New Revision: 0f7bd60791ed18b98f84916d0dd371508cbf208c URL: https://github.com/llvm/llvm-project/commit/0f7bd60791ed18b98f84916d0dd371508cbf208c DIFF: https://github.com/llvm/llvm-project/commit/0f7bd60791ed18b98f84916d0dd371508cbf208c.diff

[clang] [Clang] Fix UB in #131515 (PR #132091)

2025-03-19 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/132091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fix compound literals within function prototype (PR #132097)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes WG14 N2819 clarified that a compound literal within a function prototype has a lifetime similar to that of a local variable within the function, not a file scope variable. --- Full diff: https://githu

  1   2   3   4   >