[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [clang] Update typechecking of builtin elementwise ternary math operators (PR #155620)

2025-08-28 Thread Timm Baeder via cfe-commits
@@ -15884,6 +15884,55 @@ static bool checkBuiltinVectorMathMixedEnums(Sema &S, Expr *LHS, Expr *RHS, return false; } +/// Check if all arguments have the same type. If the types don't match, emit an +/// error message and return true. Otherwise return false. +/// +/// For

[clang] [llvm] [clang][SPARC] Pass 16-aligned 16-byte structs as i128 in CC (PR #155829)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Koakuma (koachan) Changes This coerces 9 to 16-byte C structs that are 16-byte aligned as an i128 in LLVM IR. Additionally, since i128 values will be lowered as split i64 pairs in the backend, correctly set the alignment of such arguments

[clang] [llvm] [clang][SPARC] Pass 16-aligned 16-byte structs as i128 in CC (PR #155829)

2025-08-28 Thread via cfe-commits
https://github.com/koachan created https://github.com/llvm/llvm-project/pull/155829 This coerces 9 to 16-byte C structs that are 16-byte aligned as an i128 in LLVM IR. Additionally, since i128 values will be lowered as split i64 pairs in the backend, correctly set the alignment of such argumen

[clang] [llvm] [clang][SPARC] Pass 16-aligned 16-byte structs as i128 in CC (PR #155829)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Koakuma (koachan) Changes This coerces 9 to 16-byte C structs that are 16-byte aligned as an i128 in LLVM IR. Additionally, since i128 values will be lowered as split i64 pairs in the backend, correctly set the alignment of such a

[clang] [llvm] [clang][SPARC] Pass 16-aligned 16-byte structs as i128 in CC (PR #155829)

2025-08-28 Thread via cfe-commits
koachan wrote: @beetrees does this help? https://github.com/llvm/llvm-project/pull/155829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [clang][bytecode] Lazily create DynamicAllocator (PR #155831)

2025-08-28 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/155831 Due to all the tracking via map(s) and a BumpPtrAllocator, the creating and destroying the DynamicAllocator is rather expensive. Try to do it lazily and only create it when first calling InterpState::getAlloca

[clang] [clang][bytecode] Lazily create DynamicAllocator (PR #155831)

2025-08-28 Thread Timm Baeder via cfe-commits
tbaederr wrote: https://llvm-compile-time-tracker.com/compare.php?from=3c23ae99f2f88d2a1c0f35b82a356f42e692e335&to=797559659a0d5f1c06724e174ef592319bb7ba95&stat=instructions:u https://github.com/llvm/llvm-project/pull/155831 ___ cfe-commits mailing lis

[clang] [clang][bytecode] Lazily create DynamicAllocator (PR #155831)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Due to all the tracking via map(s) and a BumpPtrAllocator, the creating and destroying the DynamicAllocator is rather expensive. Try to do it lazily and only create it when first calling InterpState::getAllo

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

2025-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: > > The main issue I saw is that we now sometimes fail to eliminate null checks > > of the form `gep inbounds (p, x-1) == null`, which are converted to `gep > > (gep p, x), -1` now, losing flags. > > I checked whether we can mitigate this by folding null checks before doing > thi

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,141 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,141 @@ +//===--===// +// +// 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] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource created https://github.com/llvm/llvm-project/pull/155855 This pull improves the handling of placement new in`PointerArith`, fixing one family of false positives, and one of negatives: ### False Positives ```cpp Buffer buffer; int* array = n

[clang-tools-extra] Add WarnOnModificationOfCopiedLoopVariable to performance-for-range-c… (PR #155731)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,49 @@ +// RUN: %check_clang_tidy %s performance-for-range-copy %t -- \ +// RUN: -config="{CheckOptions: {performance-for-range-copy.WarnOnModificationOfCopiedLoopVariable: true}}" + +template +struct Iterator { + void operator++() {} + const T& operator*() { +

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes This pull improves the handling of placement new in`PointerArith`, fixing one family of false

[clang] [analyzer] Improve handling of placement new in `PointerArith` (PR #155855)

2025-08-28 Thread via cfe-commits
Alejandro =?utf-8?q?Álvarez_Ayllón?Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes This pull improves the handling of placement new in`PointerArith`, fixing one family of false positives, and one

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/155737 >From 0b13b0e77e184666d46450b264e1237e6c41a1de Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Wed, 27 Aug 2025 22:45:25 -0400 Subject: [PATCH 1/6] Enable nullptr handle with negative elemsize in a dynami

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread Richard Thomson via cfe-commits
LegalizeAdulthood wrote: > Funnily enough, `bugprone-derived-method-shadowing-base-method` is very close > to what this is called in our downstream project. Just pushed something that > re-names the check. Can you also edit the title of the pull request to reflect that, please? https://github

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,556 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
@@ -0,0 +1,15 @@ +// RUN: not %clang_cc1 -std=c++20 -fsyntax-only %s 2>&1 \ +// RUN: | FileCheck %s --implicit-check-not='Assertion `NumElements.isPositive()` failed' + snarang181 wrote: Done https://github.com/llvm/llvm-project/pull/155737 __

[clang] [clang] Optimize EmbedExpr child iterator callback (PR #155803)

2025-08-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/155803 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-flang-openmp Author: Robert Imschweiler (ro-i) Changes OpenMP 6.0 12.1.2 specifies the behavior of the strict modifier for the num_threads clause on parallel directives, along with the message and severity clauses. This

[clang-tools-extra] [clang-tidy] New bugprone-method-hiding check (PR #154746)

2025-08-28 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// +// +// 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: Apac

[clang] [clang] clang_cmake_builddir (PR #155844)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Romaric Jodin (rjodinchr) Changes When building llvm from a subdirectory (like clspv does) `CMAKE_BINARY_DIR` is at the top of the build directory. When building runtimes (libclc for example), the build fails looking for clang (through `

[clang] Update SSE/AVX integer comparison intrinsics to be used in constexpr (PR #155656)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/155656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Partial Reduction recipe Lowering (PR #155635)

2025-08-28 Thread Erich Keane via cfe-commits
erichkeane wrote: > lgtm, but some of the tests are going to fail after #155697 so we need to > coordinate the merge order for these. I did a pull of your review + a merge to main, and did not see any issues! I realize this is because reduction is: a- not doing a copy b- not implemented to d

[clang] f5694f0 - [Headers][X86] Update SSE/AVX integer comparison intrinsics to be used in constexpr (#155656)

2025-08-28 Thread via cfe-commits
Author: Smokey Date: 2025-08-28T15:10:26Z New Revision: f5694f090b0660e6cb4dc4bf44a16e120cee27dd URL: https://github.com/llvm/llvm-project/commit/f5694f090b0660e6cb4dc4bf44a16e120cee27dd DIFF: https://github.com/llvm/llvm-project/commit/f5694f090b0660e6cb4dc4bf44a16e120cee27dd.diff LOG: [Heade

[clang] Update SSE/AVX integer comparison intrinsics to be used in constexpr (PR #155656)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/155656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update SSE/AVX integer comparison intrinsics to be used in constexpr (PR #155656)

2025-08-28 Thread via cfe-commits
github-actions[bot] wrote: @smoke-y Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [clang][bytecode] Handle negative array sizes in constexpr `new` instead of asserting (PR #155737)

2025-08-28 Thread Samarth Narang via cfe-commits
@@ -1069,6 +1069,32 @@ namespace BaseCompare { static_assert(foo()); } + +namespace NegativeArraySize { + +constexpr void f() { + int x = -1; + int *p = new int[x]; // expected-note {{cannot allocate array with negative size in a constant expression}} +} +// both-error@-4

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,14 @@ +; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=armv7 +; RUN: llc < %s -mtriple=aarch64 | FileCheck %s --check-prefix=aarch64 moorabbit wrote: I see. Thanks clarifying. Thinking about this again, the ARM test case seems redundant si

[clang-tools-extra] [clang-tidy][NFC] Add custom .clang-format with 'QualifierAlignment: Left' (PR #155852)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Baranov Victor (vbvictor) Changes ["QualifierAlignment: Left"](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#qualifieralignment) is an established way of writing code in `clang-tools-extra/clang-tidy`. We should enforce

[clang] [Headers][X86] Use `__builtin_elementwise_ctlz` instead of avx512cd intrinsics. (PR #155089)

2025-08-28 Thread Simon Pilgrim via cfe-commits
@@ -42,39 +43,70 @@ __m512i test_mm512_maskz_conflict_epi32(__mmask16 __U, __m512i __A) { } __m512i test_mm512_lzcnt_epi32(__m512i __A) { // CHECK-LABEL: test_mm512_lzcnt_epi32 - // CHECK: call <16 x i32> @llvm.ctlz.v16i32(<16 x i32> %{{.*}}, i1 false) + // CHECK: call <16

[clang] [Clang][NFC] Rename OMPLoopTransformationDirective to OMPCanonicalLoopNestTransformationDirective (PR #155848)

2025-08-28 Thread Roger Ferrer Ibáñez via cfe-commits
https://github.com/rofirrim created https://github.com/llvm/llvm-project/pull/155848 This is preparatory work for the implementation of `#pragma omp fuse` in https://github.com/llvm/llvm-project/pull/139293 Not all OpenMP loop transformations makes sense to make them inherit from `OMPLoopBase

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-28 Thread Roger Ferrer Ibáñez via cfe-commits
rofirrim wrote: This change now builds on top of: - https://github.com/llvm/llvm-project/pull/155849 - https://github.com/llvm/llvm-project/pull/155848 I added a new class `OMPCanonicalLoopSequenceTransformationDirective` which inherits from a common class `OMPLoopTransformationDirective` whic

[clang] [clang][bytecode] Lazily create DynamicAllocator (PR #155831)

2025-08-28 Thread Yanzuo Liu via cfe-commits
@@ -164,7 +170,7 @@ class InterpState final : public State, public SourceMapper { /// Reference to the offset-source mapping. SourceMapper *M; /// Allocator used for dynamic allocations performed via the program. - DynamicAllocator Alloc; + std::unique_ptr Alloc; -

[clang-tools-extra] [clang-tidy][NFC] Add custom .clang-format with 'QualifierAlignment: Left' (PR #155852)

2025-08-28 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/155852 ["QualifierAlignment: Left"](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#qualifieralignment) is an established way of writing code in `clang-tools-extra/clang-tidy`. We should enforce it in CI.

[clang] [LTO] Add unified LTO tests for the PS targets. (PR #148229)

2025-08-28 Thread Ying Yi via cfe-commits
https://github.com/MaggieYingYi updated https://github.com/llvm/llvm-project/pull/148229 >From ab2917f40d2690ce1af05d48269e2fb999002638 Mon Sep 17 00:00:00 2001 From: Ying Yi Date: Mon, 9 Jun 2025 11:14:24 +0100 Subject: [PATCH] [LTO] Enhance unified/nonunified LTO checks. For the PS targets,

[clang-tools-extra] [clang-doc] markdown parser (PR #155887)

2025-08-28 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-tools-extra/clang-doc/MDParser.cpp clang

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -66,63 +69,97 @@ char NVPTXPeephole::ID = 0; INITIALIZE_PASS(NVPTXPeephole, "nvptx-peephole", "NVPTX Peephole", false, false) -static bool isCVTAToLocalCombinationCandidate(MachineInstr &Root) { +static bool isCVTALocalCombinationCandidate(MachineInstr &Root) { auto &M

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -2253,22 +2253,31 @@ def trapexitinst : NVPTXInst<(outs), (ins), "trap; exit;", [(trap)]>, Requires<[ // brkpt instruction def debugtrapinst : BasicNVPTXInst<(outs), (ins), "brkpt", [(debugtrap)]>; -def SDTDynAllocaOp : - SDTypeProfile<1, 2, [SDTCisSameAs<0, 1>, SDTCisInt

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -2253,22 +2253,31 @@ def trapexitinst : NVPTXInst<(outs), (ins), "trap; exit;", [(trap)]>, Requires<[ // brkpt instruction def debugtrapinst : BasicNVPTXInst<(outs), (ins), "brkpt", [(debugtrap)]>; -def SDTDynAllocaOp : - SDTypeProfile<1, 2, [SDTCisSameAs<0, 1>, SDTCisInt

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,93 @@ +// The debug info of vtable is attached conditionally to whether +// - Member functions are inlined or not +// - Definition of destructor is visible or not jmorse wrote: Would you be able to give a sentence summarising what the CHECK-lines below

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: I think adding / adjusting this coverage is good -- a few questions / requests inline. https://github.com/llvm/llvm-project/pull/151818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

2025-08-28 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,87 @@ +// For CTemplate we check in case of: +// - Implicitly instantiate whole class by up-casting: +// * The vtable is generated with comdat +// * Its '_vtable$' is generated +// - Implicitly instantiate member function only: +// * The vtable is NOT generated +/

[clang] [Clang](NFC) Add coverage for VTable debug info (PR #151818)

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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

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

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-08-28 Thread Artem Belevich via cfe-commits
@@ -368,8 +354,17 @@ void NVPTXPassConfig::addIRPasses() { // NVPTXLowerArgs is required for correctness and should be run right // before the address space inference passes. addPass(createNVPTXLowerArgsPass()); + + if (getOptLevel() != CodeGenOptLevel::None) +// NVP

[clang-tools-extra] Add --project-root to clangd (PR #155905)

2025-08-28 Thread via cfe-commits
https://github.com/Dominicentek created https://github.com/llvm/llvm-project/pull/155905 Adds an ability to change the current working directory for fallback commands. >From 9a30c2b92be357deac5a65e2fa0952d91634de70 Mon Sep 17 00:00:00 2001 From: Dominicentek Date: Thu, 28 Aug 2025 20:46:35 +02

[clang-tools-extra] Add --project-root to clangd (PR #155905)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Dominicentek (Dominicentek) Changes Adds an ability to change the current working directory for fallback commands. --- Full diff: https://github.com/llvm/llvm-project/pull/155905.diff 8 Files Affected: - (modified) clang-too

[clang-tools-extra] Add --project-root to clangd (PR #155905)

2025-08-28 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] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-28 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,242 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart pointer name +static bool isSmartPtrName(StringRef Name) { + return Name == "unique_ptr

[clang] [llvm] Reland: [OpenMP][clang] 6.0: num_threads strict (part 3: codegen) (PR #155839)

2025-08-28 Thread Robert Imschweiler via cfe-commits
https://github.com/ro-i closed https://github.com/llvm/llvm-project/pull/155839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-28 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,242 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart pointer name +static bool isSmartPtrName(StringRef Name) { + return Name == "unique_ptr

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-28 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,242 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart pointer name +static bool isSmartPtrName(StringRef Name) { + return Name == "unique_ptr

[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

2025-08-28 Thread Alex MacLean via cfe-commits
@@ -198,6 +198,12 @@ static bool IsPTXVectorType(MVT VT) { static std::optional> getVectorLoweringShape(EVT VectorEVT, const NVPTXSubtarget &STI, unsigned AddressSpace) { + const bool CanLowerTo256Bit = STI.has256BitVectorLoadStore(AddressSpace); + + if

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread via cfe-commits
https://github.com/vortex73 deleted https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (PR #155865)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_disabled https://github.com/llvm/llvm-project/pull/155865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (PR #155865)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/155865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (PR #155865)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/155865 >From c77d031d8c048d132d0a9fddc46a9e3f1405b287 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 28 Aug 2025 16:52:30 +0100 Subject: [PATCH] [X86] Add -fexperimental-new-constant-interpreter test coverage

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-28 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/151590 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (PR #155865)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/155865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Canonicalize clang-scan-deps input-file/file-deps paths for Windows (PR #155908)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hiroshi Yamauchi (hjyamauchi) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/155908.diff 1 Files Affected: - (modified) clang/tools/clang-scan-deps/ClangScanDeps.cpp (+23-8) ``diff diff --git a/clang/tools/

[clang] Canonicalize clang-scan-deps input-file/file-deps paths for Windows (PR #155908)

2025-08-28 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi created https://github.com/llvm/llvm-project/pull/155908 None >From 1f4d7d3c43ca469659dddc4d068cbfad1be97207 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 28 Aug 2025 12:17:24 -0700 Subject: [PATCH] Canonicalize clang-scan-deps input-file/file-deps pa

[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

2025-08-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-devrel-x86-64` running on `ml-opt-devrel-x86-64-b2` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/24323

[clang] Canonicalize clang-scan-deps input-file/file-deps paths for Windows (PR #155908)

2025-08-28 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi updated https://github.com/llvm/llvm-project/pull/155908 >From 57a5beec01a7926e52cbb7274a8c5f3e3945895e Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 28 Aug 2025 12:17:24 -0700 Subject: [PATCH] Canonicalize clang-scan-deps input-file/file-deps paths fo

[clang] Canonicalize clang-scan-deps input-file/file-deps paths for Windows (PR #155908)

2025-08-28 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/155908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add BreakAfterOpenBracket* and BreakBeforeCloseBracket* (PR #108332)

2025-08-28 Thread Björn Schäpers via cfe-commits
@@ -203,19 +203,6 @@ template <> struct MappingTraits { } }; -template <> struct ScalarEnumerationTraits { HazardyKnusperkeks wrote: Basically ``` c++ if (IO.outputting()) { IO.mapOptional("AlignAfterOpenBracket", Style.AlignAfterOpenBracket); //Becaus

[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

2025-08-28 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/155664 >From 95b0e22f32c62e973749d25286079515ba94e6ab Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 26 Aug 2025 13:12:42 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Add -fhlsl-spv-use-unknown-image-format opti

[clang] b34258a - [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (#155865)

2025-08-28 Thread via cfe-commits
Author: Simon Pilgrim Date: 2025-08-28T19:56:44Z New Revision: b34258a540d6d88d99269e870bc0e086762b7698 URL: https://github.com/llvm/llvm-project/commit/b34258a540d6d88d99269e870bc0e086762b7698 DIFF: https://github.com/llvm/llvm-project/commit/b34258a540d6d88d99269e870bc0e086762b7698.diff LOG:

[clang] [X86] Add -fexperimental-new-constant-interpreter test coverage to the AVX1/F16C/XOP constexpr test files (PR #155865)

2025-08-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/155865 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-08-28 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Not every inline asm, only inline asm statements that specifically have an "unwind" clobber (or in Rust, may_unwind). Which is pretty rare, in practice: I've never seen anyone use it in clang, and it isn't even available on stable in Rust. Accurately detecting whether th

[clang] [clang] Frontend: Destroy compiling compiler instance before read (PR #154455)

2025-08-28 Thread Anthony Latsis via cfe-commits
https://github.com/AnthonyLatsis updated https://github.com/llvm/llvm-project/pull/154455 >From 87408f6aedc8aa50c47eeb33e6bb3b6299272c30 Mon Sep 17 00:00:00 2001 From: Ben Barham Date: Tue, 1 Jul 2025 18:06:27 -0700 Subject: [PATCH] [clang] Frontend: Destroy compiling compiler instance before

[clang] [llvm] [NVPTX] Support i256 load/store with 256-bit vector load (PR #155198)

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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

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

[clang] [analyzer] MallocChecker – Fix false positive leak for smart pointers in temporary objects (PR #152751)

2025-08-28 Thread Ivan Murashko via cfe-commits
@@ -3068,12 +3124,242 @@ void MallocChecker::checkDeadSymbols(SymbolReaper &SymReaper, C.addTransition(state->set(RS), N); } +// Helper function to check if a name is a recognized smart pointer name +static bool isSmartPtrName(StringRef Name) { + return Name == "unique_ptr

[clang] [Clang] Added explanation why `is_trivially default_constructible` is false (PR #152888)

2025-08-28 Thread via cfe-commits
https://github.com/abhijeetsharma200 updated https://github.com/llvm/llvm-project/pull/152888 >From 48d71f870d21a45c0a197d1853788a4aec80018b Mon Sep 17 00:00:00 2001 From: Abhijeet Sharma Date: Sun, 10 Aug 2025 04:49:15 +0200 Subject: [PATCH 1/4] Added explain is trivially default constructible

[clang-tools-extra] [clang-doc] add Markdown parser implementation (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/155887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/155887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] add Markdown parser (PR #155887)

2025-08-28 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/155887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 6af2c18 - [clang] fix regression parsing C enum which doesn't declare anything (#155904)

2025-08-28 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-08-28T18:59:16Z New Revision: 6af2c18fef664eec24ed490590735205aac538b3 URL: https://github.com/llvm/llvm-project/commit/6af2c18fef664eec24ed490590735205aac538b3 DIFF: https://github.com/llvm/llvm-project/commit/6af2c18fef664eec24ed490590735205aac538b3.diff LO

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I have a lot of suggestions for updating the op description, but feel free to merge after updating those. https://github.com/llvm/llvm-project/pull/154994 ___ cfe-commits maili

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-28 Thread Andy Kaylor via cfe-commits
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] DivOp & CompoundAssignmentDiv between ComplexType and ScalarType (PR #155167)

2025-08-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

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

[clang-tools-extra] Add WarnOnModificationOfCopiedLoopVariable to performance-for-range-c… (PR #155731)

2025-08-28 Thread Julia Hansbrough via cfe-commits
https://github.com/flowerhack closed https://github.com/llvm/llvm-project/pull/155731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes These four operators have an initial value of 0, so they are able to use C/C++ 'zero init'. This patch adds the infrastructure to the Sema init calculations to differentiate based on the reduction operato

[clang] [OpenACC] 'reduction' init lowering for +, |, ^, || (PR #155924)

2025-08-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes These four operators have an initial value of 0, so they are able to use C/C++ 'zero init'. This patch adds the infrastructure to the Sema init calculations to differentiate based on the reduction opera

[clang] [clang] fix obtaining underlying type for demoted enum definitions (PR #155900)

2025-08-28 Thread James Y Knight via cfe-commits
jyknight wrote: Hi -- sidenote, but I noticed that this commit -- and many other of your commits -- are missing the entire commit message other than the PR title. I don't know if that's a github preference or something you're doing manually, but it's really unfortunate because then I cannot se

[clang] [clang] fix obtaining underlying type for demoted enum definitions (PR #155900)

2025-08-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > Hi -- sidenote, but I noticed that this commit -- and many other of your > commits -- are missing the entire commit message other than the PR title. I > don't know if that's a github preference or something you're doing manually, > but it's really unfortunate because then I c

[clang] 36ebd17 - [DirectX] Validate registers are bound to root signature (#146785)

2025-08-28 Thread via cfe-commits
Author: joaosaffran Date: 2025-08-28T17:10:10-04:00 New Revision: 36ebd1797203de0d38ccb5cacee39f1fec7a0c5a URL: https://github.com/llvm/llvm-project/commit/36ebd1797203de0d38ccb5cacee39f1fec7a0c5a DIFF: https://github.com/llvm/llvm-project/commit/36ebd1797203de0d38ccb5cacee39f1fec7a0c5a.diff L

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread via cfe-commits
@@ -0,0 +1,560 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang] fix uniquing of some TagTypes created from the injected class name (PR #155347)

2025-08-28 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I don't think that helps, however the patch is a bit simple, so you could maybe sort of reverse engineer what could have gone wrong from it. For example, before this patch we would have produced non-identical CXXRecordTypes from basically the same information. There is probab

[clang] [clang-format] Fix TableGen nested DAGArg format (PR #155837)

2025-08-28 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/155837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   >