[clang] [clang] Adjust TextDiagnostic style ranges for interesting source region (PR #164941)

2025-10-31 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/164941 >From a1bcecb7a604ce7c9cee9b4443e67a173328bed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 30 Oct 2025 14:

[clang] [clang-tools-extra] [clang] Make "__GCC_HAVE_DWARF2_CFI_ASM" a proper predefined macro (PR #165731)

2025-10-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/165731 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Align trailing comments for function parameters (PR #164458)

2025-10-31 Thread via cfe-commits
@@ -650,8 +650,16 @@ static unsigned AlignTokens(const FormatStyle &Style, F &&Matches, MatchedIndices.push_back(I); } + // Pass to the function entire lines, so it can update the state of all tokens + // that move. EndOfSequence = I; + while (EndOfSequence < Cha

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

2025-10-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps void @bcnt032_not_for_vregs(ptr addrspace(1) %out, ptr addrspace(1) %in) { +; C

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

2025-10-31 Thread Patrick Simmons via cfe-commits
@@ -1884,6 +1886,13 @@ def : GCNPat < (S_MOV_B32 (i32 0)), sub1)) >; +def : GCNPat < + (i64 (UniformBinFrag 64, (ctpop i64:$src))), +(i64 (REG_SEQUENCE SReg_64, + (i32 (COPY_TO_REGCLASS (S_BCNT0_I32_B64 $src), SReg_32)), sub0, linuxrocks123 wrot

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

2025-10-31 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps void @bcnt032_not_for_vregs(ptr addrspace(1) %out, ptr addrspace(1) %in) { +; C

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

2025-10-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps void @bcnt032_not_for_vregs(ptr addrspace(1) %out, ptr addrspace(1) %in) { +; C

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

2025-10-31 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps void @bcnt032_not_for_vregs(ptr addrspace(1) %out, ptr addrspace(1) %in) { +; C

[clang] [clang-format] Improve annotating templates (PR #165631)

2025-10-31 Thread via cfe-commits
owenca wrote: We have the `TemplateNames` option for this. Is it too much to ask the user to disambiguate the input for clang-format by using the option? https://github.com/llvm/llvm-project/pull/165631 ___ cfe-commits mailing list [email protected]

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

2025-10-31 Thread Matt Arsenault via cfe-commits
@@ -1884,6 +1886,13 @@ def : GCNPat < (S_MOV_B32 (i32 0)), sub1)) >; +def : GCNPat < + (i64 (UniformBinFrag 64, (ctpop i64:$src))), +(i64 (REG_SEQUENCE SReg_64, + (i32 (COPY_TO_REGCLASS (S_BCNT0_I32_B64 $src), SReg_32)), sub0, arsenm wrote: Is

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-10-31 Thread Kees Cook via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

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

2025-10-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Description is out of date https://github.com/llvm/llvm-project/pull/164847 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
@@ -87,4 +87,7 @@ add_lit_testsuite(check-clang-extra "Running clang-tools-extra/test" add_lit_testsuites(CLANG-EXTRA ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CLANG_TOOLS_TEST_DEPS} + SKIP "^clang-doc" evelez7 wrote: I thought about this as well. I opened #

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

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Victor Chernyakin (localspook) Changes Fixed #165766. See that issue for a description of the problem. --- Full diff: https://github.com/llvm/llvm-project/pull/165955.diff 3 Files Affected: - (modified) clang-tools-extra/cla

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

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) Changes Fixed #165766. See that issue for a description of the problem. --- Full diff: https://github.com/llvm/llvm-project/pull/165955.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy

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

2025-10-31 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook created https://github.com/llvm/llvm-project/pull/165955 Fixed #165766. See that issue for a description of the problem. >From 47c2c2ef1a65ffc55ef8a8a926fab39cc56a1429 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Fri, 31 Oct 2025 19:15:34 -0700 Subject:

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Petr Hosek via cfe-commits
@@ -87,4 +87,7 @@ add_lit_testsuite(check-clang-extra "Running clang-tools-extra/test" add_lit_testsuites(CLANG-EXTRA ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${CLANG_TOOLS_TEST_DEPS} + SKIP "^clang-doc" petrhosek wrote: Not something that needs to be done in

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Paul Kirth via cfe-commits
ilovepi wrote: > I think having a separate unittest target is also perfectly reasonable to do > in a follow up patch. Right. I'm not suggesting its a requirement to land. just an observation that we probably should. https://github.com/llvm/llvm-project/pull/165935

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor to remove clangDriver dependency from clangFrontend (PR #165277)

2025-10-31 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: I've tested this with `BUILD_SHARED_LIBS=On` for `clang`, `clang-tools-extra`, `lldb` and `flang`, including the CMake targets `check-clang-unit`, `check-flang-unit`, and `check-lldb-unit`. https://github.com/llvm/llvm-project/pull/165277

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,7 @@ +# Specialize the clang-doc target to avoid building other projects +add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests" boomanaiden154 wrote: It's not actually excluded from the all target. That specific test suite needs to b

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
https://github.com/kwk updated https://github.com/llvm/llvm-project/pull/165886 >From bf5e3d016d15d33b7603801db893b0a96ca04d2c Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 31 Oct 2025 17:13:18 + Subject: [PATCH] Bring --gcc-triple to flang When there are multiple gcc versions ins

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [clang] Refactor option-related code from clangDriver into new clangOptions library (PR #163659)

2025-10-31 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM if resolving Options.td conflict. https://github.com/llvm/llvm-project/pull/163659 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
kwk wrote: > I believe it's important to add a test. Similar to > `clang/test/Driver/gcc-triple.cpp`. @tuliom, thank you for pointing this out. I've added tests now. https://github.com/llvm/llvm-project/pull/165886 ___ cfe-commits mailing list cfe-

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
evelez7 wrote: > If we're doing that, should we also consider having our own unittests target? Yes, we should. I want to do that next. The thing is that the `add_lit_testsuite` CMake macro thing exposes a target in `build.ninja`. AFAIK, no project in clang-tools-extra has a special command (li

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,7 @@ +# Specialize the clang-doc target to avoid building other projects +add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests" boomanaiden154 wrote: That's the existing name for running just `clang-doc` tests. https://github.com/llv

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,7 @@ +# Specialize the clang-doc target to avoid building other projects +add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests" + ${CMAKE_CURRENT_BINARY_DIR} + EXCLUDE_FROM_CHECK_ALL boomanaiden154 wrote: They get run twice otherwis

[clang] [llvm] [AArch64][llvm] Add support for Permission Overlays Extension 2 (FEAT_S1POE2) (PR #164912)

2025-10-31 Thread Jonathan Thackray via cfe-commits
@@ -625,6 +625,19 @@ def FeatureF16F32DOT : ExtensionWithMArch<"f16f32dot", "F16F32DOT", "FEAT_F16F32 def FeatureF16F32MM : ExtensionWithMArch<"f16f32mm", "F16F32MM", "FEAT_F16F32MM", "Enable Armv9.7-A Advanced SIMD half-precision matrix multiply-accumulate to single-precis

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +# Specialize the clang-doc target to avoid building other projects +add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests" + ${CMAKE_CURRENT_BINARY_DIR} + EXCLUDE_FROM_CHECK_ALL ilovepi wrote: Doesn't that exclude the tests fro

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,7 @@ +# Specialize the clang-doc target to avoid building other projects +add_lit_testsuite(check-clang-extra-clang-doc "Running clang-doc tests" ilovepi wrote: ```suggestion add_lit_testsuite(check-clang-doc "Running clang-doc tests" ``` If we're goin

[clang] [llvm] [NVPTX] Add ex2.approx bf16 support and cleanup intrinsic definition (PR #165446)

2025-10-31 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B approved this pull request. https://github.com/llvm/llvm-project/pull/165446 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NVPTX] Add ex2.approx bf16 support and cleanup intrinsic definition (PR #165446)

2025-10-31 Thread Artem Belevich via cfe-commits
@@ -375,28 +375,28 @@ static Value *MakeCpAsync(unsigned IntrinsicID, unsigned IntrinsicIDS, CGF.EmitScalarExpr(E->getArg(1))}); } -static Value *MakeHalfType(unsigned IntrinsicID, unsigned BuiltinID, - const Ca

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 approved this pull request. https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Paul Kirth via cfe-commits
ilovepi wrote: If we're doing that, should we also consider having our own unittests target? https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
evelez7 wrote: * **#165935** https://app.graphite.dev/github/pr/llvm/llvm-project/165935?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/1659

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/165935 >From 07c3be5a84a79849777488ce32d0d078cecfeb4d Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Fri, 31 Oct 2025 15:46:54 -0700 Subject: [PATCH] [clang-doc] create a separate cmake file for clang-doc's LIT test

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's lit tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add separate test target for clang-doc (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Erick Velez (evelez7) Changes To avoid depending on all of the tools in clang-tools-extra, the `check-clang-extra-clang-doc` target is specialized in its own CMake file in clang-tools-extra/test/clang-doc. This eliminates around

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 ready_for_review https://github.com/llvm/llvm-project/pull/165935 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] create a separate cmake file for clang-doc's LIT tests (PR #165935)

2025-10-31 Thread Erick Velez via cfe-commits
https://github.com/evelez7 created https://github.com/llvm/llvm-project/pull/165935 To avoid depending on all of the tools in clang-tools-extra, the `check-clang-extra-clang-doc` target is specialized in its own CMake file in clang-tools-extra/test/clang-doc. This eliminates around 800 files to

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/165886 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
https://github.com/kwk updated https://github.com/llvm/llvm-project/pull/165886 >From 9db125a1faf893b008472c3a46d6eef6ecf7c5aa Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 31 Oct 2025 17:13:18 + Subject: [PATCH] Bring --gcc-triple to flang When there are multiple gcc versions ins

[clang] [Clang] Add constexpr support for AVX512 permutex2 intrinsics (PR #165085)

2025-10-31 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 origin/main HEAD --extensions h,cpp,c -- clang/lib/AST/ByteCode/InterpBuiltin.cpp cla

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

2025-10-31 Thread Jasmine Tang via cfe-commits
https://github.com/badumbatish updated https://github.com/llvm/llvm-project/pull/163618 >From f9c22f861739e52e77960ae8083490dfdf62d19e Mon Sep 17 00:00:00 2001 From: Jasmine Tang Date: Wed, 15 Oct 2025 12:13:58 -0700 Subject: [PATCH 1/4] Precommit --- clang/test/CodeGen/WebAssembly/musttail.c

[clang] [llvm] [NVPTX] Add ex2.approx bf16 support and cleanup intrinsic definition (PR #165446)

2025-10-31 Thread Alex MacLean via cfe-commits
@@ -375,28 +375,28 @@ static Value *MakeCpAsync(unsigned IntrinsicID, unsigned IntrinsicIDS, CGF.EmitScalarExpr(E->getArg(1))}); } -static Value *MakeHalfType(unsigned IntrinsicID, unsigned BuiltinID, - const Ca

[clang] [Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0) (PR #164432)

2025-10-31 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple x86_64-- -emit-llvm -x c %s -o - \ +// RUN: | FileCheck %s --check-prefix=X86 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm -x c %s -o - \ ---

[clang] [Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0) (PR #164432)

2025-10-31 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caama=C3=B1o?= Message-ID: In-Reply-To: https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/164432 ___ cfe-commits mailing list [email protected] https://lists.llvm.

[clang] [Clang] Make the AS of llvm.compiler.used & llvm.used elements addrspace(0) (PR #164432)

2025-10-31 Thread Matt Arsenault via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/164432 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [Clang][Sema] Allow counted_by on void* in GNU mode (PR #164737)

2025-10-31 Thread Eli Friedman via cfe-commits
@@ -132,9 +132,20 @@ bool Sema::CheckCountedByAttrOnField(FieldDecl *FD, Expr *E, bool CountInBytes, // `BoundsSafetyCheckUseOfCountAttrPtr` // // * When the pointee type is always an incomplete type (e.g. -// `void`) the attribute is disallowed by this method

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/165886 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] Bring --gcc-triple to flang (PR #165886)

2025-10-31 Thread Konrad Kleine via cfe-commits
https://github.com/kwk updated https://github.com/llvm/llvm-project/pull/165886 >From 4b5f74e2a6cd1967030496e0a6b19609ab1cdf4a Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 31 Oct 2025 17:13:18 + Subject: [PATCH] Bring --gcc-triple to flang When there are multiple gcc versions ins

[clang] [compiler-rt] [UBSan] Fix incorrect alignment reported when global new returns an o… (PR #152532)

2025-10-31 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/152532 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-10-31 Thread Patrick Simmons via cfe-commits
https://github.com/linuxrocks123 edited https://github.com/llvm/llvm-project/pull/164847 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][HIP][SPIRV] Fix linking / translation step on Windows (PR #162175)

2025-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/162175 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `__hlsl_resource_t` to types recognized by clang TableGen for built-in functions (PR #163465)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes This change adds resource handle type `__hlsl_resource_t` to the list of types recognized in the Clang's built-in functions prototype string. HLSL has built-in resource classes and some of them have many meth

[clang] [HLSL] Add `__hlsl_resource_t` to types recognized by clang TableGen for built-in functions (PR #163465)

2025-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota ready_for_review https://github.com/llvm/llvm-project/pull/163465 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add `__hlsl_resource_t` to types recognized by clang TableGen for built-in functions (PR #163465)

2025-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/163465 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][Sema] Fix crash when compiling naked lambdas (PR #165524)

2025-10-31 Thread Eli Friedman via cfe-commits
@@ -1277,44 +1277,58 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, MD && !MD->isStatic()) { bool IsInLambda = MD->getParent()->isLambda() && MD->getOverloadedOperator() == OO_Call; -if (MD->isImplicitObjectMemberFunction()) -

[clang] [Clang][CodeGen][Sema] Fix crash when compiling naked lambdas (PR #165524)

2025-10-31 Thread Eli Friedman via cfe-commits
@@ -2332,6 +2332,20 @@ ExprResult Sema::BuildLambdaExpr(SourceLocation StartLoc, maybeAddDeclWithEffects(LSI->CallOperator); } + // This is for GCC compatibility. If any lambda captures are actually used in the + // function body. GCC silently removes the naked attrib

[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #165920)

2025-10-31 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 origin/main HEAD --extensions cpp,h -- clang/test/CodeGen/sanitize-type-outlined.cpp

[clang] [llvm] [HLSL] Implement the f16tof32() intrinsic (PR #165860)

2025-10-31 Thread Farzon Lotfi via cfe-commits
@@ -3744,6 +3751,89 @@ bool SPIRVInstructionSelector::selectResourceNonUniformIndex( return true; } +bool SPIRVInstructionSelector::selectF16ToF32(Register ResVReg, + const SPIRVType *ResType, +

[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #165920)

2025-10-31 Thread Matthew Nagy via cfe-commits
gbMattN wrote: Oops, wrong branch sorry! https://github.com/llvm/llvm-project/pull/165920 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #165920)

2025-10-31 Thread Matthew Nagy via cfe-commits
https://github.com/gbMattN closed https://github.com/llvm/llvm-project/pull/165920 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #165920)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthew Nagy (gbMattN) Changes …nd update docs --- Full diff: https://github.com/llvm/llvm-project/pull/165920.diff 6 Files Affected: - (modified) clang/docs/TypeSanitizer.rst (+19-3) - (modified) clang/docs/UsersManual.rst (+9) - (mo

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

2025-10-31 Thread Jasmine Tang via cfe-commits
@@ -508,6 +509,10 @@ def TargetMicrosoftRecordLayout : TargetArch<["x86", "x86_64", "arm", "thumb", let CustomCode = [{ Target.hasMicrosoftRecordLayout() }]; } +def TargetMustTailAvaiable: TargetArch { + let CustomCode = [{ Target.hasMustTail() }]; +} + ba

[clang] [TySan][Clang] Add clang flag to use tysan outlined instrumentation a… (PR #165920)

2025-10-31 Thread Matthew Nagy via cfe-commits
https://github.com/gbMattN created https://github.com/llvm/llvm-project/pull/165920 …nd update docs >From 04adbddcde3c22320e286027b3621cb91c43a3b9 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Fri, 31 Oct 2025 21:02:34 + Subject: [PATCH] [TySan][Clang] Add clang flag to use tysan outlined

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

2025-10-31 Thread Jasmine Tang via cfe-commits
@@ -374,6 +374,8 @@ def err_ppc_impossible_musttail: Error< >; def err_aix_musttail_unsupported: Error< "'musttail' attribute is not supported on AIX">; +def err_wasm_musttail_unsupported: Error< + "'musttail' attribute is not supported on this target without tail-call fe

[clang] [llvm] [HLSL] Implement the f16tof32() intrinsic (PR #165860)

2025-10-31 Thread Steven Perron via cfe-commits
@@ -3780,6 +3751,89 @@ bool SPIRVInstructionSelector::selectResourceNonUniformIndex( return true; } +bool SPIRVInstructionSelector::selectF16ToF32(Register ResVReg, + const SPIRVType *ResType, +

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

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

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

2025-10-31 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s + +define amdgpu_ps void @bcnt032_not_for_vregs(ptr addrspace(1) %out, ptr addrspace(1) %in) { +; C

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

2025-10-31 Thread Patrick Simmons via cfe-commits
@@ -0,0 +1,110 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s linuxrocks123 wrote: @jayfoad, the negative tests crash Global ISel, so I can't ad

[clang] [llvm] [HLSL] Implement the f16tof32() intrinsic (PR #165860)

2025-10-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/165860 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement the f16tof32() intrinsic (PR #165860)

2025-10-31 Thread Steven Perron via cfe-commits
@@ -3780,6 +3751,89 @@ bool SPIRVInstructionSelector::selectResourceNonUniformIndex( return true; } +bool SPIRVInstructionSelector::selectF16ToF32(Register ResVReg, + const SPIRVType *ResType, +

[clang] [clang] Add sections to C++ DR status page (PR #165749)

2025-10-31 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > My only real hesitation is that the table is currently sized to match the > tables in cxx_status.html and c_status.html, so we'd lose a little inter-page > consistency, but I think that's probably fine. I don't think there is a lot of users out there to appreciate the consiste

[clang] [Clang] fix false-positive lambda shadow diagnostics in explicit object member functions (PR #165919)

2025-10-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/165919 >From 9adcc63605c08ec39ea0432af4f8cc0fae252113 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Fri, 31 Oct 2025 22:54:53 +0200 Subject: [PATCH] [Clang] fix false-positive lambda shadow diagnostics in

[clang] [Clang] fix false-positive lambda shadow diagnostics in explicit object member functions (PR #165919)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #163731 --- This PR addresses false-positive shadow diagnostics for lambdas inside explicit object member functions ```cpp struct S { int x; void m(this S &self) { auto lambda = [](int x)

[clang] [Clang] fix false-positive lambda shadow diagnostics in explicit object member functions (PR #165919)

2025-10-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk edited https://github.com/llvm/llvm-project/pull/165919 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] fixes false-positive lambda shadow diagnostics in explicit object member functions (PR #165919)

2025-10-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/165919 Fixes #163731 --- This PR addresses false-positive shadow diagnostics for lambdas inside explicit object member functions ```cpp struct S { int x; void m(this S &self) { auto lambda = [](int x) { r

[clang] [clang] Add sections to C++ DR status page (PR #165749)

2025-10-31 Thread Richard Smith via cfe-commits
zygoloid wrote: Maybe we should think about a holistic redesign of the way we present the information at some point -- a single flat table with thousands of rows is probably not the most usable interface we can provide. (Also, these status pages don't match the visual style of either our other

[clang] [llvm] [Hexagon] Add V81 instructions and intrinsics (PR #165903)

2025-10-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar updated https://github.com/llvm/llvm-project/pull/165903 >From 38b4de6236b1a5dafe5675bdb32ff64439ebe339 Mon Sep 17 00:00:00 2001 From: Ikhlas Ajbar Date: Fri, 31 Oct 2025 11:25:07 -0700 Subject: [PATCH] [Hexagon] Add V81 instructions and intrinsics --- clang/lib/Head

[clang] [llvm] [Hexagon] Add V81 instructions and intrinsics (PR #165903)

2025-10-31 Thread Brian Cain via cfe-commits
https://github.com/androm3da approved this pull request. https://github.com/llvm/llvm-project/pull/165903 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Hexagon] Add V81 instructions and intrinsics (PR #165903)

2025-10-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar updated https://github.com/llvm/llvm-project/pull/165903 >From f821fcb4f04b07551a46feb7b07fb7ad88d188f1 Mon Sep 17 00:00:00 2001 From: Ikhlas Ajbar Date: Fri, 31 Oct 2025 11:25:07 -0700 Subject: [PATCH] [Hexagon] Add V81 instructions and intrinsics --- clang/lib/Head

[clang] [llvm] [Hexagon] Add V81 instructions and intrinsics (PR #165903)

2025-10-31 Thread Ikhlas Ajbar via cfe-commits
https://github.com/iajbar updated https://github.com/llvm/llvm-project/pull/165903 >From f821fcb4f04b07551a46feb7b07fb7ad88d188f1 Mon Sep 17 00:00:00 2001 From: Ikhlas Ajbar Date: Fri, 31 Oct 2025 11:25:07 -0700 Subject: [PATCH] [Hexagon] Add V81 instructions and intrinsics --- clang/lib/Head

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

2025-10-31 Thread Sarah Spall via cfe-commits
@@ -3829,6 +3829,330 @@ static bool CheckArraySize(EvalInfo &Info, const ConstantArrayType *CAT, /*Diag=*/true); } +static bool handleScalarCast(EvalInfo &Info, const FPOptions FPO, const Expr *E, + QualType SourceTy, QualType DestTy, +

[libunwind] [libunwind] Fix execution flow imbalance when using C++ Exceptions (PR #165066)

2025-10-31 Thread Louis Dionne via cfe-commits
https://github.com/ldionne commented: Can you add a test like we discussed? It might have to be in LLDB but that's already better than nothing. https://github.com/llvm/llvm-project/pull/165066 ___ cfe-commits mailing list [email protected] ht

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

2025-10-31 Thread Sarah Spall via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library -finclude-default-header -fnative-half-type -std=hlsl202x -verify %s + +// expected-no-diagnostics + +struct Base { + double D; + uint64_t2 U; + int16_t I : 5; + uint16_t I2: 5; +}; + +struct R : Base

[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Hippolyte Melica (etyloppihacilem) Changes # Clangd completion fixes Various fixes in clangd completion, including some changes to the Sema lib. ## fix clangd/clangd#1752 Adds support to autocomplete method and function arguments and qu

[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)

2025-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hippolyte Melica (etyloppihacilem) Changes # Clangd completion fixes Various fixes in clangd completion, including some changes to the Sema lib. ## fix clangd/clangd#1752 Adds support to autocomplete method and function arguments and qua

[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)

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

[clang] [clang-tools-extra] [clangd] Autocomplete fixes for methods (PR #165916)

2025-10-31 Thread Hippolyte Melica via cfe-commits
https://github.com/etyloppihacilem created https://github.com/llvm/llvm-project/pull/165916 # Clangd completion fixes Various fixes in clangd completion, including some changes to the Sema lib. ## fix clangd/clangd#1752 Adds support to autocomplete method and function arguments and qualifiers

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

2025-10-31 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > Can you please elaborate what do you mean by it "changes the semantics of > alwaysinline"? I am introducing a new attribute flatten_deep both on clang > side and LLVM side. alwaysinline should still mean the same thing. You said patch 2 will update the alwaysinliner pas

[clang] [llvm] [Hexagon] Add V81 instructions and intrinsics (PR #165903)

2025-10-31 Thread Ikhlas Ajbar via cfe-commits
iajbar wrote: The error bellow is not related to my patch: CI Checks / Build and Test Linux (pull_request)] Failing /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Analysis/DependenceAnalysis/strong-siv-overflow.ll:25:15: error: CHECK-NEXT: is not on the line after the previou

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

2025-10-31 Thread Grigory Pastukhov via cfe-commits
https://github.com/grigorypas updated https://github.com/llvm/llvm-project/pull/165777 >From f84132355882ef7d909e2970f6dc251efd4785f4 Mon Sep 17 00:00:00 2001 From: Grigory Pastukhov Date: Fri, 24 Oct 2025 12:58:33 -0700 Subject: [PATCH 1/3] Add flatten_deep attribute to clang --- clang/inclu

[clang] [llvm] Sandboxing v2 (PR #165350)

2025-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/165350 >From db5971beb9a4108b300e4dd666d3b6760d4c4890 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 27 Oct 2025 16:00:53 -0700 Subject: [PATCH 01/17] [Support] Introduce IO sandboxing --- llvm/CMakeLists

  1   2   3   4   >