[clang] [clang-tools-extra] [lldb] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)

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

[clang] [libc] [libc][math] fix-exp (PR #148670)

2025-07-14 Thread Muhammad Bassiouni via cfe-commits
https://github.com/bassiounix updated https://github.com/llvm/llvm-project/pull/148670 >From 30f3a33cea2cfcbe61663102d47dcc74ff43ccb3 Mon Sep 17 00:00:00 2001 From: bassiounix Date: Mon, 14 Jul 2025 19:50:42 +0300 Subject: [PATCH 1/2] [libc][math] fix-exp --- libc/src/__support/FPUtil/PolyEva

[clang] [llvm] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 (PR #147425)

2025-07-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/147425 >From 2c36f0664993d54841245fe62d062af3b7332c97 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 14 Jul 2025 12:56:54 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_tanh_bf16` on gfx1250 Co-authored-by

[clang] [libc] [libc][math] fix-exp (PR #148670)

2025-07-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/C

[clang] [AArch64][FMV] Enable PAuth and BTI hardening of resolver functions (PR #141573)

2025-07-14 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl milestoned https://github.com/llvm/llvm-project/pull/141573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 76f1ddc - [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (#148649)

2025-07-14 Thread via cfe-commits
Author: Finn Plummer Date: 2025-07-14T10:29:53-07:00 New Revision: 76f1ddc79cc00c78354bfae0a5cb08fae41dc4fd URL: https://github.com/llvm/llvm-project/commit/76f1ddc79cc00c78354bfae0a5cb08fae41dc4fd DIFF: https://github.com/llvm/llvm-project/commit/76f1ddc79cc00c78354bfae0a5cb08fae41dc4fd.diff

[clang] [DebugInfo] Add option for producing no source-file hash (PR #148657)

2025-07-14 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. https://github.com/llvm/llvm-project/pull/148657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Fix dependency scanner misidentifying 'import::' as module partition (PR #148674)

2025-07-14 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth updated https://github.com/llvm/llvm-project/pull/148674 >From bb1c20a40fa8635b8987733708979729d54aa02e Mon Sep 17 00:00:00 2001 From: Naveen Seth Hanig Date: Mon, 14 Jul 2025 18:44:01 +0200 Subject: [PATCH 1/2] [clang][deps] Fix dependency scanner misidentifying

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float test_no_second_arg(float3 p0) { + return refract(p0); + // expected-error@-1 {{no matching function

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-07-14 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > 1. Have what is proposed here as an initial step, with the addition that we > issue warnings on unguarded uses of builtins / ASM (similar to what > `__builtin_available` / `@available` do), and we clean-up non-extern > functions that become unreachable as a consequence of pred

[clang] [llvm] [HLSL][DXIL] Implement `refract` intrinsic (PR #147342)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,74 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify + +float test_no_second_arg(float3 p0) { + return refract(p0); + // expected-error@-1 {{no matching function

[clang] [LifetimeSafety] Make the dataflow analysis generic (PR #148222)

2025-07-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/148222 >From 927f92a13bfe02ca3e458723a0e74fe0b7f53d18 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 11 Jul 2025 11:11:47 + Subject: [PATCH 1/2] [LifetimeSafety] Add expired loans analysis --- clang/lib/A

[clang] [CIR] Upstream the basic structure of LoweringPrepare pass (PR #148545)

2025-07-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. We need to update some of the entries because they are old now, so a few comments on that, otherwise LGTM https://github.com/llvm/llvm-project/pull/148545 ___ cfe-commits mailing list cfe-co

[clang] [CIR] Upstream the basic structure of LoweringPrepare pass (PR #148545)

2025-07-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/148545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [X86][AVX10.2] Decouple AMX-AVX512 from AVX10.2 (PR #148633)

2025-07-14 Thread Phoebe Wang via cfe-commits
@@ -16,7 +16,15 @@ #define __DEFAULT_FN_ATTRS_AVX512 \ __attribute__((__always_inline__, __nodebug__, \ - __target__("amx-avx512,avx10.2-512"))) + __target__("amx-avx

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/146355 >From fc3b77d8c4b5dd264bd746ed997bcea6cddaf389 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Mon, 30 Jun 2025 17:05:41 +0300 Subject: [PATCH 1/7] Initial implementation --- .../bugprone/unchecked-optional

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// expected-error@+1{{'clang::sycl_external' attribute only applies to functions}} +[[clang::sycl_external]] int a; + + +// expected-error@+2{{'clang::sycl_external' attribute only applies to funct

[clang] [LifetimeSafety] Implement dataflow analysis for loan propagation (PR #148065)

2025-07-14 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/148065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e074044 - [clang][scan-deps] fix new test for readonly work trees

2025-07-14 Thread Augie Fackler via cfe-commits
Author: Augie Fackler Date: 2025-07-14T10:09:11-04:00 New Revision: e074044a120d5fd2f7aef8f868e8618c6909e568 URL: https://github.com/llvm/llvm-project/commit/e074044a120d5fd2f7aef8f868e8618c6909e568 DIFF: https://github.com/llvm/llvm-project/commit/e074044a120d5fd2f7aef8f868e8618c6909e568.diff

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// expected-warning@+1{{'clang::sycl_external' attribute ignored}} +[[clang::sycl_external]] void bar() {} + +// expected-warning@+1{{'clang::sycl_external' attribute ignored}} +[[clang::sycl_external]] int a; + +//

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8981,499 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8703,51 +8738,256 @@ SDValue SystemZTargetLowering::combineSETCC( } static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { - // We have a SELECT_CCMASK or BR_CCMASK comparing the condition code - // set by the CCReg instruction using the CCValid / CCMask

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8789,8 +9029,535 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-07-14 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8958,483 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_ccmask_a (select_ccmask_b)), where select_ccmas

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// expected-error@+1{{'clang::sycl_external' attribute only applies to functions}} +[[clang::sycl_external]] int a; + + +// expected-error@+2{{'clang::sycl_external' attribute only applies to funct

[clang] [llvm] [NFC][AMDGPU] Rename "amdgpu-as" to "amdgpu-synchronize-as" (PR #148627)

2025-07-14 Thread Shilei Tian via cfe-commits
@@ -704,12 +704,12 @@ void diagnoseUnknownMMRAASName(const MachineInstr &MI, StringRef AS) { DiagnosticInfoUnsupported(Fn, Str.str(), MI.getDebugLoc(), DS_Warning)); } -/// Reads \p MI's MMRAs to parse the "amdgpu-as" MMRA. +/// Reads \p MI's MMRAs to parse the "amdgpu-

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Andrey Karlov via cfe-commits
@@ -6298,10 +6304,43 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang] [llvm] [NFC][AMDGPU] Rename "amdgpu-as" to "amdgpu-synchronize-as" (PR #148627)

2025-07-14 Thread Matt Arsenault via cfe-commits
@@ -704,12 +704,12 @@ void diagnoseUnknownMMRAASName(const MachineInstr &MI, StringRef AS) { DiagnosticInfoUnsupported(Fn, Str.str(), MI.getDebugLoc(), DS_Warning)); } -/// Reads \p MI's MMRAs to parse the "amdgpu-as" MMRA. +/// Reads \p MI's MMRAs to parse the "amdgpu-

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Finn Plummer (inbelic) Changes - when there are duplicate `RangeInfo`s created and we will attempt to `llvm::sort` or `llvm::stable_sort` them, it does not appear deterministic in which order they will be sorted (because they are equivale

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-14 Thread Michael Kruse via cfe-commits
@@ -643,9 +650,7 @@ void LoopInfoStack::push(BasicBlock *Header, clang::ASTContext &Ctx, case LoopHintAttr::Disable: switch (Option) { case LoopHintAttr::Vectorize: -// Disable vectorization by specifying a width of 1. -setVectorizeWidth(1); -

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: @guy-david @bevin-hansson This resolved the build issue for me locally when using `DLLVM_ENABLE_EXSTENSIVE_CHECKS`, can you confirm this resolves the issue for you as well? https://github.com/llvm/llvm-project/pull/148649 ___ cfe-comm

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/148649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,70 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsycl-is-device -std=c++20 -fsyntax-only -verify -DCPP20 %s +// Semantic tests for sycl_external attribute + +[[clang::sycl_external]] // expected-error {{'sycl_external' can only b

[clang] [CIR] Upstream the basic structure of LoweringPrepare pass (PR #148545)

2025-07-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> { let dependentDialects = ["cir::CIRDialect"]; } +def LoweringPrepare : Pass<"cir-lowering-prepare"> { + let summary = "Preparation work before lowering to LLVM dialect"; bcardosolopes wrote: `

[clang] [CIR] Upstream the basic structure of LoweringPrepare pass (PR #148545)

2025-07-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> { let dependentDialects = ["cir::CIRDialect"]; } +def LoweringPrepare : Pass<"cir-lowering-prepare"> { + let summary = "Preparation work before lowering to LLVM dialect"; + let description = [{ +This pass d

[clang] 641ff6d - [DebugInfo] Add option for producing no source-file hash (#148657)

2025-07-14 Thread via cfe-commits
Author: Jeremy Morse Date: 2025-07-14T20:48:41+01:00 New Revision: 641ff6db383d0730ae2587c86aa59b6b3cf8341d URL: https://github.com/llvm/llvm-project/commit/641ff6db383d0730ae2587c86aa59b6b3cf8341d DIFF: https://github.com/llvm/llvm-project/commit/641ff6db383d0730ae2587c86aa59b6b3cf8341d.diff

[clang] [DebugInfo] Add option for producing no source-file hash (PR #148657)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse closed https://github.com/llvm/llvm-project/pull/148657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix typo in assertion message (Must) (PR #148704)

2025-07-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/148704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Make the dataflow analysis generic (PR #148222)

2025-07-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/148222 >From 927f92a13bfe02ca3e458723a0e74fe0b7f53d18 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 11 Jul 2025 11:11:47 + Subject: [PATCH 1/2] [LifetimeSafety] Add expired loans analysis --- clang/lib/A

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Yanzuo Liu via cfe-commits
zwuis wrote: Please update `clang/docs/LanguageExtensions.rst`. https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Reduce the small vector size for DeclTypeInfo. (PR #148788)

2025-07-14 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/148788 The `Declarator` class is large (4584 bytes) and used as a stack-local variable during parsing. This patch reduces the default size of its `DeclTypeInfo` member, reducing the overall size down to 3880 bytes. Th

[clang-tools-extra] [clang-tidy] Speed up `misc-header-include-cycle` (PR #148757)

2025-07-14 Thread Baranov Victor via cfe-commits
vbvictor wrote: Could you use `-enable-check-profile` and get a benchmark for standalone `clang-tidy` before and after the patch? https://clang.llvm.org/extra/clang-tidy/Contributing.html#on-checks-profiling https://github.com/llvm/llvm-project/pull/148757 _

[clang] [clang] Reduce the small vector size for DeclTypeInfo. (PR #148788)

2025-07-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes The `Declarator` class is large (4584 bytes) and used as a stack-local variable during parsing. This patch reduces the default size of its `DeclTypeInfo` member, reducing the overall size down to 3880 bytes. T

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/148576 Alas reflection pushed p2719 out of C++26, so this PR changes the diagnostics to reflect that for now type aware allocation is functionally a clang extension. >From d86fea4e16dc9962f87a8969e74b62767476ec30 Mon S

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Alas reflection pushed p2719 out of C++26, so this PR changes the diagnostics to reflect that for now type aware allocation is functionally a clang extension. --- Patch is 29.00 KiB, truncated to 20.00 KiB be

[clang-tools-extra] [clang-tidy] fix `bugprone-narrowing-conversions` false positive for conditional expression (PR #139474)

2025-07-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,c,cpp -- clang-tools-extra/test/clang-tidy/checkers/bugpro

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/148576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
@@ -10081,11 +10081,8 @@ def err_destroying_operator_delete_not_usual : Error< def err_type_aware_destroying_operator_delete : Error< "destroying delete is not permitted to be type aware">; -def ext_cxx26_type_aware_allocators : ExtWarn< - "type aware allocators are a C++2c

[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

2025-07-14 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin commented: Can you update the release notes? The entry is in C++2c support, it should be... under New Feature, perhaps? > - Implemented `P2719R4 Type-aware allocation and deallocation functions > `_ **as an extension** in all(?) C++ language

[clang] [Sema] Remove unnecessary casts (NFC) (PR #148762)

2025-07-14 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/148762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a9db2a - [RISCV] Prefix mcpu/mtune/march/mabi with '-' in comments. NFC (#148723)

2025-07-14 Thread via cfe-commits
Author: Craig Topper Date: 2025-07-14T20:52:46-07:00 New Revision: 9a9db2a39c7640ebd803741e4f058598bca04f0b URL: https://github.com/llvm/llvm-project/commit/9a9db2a39c7640ebd803741e4f058598bca04f0b DIFF: https://github.com/llvm/llvm-project/commit/9a9db2a39c7640ebd803741e4f058598bca04f0b.diff

[clang] [RISCV] Prefix mcpu/mtune/march/mabi with '-' in comments. NFC (PR #148723)

2025-07-14 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/148723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RISCV] Add -march=unset to cancel and ignore a previous -march. (PR #148321)

2025-07-14 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I forgot about tomorrow's LLVM 21 branch so maybe I should merge this based > on the support I've received so far? Looks good! > https://github.com/toppers what's the status of this in GCC? If it's in there > I think we should land/backport this, otherwise after the branch is

[clang] [Sema] Remove unnecessary casts (NFC) (PR #148762)

2025-07-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kazu Hirata (kazutakahirata) Changes getAsmLabel() already returns Expr *. --- Full diff: https://github.com/llvm/llvm-project/pull/148762.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaDecl.cpp (+2-2) ``diff diff --

[clang] [Sema] Remove unnecessary casts (NFC) (PR #148762)

2025-07-14 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/148762 getAsmLabel() already returns Expr *. >From d39e906124798e0cc790f5ef1aed131247341b4f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 13 Jul 2025 13:26:35 -0700 Subject: [PATCH] [Sema] Remove unnec

[clang] [Analysis] Avoid some warnings about exit from noreturn function (PR #144408)

2025-07-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/23366 Here is the relevant piece of the build log fo

[clang] [llvm] [DirectX] Validate registers are bound to root signature (PR #146785)

2025-07-14 Thread via cfe-commits
https://github.com/joaosaffran edited https://github.com/llvm/llvm-project/pull/146785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-14 Thread Balázs Kéri via cfe-commits
@@ -1022,6 +1022,23 @@ getStackOrCaptureRegionForDeclContext(const LocationContext *LC, return (const StackFrameContext *)nullptr; } +static bool isStdStreamVar(const VarDecl *D) { balazske wrote: The current code should filter this out. Still it is not su

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,114 @@ +# Key Instructions debug info in LLVM + +Key Instructions reduces the jumpiness of optimized code debug stepping. This document explains the feature and how it is implemented in LLVM. For Clang support please see the [Clang docs](../../clang/docs/KeyInstructio

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -63,6 +63,7 @@ intermediate LLVM representation. ResponseGuide Remarks RemoveDIsDebugInfo + KeyInstructions jmorse wrote: Is there a corresponding table-of-contents for clang too? https://github.com/llvm/llvm-project/pull/137991

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. jmorse wrote: This provides a negative reason (red

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: Various recommendations, but looking good. https://github.com/llvm/llvm-project/pull/137991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add docs (PR #137991)

2025-07-14 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,46 @@ +# Key Instructions in Clang + +Key Instructions is an LLVM feature that reduces the jumpiness of optimized code debug stepping. This document explains how Clang applies the necessary metadata. + +## Implementation + +See the [LLVM docs](../../llvm/docs/KeyInstr

[clang] [clang][NFC] Fix typos and grammar in comments in ASTDiagnostic (PR #148359)

2025-07-14 Thread Bogdan Vetrenko via cfe-commits
bv2k4 wrote: No merge rights — would appreciate a merge. Thanks! https://github.com/llvm/llvm-project/pull/148359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][RootSignature] Audit `RootSignatureParser` diagnostic production (PR #147800)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: @guy-david Thanks for pointing this out, I have a similar report [here](https://github.com/llvm/llvm-project/pull/147115#issuecomment-3069543491). I am taking a look into both now, but I suspect they might be the same issue. https://github.com/llvm/llvm-project/pull/147800 _

[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)

2025-07-14 Thread Michael Kruse via cfe-commits
@@ -5237,8 +5237,8 @@ width/count of the set of target architectures supported by your application. ... } -Specifying a width/count of 1 disables the optimization, and is equivalent to -``vectorize(disable)`` or ``interleave(disable)``. Meinersbur wrote

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic order (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
https://github.com/inbelic created https://github.com/llvm/llvm-project/pull/148649 - when there are duplicate `RangeInfo`s created and we will attempt to `llvm::sort` or `llvm::stable_sort` them, it does not appear deterministic in which order they will be sorted (because they are equivalent)

[clang-tools-extra] [clang-tidy] fix `bugprone-narrowing-conversions` false positive for conditional expression (PR #139474)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s bugprone-narrowing-conversions %t -- -- + +char test_char(int cond, char c) { + char ret = cond > 0 ? ':' : c; + return ret; +} + +short test_short(int cond, short s) { + short ret = cond > 0 ? ':' : s; + retur

[clang-tools-extra] [clang-tidy] fix `bugprone-narrowing-conversions` false positive for conditional expression (PR #139474)

2025-07-14 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s bugprone-narrowing-conversions %t -- -- + +char test_char(int cond, char c) { + char ret = cond > 0 ? ':' : c; + return ret; +} + +short test_short(int cond, short s) { + short ret = cond > 0 ? ':' : s; + retur

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Andrey Karlov via cfe-commits
@@ -50,37 +50,45 @@ void NoReturnFunctionChecker::checkPostCall(const CallEvent &CE, BuildSinks = getFunctionExtInfo(C->getType()).getNoReturn(); } - if (!BuildSinks && CE.isGlobalCFunction()) { -if (const IdentifierInfo *II = CE.getCalleeIdentifier()) { - /

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-07-14 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Something went wrong here, since valid code started triggering the `-Winvalid-noreturn` diagnostic after this commit: https://gcc.godbolt.org/z/zvs9MG7rz ``` template struct S { void f(); }; template void S::f() { throw 0; } template<> void S::f() {} ``` ``` :10:19: error: fun

[libunwind] [libunwind] Add CMake option to enable execute-only code generation on AArch64 (PR #140554)

2025-07-14 Thread Csanád Hajdú via cfe-commits
@@ -16,6 +16,8 @@ #if defined(_AIX) .toc +#elif defined(__aarch64__) && defined(__ELF__) && defined(_LIBUNWIND_EXECUTE_ONLY_CODE) Il-Capitano wrote: @MaskRay Do you have any thoughts on this? I would prefer to keep the code as-is if you agree with my reas

[clang] [llvm] [X86][AVX10.2] Decouple AMX-AVX512 from AVX10.2 (PR #148633)

2025-07-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Evgenii Kudriashov (e-kud) Changes According to AVX10.2 rev. 4: > AMX-AVX512's explicit AVX10.2 sensitivity is removed and the instructions are removed in favor of inclusion in the ISE/SDM. Users of AMX-AV

[clang] [llvm] [X86][AVX10.2] Decouple AMX-AVX512 from AVX10.2 (PR #148633)

2025-07-14 Thread Evgenii Kudriashov via cfe-commits
e-kud wrote: TBH I'm not sure if we need to add `avx512f,evex512` to intrinsics attributes and/or to `.td` as well. https://github.com/llvm/llvm-project/pull/148633 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Andrey Karlov via cfe-commits
@@ -2833,8 +2834,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) { if (!FD->isVariadic()) findConstructionContextsForArguments(C); -if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context)) - NoReturn = true; +if (!NoReturn) +

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Andrey Karlov via cfe-commits
@@ -6298,10 +6334,43 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang] [llvm] [X86][AVX10.2] Decouple AMX-AVX512 from AVX10.2 (PR #148633)

2025-07-14 Thread Evgenii Kudriashov via cfe-commits
https://github.com/e-kud created https://github.com/llvm/llvm-project/pull/148633 According to AVX10.2 rev. 4: > AMX-AVX512's explicit AVX10.2 sensitivity is removed and the instructions are > removed in favor of inclusion in the ISE/SDM. Users of AMX-AVX512 ISA should > follow enabling and c

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-07-14 Thread via cfe-commits
@@ -4084,6 +4084,19 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, diag::note_carries_dependency_missing_first_decl) << 0/*Function*/; } +// SYCL spec 2020 +// The first declaration of a function with external linkage m

[clang] [llvm] [X86][AVX10.2] Decouple AMX-AVX512 from AVX10.2 (PR #148633)

2025-07-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions h,c,cpp -- clang/lib/Headers/amxavx512intrin.h clang/test/Co

[clang] [clang][analyzer] Add C standard streams to the internal memory space (PR #147766)

2025-07-14 Thread Balázs Kéri via cfe-commits
https://github.com/balazske updated https://github.com/llvm/llvm-project/pull/147766 From f8dc303029c68762cdbd19b217730192d26f6fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Wed, 9 Jul 2025 16:55:07 +0200 Subject: [PATCH 1/4] [clang][analyzer] Add C standard stream

[clang] [CIR] Add rotate operation (PR #148426)

2025-07-14 Thread Henrich Lauko via cfe-commits
@@ -2847,6 +2847,37 @@ def ByteSwapOp : CIR_BitOpBase<"byte_swap", CIR_UIntOfWidths<[16, 32, 64]>> { }]; } +//===--===// +// RotateOp +//===--

[clang] [CIR] Add rotate operation (PR #148426)

2025-07-14 Thread Henrich Lauko via cfe-commits
@@ -219,6 +233,28 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, mlir::Value arg = emitScalarExpr(e->getArg(0)); return RValue::get(builder.create(loc, arg)); } + + case Builtin::BI__builtin_rotateleft8: + case Builtin::BI__buil

[clang] [NFC][SemaHLSL] Remove check dependent on non-deterministic root element association (PR #148649)

2025-07-14 Thread Finn Plummer via cfe-commits
inbelic wrote: Although, thinking a bit more, we can actually remove this test entirely. The FileCheck portion was just a nicety to check that the SourceLocation was pointing correctly for this case. However, this is redundant with the other checks that exist to do so. https://github.com/llvm

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-14 Thread Aaron Ballman via cfe-commits
@@ -2833,8 +2834,37 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) { if (!FD->isVariadic()) findConstructionContextsForArguments(C); -if (FD->isNoReturn() || C->isBuiltinAssumeFalse(*Context)) - NoReturn = true; +if (!NoReturn) +

[clang-tools-extra] [clang-tidy] fix `bugprone-narrowing-conversions` false positive for conditional expression (PR #139474)

2025-07-14 Thread via cfe-commits
https://github.com/AndreyG updated https://github.com/llvm/llvm-project/pull/139474 >From b4814ba942266c5d4f4f070cbdef7b721738f33e Mon Sep 17 00:00:00 2001 From: Andrey Davydov Date: Sun, 11 May 2025 22:23:38 +0200 Subject: [PATCH 1/3] [clang-tidy] false positive narrowing conversion Let's con

  1   2   3   4   5   >