[clang] [clang] Call ActOnCaseExpr even if the 'case' is missing (PR #166326)

2025-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/26827 Here is the relevant piece of the

[clang-tools-extra] [clang-tidy] Implement alphabetical order test (PR #166072)

2025-11-04 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/166072 >From 7b4e4172fc3cea8e8194aa3544f2c2ec30e3616a Mon Sep 17 00:00:00 2001 From: mtx Date: Sun, 2 Nov 2025 22:56:53 +0800 Subject: [PATCH 01/11] [clang-tidy][docs] Implement alphabetical order check --- .../clang-t

[clang] [NFC][CodeGen] Replace loop with "if !empty()" (PR #166515)

2025-11-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/166515 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][CodeGen] Replace loop with "if !empty()" (PR #166515)

2025-11-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/166515 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][CFI] Generalize transparent union parameters (PR #158193)

2025-11-04 Thread Vitaly Buka via cfe-commits
@@ -2339,13 +2339,26 @@ llvm::ConstantInt *CodeGenModule::CreateCrossDsoCfiTypeId(llvm::Metadata *MD) { return llvm::ConstantInt::get(Int64Ty, llvm::MD5Hash(MDS->getString())); } +static QualType GeneralizeTransparentUnion(QualType Ty) { + const RecordType *UT = Ty->getAsU

[clang] [CodeGen] Replace loop with "if !empty()" (PR #166515)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Vitaly Buka (vitalybuka) Changes The loop iterates once and returns the first element. Replace it with "if !empty()" to make it more explicit. --- Full diff: https://github.com/llvm/llvm-project/pull/166515.diff 1 Files Affected

[clang] [CodeGen] Replace loop with "if !empty()" (PR #166515)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes The loop iterates once and returns the first element. Replace it with "if !empty()" to make it more explicit. --- Full diff: https://github.com/llvm/llvm-project/pull/166515.diff 1 Files Affected: - (mo

[clang] [CodeGen] Replace loop with "if !empty()" (PR #166515)

2025-11-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/166515 The loop iterates once and returns the first element. Replace it with "if !empty()" to make it more explicit. >From f2e03972be9d0680884070393809654f5440d053 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date:

[clang] [CIR] Implement __builtin_object_size and __builtin_dynamic_object_size (PR #166191)

2025-11-04 Thread Morris Hafner via cfe-commits
@@ -4089,6 +4089,48 @@ def CIR_PrefetchOp : CIR_Op<"prefetch"> { }]; } +//===--===// +// ObjSizeOp +//===--===// + +def CIR_ObjSizeOp : C

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-aarch64-ubuntu-clang` running on `bolt-worker-aarch64` while building `clang` at step 5 "build-clang-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/128/builds/8284 Here is the relevant p

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime-2` running on `rocm-worker-hw-02` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/16710 Here is the relevant pi

[clang] [llvm] Make sanitizer special case list slash-agnostic (PR #149886)

2025-11-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @DKLoehr I guess for no.3 we need some consensus with @jyknight For no.4 or even your original patch I am ready to proceed. However for the original patch additional changes are needed: we need to short circuit prefix/suffix/subsisting optimization. https://github.com/llvm/

[clang] [HLSL] [DirectX] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Deric C. via cfe-commits
@@ -148,6 +148,29 @@ template constexpr T ldexp_impl(T X, T Exp) { return exp2(Exp) * X; } +template constexpr uint firstbithigh_impl(T X) { + uint FBH = __builtin_hlsl_elementwise_firstbithigh(X); +#if defined(__DIRECTX__) + // The firstbithigh DXIL ops count bits from

[clang-tools-extra] [clang-tidy] Fix `readability-container-data-pointer` check (PR #165636)

2025-11-04 Thread via cfe-commits
https://github.com/zeyi2 edited https://github.com/llvm/llvm-project/pull/165636 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `readability-container-data-pointer` check (PR #165636)

2025-11-04 Thread via cfe-commits
@@ -71,20 +71,20 @@ void ContainerDataPointerCheck::registerMatchers(MatchFinder *Finder) { const auto Zero = integerLiteral(equals(0)); - const auto SubscriptOperator = callee(cxxMethodDecl(hasName("operator[]"))); - - Finder->addMatcher( + const auto AddressOfMatcher

[clang] [LifetimeSafety] Fix Python path for Windows compatibility (PR #166291)

2025-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64le-linux-test-suite` running on `ppc64le-clang-test-suite` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/95/builds/190

[clang] [HLSL] [DirectX] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Farzon Lotfi via cfe-commits
@@ -148,6 +148,29 @@ template constexpr T ldexp_impl(T X, T Exp) { return exp2(Exp) * X; } +template constexpr uint firstbithigh_impl(T X) { + uint FBH = __builtin_hlsl_elementwise_firstbithigh(X); +#if defined(__DIRECTX__) + // The firstbithigh DXIL ops count bits from

[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-11-04 Thread via cfe-commits
https://github.com/clingfei edited https://github.com/llvm/llvm-project/pull/162433 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][LLVM] Use @llvm.compiler.used/@llvm.used helpers in Clang and BitcodeWriter (PR #162660)

2025-11-04 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

[clang] [llvm] [NFC][LLVM] Use @llvm.compiler.used/@llvm.used helpers in Clang and BitcodeWriter (PR #162660)

2025-11-04 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= , Juan Manuel

[clang] [llvm] [NFC][LLVM] Use @llvm.compiler.used/@llvm.used helpers in Clang and BitcodeWriter (PR #162660)

2025-11-04 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?=

[clang] [lldb] [lldb] Re-use clang's keyword enable/disable mechanism in CPlusPlusNameParser.cpp (PR #164284)

2025-11-04 Thread Daniel Sanders via cfe-commits
dsandersllvm wrote: > `lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp` has some > unit-tests for `CPlusPlusNameParser` (and friends). If we added a constructor > to `CPlusPlusNameParser` which took a user-provided `LangOptions` (but > defaults to the existing one) that we could ad

[clang] [lldb] [lldb] Re-use clang's keyword enable/disable mechanism in CPlusPlusNameParser.cpp (PR #164284)

2025-11-04 Thread Daniel Sanders via cfe-commits
dsandersllvm wrote: Done https://github.com/llvm/llvm-project/pull/164284 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb] Re-use clang's keyword enable/disable mechanism in CPlusPlusNameParser.cpp (PR #164284)

2025-11-04 Thread Daniel Sanders via cfe-commits
https://github.com/dsandersllvm updated https://github.com/llvm/llvm-project/pull/164284 >From e1175e636933074c6c00f52f9c5287b4a4cf002c Mon Sep 17 00:00:00 2001 From: Daniel Sanders Date: Fri, 17 Oct 2025 18:10:51 -0700 Subject: [PATCH 01/11] [lldb] Re-use clang's keyword enable/disable mechani

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yeoul Na (rapidsna) Changes Previously, late parsing only supported attributes in declaration position and could not resolve references to member declarations that appeared later in the struct. Additionally, the compiler incorrectly accep

[clang] [compiler-rt] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-04 Thread Stephen Senran Zhang via cfe-commits
zsrkmyn wrote: Ooof, my bad. The log of CI was too long, and maybe I missed some things :-/ Let me try again. https://github.com/llvm/llvm-project/pull/165358 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailm

[clang-tools-extra] [clang-tidy] Rename `cert-dcl58-cpp` to `bugprone-std-namespace-modification` (PR #165659)

2025-11-04 Thread via cfe-commits
https://github.com/zeyi2 updated https://github.com/llvm/llvm-project/pull/165659 >From 0f42a4416fbc86556d45df83fbbe269253b6eb8b Mon Sep 17 00:00:00 2001 From: mtx Date: Thu, 30 Oct 2025 13:12:26 +0800 Subject: [PATCH 1/4] [clang-tidy] Rename `cert-dcl58-cpp` to `bugprone-dont-modify-std-names

[clang] [BoundsSafety] Support late parsing for `counted_by` in type positions (PR #166491)

2025-11-04 Thread Yeoul Na via cfe-commits
https://github.com/rapidsna created https://github.com/llvm/llvm-project/pull/166491 Previously, late parsing only supported attributes in declaration position and could not resolve references to member declarations that appeared later in the struct. Additionally, the compiler incorrectly acce

[clang] [compiler-rt] [llvm] [InstrProf] Fix frontend generated function hash (PR #165358)

2025-11-04 Thread Stephen Senran Zhang via cfe-commits
https://github.com/zsrkmyn updated https://github.com/llvm/llvm-project/pull/165358 >From 0fc8d8d02fdf11e2a42b1c8015347ee7ab0a78e0 Mon Sep 17 00:00:00 2001 From: Senran Zhang Date: Tue, 28 Oct 2025 16:15:07 +0800 Subject: [PATCH 1/5] [InstrProf] Fix frontend generated function hash The most si

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
yuxuanchen1997 wrote: Hi @boomanaiden154, I missed your last comment but please allow me to address some of your concerns. > I am not making an assumption about how users would use this. Not being able > to take into account the hotness of a callsite when making inlining decisions > will redu

[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-11-04 Thread via cfe-commits
@@ -2218,6 +2218,40 @@ static bool BuiltinCpu(Sema &S, const TargetInfo &TI, CallExpr *TheCall, return false; } +/// Checks that __builtin_bswapg was called with a single argument, which is an +/// unsigned integer, and overrides the return value type to the integer type. +

[clang] [Clang] Add __builtin_bswapg (PR #162433)

2025-11-04 Thread via cfe-commits
https://github.com/clingfei updated https://github.com/llvm/llvm-project/pull/162433 >From 92466f3789ce1849ebee8a405efd42e191c591f5 Mon Sep 17 00:00:00 2001 From: clingfei <[email protected]> Date: Wed, 8 Oct 2025 15:05:44 +0800 Subject: [PATCH 01/14] [Clang] Add __builtin_bswapg --- clang/inc

[clang-tools-extra] [clang-tidy] Rename 'cert-err60-cpp' to 'bugprone-exception-copy-constructor-throws' (PR #164061)

2025-11-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/164061 >From cf8d1596e1dbac83c36aa328cebacfb51675aac3 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 18 Oct 2025 11:07:51 +0300 Subject: [PATCH 1/4] [clang-tidy] Rename 'cert-err60-cpp' to 'bugprone-excepti

[clang-tools-extra] [clang-tidy] Implement alphabetical order test (PR #166072)

2025-11-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: As for the test, it could be a simple `xxx_test.py` script, look at how tests in https://github.com/llvm/llvm-project/tree/main/.ci are organized. AFAIK they are not run in premerge CI, but for small tests I guess it's not needed that much. As for the script name, we should re

[clang] [llvm] [OpenMP][clang] Register Vtables on device for indirect calls (PR #159856)

2025-11-04 Thread via cfe-commits
https://github.com/Jason-VanBeusekom updated https://github.com/llvm/llvm-project/pull/159856 >From e7aafa4162d216914902aab34f51db5232fc8c45 Mon Sep 17 00:00:00 2001 From: "[email protected]" Date: Fri, 12 Sep 2025 14:07:54 -0500 Subject: [PATCH 1/6] [OpenMP][clang] Register Vtables on

[clang] [Clang][CIR][Doc] Document CIR code duplication plans (PR #166457)

2025-11-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/166457 >From 4b42338b54fcab080e458032b0e22326b9a6ab02 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 4 Nov 2025 14:24:43 -0800 Subject: [PATCH 1/3] [Clang][CIR][Doc] Document CIR code duplication plans This

[clang-tools-extra] [clang-tidy] Fix `bugprone-exception-escape` not diagnosing throws in argument lists (PR #165955)

2025-11-04 Thread Baranov Victor via cfe-commits
@@ -601,10 +591,25 @@ ExceptionAnalyzer::throwsException(const Stmt *St, Results.merge(Excs); } } else { +// Check whether any of this node's subexpressions throws. for (const Stmt *Child : St->children()) { ExceptionInfo Excs = throwsException(Child

[clang] [llvm] [OMPIRBuilder] Fix addrspace of internal critical section lock (PR #166459)

2025-11-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex created https://github.com/llvm/llvm-project/pull/166459 None >From 406542570c3c20b1509c287fb9fe3a18700f7ac2 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Tue, 4 Nov 2025 14:44:48 -0800 Subject: [PATCH] [OMPIRBuilder] Fix addrspace of internal critical section loc

[clang-tools-extra] [clang-tidy] Fix `bugprone-exception-escape` not diagnosing throws in argument lists (PR #165955)

2025-11-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/165955 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CIR][Doc] Document CIR code duplication plans (PR #166457)

2025-11-04 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/166457 >From 4b42338b54fcab080e458032b0e22326b9a6ab02 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 4 Nov 2025 14:24:43 -0800 Subject: [PATCH 1/2] [Clang][CIR][Doc] Document CIR code duplication plans This

[clang-tools-extra] [clang-tidy] Fix `bugprone-exception-escape` not diagnosing throws in argument lists (PR #165955)

2025-11-04 Thread Baranov Victor via cfe-commits
@@ -601,10 +591,25 @@ ExceptionAnalyzer::throwsException(const Stmt *St, Results.merge(Excs); } } else { +// Check whether any of this node's subexpressions throws. for (const Stmt *Child : St->children()) { ExceptionInfo Excs = throwsException(Child

[clang] [llvm] [Clang] Fix cleanup attribute by delaying type checks after the type is deduced (PR #164440)

2025-11-04 Thread Guillot Tony via cfe-commits
to268 wrote: Basically, it is about the way template type parameters are deduced. The `Ty` template type parameter should be referring to the `int` type in the following example: ```cpp int open() { return 0; } void close(decltype(open()) *) {} template void test() { Ty fd [[gnu::cleanup(clo

[clang] [HLSL] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Ashley Coleman via cfe-commits
V-FEXrt wrote: Here is some further reading/context that we want to make sure we've applied here https://github.com/Microsoft/DirectXShaderCompiler/issues/169 https://github.com/llvm/llvm-project/pull/166419 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang][utils] Add auto mode to reduction script (PR #163282)

2025-11-04 Thread Paul Kirth via cfe-commits
@@ -472,6 +633,22 @@ def main(): creduce_flags += ["--n", str(max(4, multiprocessing.cpu_count() // 2))] r = Reduce(crash_script, file_to_reduce, creduce_flags) +if args.auto: ilovepi wrote: If you're OK w/ it, I'd like to keep the `--auto` me

[clang] [HLSL] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Ashley Coleman via cfe-commits
@@ -148,6 +148,15 @@ template constexpr T ldexp_impl(T X, T Exp) { return exp2(Exp) * X; } +template constexpr uint firstbithigh_impl(T X) { + return (Bitwidth - 1) - __builtin_hlsl_elementwise_firstbithigh(X); +} + +template +constexpr vector firstbithigh_impl(vector X)

[clang-tools-extra] [clang-tidy][doc] add more information in twine-local's document (PR #166266)

2025-11-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/166266 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][doc] add more information in twine-local's document (PR #166266)

2025-11-04 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/166266 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add support for HLSLAggregateSplatCast and HLSLElementwiseCast to constant expression evaluator (PR #164700)

2025-11-04 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/164700 >From 276fca41ad8e81ce4189266c20d260646d6d5f4c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 31 Jan 2025 16:57:24 -0800 Subject: [PATCH 1/6] add support for HLSLAggregateSplatCast and HLSLElementwiseCast

[clang] [Clang] fix confusing diagnostics for lambdas with init-captures inside braced initializers (PR #166180)

2025-11-04 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/166180 >From b97e99f73cddc4ca5c525dbd9e781679902adaec Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 3 Nov 2025 17:21:38 +0200 Subject: [PATCH] [Clang] fix confusing diagnostics for lambdas with init-

[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

2025-11-04 Thread Baranov Victor via cfe-commits
vbvictor wrote: > As of c++20, you can reassign a lambda variable, if it meets certain > conditions. Thank you for the insights on C++20, didn't know that! I'm happy if we make all options "on-by-default" so that users would know about new places to add `const`, but just make a fallback to dis

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > You are making assumption of how users use them. There are cases where adding > alwaysinline would be worse than default inliner decision, if it's not used > carefully. But alwaysinline is still a valuable tool provided by compiler to > certain users. I am not making a

[clang] [HLSL] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/166419 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Invert the result of `firstbithigh` (PR #166419)

2025-11-04 Thread Farzon Lotfi via cfe-commits
@@ -148,6 +148,15 @@ template constexpr T ldexp_impl(T X, T Exp) { return exp2(Exp) * X; } +template constexpr uint firstbithigh_impl(T X) { + return (Bitwidth - 1) - __builtin_hlsl_elementwise_firstbithigh(X); +} + +template +constexpr vector firstbithigh_impl(vector X)

[clang] [WebAssembly] Enable musttail only when tail-call is enabled (PR #163618)

2025-11-04 Thread Derek Schuff via cfe-commits
@@ -546,6 +546,8 @@ NetBSD Support WebAssembly Support ^^^ +- Fix a bug so that __has_attribute(musttail) should not be true anymore when notail is not enabled. dschuff wrote: "when notail is not enabled" should that be something like "when W

[clang] Returning library functions as integer instead of bool (PR #166446)

2025-11-04 Thread Thomas Applencourt via cfe-commits
https://github.com/TApplencourt updated https://github.com/llvm/llvm-project/pull/166446 >From 2212bb2d182862a51787826a496b6f9faea82939 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 4 Nov 2025 20:58:54 + Subject: [PATCH 1/3] run black --- clang/bindings/python/clang/cindex.py | 1

[clang] [llvm] [HLSL] Add load overload with status (PR #166449)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Joshua Batista (bob80905) Changes This PR adds a new overload for resources, which takes an additional parameter by reference, status. It fills the status parameter with a 1 or 0, depending on whether or not the resource access wa

[clang] [llvm] [HLSL] Add load overload with status (PR #166449)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Joshua Batista (bob80905) Changes This PR adds a new overload for resources, which takes an additional parameter by reference, status. It fills the status parameter with a 1 or 0, depending on whether or not the resource access was mapped.

[clang] [llvm] [HLSL] Add load overload with status (PR #166449)

2025-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/166449 This PR adds a new overload for resources, which takes an additional parameter by reference, status. It fills the status parameter with a 1 or 0, depending on whether or not the resource access was mapped. Che

[clang-tools-extra] [clangd] Remove the unused AST-based code folding Implementation. (PR #166189)

2025-11-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: cc @aketchum15 since you brought up the possibility of using this AST folding code again in [this Discourse thread](https://discourse.llvm.org/t/clangd-implementing-more-folding-ranges-and-the-pseudo-parser/86626). Do you have any short-term plans t

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -188,10 +188,20 @@ void EHScopeStack::popCleanup() { } } +bool EHScopeStack::requiresLandingPad() const { andykaylor wrote: We really shouldn't have a "landing pad" concept in CIR. That's an LLVM IR construct. Perhaps `requiresCatchOrCleanup`? https://

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -30,12 +30,16 @@ struct CatchTypeInfo { /// A protected scope for zero-cost EH handling. class EHScope { + EHScopeStack::stable_iterator enclosingEHScope; + class CommonBitFields { friend class EHScope; unsigned kind : 3; }; enum { NumCommonBits = 3 };

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -465,12 +465,48 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, mlir::Location callLoc, cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal, cir::FuncOp directFuncOp, - const SmallVectorImpl &cirCallArgs

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -382,5 +410,279 @@ void CIRGenFunction::exitCXXTryStmt(const CXXTryStmt &s, bool isFnTryBlock) { return; } - cgm.errorNYI("exitCXXTryStmt: Required catch"); + // Emit the structure of the EH dispatch for this catch. + emitCatchDispatchBlock(*this, catchScope, tryO

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -354,6 +355,33 @@ void CIRGenFunction::enterCXXTryStmt(const CXXTryStmt &s, cir::TryOp tryOp, } } +/// Emit the structure of the dispatch block for the given catch scope. +/// It is an invariant that the dispatch block already exists. +static void emitCatchDispatchBlock(

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -465,12 +465,48 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, mlir::Location callLoc, cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal, cir::FuncOp directFuncOp, - const SmallVectorImpl &cirCallArgs

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Andy Kaylor via cfe-commits
@@ -465,12 +465,48 @@ static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, mlir::Location callLoc, cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal, cir::FuncOp directFuncOp, - const SmallVectorImpl &cirCallArgs

[clang] [ARM] Fix test using thumb instead arm arch prefix (PR #166416)

2025-11-04 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I'm confused what, exactly, this is fixing. We're explicitly specifying the triple, so the host triple shouldn't matter. And this test is currently passing on every buildbot. So what does this do? https://github.com/llvm/llvm-project/pull/166416 ___

[clang] [CodeCompletion] Consider header files without extension, if... (PR #166447)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Björn Schäpers (HazardyKnusperkeks) Changes ... the path passed to -I ends with /include. I've brought it up, when the special handling for Qt was added (https://reviews.llvm.org/D112996#3349609) but got no feedback. --- Full diff: https

[clang] [CodeCompletion] Consider header files without extension, if... (PR #166447)

2025-11-04 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks created https://github.com/llvm/llvm-project/pull/166447 ... the path passed to -I ends with /include. I've brought it up, when the special handling for Qt was added (https://reviews.llvm.org/D112996#3349609) but got no feedback. From 00630965ddf956654d5d

[clang] [CIR] Upstream non-empty Try block with catch all (PR #165158)

2025-11-04 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/165158 >From c4ead2dc0edd6698a6a661133dc633bd3b6a771e Mon Sep 17 00:00:00 2001 From: Amr Hesham Date: Sat, 25 Oct 2025 21:17:00 +0200 Subject: [PATCH] [CIR] Upstream non-empty Try block with catch all --- clang/

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-04 Thread Craig Topper via cfe-commits
@@ -139,6 +139,7 @@ on support follow. ``Smepmp``Supported ``Smmpm`` Supported ``Smnpm`` Supported + ``Smpmpmt`` Supported topperc wrote: Should be in the experimental extension section with a link to the spec.

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-04 Thread Craig Topper via cfe-commits
https://github.com/topperc requested changes to this pull request. Extension isn't ratified yet so should be experimental. https://github.com/llvm/llvm-project/pull/166322 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/c

[clang] [llvm] [RISCV][llvm] Support Smpmpmt version 0.6 (PR #166322)

2025-11-04 Thread Craig Topper via cfe-commits
@@ -956,6 +956,9 @@ def FeatureStdExtSsdbltrp def FeatureStdExtSmepmp : RISCVExtension<1, 0, "Enhanced Physical Memory Protection">; +def FeatureStdExtSmpmpmt +: RISCVExtension<0, 6, "PMP-based Memory Types Extension">; topperc wrote: Shouldn't this b

[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)

2025-11-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 ready_for_review https://github.com/llvm/llvm-project/pull/165350 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6e2dcdb - Fix implicit truncation of `select` non-bool vector conditions (#166279)

2025-11-04 Thread via cfe-commits
Author: Kaitlin Peng Date: 2025-11-04T13:20:46-08:00 New Revision: 6e2dcdb17c0ef4eff239a08772b194e2009193ec URL: https://github.com/llvm/llvm-project/commit/6e2dcdb17c0ef4eff239a08772b194e2009193ec DIFF: https://github.com/llvm/llvm-project/commit/6e2dcdb17c0ef4eff239a08772b194e2009193ec.diff

[clang] Fix implicit truncation of `select` non-bool vector conditions (PR #166279)

2025-11-04 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng closed https://github.com/llvm/llvm-project/pull/166279 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix implicit truncation of `select` non-bool vector conditions (PR #166279)

2025-11-04 Thread Kaitlin Peng via cfe-commits
kmpeng wrote: If you mean just using `HLSL_FIXED_VECTOR` and not separating the templates, I think we would end up running into the same template deduction problem. https://github.com/llvm/llvm-project/pull/166279 ___ cfe-commits mailing list cfe-com

[clang] [llvm] [AMDGPU] Match bitsin(typeof(x)) - popcnt(x) to s_bcnt0_i32 (PR #164847)

2025-11-04 Thread Patrick Simmons via cfe-commits
https://github.com/linuxrocks123 updated https://github.com/llvm/llvm-project/pull/164847 >From 96825875e1c8bad9a9b3b28fe943a5469f94c575 Mon Sep 17 00:00:00 2001 From: Patrick Simmons Date: Thu, 23 Oct 2025 11:50:32 -0500 Subject: [PATCH 01/12] Initial work --- clang/include/clang/Basic/Built

[clang] Returning library functions as integer instead of bool (PR #166446)

2025-11-04 Thread Thomas Applencourt via cfe-commits
TApplencourt wrote: I did manually check if functions where returning cint or cuint, but I more likely missed a few. Please let me know if it's worth a line in the release notes. https://github.com/llvm/llvm-project/pull/166446 ___ cfe-commits ma

[clang] Returning library functions as integer instead of bool (PR #166446)

2025-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thomas Applencourt (TApplencourt) Changes Fix #164915 --- Patch is 20.41 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/166446.diff 1 Files Affected: - (modified) clang/bindings/python/clang

[clang] Returning library functions as integer instead of bool (PR #166446)

2025-11-04 Thread Thomas Applencourt via cfe-commits
https://github.com/TApplencourt created https://github.com/llvm/llvm-project/pull/166446 Fix #164915 >From 2212bb2d182862a51787826a496b6f9faea82939 Mon Sep 17 00:00:00 2001 From: tapplencourt Date: Tue, 4 Nov 2025 20:58:54 + Subject: [PATCH 1/2] run black --- clang/bindings/python/clang/

[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)

2025-11-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/165350 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][clang] Sandbox filesystem reads (PR #165350)

2025-11-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/165350 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [llvm][clang] Sandbox filesystem reads (PR #162151)

2025-11-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/162151 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add support for HLSLAggregateSplatCast and HLSLElementwiseCast to constant expression evaluator (PR #164700)

2025-11-04 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/164700 >From 276fca41ad8e81ce4189266c20d260646d6d5f4c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 31 Jan 2025 16:57:24 -0800 Subject: [PATCH 1/6] add support for HLSLAggregateSplatCast and HLSLElementwiseCast

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
@@ -4032,6 +4032,29 @@ callee is unavailable or if the callee has the ``noinline`` attribute. }]; } +def FlattenDeepDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``flatten_deep`` attribute causes calls within the attributed function and -

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 approved this pull request. Generally in favor of this change. Given how "normal" flatten is implemented (https://github.com/llvm/llvm-project/commit/41af7c2fdc8cc), I think this patch provides a good foundation to move this feature into LLVM instead of attrib

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 edited https://github.com/llvm/llvm-project/pull/165777 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
@@ -2749,6 +2749,15 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute("aarch64_new_zt0"); } + // Handle flatten_deep attribute for depth-based inlining + if (const auto *FD = dyn_cast(D)) { +if (const FlattenDeepAttr *FD

[clang] [llvm] [clang/LLVM] Add flatten_deep attribute for depth-limited inlining (1/2) (PR #165777)

2025-11-04 Thread Yuxuan Chen via cfe-commits
@@ -1984,6 +1984,13 @@ def Flatten : InheritableAttr { let SimpleHandler = 1; } +def FlattenDeep : InheritableAttr { + let Spellings = [Clang<"flatten_deep">]; + let Subjects = SubjectList<[Function], ErrorDiag>; + let Args = [UnsignedArgument<"MaxDepth">]; --

[clang] [clang] Refactor clang's keyword enable/disable mechanism to allow lldb to re-use it (PR #165323)

2025-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM modulo the requests from @Michael137 https://github.com/llvm/llvm-project/pull/165323 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [flang] [llvm] [mlir] Add FramePointerKind::NonLeafNoReserve (PR #163775)

2025-11-04 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/163775 >From 2cb9a74fe45202d542891b3f609cf56d80130e07 Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Thu, 16 Oct 2025 10:44:55 +0100 Subject: [PATCH 01/10] Add FramePointerKind::NonLeafNoReserve This patch adds a new

[clang] [clang][lit] Add SPIR-V to some OpenMP offload tests (PR #165775)

2025-11-04 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex closed https://github.com/llvm/llvm-project/pull/165775 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4f428d3 - [clang][lit] Add SPIR-V to some OpenMP offload tests (#165775)

2025-11-04 Thread via cfe-commits
Author: Nick Sarnie Date: 2025-11-04T20:34:42Z New Revision: 4f428d30e4d8287169fbc2acfcf37ca7b37ed539 URL: https://github.com/llvm/llvm-project/commit/4f428d30e4d8287169fbc2acfcf37ca7b37ed539 DIFF: https://github.com/llvm/llvm-project/commit/4f428d30e4d8287169fbc2acfcf37ca7b37ed539.diff LOG: [

[clang] [Clang][Driver] Create crash reproducers for IR inputs (PR #165572)

2025-11-04 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/165572 >From be66c84cc561e52bfc28a8aa5706535eeb9f2d6d Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Wed, 29 Oct 2025 11:34:51 + Subject: [PATCH 1/3] [Clang][Driver] Create crash reproducers for IR inputs This pa

[clang] [Clang][Driver] Create crash reproducers for IR inputs (PR #165572)

2025-11-04 Thread Nabeel Omer via cfe-commits
https://github.com/omern1 updated https://github.com/llvm/llvm-project/pull/165572 >From be66c84cc561e52bfc28a8aa5706535eeb9f2d6d Mon Sep 17 00:00:00 2001 From: Nabeel Omer Date: Wed, 29 Oct 2025 11:34:51 + Subject: [PATCH 1/3] [Clang][Driver] Create crash reproducers for IR inputs This pa

  1   2   3   4   >