[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

2025-09-09 Thread via cfe-commits
https://github.com/tgs-sc updated https://github.com/llvm/llvm-project/pull/154134 >From 8feef619e2ef72cc2c6c9a107e5a5695ca8fd042 Mon Sep 17 00:00:00 2001 From: Timur Golubovich Date: Mon, 18 Aug 2025 18:08:27 +0300 Subject: [PATCH 1/2] [clang][AST] Added assert to prevent infinite recursion i

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-09 Thread via cfe-commits
@@ -2060,7 +2060,7 @@ static __inline__ void __DEFAULT_FN_ATTRS _mm_storel_pd(double *__dp, ///A 128-bit vector of [16 x i8]. /// \returns A 128-bit vector of [16 x i8] containing the sums of both ///parameters. -static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_add_epi

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-09 Thread Nathan Gauër via cfe-commits
@@ -118,6 +118,47 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang-tools-extra] [clang-tidy] New bugprone-derived-method-shadowing-base-method (PR #154746)

2025-09-09 Thread via cfe-commits
@@ -0,0 +1,127 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi created https://github.com/llvm/llvm-project/pull/157535 Reverts llvm/llvm-project#157148 Adds fixes to `TransferVisitor::VisitCXXConstructExpr` and `copyRecord` to avoid crashing on base class initialization from sibling-derived class instances. I believe this is th

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

2025-09-09 Thread Devon Loehr via cfe-commits
@@ -57,9 +59,12 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber, auto Glob = std::make_unique(); Glob->Name = Pattern.str(); Glob->LineNo = LineNumber; + // Backslashes are valid in posix-style filenames. + bool IsSlashAgnostic = Triple

[clang] [CIR] Add support for atomic compare-and-swap (PR #156253)

2025-09-09 Thread Sirui Mu via cfe-commits
https://github.com/Lancern updated https://github.com/llvm/llvm-project/pull/156253 >From af79b902dc043ee85d02015cce912375bdaf4cf3 Mon Sep 17 00:00:00 2001 From: Sirui Mu Date: Mon, 1 Sep 2025 00:34:29 +0800 Subject: [PATCH] [CIR] Add support for atomic compare-and-swap This patch adds support

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/157333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebKit checkers] Treat asm brk as trivial (PR #155046)

2025-09-09 Thread Ryosuke Niwa via cfe-commits
@@ -666,6 +666,10 @@ class TrivialFunctionAnalysisVisitor return IsFunctionTrivial(Callee); } + bool VisitGCCAsmStmt(const GCCAsmStmt *AS) { +return AS->getAsmString() == "brk #0xc471"; rniwa wrote: We could consider stripping whitespace but it's p

[clang] [CIR] Add support for __builtin_alloca (PR #157116)

2025-09-09 Thread Morris Hafner via cfe-commits
@@ -149,6 +149,57 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID, emitVAEnd(emitVAListRef(e->getArg(0)).getPointer()); return {}; + case Builtin::BIalloca: + case Builtin::BI_alloca: + case Builtin::BI__builtin_alloca_uninitializ

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 441f060fee2f624e1940f04ade9272cb50b0b33e Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/8] [Headers][X86] Enable constexpr handling for MMX/

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,9 @@ +// TODO: fix crash in emitTaskWaitCall andykaylor wrote: We don't have any OpenMP support upstream, so this test is only passing because it doesn't really do anything. This should be removed from your PR. https://github.com/llvm/llvm-project/pu

[clang] [HLSL] Fix OpaqueValueExpr handling in InitListExpr (PR #156750)

2025-09-09 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/156750 >From 3fa3bc0ae3e3f24368d7ffeed2595580d0e982a1 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 3 Sep 2025 16:09:17 -0400 Subject: [PATCH 1/2] [HLSL] Fix OpaqueValueExpr handling in InitListExpr The Opa

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-09 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > > > * Fix personality pointer authentication on non-Apple targets: > > > [[runtimes][PAC] Harden unwinding when possible #143230 > > > (comment)](https://github.com/llvm/llvm-project/pull/143230#discussion_r2318636296) > > > > > > I'm not sure what's going on in this diff as i

[clang] [Clang][CodeGen]NFC] Modernize loops in EmitCtorPrologue (PR #155668)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/155668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP][SPIR-V] Fix addrspace of pointer kernel arguments (PR #157172)

2025-09-09 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/157172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang Author: Bhasawut Singhaphan (markbhasawut) Changes This PR updates the avg builtins to support constant expression handling, by extending the VectorExprEvaluator::VisitCallExpr that handles elementwise integer bin

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

2025-09-09 Thread Valentyn Yukhymenko via cfe-commits
@@ -201,6 +201,11 @@ Changes in existing checks namespace are treated as the tag or the data part of a user-defined tagged union respectively. +- Improved :doc:`bugprone-unchecked-optional-access + ` check by supporting + `NullableValue::makeValue` and `NullableValue::m

[clang] [clang][RISCV] support BITINT with mixed-type (PR #156592)

2025-09-09 Thread Piyou Chen via cfe-commits
@@ -680,14 +680,11 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType Ty, bool IsFixed, if (const auto *ED = Ty->getAsEnumDecl()) Ty = ED->getIntegerType(); -// All integral types are promoted to XLen width -if (Size < XLen && Ty->isIntegralOrEnumerat

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Simon Pilgrim via cfe-commits
@@ -496,9 +496,8 @@ _mm256_andnot_si256(__m256i __a, __m256i __b) /// \param __b ///A 256-bit integer vector. /// \returns A 256-bit integer vector containing the result. -static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_avg_epu8(__m256i __a, __m256i __b) -{ +static

[clang] [llvm] [mlir] [Flang][OpenMP] Enable no-loop kernels (PR #155818)

2025-09-09 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/155818 >From efdd979d6189b986ea09dec7c0c0da26725ab1a1 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Wed, 27 Aug 2025 10:24:51 -0500 Subject: [PATCH 1/5] [Flang][OpenMP] Enable no-loop kernels Enable the

[clang] [lldb] [clang][Mangle] Inject structor type into mangled name when mangling for LLDB JIT expressions (PR #155485)

2025-09-09 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/155485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add the `Frs` `DXC` driver option (PR #157690)

2025-09-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/157690 >From 0831e99798973a6d8c47ef6b257046640298142c Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Tue, 9 Sep 2025 15:09:28 + Subject: [PATCH 1/3] [HLSL] Add the `Frs` driver option This pr adds the `Frs` as

[clang] [analyzer][NFC] Modernize loops in LiveVariables analysis (PR #157670)

2025-09-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal auto_merge_enabled https://github.com/llvm/llvm-project/pull/157670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

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

[clang] [clang] Fix side effects resolving overloads of builtin functions (#138651) (PR #154034)

2025-09-09 Thread via cfe-commits
https://github.com/comex updated https://github.com/llvm/llvm-project/pull/154034 >From 5a0549b35cd5b3b4ecb8a25bcde1560cf85c094d Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 17 Aug 2025 12:41:44 -0700 Subject: [PATCH 1/2] [clang] Fix side effects resolving overloads of builtin functions (#1

[clang] [X86] Allow AVX512 rotate intrinsics to be used in constexpr (PR #157652)

2025-09-09 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 c,h -- clang/lib/Headers/avx512fintrin.h clang/lib/Head

[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

2025-09-09 Thread via cfe-commits
@@ -137,7 +137,8 @@ void RootSignatureDesc::write(raw_ostream &OS) const { llvm::endianness::little); rewriteOffsetToCurrentByte(BOS, writePlaceholder(BOS)); for (const auto &Range : Table) { -support::endian::write(BOS, Range.Ra

[clang] [analyzer][NFC] Modernize loops in LiveVariables analysis (PR #157670)

2025-09-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/157670 >From a6e7eddd339c46b47a5964ab2880c1e66a4746d5 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 9 Sep 2025 16:06:47 +0200 Subject: [PATCH 1/4] [analyzer][NFC] Modernize iterator-based loop in LiveVariab

[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

2025-09-09 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/154134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-09-09 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/149827 >From f979958249187a1b89b4b87c46e90d63b6dc4042 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Mon, 18 Aug 2025 15:14:40 +0100 Subject: [PATCH 1/2] [clang][DebugInfo] Emit unified (Itanium) mangled name to

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-09 Thread Nathan Gauër via cfe-commits
@@ -4943,13 +4932,35 @@ def HLSLResourceBinding: InheritableAttr { }]; } -def HLSLSV_Position : HLSLAnnotationAttr { - let Spellings = [HLSLAnnotation<"sv_position">]; - let Subjects = SubjectList<[ParmVar, Field]>; +def HLSLUnparsedSemantic : HLSLAnnotationAttr { + let S

[clang] [Frontend] Define __SANITIZE__ macros for kernel address variants (PR #156543)

2025-09-09 Thread Nathan Chancellor via cfe-commits
https://github.com/nathanchance closed https://github.com/llvm/llvm-project/pull/156543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-09-09 Thread Madhur Amilkanthwar via cfe-commits
madhur13490 wrote: @kasuga-fj If your concerns are addressed, I'd like to merge the patch. @nikic I haven't heard back from you on this. Do you have any comments? https://github.com/llvm/llvm-project/pull/142686 ___ cfe-commits mailing list cfe-commit

[clang] [X86] Allow AVX512 rotate intrinsics to be used in constexpr (PR #157652)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes Now that they wrap the __builtin_elementwise_fshl/fshr builtin intrinsics this is pretty trivial. Another step towards #153152 - just VBMI2 double shifts remaining --- Patch is 31.73 KiB, truncated to 20.

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 441f060fee2f624e1940f04ade9272cb50b0b33e Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/8] [Headers][X86] Enable constexpr handling for MMX/

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Thanks for working on this! https://github.com/llvm/llvm-project/pull/157333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Match the FoldingSetNodeID computed before and after creating TypedefType (PR #157662)

2025-09-09 Thread Alexander Kornienko via cfe-commits
https://github.com/alexfh approved this pull request. Thank you for the fix! https://github.com/llvm/llvm-project/pull/157662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 441f060fee2f624e1940f04ade9272cb50b0b33e Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/7] [Headers][X86] Enable constexpr handling for MMX/

[libclc] [libclc] Refine __clc_fp*_subnormals_supported and __clc_flush_denormal_if_not_supported (PR #157633)

2025-09-09 Thread Matt Arsenault via cfe-commits
@@ -66,13 +65,11 @@ bool __attribute__((noinline)) __clc_runtime_has_hw_fma32(void); #define LOG_MAGIC_NUM_SP32 (1 + NUMEXPBITS_SP32 - EXPBIAS_SP32) _CLC_OVERLOAD _CLC_INLINE float __clc_flush_denormal_if_not_supported(float x) { - int ix = __clc_as_int(x); - if (!__clc_fp

[clang] [CIR] Add support for copy elision (PR #157713)

2025-09-09 Thread Erich Keane via cfe-commits
@@ -44,16 +46,37 @@ CIRGenFunction::emitAutoVarAlloca(const VarDecl &d, if (ty->isVariablyModifiedType()) cgm.errorNYI(d.getSourceRange(), "emitAutoVarDecl: variably modified type"); + assert(!cir::MissingFeatures::openMP()); + Address address = Address::invalid();

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-09 Thread Nathan Gauër via cfe-commits
Keenuts wrote: > I'm guessing this change broke the build for me: > > ``` > FAILED: [code=1] docs/AttributeReference.rst > /var/tmp/portage/llvm-core/clang-22.0.0./work/x/y/clang-.arm64/docs/AttributeReference.rst > > cd /var/tmp/portage/llvm-core/clang-22.0.0./work/x/y/clang-.arm64/d

[clang] [llvm] [RISCV][MC] Add MC support of Zibi experimental extension (PR #127463)

2025-09-09 Thread Craig Topper via cfe-commits
@@ -0,0 +1,44 @@ +//===-- RISCVInstrInfoZibi.td - 'Zibi' instructions *- tablegen -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR][NFC] Fix build warnings after #154142 (PR #157724)

2025-09-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/157724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clangd] Add code action to generate getter and setter for a field in a C++ class (PR #157727)

2025-09-09 Thread via cfe-commits
https://github.com/GuillaumeF0 updated https://github.com/llvm/llvm-project/pull/157727 >From 4042478aac711d34ef396f54ad314a092b967778 Mon Sep 17 00:00:00 2001 From: Guillaume Frognier Date: Tue, 9 Sep 2025 19:25:43 +0200 Subject: [PATCH 1/2] [clangd] Add code action to generate getter and sett

[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/157535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-09 Thread Nicolas van Kempen via cfe-commits
@@ -263,6 +263,10 @@ Changes in existing checks ` check to avoid false positives on pure virtual member functions. +- Improved :doc:`readability-container-contains + ` to support string + comparisons to ``npos``. nicovank wrote: Preferred a simplified s

[clang] [HLSL] Add the `Frs` `DXC` driver option (PR #157690)

2025-09-09 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_dxc -T cs_6_0 /Fo %t.dxo /Frs %t.rs.dxo -### %s 2>&1 | FileCheck %s + +// Test to demonstrate that extracting the root signature to the specified inbelic wrote: ```suggestion // Test to demonstrate extracting the root signature t

[clang] [CIR][NFC] Fix build warnings after #154142 (PR #157724)

2025-09-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM, Thanks https://github.com/llvm/llvm-project/pull/157724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/156763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Enabled debug entry support by default (PR #157703)

2025-09-09 Thread Craig Topper via cfe-commits
@@ -0,0 +1,74 @@ +;; Test RISC-V 64 bit: +; RUN: llc -emit-call-site-info -stop-after=livedebugvalues -mtriple=riscv64-linux-gnu -o - %s | FileCheck %s --check-prefix=CHECK64 +; RUN: llc -force-instr-ref-livedebugvalues=1 -emit-call-site-info -stop-after=livedebugvalues -mtriple

[clang-tools-extra] [clang-tools-extra] Remove 'REQUIRES: shell' from lit tests. (PR #156950)

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -1,4 +1,4 @@ -// REQUIRES: shell +// UNSUPPORTED: system-windows vbvictor wrote: Yeah, that's unfortunate. I also found this in test results: ``` ``` >From >[this](https://github.com/llvm/llvm-project/actions/runs/17517903882/job/49757841499?pr=157285) > a

[clang] [AST] Assert that FoldingSetNodeID used for hint is correct upon insertion (PR #157692)

2025-09-09 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Sharing this early to showcase the approach and see if folks are on board with that. The approach adds some boilerplate and requires discipline, but I couldn't come up with a different one that avoids that. I have seen some failures (~150) with `ninja check-clang`, will in

[clang] [llvm] [RISCV] Enabled debug entry support by default (PR #157703)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Georgiy Samoylov (sga-sc) Changes This patch enables support for debug entry values. This improves quality of debug info for RISC-V --- Full diff: https://github.com/llvm/llvm-project/pull/157703.diff 4 Files Affected: - (modified) cla

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-09 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @ojhunt Thanks! So could you please adopt the code snippet from my previous comment to make things explicitly unsupported for Linux? And also I kindly ask you to fix p.4 from https://github.com/llvm/llvm-project/pull/143230#issuecomment-3249013139 (we've already discussed that

[clang-tools-extra] [clang-tidy] Add check 'bugprone-cast-to-struct' (PR #153428)

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

[clang-tools-extra] [clang-tidy] Support find for string-like classes in readability-container-contains (PR #157243)

2025-09-09 Thread Baranov Victor via cfe-commits
@@ -263,6 +263,10 @@ Changes in existing checks ` check to avoid false positives on pure virtual member functions. +- Improved :doc:`readability-container-contains + ` to support string + comparisons to ``npos``. vbvictor wrote: Could you also add that

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
markbhasawut wrote: Thanks for your time to review this! @RKSimon https://github.com/llvm/llvm-project/pull/157464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-09 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/156763 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Enabled debug entry support by default (PR #157703)

2025-09-09 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,74 @@ +;; Test RISC-V 64 bit: +; RUN: llc -emit-call-site-info -stop-after=livedebugvalues -mtriple=riscv64-linux-gnu -o - %s | FileCheck %s --check-prefix=CHECK64 +; RUN: llc -force-instr-ref-livedebugvalues=1 -emit-call-site-info -stop-after=livedebugvalues -mtriple

[clang] [llvm] [clang][driver][arm][macho] Default to -mframe-pointer=non-leaf. (PR #154216)

2025-09-09 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli updated https://github.com/llvm/llvm-project/pull/154216 >From 565fddd293fd65b860ea03fca27ab8b05933fc22 Mon Sep 17 00:00:00 2001 From: Francesco Petrogalli Date: Mon, 18 Aug 2025 10:01:25 -0700 Subject: [PATCH 1/7] [clang][driver][arm][macho] Default to -mframe-p

[clang] [llvm] Explicit types in cbuffer layouts (PR #156919)

2025-09-09 Thread Steven Perron via cfe-commits
s-perron wrote: I'm seeing a problem for SPIR-V that we may need to work out. I understand why you do it, and I don't have a solution yet. ``` // This struct has a size of 12 bytes (float + float2). // In a cbuffer array, HLSL layout rules require each element to start on a // 16-byte boundary.

[clang-tools-extra] 5c17af4 - [clang-tools-extra][test] Ensure file is writeable after copying (#157728)

2025-09-09 Thread via cfe-commits
Author: Jordan Rupprecht Date: 2025-09-09T13:23:14-05:00 New Revision: 5c17af419ec7e9c823a1ae9287baeed0d27336ce URL: https://github.com/llvm/llvm-project/commit/5c17af419ec7e9c823a1ae9287baeed0d27336ce DIFF: https://github.com/llvm/llvm-project/commit/5c17af419ec7e9c823a1ae9287baeed0d27336ce.di

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +int foo(int a, int b) { + int x = a * b; + x *= b; + x /= b; + x %= b; + x += b; + x -= b; + x >>= b; + x <<= b;

[clang] [llvm] MC: Use Triple form of lookupTarget in more places (PR #157591)

2025-09-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/157591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-09-09 Thread Michał Górny via cfe-commits
mgorny wrote: And sorry, I won't be able to take a closer look at it today, as the devboxes are currently busy building new kernels. https://github.com/llvm/llvm-project/pull/152537 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] [lldb] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-09-09 Thread Michael Buch via cfe-commits
https://github.com/Michael137 closed https://github.com/llvm/llvm-project/pull/149827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Allow remaining AVX512 per-element shift intrinsics to be used in constexpr (PR #157696)

2025-09-09 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,c,cpp -- clang/lib/AST/ByteCode/InterpBuiltin.cpp cla

[clang] Reland [clang][dataflow] Transfer more cast expressions. (PR #157535)

2025-09-09 Thread Samira Bakon via cfe-commits
https://github.com/bazuzi updated https://github.com/llvm/llvm-project/pull/157535 >From 4779770aab880315d359005a5cacd4c4976d8649 Mon Sep 17 00:00:00 2001 From: Samira Bakon Date: Mon, 8 Sep 2025 15:08:52 -0400 Subject: [PATCH 1/3] Revert "Revert "[clang][dataflow] Transfer more cast expressio

[clang-tools-extra] [clang-tools-extra][test] Ensure file is writeable after copying (PR #157728)

2025-09-09 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 approved this pull request. https://github.com/llvm/llvm-project/pull/157728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for copy elision (PR #157713)

2025-09-09 Thread Amr Hesham via cfe-commits
@@ -44,16 +46,37 @@ CIRGenFunction::emitAutoVarAlloca(const VarDecl &d, if (ty->isVariablyModifiedType()) cgm.errorNYI(d.getSourceRange(), "emitAutoVarDecl: variably modified type"); + assert(!cir::MissingFeatures::openMP()); + Address address = Address::invalid();

[clang-tools-extra] [Clang-Tidy] Add google-runtime-float Clang-Tidy check (PR #156763)

2025-09-09 Thread Baranov Victor via cfe-commits
vbvictor wrote: > > I think this can go straight into `portability`. Also linking this recent > > related PR: #146970. > > It could go there and then have an alias to `google` if wanted maybe? I'm weak +1 on this, `portability-avoid-long-double` maybe? But if anything happens, we could add al

[clang] [llvm] [clang][driver][arm][macho] Default to -mframe-pointer=non-leaf. (PR #154216)

2025-09-09 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli auto_merge_enabled https://github.com/llvm/llvm-project/pull/154216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add the `Frs` `DXC` driver option (PR #157690)

2025-09-09 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/157690 >From 0831e99798973a6d8c47ef6b257046640298142c Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Tue, 9 Sep 2025 15:09:28 + Subject: [PATCH 1/4] [HLSL] Add the `Frs` driver option This pr adds the `Frs` as

[clang] [llvm] [RISCV] Enabled debug entry support by default (PR #157703)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Author: Georgiy Samoylov (sga-sc) Changes This patch enables support for debug entry values. This improves quality of debug info for RISC-V --- Full diff: https://github.com/llvm/llvm-project/pull/157703.diff 4 Files Affected: - (modified)

[clang] [clang][bytecode][X86] Allow AVX512 funnel shift by scalar immediate intrinsics to be used in constexpr (PR #157681)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Simon Pilgrim (RKSimon) Changes Extends interp__builtin_elementwise_triop to handle (vector, vector, scalar) trinary op intrinsics Fixes #153152 --- Patch is 45.42 KiB, truncated to 20.00 KiB below, full version: https://github.com/llv

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-09 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > * Fix personality pointer authentication on non-Apple targets: > [[runtimes][PAC] Harden unwinding when possible #143230 > (comment)](https://github.com/llvm/llvm-project/pull/143230#discussion_r2318636296) > * I'm not sure what's going on in this diff as it does not appear rel

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut updated https://github.com/llvm/llvm-project/pull/157464 >From 441f060fee2f624e1940f04ade9272cb50b0b33e Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Mon, 8 Sep 2025 15:51:33 +0700 Subject: [PATCH 1/8] [Headers][X86] Enable constexpr handling for MMX/

[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)

2025-09-09 Thread Michael Buch via cfe-commits
@@ -187,6 +187,8 @@ void EmptySubobjectMap::ComputeEmptySubobjectSizes() { // Check the bases. for (const CXXBaseSpecifier &Base : Class->bases()) { const CXXRecordDecl *BaseDecl = Base.getType()->getAsCXXRecordDecl(); +// Assert to prevent infinite recursion. -

[clang] 17abebe - [X86] Allow AVX512 funnel shift intrinsics to be used in constexpr (#157668)

2025-09-09 Thread via cfe-commits
Author: Simon Pilgrim Date: 2025-09-09T14:53:49+01:00 New Revision: 17abebe68c222dd2a6e7e09236658a0afac2fbb8 URL: https://github.com/llvm/llvm-project/commit/17abebe68c222dd2a6e7e09236658a0afac2fbb8 DIFF: https://github.com/llvm/llvm-project/commit/17abebe68c222dd2a6e7e09236658a0afac2fbb8.diff

[clang] [APINotes] Support annotating safety of APIs (PR #157506)

2025-09-09 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun updated https://github.com/llvm/llvm-project/pull/157506 From 09a1cc08019ffc336609aa2909565baf775129bb Mon Sep 17 00:00:00 2001 From: Gabor Horvath Date: Mon, 8 Sep 2025 17:21:45 +0100 Subject: [PATCH] [APINotes] Support annotating safety of APIs Swift supports a s

[clang] [analyzer][NFC] Change LiveVariablesImpl::inAssignment from DenseMap to DenseSet (PR #157685)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes The `inAssignment` variable is actually used as a set; let's declare it as a set. --- Full diff: https://github.com/llvm/llvm-project/pull/157685.diff 1 Files Affected: - (modified) cl

[clang] [X86] Allow AVX512 rotate intrinsics to be used in constexpr (PR #157652)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Simon Pilgrim (RKSimon) Changes Now that they wrap the __builtin_elementwise_fshl/fshr builtin intrinsics this is pretty trivial. Another step towards #153152 - just VBMI2 double shifts remaining --- Patch is 31.73 KiB, truncated

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Bhasawut Singhaphan via cfe-commits
@@ -24,6 +24,7 @@ typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); /* Unsigned types */ typedef unsigned int __v4su __attribute__((__vector_size__(16))); typedef unsigned short __v8hu __attribute__((__vector_size__(16))); +typedef unsigned char __v1

[clang] [HLSL] Add static methods for resource initialization (PR #155866)

2025-09-09 Thread Steven Perron via cfe-commits
https://github.com/s-perron commented: LGTM https://github.com/llvm/llvm-project/pull/155866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] In LivenessValues::equals also check liveBindings (PR #157645)

2025-09-09 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/157645 This was likely accidentally omitted when `liveBindings` was introduced. I don't think in practice it matters. >From 99e2c1391b0a4e9b7ccc412087202d60b89d08f4 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date:

[libclc] [libclc] Refine __clc_fp*_subnormals_supported and __clc_flush_denormal_if_not_supported (PR #157633)

2025-09-09 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/157633 >From 7e2d210d9c6cd20c342562a44c2e4d2cb238e229 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 9 Sep 2025 11:05:02 +0200 Subject: [PATCH 1/4] [libclc] Refine __clc_fp*_subnormals_supported and __clc_flush_d

[clang] [clang] Restrict -Wnrvo to C++ code only. (PR #157059)

2025-09-09 Thread Javier Muñoz Kirschberg via cfe-commits
@@ -0,0 +1,41 @@ +// RUN: %clang -std=c23 -Wnrvo -Xclang -verify %s +// expected-no-diagnostics + +#include + +#define SIZE 20 + +typedef struct String_s { +char* buf; +size_t len; +} String; + + +void clean(String* s) { +free(s->buf); +} + +String randomString() { +

[clang] [clang] Allow custom bug report messages (PR #157536)

2025-09-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alan Zhao (alanzhao1) Changes Clang vendors may need to set a custom message for bug reports if the default is not sufficient (e.g. if they need the user to provide more information than what the default message asks for). This can be con

[clang] [clang] Allow custom bug report messages (PR #157536)

2025-09-09 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 created https://github.com/llvm/llvm-project/pull/157536 Clang vendors may need to set a custom message for bug reports if the default is not sufficient (e.g. if they need the user to provide more information than what the default message asks for). This can be con

[clang-tools-extra] 3b452e0 - [clang-tidy][NFC] Enable `modernize-use-auto` in clang-tidy config and fix warnings (#157468)

2025-09-09 Thread via cfe-commits
Author: flovent Date: 2025-09-08T21:37:03+03:00 New Revision: 3b452e0565897d2e28dfd9d703fa358fad2bac76 URL: https://github.com/llvm/llvm-project/commit/3b452e0565897d2e28dfd9d703fa358fad2bac76 DIFF: https://github.com/llvm/llvm-project/commit/3b452e0565897d2e28dfd9d703fa358fad2bac76.diff LOG:

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,264 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare -o %t.cir %s 2>&1 | FileCheck --check-prefixes=CIR-BEFORE,CHECK %s +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-c

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-09 Thread Nikita Popov via cfe-commits
nikic wrote: @ritter-x2a Nice find! I guess this code is the culprit: https://github.com/llvm/llvm-project/blob/db8cad0c8d00a691d1365e9b2962a7f2f4ff0890/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp#L404 It seems to treat ConstOffset as an unsigned number, while it is actually signed. https:

[clang] [Headers][X86] Enable constexpr handling for MMX/SSE/AVX/AVX512 avg intrinsics (PR #157464)

2025-09-09 Thread Simon Pilgrim via cfe-commits
@@ -24,6 +24,7 @@ typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); /* Unsigned types */ typedef unsigned int __v4su __attribute__((__vector_size__(16))); typedef unsigned short __v8hu __attribute__((__vector_size__(16))); +typedef unsigned char __v1

[clang] [llvm] [HLSL][DirectX] Add support for `rootsig` as a target environment (PR #156373)

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

[clang] ad49111 - [HLSL][DirectX] Add support for `rootsig` as a target environment (#156373)

2025-09-09 Thread via cfe-commits
Author: Finn Plummer Date: 2025-09-09T09:14:58-06:00 New Revision: ad491118df1304c7d6bcce5b2207895f57204c16 URL: https://github.com/llvm/llvm-project/commit/ad491118df1304c7d6bcce5b2207895f57204c16 DIFF: https://github.com/llvm/llvm-project/commit/ad491118df1304c7d6bcce5b2207895f57204c16.diff

[clang] [CIR] Upstream a batch of passing tests from CIR-Incubator (PR #157333)

2025-09-09 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: true andykaylor wrote: This test isn't doing anything. I'm not sure what the history is, but it doesn't even compile this file. This should also be removed. https://github.com/llvm/llvm-project/pull/157333 _

[clang] [alpha.webkit.UncheckedCallArgsChecker] Don't emit a warning for passing a temporary object as an argument. (PR #155033)

2025-09-09 Thread Artem Dergachev via cfe-commits
@@ -208,6 +208,8 @@ bool isASafeCallArg(const Expr *E) { return true; } } + if (isa(E)) +return true; // A temporary lives until the end of this statement. haoNoQ wrote: Oh. Right. You already know it's an argument. Yeah, case closed

[clang] [Headers][X86] Allow SSE2/AVX2/AVX512F/AVX512BW/AVX512DQ integer arithmetic intrinsics to be used in constexpr (PR #157582)

2025-09-09 Thread via cfe-commits
https://github.com/donneypr updated https://github.com/llvm/llvm-project/pull/157582 >From 0e67c0217dada580d43c30e03180b0977a6cce98 Mon Sep 17 00:00:00 2001 From: donneypr Date: Mon, 8 Sep 2025 19:54:43 -0400 Subject: [PATCH 1/5] [clang][x86][headers] Make SSE2 add/sub intrinsics constexpr --

[clang] [AMDGPU][SPIRV] Use SPIR-V syncscopes for some AMDGCN BIs (PR #154867)

2025-09-09 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/154867 >From f65fa1deedae45ad8f3d007e39c914c091387be2 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 22 Aug 2025 01:02:42 +0100 Subject: [PATCH 1/3] Use "device" instead of "agent" and "subgroup" instead of "wav

  1   2   3   >