[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-28 Thread Michael Flanders via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_analyze_cc1 -verify %s\ +// RUN: -analyzer-checker=core,debug.ExprInspection + +void clang_analyzer_eval(bool); + +using size_t = decltype(sizeof(int)); + +template +void escape(FirstT first, Rest... args); + +namespace CustomClassType { +struct

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-28 Thread Valentyn Yukhymenko via cfe-commits
BaLiKfromUA wrote: Could someone merge it? Or do we need another reviewer? I don't have merge permissions :) https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/17949 Here is

[clang] [AST] Fix printing of large 64-bit unsigned template arguments (PR #129235)

2025-02-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov requested changes to this pull request. What problem is this trying to fix here? At first glance, I think it's a problem that we ast-print instantiations as explicit specializations. If we fix that, does your problem go away? Secondly, I agree that if we would print

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -12796,6 +12799,7 @@ namespace { } void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { + llvm::SaveAndRestore cxxOpCallScope(isInCXXOperatorCall, true); erichkeane wrote: ```suggestion llvm::SaveAndRestore CxxOpCallScope(isInCXXOpera

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-28 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 closed https://github.com/llvm/llvm-project/pull/129169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-28 Thread Daniel Paoliello via cfe-commits
dpaoliello wrote: > Any further thoughts on splitting unwind info, as we discussed in #110338? Unfortunately, this isn't going to work. @pmsjt informs me that we can't have epilogs in chained unwind tables, since they are only for additional savereg codes. Using the "assume terminator is 1-byt

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/129285 Improve the diagnostics for chained comparisons to report actual expressions and operators Fixes #129069 >From 66cd32d7c58976bf050f82c0b6af39bc2b838a74 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: F

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/129167 >From d1fa2629b5786befa8ca8f839cf948df4644d615 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 25 Feb 2025 16:52:18 -0800 Subject: [PATCH 1/2] [CIR] Upstream func args alloca handling This change adds

[clang] [CodeGen] Ensure relative vtables use llvm.type.checked.load.relative (PR #126785)

2025-02-28 Thread via cfe-commits
https://github.com/PiJoules updated https://github.com/llvm/llvm-project/pull/126785 >From 07c7c069a57ec78e64df711cb17d5c873d3ad8cd Mon Sep 17 00:00:00 2001 From: Leonard Chan Date: Tue, 11 Feb 2025 11:31:17 -0800 Subject: [PATCH] [CodeGen] Ensure relative vtables use llvm.type.checked.load.re

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-28 Thread Eli Friedman via cfe-commits
@@ -500,7 +500,8 @@ MCSymbol *MCStreamer::emitLineTableLabel() { MCSymbol *MCStreamer::emitCFILabel() { // Return a dummy non-null value so that label fields appear filled in when // generating textual assembly. - return (MCSymbol *)1; + static size_t DummyLabelValue = 0;

[clang] [llvm] [AggressiveInstCombine] Shrink loads used in shufflevector rebroadcasts. (PR #128938)

2025-02-28 Thread Ulrich Weigand via cfe-commits
uweigand wrote: In the SystemZ tests, the variables involved have been deliberated marked `volatile` to prevent this type of optimization (the tests are supposed to verify the basic operation of the intrinsics). Does this new transformation respect `volatile`? https://github.com/llvm/llvm-pr

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -162,3 +162,10 @@ struct A { }; A<0>::B a; } + +template void shadow() { // expected-note{{template parameter is declared here}} erichkeane wrote: Just a call to this function, so: `shadow()` call. If you change it to return `int`, you can do: `auto Use

[clang] [SystemZ] Add header guard macros to vecintrin.h (PR #129170)

2025-02-28 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#129286 https://github.com/llvm/llvm-project/pull/129170 ___ 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 new check `readability-use-numeric-limits` (PR #127430)

2025-02-28 Thread Katherine Whitlock via cfe-commits
https://github.com/stellar-aria updated https://github.com/llvm/llvm-project/pull/127430 >From ba0eef9808b42b01e356cd5c87745f7477e07c68 Mon Sep 17 00:00:00 2001 From: Katherine Whitlock Date: Sun, 16 Feb 2025 22:45:06 -0500 Subject: [PATCH 01/10] [clang-tidy] Add new check `readability-use-num

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-28 Thread Katherine Whitlock via cfe-commits
@@ -0,0 +1,163 @@ +//===--- UseNumericLimitsCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-02-28 Thread Katherine Whitlock via cfe-commits
stellar-aria wrote: > What is the expected behavior of `+128` `-127`? I feel like they shouldn't be matched, since with opposite signs they're not really within the set of limits? It just feels unintuitive to me for `-127` to be replaced by something like `-std::numeric_limits::max()`. I've ad

[clang] 43eb18e - [analyzer] Do list initialization for CXXNewExpr with initializer list arg (#127702)

2025-02-28 Thread via cfe-commits
Author: Michael Flanders Date: 2025-02-28T17:42:26+01:00 New Revision: 43eb18e51f5582b73665306a45c640a880976ec1 URL: https://github.com/llvm/llvm-project/commit/43eb18e51f5582b73665306a45c640a880976ec1 DIFF: https://github.com/llvm/llvm-project/commit/43eb18e51f5582b73665306a45c640a880976ec1.di

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] [Clang][Docs][NFC] Correct documentation for the CPATH environment variable (PR #129113)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -733,16 +733,17 @@ ENVIRONMENT .. envvar:: CPATH - If this environment variable is present, it is treated as a delimited list of - paths to be added to the default system include path list. The delimiter is - the platform dependent delimiter, as used in the PATH environ

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-28 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_analyze_cc1 -verify %s\ +// RUN: -analyzer-checker=core,debug.ExprInspection + +void clang_analyzer_eval(bool); + +using size_t = decltype(sizeof(int)); + +template +void escape(FirstT first, Rest... args); + +namespace CustomClassType { +struct

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -376,6 +376,24 @@ let SMETargetGuard = "sme2" in { // Outer product and accumulate/subtract // +multiclass MOP4 checks> { + def NAME # "_1x1" : Inst<"svmop4" # name # "_1x1_" # n # "[_{d}_{d}]", "vidd", t, MergeNone, i # wide # "_1x1", [IsInOutZA, IsStreaming], checks>; +

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

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

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1986,112 +2360,119 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1986,112 +2360,119 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem updated https://github.com/llvm/llvm-project/pull/129255 >From c1fe663ceacd31064b2758e43de1afc3f51d3f2c Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 28 Feb 2025 11:55:06 +0100 Subject: [PATCH 1/2] [Coroutines] Replace coro.outside.frame metadata with an int

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1986,112 +2360,119 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -2672,7 +3053,7 @@ static inline std::optional createDataFixit(const ASTContext &Ctx, // `DRE.data()` std::optional UPCStandalonePointerGadget::getFixits(const FixitStrategy &S) const { - const auto VD = cast(Node->getDecl()); ilya-biryukov wrote: NIT: we

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1948,31 +2294,59 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { const IntegerLiteral *Offset = nullptr; public: - DerefSimplePtrArithFixableGadget(const MatchFinder::MatchResult &Result) + DerefSimplePtrArithFixableGadget(const MatchResult &Result)

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: @ivanaivanovska I only have NITs so far, could you address them? I will make sure to finish the few other functions I have left "note to self" for, but I don't actually expect much to pop up there. As soon as the comments are addressed, I think we are

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1948,31 +2294,59 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { const IntegerLiteral *Offset = nullptr; public: - DerefSimplePtrArithFixableGadget(const MatchFinder::MatchResult &Result) + DerefSimplePtrArithFixableGadget(const MatchResult &Result)

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem closed https://github.com/llvm/llvm-project/pull/129255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update SVE load and store intrinsics to have FP8 variants (PR #126726)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/20721 Here is the r

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread Hans Wennborg via cfe-commits
zmodem wrote: This is a follow-up to the discussion on the previous PR: - I think that discussion ended with the conclusion that we need an explicit mechanism for marking out-of-frame allocas. - We agree it should not be metadata - I think an intrinsic may be better than a flag directly on the

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread Hans Wennborg via cfe-commits
zmodem wrote: (sorry, wrong button) https://github.com/llvm/llvm-project/pull/129255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread Hans Wennborg via cfe-commits
https://github.com/zmodem reopened https://github.com/llvm/llvm-project/pull/129255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-28 Thread Michael Flanders via cfe-commits
@@ -254,6 +254,224 @@ void foo() { } } // namespace CXX17_aggregate_construction +namespace newexpr_init_list_initialization { Flandini wrote: They currently take different code paths and have different results in CSA. I think ideally they would use the same

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-28 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

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

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-28 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/128360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. LGTM once the 'auto' problems are fixed. https://github.com/llvm/llvm-project/pull/129167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] Revert "[clang][HIP] Make some math not not work with AMDGCN SPIR-V" (PR #129280)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Reverts llvm/llvm-project#128360 pending resolution of odd test break. --- Patch is 183.19 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/129280.diff 3 Files Affe

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -234,6 +273,29 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl gd, cir::FuncOp fn, return fn; } +clang::QualType CIRGenFunction::buildFunctionArgList(clang::GlobalDecl gd, + FunctionArgList &args) { + con

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -149,16 +153,49 @@ mlir::LogicalResult CIRGenFunction::declare(Address addr, const Decl *var, void CIRGenFunction::startFunction(GlobalDecl gd, QualType returnType, cir::FuncOp fn, cir::FuncType funcType, -

[clang] [llvm] [win][x64] Unwind v2 3/n: Add support for emitting unwind v2 information (equivalent to MSVC /d2epilogunwind) (PR #129142)

2025-02-28 Thread Daniel Paoliello via cfe-commits
@@ -500,7 +500,8 @@ MCSymbol *MCStreamer::emitLineTableLabel() { MCSymbol *MCStreamer::emitCFILabel() { // Return a dummy non-null value so that label fields appear filled in when // generating textual assembly. - return (MCSymbol *)1; + static size_t DummyLabelValue = 0;

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-28 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/128437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix fp8-init-list.c test failure (PR #129259)

2025-02-28 Thread Virginia Cangelosi via cfe-commits
https://github.com/virginia-cangelosi created https://github.com/llvm/llvm-project/pull/129259 Fix error in fp8-init-list.c introduced by PR #126726 >From 2198ad34793db8a11c88dc69deaf7bc4038b0de8 Mon Sep 17 00:00:00 2001 From: Virginia Cangelosi Date: Fri, 28 Feb 2025 15:07:54 + Subject: [

[clang] Fix fp8-init-list.c test failure (PR #129259)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Virginia Cangelosi (virginia-cangelosi) Changes Fix error in fp8-init-list.c introduced by PR #126726 --- Full diff: https://github.com/llvm/llvm-project/pull/129259.diff 1 Files Affected: - (modified) clang/test/CodeGen/AArch64/fp8-ini

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Hans Wennborg (zmodem) Changes Metadata should not be "load bearing", i.e. required for correctness, since optimizations are not required to preserve it. Therefore, turn this into an intrinsic instead. This is a follow-up to #127653. --

[clang] [HLSL] Add "or" intrinsic (PR #128979)

2025-02-28 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128979 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] check dtor in deferred diag (PR #129117)

2025-02-28 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/129117 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Replace coro.outside.frame metadata with an intrinsic (PR #129255)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Hans Wennborg (zmodem) Changes Metadata should not be "load bearing", i.e. required for correctness, since optimizations are not required to preserve it. Therefore, turn this into an intrinsic instead. This is a follow-up to #127

[clang] [clang-tools-extra] [clang-tidy] [dataflow] Cache reference accessors for `bugprone-unchecked-optional-access` (PR #128437)

2025-02-28 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA updated https://github.com/llvm/llvm-project/pull/128437 >From 319ad0b803b8c6c6c5405178335bd1f2258be4b8 Mon Sep 17 00:00:00 2001 From: Valentyn Yukhymenko Date: Sun, 23 Feb 2025 12:08:02 + Subject: [PATCH 1/9] first implementation and basic tests --- .../Mod

[clang] Improve the -Wundefined-func-template diagnostic note for invisible template functions (PR #129031)

2025-02-28 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/129031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Update SVE load and store intrinsics to have FP8 variants (PR #126726)

2025-02-28 Thread via cfe-commits
SpencerAbson wrote: I think this just needed a rebase after https://github.com/llvm/llvm-project/pull/125097 was landed. https://github.com/llvm/llvm-project/pull/126726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] 0f0665d - [CUDA][HIP] check dtor in deferred diag (#129117)

2025-02-28 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-02-28T09:58:19-05:00 New Revision: 0f0665db067f9680f0a90ad07c2f42842acc693f URL: https://github.com/llvm/llvm-project/commit/0f0665db067f9680f0a90ad07c2f42842acc693f DIFF: https://github.com/llvm/llvm-project/commit/0f0665db067f9680f0a90ad07c2f42842acc693f.dif

[clang] 4a477ee - Fix fp8-init-list.c test failure (#129259)

2025-02-28 Thread via cfe-commits
Author: Virginia Cangelosi Date: 2025-02-28T15:17:33Z New Revision: 4a477eeefa5be85f51e146aca8f76e2421a63971 URL: https://github.com/llvm/llvm-project/commit/4a477eeefa5be85f51e146aca8f76e2421a63971 DIFF: https://github.com/llvm/llvm-project/commit/4a477eeefa5be85f51e146aca8f76e2421a63971.diff

[clang] [Clang][ARM] Only try to redefine builtins for non-CUDA (PR #128222)

2025-02-28 Thread Nick Sarnie via cfe-commits
@@ -27,6 +27,8 @@ extern "C" { #endif +#if !defined(__CUDA_ARCH__) + sarnex wrote: @compnerd @Bigcheese Do you mind taking a look at Artem's questions above? Thx https://github.com/llvm/llvm-project/pull/128222 ___

[clang] [llvm] [Clang][LLVM] Implement single-single vectors MOP4{A/S} (PR #127797)

2025-02-28 Thread via cfe-commits
@@ -507,6 +559,9 @@ let SMETargetGuard = "sme-f16f16" in { } let SMETargetGuard = "sme-b16b16" in { + defm SVBMOP4A_H : MOP4<"a", "za16", "bf", "aarch64_sme_mop4a", "", [ImmCheck<0, ImmCheck0_1>]>; Lukacma wrote: ```suggestion defm SVBMOP4A_H : MOP4<"a",

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/129116 >From ed0cf3f026e439288f8334f27555ad26825fd56a Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 27 Feb 2025 21:49:32 +0100 Subject: [PATCH 1/2] [Clang][diagnostics] Fix structured binding shadows tem

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 09b809d803ca319f194eba6b6d8a78fa6dbbf9f3 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From cb684ab2c1bf2f1388fbdee063eaa95753d70a2c Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -162,3 +162,10 @@ struct A { }; A<0>::B a; } + +template void shadow() { // expected-note{{template parameter is declared here}} erichkeane wrote: Please instantiate this template as well. https://github.com/llvm/llvm-project/pull/129116 ___

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Marco C. via cfe-commits
https://github.com/Marcondiro updated https://github.com/llvm/llvm-project/pull/129209 >From c1bb0f84852e223a83638384188e4858877ec89e Mon Sep 17 00:00:00 2001 From: Marcondiro <46560192+marcond...@users.noreply.github.com> Date: Fri, 28 Feb 2025 09:34:30 +0100 Subject: [PATCH] [clang-tidy] Contr

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -162,3 +162,10 @@ struct A { }; A<0>::B a; } + +template void shadow() { // expected-note{{template parameter is declared here}} + using arr = int[1]; // expected-warning@+1 {{decomposition declarations are a C++17 extension}} erichkeane wrote: ```sugg

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From f8874335dfcef03fd75eff9a8ba5ff91b3596877 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [CIR] Upstream func args alloca handling (PR #129167)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -52,6 +52,14 @@ class Address { elementType); } + Address(mlir::Value pointer, clang::CharUnits alignment) + : Address(pointer, +mlir::cast(pointer.getType()).getPointee(), andykaylor wrote: The thing that's being cast is

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
@@ -1986,112 +2360,119 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-02-28 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-02-28 Thread via cfe-commits
https://github.com/pzzp updated https://github.com/llvm/llvm-project/pull/126481 >From ad5d0ba6d6fdacf89c9fd132bfb4a8d733781f03 Mon Sep 17 00:00:00 2001 From: pzzp Date: Fri, 28 Feb 2025 10:46:12 +0800 Subject: [PATCH] [llvm:ir] Add support for constant data exceeding 4GiB --- clang/lib/CodeGe

[clang] [clang] Update SVE load and store intrinsics to have FP8 variants (PR #126726)

2025-02-28 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/24243 Here is

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread via cfe-commits
https://github.com/zhaohuiw42 updated https://github.com/llvm/llvm-project/pull/129198 >From 54c65ab88fe949bce2b1717f97132c06ec1405ac Mon Sep 17 00:00:00 2001 From: zhaohui Date: Fri, 28 Feb 2025 14:12:39 +0800 Subject: [PATCH] [Clang] Check for uninitialized use in lambda within CXXOperatorCa

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread via cfe-commits
@@ -12597,6 +12597,12 @@ namespace { bool isRecordType; bool isPODType; bool isReferenceType; +// Tracks whether the current expression is being visited within a +// CXXOperatorCallExpr. This flag is set to true when entering a +// CXXOperatorCallExpr an

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread via cfe-commits
@@ -12796,6 +12803,7 @@ namespace { } void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *E) { + isInCXXOperatorCall = true; zhaohuiw42 wrote: Fixed, thanks. https://github.com/llvm/llvm-project/pull/129198 ___

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread via cfe-commits
@@ -12804,6 +12812,20 @@ namespace { Visit(Callee); for (auto Arg: E->arguments()) HandleValue(Arg->IgnoreParenImpCasts()); + isInCXXOperatorCall = false; +} + +void VisitLambdaExpr(LambdaExpr *E) { + if (isInCXXOperatorCall) {

[clang] [analyzer] Do list initialization for CXXNewExpr with initializer list arg (PR #127702)

2025-02-28 Thread Michael Flanders via cfe-commits
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/127702 >From 12791f2c89f7e42bd261ac573c2497857c42b6f3 Mon Sep 17 00:00:00 2001 From: Michael Flanders Date: Tue, 18 Feb 2025 15:56:13 -0600 Subject: [PATCH 01/17] [analyzer] Do list initialization for CXXNewExpr with

[clang] [llvm] [llvm:ir] Add support for constant data exceeding 4GiB (PR #126481)

2025-02-28 Thread via cfe-commits
https://github.com/pzzp updated https://github.com/llvm/llvm-project/pull/126481 >From 82cb46625825e6aca4544b964e4885ba535c96b5 Mon Sep 17 00:00:00 2001 From: pzzp Date: Fri, 28 Feb 2025 10:46:12 +0800 Subject: [PATCH] [llvm:ir] Add support for constant data exceeding 4GiB --- clang/lib/CodeGe

[clang] [Clang] Check for uninitialized use in lambda within CXXOperatorCallExpr (PR #129198)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -12806,6 +12810,19 @@ namespace { HandleValue(Arg->IgnoreParenImpCasts()); } +void VisitLambdaExpr(LambdaExpr *E) { + if (!isInCXXOperatorCall) { +Inherited::VisitLambdaExpr(E); +return; + } + + for (const auto &init : E->captu

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

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

[clang] [llvm] [AggressiveInstCombine] Shrink loads used in shufflevector rebroadcasts. (PR #128938)

2025-02-28 Thread Leon Clark via cfe-commits
https://github.com/PeddleSpam updated https://github.com/llvm/llvm-project/pull/128938 >From f1c09277af268256fce71df9a858959b69385ef1 Mon Sep 17 00:00:00 2001 From: Leon Clark Date: Wed, 26 Feb 2025 15:59:02 + Subject: [PATCH 1/3] [AggressiveInstCombine] Shrink loads used in shufflevector

[clang] [C++20] [Modules] Support generating in-class defined function with try-catch body (PR #129212)

2025-02-28 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov commented: We could use a scope guard here to avoid the duplication, and this includes the pre-existing EOF handling. This would make this sort of bug more unlikely to happen in the future. https://github.com/llvm/llvm-project/pull/129212 ___

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 09b809d803ca319f194eba6b6d8a78fa6dbbf9f3 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-28 Thread Nico Weber via cfe-commits
nico wrote: This seems to break tests: http://45.33.8.238/linux/161683/step_6.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/128360 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/128926 >From 30bde986afda876d877d63212d8e4a34d2927aad Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 26 Feb 2025 11:43:28 -0500 Subject: [PATCH] [CUDA][HIP] fix virtual dtor host/device attr Currently if

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread via cfe-commits
https://github.com/Andrewyuan34 updated https://github.com/llvm/llvm-project/pull/127162 >From 09b809d803ca319f194eba6b6d8a78fa6dbbf9f3 Mon Sep 17 00:00:00 2001 From: Andrewyuan34 Date: Thu, 13 Feb 2025 22:35:36 -0500 Subject: [PATCH] [clang-tidy] Fix invalid fixit from modernize-use-ranges for

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-28 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > This seems to break tests: http://45.33.8.238/linux/161683/step_6.txt > > Please take a look and revert for now if it takes a while to fix. Should be fixed within the next 30 mins or so, if not I'll revert, apologies for the inconvenience. https://github.com/llvm/llvm-project

[clang] [CUDA][HIP] fix virtual dtor host/device attr (PR #128926)

2025-02-28 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/128926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (PR #129169)

2025-02-28 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: LGTM, thank you for the quick fix! https://github.com/llvm/llvm-project/pull/129169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} erichkeane wrote: Hmm @AaronBallman will probably have to comment here, but I'm not sure this is better? The point of `comparisons like` here was to

[clang-tools-extra] [clang-tidy] Contributing.rst update snippet and docs (PR #129209)

2025-02-28 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/129209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7446601 - [-Wunsafe-buffer-usage] Fix a potential overflow bug reported by #126334 (#129169)

2025-02-28 Thread via cfe-commits
Author: Ziqing Luo Date: 2025-02-28T10:33:32-08:00 New Revision: 7446601c6a9b71945fdc9d7434d8347789708858 URL: https://github.com/llvm/llvm-project/commit/7446601c6a9b71945fdc9d7434d8347789708858 DIFF: https://github.com/llvm/llvm-project/commit/7446601c6a9b71945fdc9d7434d8347789708858.diff LO

[clang-tools-extra] [clang-tidy] Fix invalid fixit from modernize-use-ranges for nullptr used with std::unique_ptr (PR #127162)

2025-02-28 Thread Baranov Victor via cfe-commits
vbvictor wrote: > I‘m sorry for requesting approval again. But I'm really confused that should > I make sure my branch is alwasy up-to-date? Rebase from `main` periodically, at least before merge. It's just to make sure that there are no merge conflicts. https://github.com/llvm/llvm-project/pu

[clang] [llvm] [RISCV] Xqccmp Code Generation (PR #128815)

2025-02-28 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][diagnostics] Fix structured binding shadows template param loc (PR #129116)

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

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Amr Hesham via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} AmrDeveloper wrote: Yes i think the word `like` should be removed here, but I am thinking should we prefer the previous diagnostics or the one with actual

[clang] [Clang][diagnostics] Improve the diagnostics for chained comparisons (PR #129285)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -85,7 +85,7 @@ void f(int x, int y, int z) { if ((ayy y < z' don't have their mathematical meaning}} erichkeane wrote: I don't like the one with the actual expression in it, as that is going to get arbitrarily large. That said, I DO wonder if there is va

[clang] f09e245 - [NFC][clang] Remove trailing whitespace in Options.td

2025-02-28 Thread via cfe-commits
Author: pvanhout Date: 2025-02-28T10:29:42+01:00 New Revision: f09e245b35f291ab48f6efeb4986e7f9818b7cb7 URL: https://github.com/llvm/llvm-project/commit/f09e245b35f291ab48f6efeb4986e7f9818b7cb7 DIFF: https://github.com/llvm/llvm-project/commit/f09e245b35f291ab48f6efeb4986e7f9818b7cb7.diff LOG:

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-28 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From e580bbe66a5d65e90051cb0906b87478341696e6 Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/4] [clang][AMDGPU] Enable module splitting by default The default

[clang] Clang: Add minnum/maxnum builtin functions (PR #129207)

2025-02-28 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/129207 >From 917e3b80ae7962a4f0bd5735cdc88163fcdbdcc7 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Fri, 28 Feb 2025 16:09:04 +0800 Subject: [PATCH 1/2] Clang: Add minnum/maxnum builtin functions support With https

<    1   2   3   4   >