[clang] 087f4fc - [HLSL] Remove resource constructors with binding (#157008)

2025-09-17 Thread via cfe-commits
Author: Helena Kotas Date: 2025-09-17T09:56:48-07:00 New Revision: 087f4fc91b9665dced0007f82a38a0ddb0be79fd URL: https://github.com/llvm/llvm-project/commit/087f4fc91b9665dced0007f82a38a0ddb0be79fd DIFF: https://github.com/llvm/llvm-project/commit/087f4fc91b9665dced0007f82a38a0ddb0be79fd.diff

[clang] [HLSL] Remove resource constructors with binding (PR #157008)

2025-09-17 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/157008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Optimize InterpStack (PR #159400)

2025-09-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/159400 Replace `StackChunk::End` with `StackChunk::Size`, mark the allocating code paths as unlikely and move `grow()` into the header, which allows us to template this for the `Size` parameter. Since we only push ou

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -0,0 +1,123 @@ +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Option/ArgList.h" +#include "llvm/Option/OptTable.h" +#include "llvm/Support/Error.h" +#include "llvm/Support/InitLLVM.h" +#include "llvm/Support/raw_ostream.h" + +using namespace ll

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -202,6 +205,39 @@ void ArgList::print(raw_ostream &O) const { LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); } #endif +StringRef ArgList::getSubcommand( +ArrayRef Commands, +std::function)> HandleMultipleSubcommands, +std::function)> HandleOtherPos

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -415,16 +418,18 @@ std::unique_ptr OptTable::parseOneArgGrouped(InputArgList &Args, std::unique_ptr OptTable::ParseOneArg(const ArgList &Args, unsigned &Index, Visibility VisibilityMask) const { - return internalParseOneArg(Args

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -202,6 +205,39 @@ void ArgList::print(raw_ostream &O) const { LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); } #endif +StringRef ArgList::getSubcommand( +ArrayRef Commands, +std::function)> HandleMultipleSubcommands, +std::function)> HandleOtherPos

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -98,7 +98,23 @@ class HelpTextVariant visibilities, string text> { string Text = text; } -class Option prefixes, string name, OptionKind kind> { +// Base class for TopLevelCommand and Subcommands. +class Command { string Name = name; } + +// Class definition for position

[clang] [CIR] Change unreachable to diagnostic for ill-equipped clang (PR #152614)

2025-09-17 Thread Justin Stitt via cfe-commits
JustinStitt wrote: If no one else has any feedback here, I'll be clicking the big green button later today. thanks for the review @steakhal https://github.com/llvm/llvm-project/pull/152614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

2025-09-17 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 approved this pull request. The libc++ part LGTM. https://github.com/llvm/llvm-project/pull/158048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] Fix compilation errors (PR #159293)

2025-09-17 Thread Igor Popov via cfe-commits
https://github.com/silver-popov updated https://github.com/llvm/llvm-project/pull/159293 >From d9fa0e0523476ef5b0a856379c99e3e9fa7b8613 Mon Sep 17 00:00:00 2001 From: Igor Popov Date: Wed, 17 Sep 2025 12:10:50 +0300 Subject: [PATCH] Fix compilation errors --- libunwind/src/Unwind-seh.cpp | 4

[clang] [llvm] RISCV: the builtins support for MIPS RV64 P8700 execution control . (PR #159246)

2025-09-17 Thread Craig Topper via cfe-commits
@@ -0,0 +1,27 @@ +//==- BuiltinsRISCVXMIPS.td - RISC-V MIPS Builtin database*- C++ -*-==// +// +// 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] improve robustness of the member initializer detection in modernize-use-default-member-init (PR #159392)

2025-09-17 Thread Yanzuo Liu via cfe-commits
@@ -8,17 +8,52 @@ #include "UseDefaultMemberInitCheck.h" #include "clang/AST/ASTContext.h" +#include "clang/AST/Expr.h" #include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Lex/Lexer.h" using namespace clang::ast_matche

[clang-tools-extra] [clang-tidy] improve robustness of the member initializer detection in modernize-use-default-member-init (PR #159392)

2025-09-17 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: > Fixed #156295, #122480 Linked issue | Syntax | Example --- | -- | -- Multiple issues | Use full syntax for each issue | `Resolves #10, resolves #123, resolves octo-org/octo-repo#100` https://docs.github.com/en/issues/tracking-your-work-

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-17 Thread via cfe-commits
yronglin wrote: Thanks for the review! > This "known issue" in > https://clang.llvm.org/docs/StandardCPlusPlusModules.html can probably be > removed > > https://github.com/llvm/llvm-project/blob/d90a313b5e90771c0956b5fdd2814bc93bf414de/clang/docs/StandardCPlusPlusModules.rst?plain=1#L1384-L14

[clang] [llvm] [SYCL] Add offload wrapping for SYCL kind. (PR #147508)

2025-09-17 Thread Maksim Sabianin via cfe-commits
https://github.com/maksimsab edited https://github.com/llvm/llvm-project/pull/147508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-09-17 Thread Craig Topper via cfe-commits
@@ -20594,6 +20645,8 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N, if (SDValue V = combineVqdotAccum(N, DAG, Subtarget)) return V; return combineToVWMACC(N, DAG, Subtarget); + case RISCVISD::VWADDU_VL: topperc wrote: What about V

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

2025-09-17 Thread Chaitanya Koparkar via cfe-commits
https://github.com/ckoparkar updated https://github.com/llvm/llvm-project/pull/158048 >From 7665f0d152250b327b93a8aedc2ed9410e22277c Mon Sep 17 00:00:00 2001 From: Chaitanya Koparkar Date: Thu, 11 Sep 2025 07:24:02 -0400 Subject: [PATCH 1/5] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a

[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-17 Thread Lei Huang via cfe-commits
@@ -50,6 +50,26 @@ def SDT_PPCVecSplat : SDTypeProfile<1, 2, [ SDTCisVec<0>, SDTCisVec<1>, SDTCisInt<2> ]>; +def SDT_PPCBcdShift : SDTypeProfile<1, 3, [ SDTCisVT<0, v16i8>, + SDTCisVT<1, v4i32>, SDTCisVT<2, v16i8>, SDTCisInt<3> +]>; + +def SDT_PPCBcdShiftRound : SDTypeProfi

[clang-tools-extra] Revert "[clang-tidy] support query based custom check" (PR #159380)

2025-09-17 Thread Ingo Müller via cfe-commits
ingomueller-net wrote: I am AFK now but I am pretty sure the only relevant flag is https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html, which I set to ON. I can provide more detail tomorrow if this isn't enough. https://github.com/llvm/llvm-project/pull/159380

[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-17 Thread Lei Huang via cfe-commits
@@ -249,6 +269,11 @@ def PPCpaddiDtprel : SDNode<"PPCISD::PADDI_DTPREL", SDTIntBinOp>; def PPCvperm : SDNode<"PPCISD::VPERM", SDT_PPCvperm, []>; def PPCxxsplt: SDNode<"PPCISD::XXSPLT", SDT_PPCVecSplat, []>; +def PPCbcds : SDNode<"PPCISD::BCDSHIFT", SDT_PPCBcdSh

[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-17 Thread Lei Huang via cfe-commits
@@ -11151,6 +11161,20 @@ SDValue PPCTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op, SDLoc dl(Op); + // Lowers BCD intrinsics with rounding operand + auto MapNodeWithSplatVector = [&](unsigned Opcode) -> SDValue { +SDValue SplatVal = +DAG.getNode(ISD::SPLA

[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-17 Thread Lei Huang via cfe-commits
@@ -683,6 +683,31 @@ let TargetPrefix = "ppc" in { // All intrinsics start with "llvm.ppc.". DefaultAttrsIntrinsic<[llvm_v16i8_ty], [llvm_v16i8_ty, llvm_i32_ty], [IntrNoMem, ImmArg>]>; + def int_ppc_bcdshift : ClangBuiltin<"__builtin_ppc_bcdshift">, ---

[clang] [llvm] [PowerPC] Add Support for BCDSHIFT, BCDSHIFTR, BCDTRUNC, BCDUTRUNC, and BCDUSHIFT instruction support (PR #154715)

2025-09-17 Thread Lei Huang via cfe-commits
@@ -3455,6 +3480,21 @@ include "PPCInstr64Bit.td" include "PPCInstrVSX.td" include "PPCInstrHTM.td" +def : Pat<(PPCbcds v4i32:$Shift, v16i8:$Src, i32:$PS), + (BCDS_rec $Shift, $Src, $PS)>; lei137 wrote: BCDS_res is defined in `PPCInstrAltivec.td`. Th

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -415,16 +418,18 @@ std::unique_ptr OptTable::parseOneArgGrouped(InputArgList &Args, std::unique_ptr OptTable::ParseOneArg(const ArgList &Args, unsigned &Index, Visibility VisibilityMask) const { - return internalParseOneArg(Args

[clang] [clang-tools-extra] [lld] [llvm] [llvm] Add subcommand support for OptTable (PR #155026)

2025-09-17 Thread via cfe-commits
@@ -202,6 +205,39 @@ void ArgList::print(raw_ostream &O) const { LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); } #endif +StringRef ArgList::getSubcommand( +ArrayRef Commands, +std::function)> HandleMultipleSubcommands, +std::function)> HandleOtherPos

[clang] [clang-repl] Disable out of process JIT tests on non-unix platforms (PR #159404)

2025-09-17 Thread Abhinav Kumar via cfe-commits
https://github.com/kr-2003 created https://github.com/llvm/llvm-project/pull/159404 None >From dbabd925f7cd1a1c1bb32ebcc72a4353ffc8c07b Mon Sep 17 00:00:00 2001 From: kr-2003 Date: Wed, 17 Sep 2025 22:41:47 +0530 Subject: [PATCH] Fix: out-of-process tests only on unix --- clang/unittests/Int

[clang] [clang-repl] Disable out of process JIT tests on non-unix platforms (PR #159404)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Abhinav Kumar (kr-2003) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/159404.diff 1 Files Affected: - (modified) clang/unittests/Interpreter/CMakeLists.txt (+2-2) ``diff diff --git a/clang/unittests/Interp

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
@@ -347,6 +347,9 @@ Bug Fixes in This Version ``-Wshadow`` and show uncaptured-local warnings with ``-Wshadow-all``. (#GH68605) - Fixed a failed assertion with a negative limit parameter value inside of ``__has_embed``. (#GH157842) +- Fixed an assertion when an improper us

[clang] [clang][BufferUsage] Fix a StringRef lifetime issue (PR #159109)

2025-09-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/159109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/159371 As reported in #159080, patch #68059 didn't correctly check for the argument count of the target function from malloc to ensure it has an argument. This patch corrects that check. >From 35b6efd0e5929aab3e6

[clang] Revert "[Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches (#155957)" (PR #159367)

2025-09-17 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis ready_for_review https://github.com/llvm/llvm-project/pull/159367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Victor Chernyakin via cfe-commits
@@ -1,4 +1,5 @@ -// RUN: %check_clang_tidy -std=c++17 %s bugprone-invalid-enum-default-initialization %t +// RUN: %check_clang_tidy -check-suffixes=,DEFAULT -std=c++17 %s bugprone-invalid-enum-default-initialization %t +// RUN: %check_clang_tidy -std=c++17 %s bugprone-invalid-e

[clang] [analyzer] Enhance array bound checking for `ConstantArrayType` (PR #159357)

2025-09-17 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,cpp -- clang/lib/StaticAnalyzer/Checkers/ArrayBoundCh

[clang] Fix crash in 'malloc' referring to function without a argument (PR #159371)

2025-09-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/159371 >From 35b6efd0e5929aab3e6493fd83e7792159deda39 Mon Sep 17 00:00:00 2001 From: erichkeane Date: Wed, 17 Sep 2025 07:17:52 -0700 Subject: [PATCH 1/3] Fix crash in 'malloc' referring to function without a argum

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Baranov Victor via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -70,3 +70,8 @@ enum type) are set to 0. enum Enum1 Array3[2][2] = {{Enum1_A, Enum1_A}}; // warn: elements of second array are initialized to 0 struct Struct1 S1 = {1}; // warn: element 'b' is initialized t

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Félix-Antoine Constantin via cfe-commits
@@ -88,12 +90,22 @@ class FindEnumMember : public TypeVisitor { InvalidEnumDefaultInitializationCheck::InvalidEnumDefaultInitializationCheck( StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Name, Context) {} +: ClangTidyCheck(Name, Context), + Ign

[clang] [clang] Add unreachable after fully covered switches, avoid GCC warnings. NFC. (PR #159330)

2025-09-17 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I'm not opposed to this change but we might want to report that to GCC, it is > a false positive GCC considers that enums potentially can have any representable value - this is a known longtime difference between GCC and Clang to the point that we have it mentioned in our [

[clang] 48f00e8 - [analyzer] Prevent triplicate warnings for `sarif-html` (#158112)

2025-09-17 Thread via cfe-commits
Author: Dave Bartolomeo Date: 2025-09-17T09:25:51-07:00 New Revision: 48f00e81338e637b8210d3320527d4f389d5343b URL: https://github.com/llvm/llvm-project/commit/48f00e81338e637b8210d3320527d4f389d5343b DIFF: https://github.com/llvm/llvm-project/commit/48f00e81338e637b8210d3320527d4f389d5343b.dif

[clang] [analyzer] Prevent triplicate warnings for `sarif-html` (PR #158112)

2025-09-17 Thread Jan Korous via cfe-commits
jkorous-apple wrote: Merged on behalf of @dbartol https://github.com/llvm/llvm-project/pull/158112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Prevent triplicate warnings for `sarif-html` (PR #158112)

2025-09-17 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple closed https://github.com/llvm/llvm-project/pull/158112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Make lambda in non-dependent context generate same analysis-based warnings as function[ template] (PR #159364)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yanzuo Liu (zwuis) Changes This patch fixes following two issues: - When handling warnings which should be emitted if reachable, expressions in global lambdas aren't treated as if in functions, so warnings are emitted immediately without

[clang] [llvm] RISCV: the builtins support for MIPS RV64 P8700 execution control . (PR #159246)

2025-09-17 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,35 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --tool /home/ukalappa/llvm/github/build/bin/llc --version 6 mshockwave wrote: if you use `--llc-binary` instead it won't attach `--tool ` here I believe.

[clang] [llvm] RISCV: the builtins support for MIPS RV64 P8700 execution control . (PR #159246)

2025-09-17 Thread Min-Yih Hsu via cfe-commits
@@ -0,0 +1,35 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --tool /home/ukalappa/llvm/github/build/bin/llc --version 6 +; RUN: llc -mtriple=riscv64 -mcpu=mips-p8700 -O3 -verify-machineinstrs < %s \ +; RUN: | FileCheck -check-prefi

[clang] [clang] Avoid warnings about enum mismatch in ternary expressions. NFC. (PR #159338)

2025-09-17 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo updated https://github.com/llvm/llvm-project/pull/159338 From 80607ae5154313cbafe506cc1bb72486b530521d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Wed, 17 Sep 2025 14:25:50 +0300 Subject: [PATCH 1/2] [clang] Avoid warnings about enum mismat

[clang] [clang] Avoid warnings about enum mismatch in ternary expressions. NFC. (PR #159338)

2025-09-17 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > I think it might be cleaner in that case to have two different if statements > (one for isRegularKeywordAttribute and one for isDeclspecAttribute) Sounds reasonable, thanks - I updated the PR with such a change. https://github.com/llvm/llvm-project/pull/159338 ___

[clang] [clang][bytecode] Remove InterpFrame::IsBottom flag (PR #159279)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The bottom frame is the one without a parent. No need to save that information separately. --- Full diff: https://github.com/llvm/llvm-project/pull/159279.diff 2 Files Affected: - (modified) clang/lib/AST

[clang-tools-extra] [clang-tidy] Enable `modernize-return-braced-init-list`'s tests in C++11 (PR #158196)

2025-09-17 Thread Victor Chernyakin via cfe-commits
localspook wrote: Added `-std=c++11-or-later`. If we want this to be a general policy, that all checks which require `LangOpts.CPlusPlus11` should specify `-std` explicitly, we'll need to fix a number of tests https://github.com/llvm/llvm-project/pull/158196 ___

[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

2025-09-17 Thread Zahira Ammarguellat via cfe-commits
@@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple spir64-unknown-unknown -aux-triple x86_64-pc-windows-msvc -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s '-D$ADDRSPACE=addrspace(1) ' -// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsycl-is-host -disable-

[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

2025-09-17 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/159115 >From b197e92e844472ccef1999cac653a76109183ee4 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Tue, 16 Sep 2025 08:47:40 -0700 Subject: [PATCH 1/2] Fix Lambda Mangling in Namespace-Scope Variable Init

[clang] Revert "[Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches (#155957)" (PR #159367)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Paschalis Mpeis (paschalis-mpeis) Changes This reverts commit 7fca1f841b4c226d50ab7bad64de5db225d4193b. --- Full diff: https://github.com/llvm/llvm-project/pull/159367.diff 1 Files Affected: - (modified) clang/cmake/caches/PGO.cmake (+1

[clang] [Sema][AArch64] Emit error for mismatched VLs on streaming mode transitions (PR #159131)

2025-09-17 Thread Mary Kassayova via cfe-commits
https://github.com/marykass-arm updated https://github.com/llvm/llvm-project/pull/159131 >From 035aafb13cff57bfd266c8266ccebe4be685 Mon Sep 17 00:00:00 2001 From: Mary Kassayova Date: Tue, 16 Sep 2025 15:59:14 + Subject: [PATCH 1/2] [Sema][AArch64] Emit error for mismatched VLs on stre

[clang-tools-extra] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-variadic-functions' (PR #157737)

2025-09-17 Thread Baranov Victor via cfe-commits
vbvictor wrote: @carlosgalvezp, Do you like new doc style? If so I'd rebase and merge https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-17 Thread via cfe-commits
h-vetinari wrote: This "known issue" in https://clang.llvm.org/docs/StandardCPlusPlusModules.html can probably be removed https://github.com/llvm/llvm-project/blob/d90a313b5e90771c0956b5fdd2814bc93bf414de/clang/docs/StandardCPlusPlusModules.rst?plain=1#L1384-L1408 This PR can also close #54047

[clang-tools-extra] [clang-tidy] New Option Invalid Enum Default Initialization (PR #159220)

2025-09-17 Thread Félix-Antoine Constantin via cfe-commits
https://github.com/felix642 updated https://github.com/llvm/llvm-project/pull/159220 From 8177f228f3d428336d802139eebff70426067b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Constantin?= Date: Tue, 16 Sep 2025 21:10:25 -0400 Subject: [PATCH 1/3] =?UTF-8?q?[clang-tidy]=C2=A0N

[clang] 1f05682 - [clang] Remove redundant conditions (NFC) (#159349)

2025-09-17 Thread via cfe-commits
Author: hstk30-hw Date: 2025-09-17T15:51:49+02:00 New Revision: 1f05682d7634d644cd6fd7141c84ee3ab58c26ab URL: https://github.com/llvm/llvm-project/commit/1f05682d7634d644cd6fd7141c84ee3ab58c26ab DIFF: https://github.com/llvm/llvm-project/commit/1f05682d7634d644cd6fd7141c84ee3ab58c26ab.diff LOG

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Abid Qadeer via cfe-commits
@@ -995,7 +995,12 @@ void CodeGenAction::runOptimizationPipeline(llvm::raw_pwrite_stream &os) { // Create the pass manager. llvm::ModulePassManager mpm; - if (opts.PrepareForFullLTO) + if (opts.PrepareForFatLTO) { +bool emitSummary = opts.PrepareForThinLTO || opts.P

[clang] [clang] Avoid warnings about enum mismatch in ternary expressions. NFC. (PR #159338)

2025-09-17 Thread Erich Keane via cfe-commits
Martin =?utf-8?q?Storsj=C3=B6?= Message-ID: In-Reply-To: https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/159338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang-tools-extra] [clang-tidy] improve robustness of the member initializer detection in modernize-use-default-member-init (PR #159392)

2025-09-17 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis edited https://github.com/llvm/llvm-project/pull/159392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-17 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/107168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang: Emit error if assembler fails to construct subtarget (PR #159219)

2025-09-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. if manual testing locally shows that the error message is correct then lgtm https://github.com/llvm/llvm-project/pull/159219 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Abid Qadeer via cfe-commits
@@ -1494,8 +1484,35 @@ static bool parseLinkerOptionsArgs(CompilerInvocation &invoc, return false; } - invoc.getCodeGenOpts().DependentLibs = + opts.DependentLibs = args.getAllArgValues(clang::driver::options::OPT_dependent_lib); + + // -flto=full/thin option.

[clang] [llvm] RISCV: the builtins support for MIPS RV64 P8700 execution control . (PR #159246)

2025-09-17 Thread Craig Topper via cfe-commits
@@ -0,0 +1,20 @@ +//===- IntrinsicsRISCVXMIPS.td - Defines MIPS intrinsics ---*- 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:

[clang] [Headers][X86] VectorExprEvaluator::VisitCallExpr - allow SSE/AVX2/AVX512 pack intrinsics to be used in constexpr (PR #156003)

2025-09-17 Thread via cfe-commits
https://github.com/woruyu updated https://github.com/llvm/llvm-project/pull/156003 >From 1e95c44008b5751baa53ee5d0b8b9d665b83765e Mon Sep 17 00:00:00 2001 From: woruyu <1214539...@qq.com> Date: Tue, 16 Sep 2025 23:16:52 -0900 Subject: [PATCH] [Headers][X86] VectorExprEvaluator::VisitCallExpr - a

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

2025-09-17 Thread Zahira Ammarguellat via cfe-commits
@@ -47,7 +47,19 @@ int main() { // Make sure the following 3 are the same between the host and device compile. // Note that these are NOT the same value as each other, they differ by the // signature. - // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"

[clang] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
https://github.com/anchuraj updated https://github.com/llvm/llvm-project/pull/158125 >From 78068dcea27ebdfd84743d69a8815f77b8bfcd3d Mon Sep 17 00:00:00 2001 From: Anchu Rajendran Date: Tue, 2 Sep 2025 12:34:06 -0500 Subject: [PATCH 1/2] [flang][Driver] Enables lto-partitions and fat-lto-object

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/156773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Reapply "[Coroutines] Add llvm.coro.is_in_ramp and drop return value of llvm.coro.end (#155339)" (PR #159278)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-analysis @llvm/pr-subscribers-mlir Author: Weibo He (NewSigma) Changes Update a test in inline/ML, which seem to be enabled only in specific environments. Reapply #155339 --- Patch is 156.17 KiB, truncated to 20.00 KiB below, full version: htt

[clang-tools-extra] Reland "[clangd] Add feature modules registry" (PR #154836)

2025-09-17 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX updated https://github.com/llvm/llvm-project/pull/154836 >From 27b44cefdc1ea4b373f8e990bc1fea05fc278701 Mon Sep 17 00:00:00 2001 From: Aleksandr Platonov Date: Thu, 21 Aug 2025 22:51:41 +0300 Subject: [PATCH 1/4] [clangd] Introduce feature modules registry This patch

[clang] [DTLTO] Remove XFAIL for llvm-driver (PR #159413)

2025-09-17 Thread via cfe-commits
bd1976bris wrote: @petrhosek. Thanks for putting this up and apologies for the disruption to you. There was another failure due to the regex's being too greedy. Can you please review PR #159418 in preference to this. Thanks. https://github.com/llvm/llvm-project/pull/159413

[clang] [clang] Check captured variables for noreturn attribute (PR #155213)

2025-09-17 Thread Serge Pavlov via cfe-commits
@@ -467,6 +467,41 @@ struct TransferFunctions : public StmtVisitor { AllValuesAreNoReturn = false; } } + + void VisitCXXOperatorCallExpr(CXXOperatorCallExpr *CE) { +if (CE->getOperator() == OO_Call && CE->getNumArgs() > 0) { + Expr *Obj = CE->getA

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple commented: Great! Thank you for implementing this! https://github.com/llvm/llvm-project/pull/156773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Move getLangOpts() to interp::State subclasses (PR #159280)

2025-09-17 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-armv8-quick` running on `linaro-clang-armv8-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/154/builds/21604 Here is the relevant piece o

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
@@ -31,6 +31,20 @@ void test_unclaimed_use(int *p) { // expected-warning{{'p' is an unsafe pointer p[5] = 5; // expected-note{{used in buffer access here}} } +namespace std { jkorous-apple wrote: I don't think this test is the right place to add test

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple edited https://github.com/llvm/llvm-project/pull/156773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
@@ -1318,6 +1319,88 @@ static bool isSupportedVariable(const DeclRefExpr &Node) { return D != nullptr && isa(D); } +static bool isUniquePtrArray(const CXXRecordDecl *RecordDecl) { + if (!RecordDecl || !RecordDecl->isInStdNamespace() || + RecordDecl->getNameAsString()

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
@@ -2606,6 +2606,19 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { #endif } + void handleUnsafeUniquePtrArrayAccess(const DynTypedNode &Node, +bool IsRelatedToDecl, +AST

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
@@ -31,6 +31,20 @@ void test_unclaimed_use(int *p) { // expected-warning{{'p' is an unsafe pointer p[5] = 5; // expected-note{{used in buffer access here}} } +namespace std { +inline namespace __1 { +template class unique_ptr { +public: + T &operator[](long long i)

[clang] [DTLTO][TEST] Make Clang driver tests even more robust (PR #159418)

2025-09-17 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/159418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add unique_ptr accesses to -Wunsafe-buffer-usage (PR #156773)

2025-09-17 Thread Jan Korous via cfe-commits
@@ -31,6 +31,20 @@ void test_unclaimed_use(int *p) { // expected-warning{{'p' is an unsafe pointer p[5] = 5; // expected-note{{used in buffer access here}} } +namespace std { +inline namespace __1 { +template class unique_ptr { +public: + T &operator[](long long i)

[clang] [lldb] [Clang] Introduce OverflowBehaviorType for fine-grained overflow control (PR #148914)

2025-09-17 Thread Matheus Izvekov via cfe-commits
@@ -112,6 +112,25 @@ class LangOptionsBase { SOB_Trapping }; + // Used by __attribute__((overflow_behavior())) to describe overflow behavior + // on a per-type basis. + enum OverflowBehaviorKind { +// Default C standard behavior (type dependent). +OB_Unset, +

[clang] [clang][Sema] Avoid warnings when mixing diagnostic categories (NFC) (PR #159316)

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @brunodf-snps @mstorsjo Please synchronize to avoid duplicates Duplicate of #159338 https://github.com/llvm/llvm-project/pull/159316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-17 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar created https://github.com/llvm/llvm-project/pull/159423 Previously this only checked for OpBuilder usage, but it could also be invoked via pointer. Also change how call range is calculated to avoid false overlaps which limits rewriting builder calls inside argument

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Jacques Pienaar (jpienaar) Changes Previously this only checked for OpBuilder usage, but it could also be invoked via pointer. Also change how call range is calculated to avoid false overlaps which limits rewriting builder cal

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-17 Thread Jacques Pienaar via cfe-commits
https://github.com/jpienaar updated https://github.com/llvm/llvm-project/pull/159423 >From f23c42bea591a122ab366a749c4959e44b405d50 Mon Sep 17 00:00:00 2001 From: Jacques Pienaar Date: Wed, 17 Sep 2025 18:53:01 + Subject: [PATCH] [clang-tidy][mlir] Expand to cover pointer of builder Previo

[clang-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-17 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--===// +// +// 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] [NFC] Remove redundant conditions (PR #159349)

2025-09-17 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto approved this pull request. https://github.com/llvm/llvm-project/pull/159349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Clang][CMake] Use IRPGO instead of FE PGO for Cmake Caches (#155957)" (PR #159367)

2025-09-17 Thread Paschalis Mpeis via cfe-commits
https://github.com/paschalis-mpeis created https://github.com/llvm/llvm-project/pull/159367 This reverts commit 7fca1f841b4c226d50ab7bad64de5db225d4193b. >From 7e5b56b7447f771d0736220da5c4db1459424d9a Mon Sep 17 00:00:00 2001 From: Paschalis Mpeis Date: Wed, 17 Sep 2025 09:28:28 +0100 Subject:

[clang-tools-extra] [clang-tidy][mlir] Expand to cover pointer of builder (PR #159423)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Jacques Pienaar (jpienaar) Changes Previously this only checked for OpBuilder usage, but it could also be invoked via pointer. Also change how call range is calculated to avoid false overlaps which limits rewriting builder calls insi

[clang] [CIR] Upstream TypeInfo attribute (PR #159426)

2025-09-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/159426 This change adds support for TypeInfoAttr which is needed later for RTTI in exceptions Issue https://github.com/llvm/llvm-project/issues/154992 >From 120397488168606f961e05235c2c5fa8a85cd59a Mon Sep 17 00

[clang] [Headers][X86] Add constexpr support for some AVX[512] intrinsics. (PR #159231)

2025-09-17 Thread via cfe-commits
sskzakaria wrote: @RKSimon PTLA when you can, ty https://github.com/llvm/llvm-project/pull/159231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TypeInfo attribute (PR #159426)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for TypeInfoAttr which is needed later for RTTI in exceptions Issue https://github.com/llvm/llvm-project/issues/154992 --- Full diff: https://github.com/llvm/llvm-project/pull/

[clang] [CIR] Upstream TypeInfo attribute (PR #159426)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for TypeInfoAttr which is needed later for RTTI in exceptions Issue https://github.com/llvm/llvm-project/issues/154992 --- Full diff: https://github.com/llvm/llvm-project/pull/15

[clang] Fix Lambda Mangling in Namespace-Scope Variable Initializers. (PR #159115)

2025-09-17 Thread Zahira Ammarguellat via cfe-commits
@@ -47,7 +47,19 @@ int main() { // Make sure the following 3 are the same between the host and device compile. // Note that these are NOT the same value as each other, they differ by the // signature. - // CHECK: private unnamed_addr [[$ADDRSPACE]]constant [17 x i8] c"

[clang] [libcxx] [Clang] Allow __builtin_fma/fmaf/fmal to be used in a constant expression (PR #158048)

2025-09-17 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: > > The libc++ part LGTM. > > Any advice on the libcxx buildbot CI failures? The regex/locale failures on apple platforms are unrelated - most likely due to an OS update (if we don't fix it soon we'll XFAIL the tests). The android failures should be fixed in trunk I think, b

[clang] 6ad0f8e - [DTLTO][TEST] Make Clang driver tests even more robust (#159418)

2025-09-17 Thread via cfe-commits
Author: bd1976bris Date: 2025-09-17T20:16:38+01:00 New Revision: 6ad0f8e16b223707827efbf2cd0825b793b1db14 URL: https://github.com/llvm/llvm-project/commit/6ad0f8e16b223707827efbf2cd0825b793b1db14 DIFF: https://github.com/llvm/llvm-project/commit/6ad0f8e16b223707827efbf2cd0825b793b1db14.diff LO

[clang] [DTLTO][TEST] Make Clang driver tests even more robust (PR #159418)

2025-09-17 Thread via cfe-commits
bd1976bris wrote: Thanks @petrhosek :) https://github.com/llvm/llvm-project/pull/159418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DTLTO][TEST] Make Clang driver tests even more robust (PR #159418)

2025-09-17 Thread via cfe-commits
https://github.com/bd1976bris closed https://github.com/llvm/llvm-project/pull/159418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add gfx1251 subtarget (PR #159430)

2025-09-17 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec created https://github.com/llvm/llvm-project/pull/159430 None >From 0219b29bf4d22f56e23b10a250de16ebae58e71a Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Wed, 17 Sep 2025 12:16:46 -0700 Subject: [PATCH] [AMDGPU] Add gfx1251 subtarget --- clang/includ

  1   2   3   4   5   6   7   >