[clang] [Clang] Permit `-Xarch_` to be used with `--offload-arch` (PR #131884)

2025-03-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/131884 ___ 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
@@ -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] [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/6] revert

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

2025-03-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor 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] [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] 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] [SPARC][Driver] Set correct IAS mode defaults for Linux and Free/OpenBSD (PR #130108)

2025-03-19 Thread via cfe-commits
koachan wrote: Ping? https://github.com/llvm/llvm-project/pull/130108 ___ 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 new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor 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] [clang] Auto-detect which newline style to use for cxx_dr_status.html (PR #132045)

2025-03-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/132045 Aaron reported that `make_cxx_dr_status` replaces all newlines in `cxx_dr_status.html`, which makes for a huge diff. On Windows, we can't be compatible with all `autocrlf` modes at once, so this patch adds auto

[clang] [clang][analyzer] Add support for C++23 container methods releated to iterator in ContainerModeling (PR #129719)

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

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

2025-03-19 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

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

2025-03-19 Thread CHANDRA GHALE 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] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread CHANDRA GHALE via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] [flang] [Clang][Driver][Test] Created test for unsupported driver options (PR #120900)

2025-03-19 Thread via cfe-commits
@@ -0,0 +1,472 @@ +#!/usr/bin/env python3 + +"""generate_unsupported_in_drivermode.py + +This script generates Lit regression test files that validate that options are only exposed to intended driver modes. + +The options and driver modes are parsed from Options.td, whose path sh

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-03-19 Thread via cfe-commits
@@ -10555,6 +10555,43 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); } +static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy, +

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-03-19 Thread via cfe-commits
@@ -10555,6 +10555,43 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); } +static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy, +

[clang] [llvm] [Clang] [OpenMP] Support NOWAIT with optional argument (PR #128742)

2025-03-19 Thread via cfe-commits
https://github.com/jadhbeika updated https://github.com/llvm/llvm-project/pull/128742 >From fa3dd1423e4bf2209feb9713f1833e653ec43a74 Mon Sep 17 00:00:00 2001 From: Jad Hbeika Date: Wed, 19 Feb 2025 12:53:11 -0800 Subject: [PATCH 1/2] [Clang] [OpenMP] Support NOWAIT with optional argument ---

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

2025-03-19 Thread Craig Topper via cfe-commits
@@ -96,6 +96,21 @@ def simm32 : RISCVOp { }]; } +// A 32-bit signed immediate where the least significant bit is zero. +def simm32_lsb0 : Operand { + let ParserMatchClass = SImmAsmOperand<32, "Lsb0">; + let PrintMethod = "printBranchOperand"; + let EncoderMethod = "getImm

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

2025-03-19 Thread Shilei Tian via cfe-commits
@@ -162,6 +162,8 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +BUILTIN(__builtin_amdgcn_raw_ptr_buffer_load_lds, "vQbv*3IU

[clang] [LinkerWrapper] Remove special handling for archives (PR #114843)

2025-03-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/114843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/131657 >From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 14 Mar 2025 21:46:57 +0100 Subject: [PATCH 1/4] [CIR] Upstream global initialization for ArrayType ---

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

2025-03-19 Thread Amr Hesham via cfe-commits
@@ -45,6 +45,41 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { return false; } + // Return true if this is the null value AmrDeveloper wrote: That's right, I updated the comment to describe the implemented cases https://github.com/llvm/llvm

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

2025-03-19 Thread via cfe-commits
Author: Joseph Huber Date: 2025-03-19T14:16:25-05:00 New Revision: b37be0e734ecc29fe55eb9d7a8119f82afc9da54 URL: https://github.com/llvm/llvm-project/commit/b37be0e734ecc29fe55eb9d7a8119f82afc9da54 DIFF: https://github.com/llvm/llvm-project/commit/b37be0e734ecc29fe55eb9d7a8119f82afc9da54.diff

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

2025-03-19 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: > If you just set commonElementType to {} as is done in the incubator, this > will eventually reach the NYI state in emitConstantArray and this code won't > need to be updated later. @andykaylor Yes, this is a better approach, I updated the code Thanks https://github.com/

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

2025-03-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From bc1b4ada7615d407c2df009f414d62da3857ee86 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 09:25:03 +0300 Subject: [PATCH 1/9] [clang-tidy] add scoped-lock-check --- .../clang-tidy/mod

[clang] [Clang] Introduce a trait to determine the structure binding size (PR #131515)

2025-03-19 Thread Akira Hatanaka via cfe-commits
ahatanak wrote: It looks like this PR introduced some undefined behavior. https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-cmake-RgSan/767/testReport/ Could you take a look at the failing tests and fix them or revert the PR? https://github.com/llvm/llvm-project/pull/131515

[clang] 02744c5 - [clang][diagnostics] Update note_constexpr_invalid_cast to use enum_select and adjust its uses (#130868)

2025-03-19 Thread via cfe-commits
Author: Ayokunle Amodu Date: 2025-03-19T12:36:08-07:00 New Revision: 02744c5010c8a37b4f20e377a5673cf624a3a159 URL: https://github.com/llvm/llvm-project/commit/02744c5010c8a37b4f20e377a5673cf624a3a159 DIFF: https://github.com/llvm/llvm-project/commit/02744c5010c8a37b4f20e377a5673cf624a3a159.diff

[clang] [Clang] Introduce a trait to determine the structure binding size (PR #131515)

2025-03-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > It looks like this PR introduced some undefined behavior. > https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-cmake-RgSan/767/testReport/ > > Could you take a look at the failing tests and fix them or revert the PR? Huh, interesting! Looks like the APValue wasn't in

[clang] [clang][diagnostics] Update note_constexpr_invalid_cast to use enum_select and adjust its uses (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > @erichkeane CI is happy now! For future patches, I was wondering if to > separate them like this so reviews could be easier or I should just do it all > in one PR. Separate reviews would be great, I can get those done pretty quickly. https://github.com/llvm/llvm-project/pu

[clang] [clang] Improve checking of operator functions (PR #131777)

2025-03-19 Thread via cfe-commits
@@ -330,6 +331,13 @@ Bug Fixes to C++ Support - Fixed an assertion failure affecting code that uses C++23 "deducing this". (#GH130272) - Clang now properly instantiates destructors for initialized members within non-delegating constructors. (#GH93251) - Correctly diagnoses if

[clang] [clang][scan-build] Treat --use-cc and --use-c++ as shell commands (PR #131932)

2025-03-19 Thread Florian Ragwitz via cfe-commits
rafl wrote: Thanks for your feedback, Balázs! > When I looked at this patch and I had the impression that `CCC_CXX` is > basically what one should use as `CXX` or `CMAKE_CXX_COMPILER`, which is just > a path to a binary - without any arguments. The author of the original code this change is m

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

2025-03-19 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/132091 It turns out trailing objects are uninitialized and APValue assignment operator requires a fully initialized object. >From e91e16c4129b81c11e16e14f6ed1a379992b870b Mon Sep 17 00:00:00 2001 From: Corentin Jabot

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

2025-03-19 Thread Amr Hesham via cfe-commits
@@ -228,6 +257,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr fltAttr) { loc, converter->convertType(fltAttr.getType()), fltAttr.getValue()); } +// ConstArrayAttr visitor +mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstArrayAttr attr) { + mlir::Type llv

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

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 422fefad20557f1d9777afa363f558c92564f0ee Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH] [Coverage] Fix region termination for GNU statement expression

[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] 0827e3a - [Coverage] Fix region termination for GNU statement expressions (#130976)

2025-03-19 Thread via cfe-commits
Author: Justin Cady Date: 2025-03-19T16:22:26-04:00 New Revision: 0827e3aae6eb69c2a6fa842ffa780881feb45b5d URL: https://github.com/llvm/llvm-project/commit/0827e3aae6eb69c2a6fa842ffa780881feb45b5d DIFF: https://github.com/llvm/llvm-project/commit/0827e3aae6eb69c2a6fa842ffa780881feb45b5d.diff L

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

2025-03-19 Thread Baranov Victor via cfe-commits
@@ -19,16 +19,22 @@ namespace clang::tidy::bugprone { namespace { -AST_MATCHER(EnumDecl, isCompleteAndHasNoZeroValue) { +AST_MATCHER(EnumDecl, isCompleteNonEmptyAndHasNoZeroValue) { const EnumDecl *Definition = Node.getDefinition(); return Definition && Node.isComplete(

[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 created https://github.com/llvm/llvm-project/pull/132016 Currently, the check is processing system macros. Most importantly, it tries to find .clang-tidy files associated with those files, if the option GetConfigPerFile (on by default) is active. This is probl

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

2025-03-19 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/132021 This iterates on #104717 (which we had to revert) In a bid to increase our chances of success, we try to avoid blowing up the stack by - Using `runWithSufficientStackSpace` in ParseCompoundStatement - Reduc

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

2025-03-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL 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] [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] [clang-tools-extra] [CudaSPIRV] Allow using integral non-type template parameters as attribute args (PR #131546)

2025-03-19 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks 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] [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] ASTContext: flesh out implementation of getCommonNNS (PR #131964)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few small comments, but comments on the function would be great. Code itself looks fine as best I can tell. https://github.com/llvm/llvm-project/pull/131964 ___ cfe-commits mailing list cfe-commits@lists.llv

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

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

[clang] [HLSL] Add SPIR-V target type for RWStructuredBuffers (PR #132027)

2025-03-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron created https://github.com/llvm/llvm-project/pull/132027 This PR adds the target type that should be used for RWStructuredBuffers. It does not handle ByteAddressBuffers yet. For now all structs will be laid out using the standard C/C++ layout rules. Other layout rule

[clang] [HLSL] Add SPIR-V target type for RWStructuredBuffers (PR #132027)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Steven Perron (s-perron) Changes This PR adds the target type that should be used for RWStructuredBuffers. It does not handle ByteAddressBuffers yet. For now all structs will be laid out using the standard C/C++ layout rules. Other layout

[clang] 434ac46 - Improve the -Wundefined-func-template diagnostic note for invisible template functions (#129031)

2025-03-19 Thread via cfe-commits
Author: Haojian Wu Date: 2025-03-19T10:51:45+01:00 New Revision: 434ac4612f2b43a5b7f1a8e3b5310e8d129360e6 URL: https://github.com/llvm/llvm-project/commit/434ac4612f2b43a5b7f1a8e3b5310e8d129360e6 DIFF: https://github.com/llvm/llvm-project/commit/434ac4612f2b43a5b7f1a8e3b5310e8d129360e6.diff LO

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

2025-03-19 Thread Ashley Coleman via cfe-commits
V-FEXrt wrote: I'm assuming this PR resolves an issue right? We typically add `Fixes #1234` (without the `) as part of the description so it will close the issue when the PR is merged https://github.com/llvm/llvm-project/pull/131900 ___ cfe-commits

[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 %} farzonl wrote: delete this file https://github.c

[clang] 2c41a8e - [HLSL] Fix bug in new clamp overloads (#131928)

2025-03-19 Thread via cfe-commits
Author: Sarah Spall Date: 2025-03-19T08:47:56-07:00 New Revision: 2c41a8e6d39800383edfd863d6d96f0cfc4a2283 URL: https://github.com/llvm/llvm-project/commit/2c41a8e6d39800383edfd863d6d96f0cfc4a2283 DIFF: https://github.com/llvm/llvm-project/commit/2c41a8e6d39800383edfd863d6d96f0cfc4a2283.diff L

[clang] [HLSL] Fix bug in new clamp overloads (PR #131928)

2025-03-19 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131928 ___ 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 Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/131900 ___ 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 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] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-19 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl deleted https://github.com/llvm/llvm-project/pull/131900 ___ 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-19 Thread via cfe-commits
dong-miao wrote: > do you need someone to merge this? Yes,Please help me merge. 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-commits

[clang] [Clang] Permit `-Xarch_` to be used with `--offload-arch` (PR #131884)

2025-03-19 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex approved this pull request. https://github.com/llvm/llvm-project/pull/131884 ___ 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 Farzon Lotfi via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.2-library %s -fnative-half-type -verify + + +int16_t4 test_asint_too_many_arg(uint16_t p0, uint16_t p1) +{ +return asint16(p0, p1); + // expected-error@-1 {{no matching function for ca

[clang] 480202f - [RISCV] Add Zilsd and Zclsd Extensions (#131094)

2025-03-19 Thread via cfe-commits
Author: dong-miao Date: 2025-03-19T08:53:41-07:00 New Revision: 480202f0d16f7dbc5c650aea6e8dfd9eca5b999d URL: https://github.com/llvm/llvm-project/commit/480202f0d16f7dbc5c650aea6e8dfd9eca5b999d DIFF: https://github.com/llvm/llvm-project/commit/480202f0d16f7dbc5c650aea6e8dfd9eca5b999d.diff LOG

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

2025-03-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/132037 >From 181315ce22b47a9b75cd60f584dfbcf359659a11 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 19 Mar 2025 09:12:55 -0500 Subject: [PATCH 1/2] [Offload] Handle `BoundArchitecture` for non-GPU targets Sum

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

2025-03-19 Thread Nick Sarnie via cfe-commits
@@ -3388,46 +3388,44 @@ Generic_GCC::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, } llvm::opt::DerivedArgList * -Generic_GCC::TranslateArgs(const llvm::opt::DerivedArgList &Args, StringRef, +Generic_GCC::TranslateArgs(const llvm::opt::DerivedArgList &Args, +

[clang] [NFC][analyzer] Correct example code in VirtualCall docs (PR #131992)

2025-03-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/131992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 96ad7ef - [NFC][analyzer] Correct example code in VirtualCall docs (#131992)

2025-03-19 Thread via cfe-commits
Author: Donát Nagy Date: 2025-03-19T11:00:28+01:00 New Revision: 96ad7ef77655362dd818fda4685c14776fe5dbf3 URL: https://github.com/llvm/llvm-project/commit/96ad7ef77655362dd818fda4685c14776fe5dbf3 DIFF: https://github.com/llvm/llvm-project/commit/96ad7ef77655362dd818fda4685c14776fe5dbf3.diff LO

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

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

[clang] [clang] Auto-detect which newline style to use for cxx_dr_status.html (PR #132045)

2025-03-19 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, this works well! https://github.com/llvm/llvm-project/pull/132045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

[clang] 5497709 - Update C++ DR status page

2025-03-19 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-03-19T11:01:51-04:00 New Revision: 54977097567a55964505c965513a354926c0565b URL: https://github.com/llvm/llvm-project/commit/54977097567a55964505c965513a354926c0565b DIFF: https://github.com/llvm/llvm-project/commit/54977097567a55964505c965513a354926c0565b.diff

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

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

[clang] [clang] Auto-detect which newline style to use for cxx_dr_status.html (PR #132045)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes Aaron reported that `make_cxx_dr_status` replaces all newlines in `cxx_dr_status.html`, which makes for a huge diff. On Windows, we can't be compatible with all `autocrlf` modes at once, so this patch

[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 Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131200 >From 55653ee989d41d4caf5ba5396bb2406dcc443945 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Thu, 13 Mar 2025 15:52:23 -0400 Subject: [PATCH 01/10] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DI

[clang] [NFC][analyzer] Correct example code in VirtualCall docs (PR #131992)

2025-03-19 Thread Balazs Benics via cfe-commits
https://github.com/steakhal commented: LGTM https://github.com/llvm/llvm-project/pull/131992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: cor3ntin (cor3ntin) Changes This iterates on #104717 (which we had to revert) In a bid to increase our chances of success, we try to avoid blowing up the stack by - Using `runWithSufficientStackSpace` in ParseCompoundStatement - Reduci

[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/3] [clang] Introduce elementwise clz/ctz builtins These bu

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

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,20 @@ +set(LLVM_LINK_COMPONENTS + support + ) + +add_clang_library(clangTidyCustomModule STATIC + CustomTidyModule.cpp + QueryCheck.cpp + + LINK_LIBS + clangTidy + clangTidyUtils + + DEPENDS + ClangDriverOptions + ) + +clang_target_link_libraries(clangTidyCust

[clang] [clang] Update C++ DR status page (PR #131812)

2025-03-19 Thread Vlad Serebrennikov via cfe-commits
@@ -3599,7 +3599,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/591.html";>591 CD4 When a dependent base class is the current instantiation -Clang 20 +Clang 20 Endilll wrote: This is caused by the fact

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

2025-03-19 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,20 @@ +set(LLVM_LINK_COMPONENTS + support + ) + +add_clang_library(clangTidyCustomModule STATIC + CustomTidyModule.cpp + QueryCheck.cpp + + LINK_LIBS + clangTidy + clangTidyUtils + + DEPENDS + ClangDriverOptions + ) + +clang_target_link_libraries(clangTidyCust

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

2025-03-19 Thread Ben Barham via cfe-commits
https://github.com/bnbarham approved this pull request. 💃 thanks for following this all the way through @jansvoboda11! https://github.com/llvm/llvm-project/pull/132063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

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

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

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-19 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [llvm] [Clang][OpenMP] Add support for additional argument for nowait constr… (PR #132078)

2025-03-19 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/132078 …uct. >From f9c704c3fe15c2925aae8f3fb026c43256858f1a Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Wed, 19 Mar 2025 11:32:35 -0700 Subject: [PATCH] [Clang][OpenMP] Add support for additional argumen

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-19 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

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

2025-03-19 Thread Sam Elliott via cfe-commits
@@ -96,6 +96,21 @@ def simm32 : RISCVOp { }]; } +// A 32-bit signed immediate where the least significant bit is zero. +def simm32_lsb0 : Operand { + let ParserMatchClass = SImmAsmOperand<32, "Lsb0">; + let PrintMethod = "printBranchOperand"; + let EncoderMethod = "getImm

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

2025-03-19 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM but Craig may have more comments. https://github.com/llvm/llvm-project/pull/131996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [Clang][OpenMP] Add support for additional argument for nowait. (PR #132078)

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

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-03-19 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/129142 >From 151e8f8e3204a0a7ef6c43ce99a7a60774cb041b Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Thu, 27 Feb 2025 15:08:36 -0800 Subject: [PATCH] [win][x64] Unwind v2 3/n: Add support for emitting unwind

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

2025-03-19 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 commented: I can't speak to the Clang side of this change, but I don't see any issues here https://github.com/llvm/llvm-project/pull/132048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

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

2025-03-19 Thread via cfe-commits
@@ -1348,6 +1348,16 @@ std::optional Sema::isSFINAEContext() const { return std::nullopt; } +static TemplateArgument +getPackSubstitutedTemplateArgument(Sema &S, TemplateArgument Arg) { cor3ntin wrote: `getSubstitutedTemplateArgumentPattern` would be a be

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -2041,15 +2042,16 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, if (!a.has_value()) { Analyzer->Handler.handleExpectFewerUnderlyingMutexes( Exp->getExprLoc(), D->getLocation(), Scope->toString(), - b.value

[clang] [llvm] [Clang][OpenMP] Add support for additional argument for nowait. (PR #132078)

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

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-03-19 Thread Daniel Paoliello via cfe-commits
@@ -500,7 +500,8 @@ MCSymbol *MCStreamer::emitLineTableLabel() { MCSymbol *MCStreamer::emitCFILabel() { // Return a dummy non-null value so that label fields appear filled in when // generating textual assembly. - return (MCSymbol *)1; + static size_t DummyLabelValue = 0;

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-19 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [clang] Improve checking of operator functions (PR #131777)

2025-03-19 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/131777 >From ff54ffd5ac3f761c877eebce52ef81d096d98f16 Mon Sep 17 00:00:00 2001 From: offsetof Date: Tue, 18 Mar 2025 10:08:56 + Subject: [PATCH 1/2] [clang] Improve checking of operator functions * Move validatio

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-03-19 Thread via cfe-commits
https://github.com/TilakChad updated https://github.com/llvm/llvm-project/pull/124609 >From c865ba50fd3c1a5d427069e29e035c1d6e3d21d3 Mon Sep 17 00:00:00 2001 From: Tilak Chad Date: Fri, 14 Mar 2025 00:44:10 +0545 Subject: [PATCH 1/3] [Clang] Dependent CallExpr having UnresolvedLookupExpr are n

<    1   2   3   4