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

2025-09-17 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \ +// RUN: -aux-triple nvptx64-nvidia-cuda -fcuda-is-device \ +// RUN: -x cuda -emit-llvm %s -o - | FileCheck %s --check-prefix=DEVICE + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \ +// RUN: -aux-tripl

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

2025-09-17 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: Tagging @erichkeane @Sirraide https://github.com/llvm/llvm-project/pull/159316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable -gsplit-dwarf as it is unsupported at the moment on AIX (PR #158199)

2025-09-17 Thread Aditya Chaudhary via cfe-commits
https://github.com/adityankit ready_for_review https://github.com/llvm/llvm-project/pull/158199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DropUnnecessaryAssumes] Add pass for dropping assumes (PR #159403)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms Author: Nikita Popov (nikic) Changes This adds a new pass for dropping assumes that are unlikely to be useful for further optimization. It works by discarding any assumes whose affected values are one-use (whi

[clang] [llvm] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-09-17 Thread Erik Enikeev via cfe-commits
Varnike wrote: > Are there any smaller parts we can split away into their own reviews to > start moving it forward? Yes, I think it will be possible to divide the patch into several separate ones. However, they will depend on the patch with changes to intruction selection patterns (commit 9e

[clang] [llvm] [mlir] [AMDGPU] [ROCDL] Added Intrinsics for smed, umed, to support ISA instructions from ROCDL (PR #157748)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir @llvm/pr-subscribers-clang-codegen Author: Keshav Vinayak Jha (keshavvinayak01) Changes ## Description Added support for AMDGPU signed (med3) intrinsics. Implemented `smed3` and `umed3` ISA instructions from ROCDL with complete end-to-end support i

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

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes 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

[clang] b8efe1c - [clang][nfc] Fix tests to avoid writing output to unreachable location (#159138)

2025-09-17 Thread via cfe-commits
Author: Vy Nguyen Date: 2025-09-16T13:34:35-04:00 New Revision: b8efe1c64746e832bc3313ec2f6a23f09f2d2dd9 URL: https://github.com/llvm/llvm-project/commit/b8efe1c64746e832bc3313ec2f6a23f09f2d2dd9 DIFF: https://github.com/llvm/llvm-project/commit/b8efe1c64746e832bc3313ec2f6a23f09f2d2dd9.diff LOG

[clang] [clang][ARM] Include arm_acle.h in intrin.h on supported platforms (PR #144172)

2025-09-17 Thread Nick Sarnie via cfe-commits
sarnex wrote: No problem, thanks for the review! https://github.com/llvm/llvm-project/pull/144172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-llvm-ir Author: Weibo He (NewSigma) Changes Reverts llvm/llvm-project#155339 because of CI fail --- Patch is 155.29 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/159236.

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

2025-09-17 Thread Burhan Söğüt via cfe-commits
bursot wrote: > I added suggestions for two different patterns with the correct code. Please > check the same pattern, and feel free to put any pattern that it's confusing > so we can discuss it Please could you look the last commits. Is those true. https://github.com/llvm/llvm-project/pull/1

[clang] [X86] Add F16C f16 -> f32 constexpr support (PR #158142)

2025-09-17 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @abhinavp5 Make sure you don't update again or the auto-merge will fail https://github.com/llvm/llvm-project/pull/158142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an incorrect assertion in `Sema::CheckAddressOfOperand` (PR #159314)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes Not all non-type template arguments are modeled as NonTypeTemplateParmDecl. Fixes #151531 --- Full diff: https://github.com/llvm/llvm-project/pull/159314.diff 3 Files Affected: - (modified) clang/docs/

[clang] [PAC][clang] Add new features to pauthtest ABI (PR #113150)

2025-09-17 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Would be glad to see your feedback considering the info from my comments above https://github.com/llvm/llvm-project/pull/113150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] Adding support for iterator in motion clauses. (PR #159112)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (ShashwathiNavada) Changes As described in section 2.14.6 of openmp spec, the patch implements support for iterator in motion clauses. --- Patch is 26.05 KiB, truncated to 20.00 KiB below, full version: https://github.com/l

[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
@@ -11599,6 +11599,89 @@ static bool handleVectorElementCast(EvalInfo &Info, const FPOptions FPO, return false; } +enum class PackKind { + SSWB, + USWB, + SSDW, + USDW +}; // 16→8 signed/unsigned; 32→16 signed/unsigned + +static bool evalPackBuiltin(const CallExpr *E, E

[clang] [clang][ExprConst] Assert that EvaluateAsInitializer has non-null VD (PR #159274)

2025-09-17 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/159274 Both the expression (the initializer) as well as the VarDecl can't be null here. Assert that. >From ed0797da5f059b7f6e560a8f07c455937afd9721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date:

[clang] [libcxx] [Clang] Normalize constraints before checking for satisfaction (PR #141776)

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -543,30 +661,328 @@ static ExprResult calculateConstraintSatisfaction( return ExprError(); } - assert(EvalResult.Val.isInt() && - "evaluating bool expression didn't produce int"); - Satisfaction.IsSatisfied = EvalResult.Val.getInt().getBoolValue(); - if (!S

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

2025-09-17 Thread via cfe-commits
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvH

[clang] [clang] Delay normalization of `-fmodules-cache-path` (PR #150123)

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

[clang] [clang][Parse] use consistent Scope::ScopeFlags enum values [NFC] (PR #159275)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/159275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-17 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/159277 >From c73c23f8aa29bcd6664d5bbc66b8f451c542892b Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Wed, 17 Sep 2025 00:04:24 -0700 Subject: [PATCH] [clang-format] Fix for BreakTemplateDeclarations and

[clang] [Clang][attr] Add 'cfi_salt' attribute (PR #141846)

2025-09-17 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Maybe nice to call it kcfi_sault? -fsanitize=kcfi is completely different from -fsanitize=cfi, so it would be consistent to keep the convention in attributes as well. https://github.com/llvm/llvm-project/pull/141846 ___ cfe-commits

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

2025-09-17 Thread Richard Smith via cfe-commits
zygoloid wrote: Do we also have test coverage for mangling the names of lambdas that appear in inline variables and variable templates? Those are the cases where it's critical to get this right in plain C++ without language extensions. Also, do we have test coverage for the case where multiple

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

2025-09-17 Thread Madhur Amilkanthwar via cfe-commits
https://github.com/madhur13490 updated https://github.com/llvm/llvm-project/pull/142686 >From e2f53441f1a2d35af7c0d6d177afea79c7af2c47 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Thu, 22 May 2025 13:50:38 + Subject: [PATCH 01/11] add -floop-fuse to clang and flang --- clang/include

[clang] 1b1b83f - [CIR][NFC] Remove Covered MissingFeatures flags for Complex (#158425)

2025-09-17 Thread via cfe-commits
Author: Amr Hesham Date: 2025-09-14T11:29:00+02:00 New Revision: 1b1b83ffacc56e0c6344be25a7238f509fd705e6 URL: https://github.com/llvm/llvm-project/commit/1b1b83ffacc56e0c6344be25a7238f509fd705e6 DIFF: https://github.com/llvm/llvm-project/commit/1b1b83ffacc56e0c6344be25a7238f509fd705e6.diff LO

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

2025-09-17 Thread via cfe-commits
https://github.com/bd1976bris edited 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] [X86] Allow AVX512 rotate intrinsics to be used in constexpr (PR #157652)

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

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

2025-09-17 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \ +// RUN: -aux-triple nvptx64-nvidia-cuda -fcuda-is-device \ +// RUN: -x cuda -emit-llvm %s -o - | FileCheck %s --check-prefix=DEVICE + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \ +// RUN: -aux-tripl

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

2025-09-17 Thread via cfe-commits
https://github.com/bd1976bris updated https://github.com/llvm/llvm-project/pull/159151 >From 42b3a5d533f3b6855949b9b44439a441943862ca Mon Sep 17 00:00:00 2001 From: Dunbobbin Date: Tue, 16 Sep 2025 19:34:48 +0100 Subject: [PATCH 1/2] [DTLTO][TEST] Make Clang driver tests more robust The Clang

[clang] [llvm] [PowerPC] Take ABI into account for data layout (PR #149725)

2025-09-17 Thread Jens Reidel via cfe-commits
Gelbpunkt wrote: Gentle ping, I really hope this PR isn't forgotten about :) https://github.com/llvm/llvm-project/pull/149725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-17 Thread Amr Hesham via cfe-commits
Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvHQ=?= , Burhan =?utf-8?b?U8O2xJ/DvH

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

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alejandro Álvarez Ayllón (alejandro-alvarez-sonarsource) Changes - `ArrayBoundChecker` now directly models index accesses on `ConstantArrayType`, enabling more detection of out-of-bounds (OOB) accesses for arrays with known constant sizes

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

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Ingo Müller (ingomueller-net) Changes Reverts llvm/llvm-project#131804. This breaks a build bot; see discussion in the original PR. I could reproduce this problem locally. The problem is that the original PR makes use of `registerCu

[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 have tried to add the missing dependency as follows: ```patch diff --git a/clang-tools-extra/clang-tidy/CMakeLists.txt b/clang-tools-extra/clang-tidy/CMakeLists.txt index 153356245cfd..d3bbe0176688 100644 --- a/clang-tools-extra/clang-tidy/CMakeLists.txt +++ b/clang-too

[clang] [DTLTO][TEST] Get the DTLTO Clang driver tests failing on some buildbots to pass (PR #159158)

2025-09-17 Thread via cfe-commits
https://github.com/bd1976bris created https://github.com/llvm/llvm-project/pull/159158 Make the test regexes more permissive to fix buildbot failures caused by the merge of PR https://github.com/llvm/llvm-project/pull/159129. This is the same fix as applied in: https://github.com/llvm/llvm-pro

[clang] [clang][ARM] Include arm_acle.h in intrin.h on supported platforms (PR #144172)

2025-09-17 Thread Nick Sarnie via cfe-commits
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "") BUILTIN(__builtin_arm_sev, "v", "") BUILTIN(__builtin_arm_sevl, "v", "") BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "") -TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "") -TARGET_HEADER_BUILTIN(__wfe,

[clang-tools-extra] [clang-tools-extra][docs] Add "Potentially Breaking Changes" section to ReleaseNotes (PR #158434)

2025-09-17 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/158434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix false positive -Wshadow with structured binding captures (PR #157667)

2025-09-17 Thread Ivan Murashko via cfe-commits
ivanmurashko wrote: > LGTM if PR description is updated. Ah, I forgot to update the PR description, that was just fixed https://github.com/llvm/llvm-project/pull/157667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang-tools-extra] [clang-tidy][NFC] Enable `readability-container-contains` check in clang-tidy config and apply fix-its (PR #157123)

2025-09-17 Thread via cfe-commits
flovent wrote: > Do you wish to have this merged or wait for your commit approval (it can take > 2-3week if unlucky)? I think it's not necessary to wait, please help me merge it, thanks! https://github.com/llvm/llvm-project/pull/157123 ___ cfe-commit

[clang] 20c08f3 - [Clang][CodeGen]NFC] Modernize loops in EmitCtorPrologue (#155668)

2025-09-17 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-09-09T09:56:24-07:00 New Revision: 20c08f36d7d39c97a4979d9a9fd1a5b7fb53e268 URL: https://github.com/llvm/llvm-project/commit/20c08f36d7d39c97a4979d9a9fd1a5b7fb53e268 DIFF: https://github.com/llvm/llvm-project/commit/20c08f36d7d39c97a4979d9a9fd1a5b7fb53e268.diff L

[clang] [AST] Fix an assertion failure in TypeName::getFullyQualifiedName (PR #159312)

2025-09-17 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks Ilya! https://github.com/llvm/llvm-project/pull/159312 ___ 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
@@ -29,3 +29,9 @@ __attribute__ ((__format_arg__(2))) // expected-error {{'__format_arg__' attribu void test (int, ...); void __attribute__ ((alloc_size (2, 3))) *test2(int, ...); // expected-error {{'alloc_size' attribute parameter 1 is out of bounds}} + +void gh159080_a(vo

[clang] [llvm] Implements isnan() HLSL intrinsic for DXIL and SPIR-V targets. (PR #157733)

2025-09-17 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/157733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-17 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/159277 >From 7eb6b33350e4887fca8ca882ab1a46fe811017b8 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Wed, 17 Sep 2025 00:04:24 -0700 Subject: [PATCH] [clang-format] Fix for BreakTemplateDeclarations and

[clang] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 - Parsing and Sema support for groupprivate (PR #158134)

2025-09-17 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/158134 >From a9dbb90836fb5f99ce282445a893a10bfaa74903 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Thu, 11 Sep 2025 13:49:20 -0500 Subject: [PATCH 1/3] Parsing and Sema support for groupprivate

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

2025-09-17 Thread via cfe-commits
@@ -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 to 0 + +.. option:: IgnoredContainers + +Semicolon-separated list

[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 -*-===// topperc wrote: Limit line to 80 columns https://github.com/llvm/llvm-project/pull/159246 ___ cfe-commits mailing l

[clang] [llvm] [mlir] [x86][AVX-VNNI] Fix VPDPBXXD Argument Type (PR #159222)

2025-09-17 Thread Thurston Dang via cfe-commits
https://github.com/thurstond commented: I approve of the MemorySanitizer-related portion of this pull request. (The rest of the change looks reasonable to me but I'll defer to the code owners / experts.) Thanks for adding the intrinsic cases and updating the test files :-). https://github.com/

[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
https://github.com/lei137 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/154715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-17 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: @philnik777 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

[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] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 - Parsing and Sema support for groupprivate (PR #158134)

2025-09-17 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/158134 >From a9dbb90836fb5f99ce282445a893a10bfaa74903 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Thu, 11 Sep 2025 13:49:20 -0500 Subject: [PATCH 1/3] Parsing and Sema support for groupprivate

[clang] [clang][dataflow] Handle when `this` refers to a different location (PR #146900)

2025-09-17 Thread Jan Voung via cfe-commits
jvoung wrote: Hi, @martinboehme or other reviewers -- is the response in the discourse post from tbaeder (and link to https://github.com/llvm/llvm-project/pull/106552#issuecomment-2320298264 ) enough for the concern about getting the rule correct? Thanks! https://github.com/llvm/llvm-project/

[clang] [llvm] Add parentheses to clarify operator ordering in asserts. NFC. (PR #159333)

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

[clang] 6db244a - Add parentheses to clarify operator ordering in asserts. NFC. (#159333)

2025-09-17 Thread via cfe-commits
Author: Martin Storsjö Date: 2025-09-17T20:46:44+03:00 New Revision: 6db244a58626e885ba010b3d6813191485e18e90 URL: https://github.com/llvm/llvm-project/commit/6db244a58626e885ba010b3d6813191485e18e90 DIFF: https://github.com/llvm/llvm-project/commit/6db244a58626e885ba010b3d6813191485e18e90.diff

[clang] [flang] [clang][OpenMP] Diagnose invalid allocator in `#pragma omp allocate`; avoid null deref (PR #158146)

2025-09-17 Thread Zahira Ammarguellat via cfe-commits
@@ -0,0 +1,22 @@ +! RUN: %flang_fc1 -fopenmp -emit-hlfir %s -o - | FileCheck %s + +program p + type y3; integer, allocatable :: x; end type + type(y3) :: v + integer :: s, n, i + s = 1; n = 10 + allocate(v%x); v%x = 0 +!$omp parallel + if (.not. allocated(v%x)) print *, '101

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-17 Thread Jongmyeong Choi via cfe-commits
@@ -5,3 +5,26 @@ void g(void) { __attribute__((cleanup(f))) void *g; } +// Test for cleanup in for-loop initialization (PR #154624) +// RUN: %clang_cc1 -std=c89 -emit-llvm %s -o - | FileCheck %s --check-prefix=C89 +// RUN: %clang_cc1 -std=c99 -emit-llvm %s -o - | FileCheck

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

2025-09-17 Thread via cfe-commits
Author: Ingo Müller Date: 2025-09-17T19:00:34+02:00 New Revision: 6fdecaa7709a395c3ad5f47928f0290fbd0446c9 URL: https://github.com/llvm/llvm-project/commit/6fdecaa7709a395c3ad5f47928f0290fbd0446c9 DIFF: https://github.com/llvm/llvm-project/commit/6fdecaa7709a395c3ad5f47928f0290fbd0446c9.diff L

[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
@@ -194,11 +194,17 @@ int main(int, char**) { ASSERT_NOT_CONSTEXPR_CXX23(std::fminf(1.0f, 0.0f) == 0.0f); ASSERT_NOT_CONSTEXPR_CXX23(std::fminl(1.0L, 0.0L) == 0.0L); +#if !__has_constexpr_builtin(__builtin_fma) ASSERT_NOT_CONSTEXPR_CXX23(std::fma(1.0f, 1.0f, 1.0f) == 2.

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

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

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

2025-09-17 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-17T16:07:12+02:00 New Revision: d6315a260baddd5454a02878a78f0e9ae41860d9 URL: https://github.com/llvm/llvm-project/commit/d6315a260baddd5454a02878a78f0e9ae41860d9 DIFF: https://github.com/llvm/llvm-project/commit/d6315a260baddd5454a02878a78f0e9ae41860d9.diff L

[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
paschalis-mpeis wrote: Hey @boomanaiden154, PR #155957 breaks our buildbot: [bolt-aarch64-ubuntu-clang](https://lab.llvm.org/staging/#/builders/126). Example build: [#2628](https://lab.llvm.org/staging/#/builders/126/builds/2628): > ld.lld: > /home/buildbot/workspace/bolt-aarch64-ubuntu-clan

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

2025-09-17 Thread Corentin Jabot via cfe-commits
@@ -1778,10 +1778,20 @@ def ext_bit_int : Extension< } // end of Parse Issue category. let CategoryName = "Modules Issue" in { -def err_unexpected_module_decl : Error< - "module declaration can only appear at the top level">; +def err_invalid_module_or_import_directive : Erro

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

2025-09-17 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I see builds failing in the link, per the report from @llvm-ci above: > https://lab.llvm.org/buildbot/#/builders/145/builds/9815 > > ``` > FAILED: lib/libclangTidy.so.22.0git > : && /home/buildbots/llvm-external-buildbots/clang.19.1.7/bin/clang++ > --gcc-toolchain=/gcc-to

[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'll also revert #159289, which adapts the bazel build files to the original change. I would be grateful if that PR were included into a possible new version of the reverted PR or re-applied after that new PR is merged. https://github.com/llvm/llvm-project/pull/159380 __

[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=C3=A9lix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -219,6 +219,10 @@ Changes in existing checks ` check by adding detection for variables introduced by structured bindings. +- Improved :doc:`bugprone-invalid-enum-default-initialization + ` with new +

[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: @@ -88,12 +90,22 @@ class FindEnumMember : public TypeVisitor { InvalidEnumDefaultInitializationCheck::InvalidEnumDefaultInitializationCheck( StringRef Name, ClangTidyContext *Context) -: ClangTidyCheck(Na

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

2025-09-17 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 requested changes to this pull request. What exactly is the motivation for this? https://github.com/llvm/llvm-project/pull/159367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[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 edited https://github.com/llvm/llvm-project/pull/159371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Use TableGen to generate LLVM lowering patterns (PR #159390)

2025-09-17 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/159390 Most lowering patterns have exactly the same class declaration with different names and different `matchAndRewrite` implementations, yet their declaration occupies near 1000 lines of code in `LowerToLLVM.h`, ma

[clang] [CIR][NFC] Use TableGen to generate LLVM lowering patterns (PR #159390)

2025-09-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sirui Mu (Lancern) Changes Most lowering patterns have exactly the same class declaration with different names and different `matchAndRewrite` implementations, yet their declaration occupies near 1000 lines of code in `LowerToLLVM.h`, mak

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

2025-09-17 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/159392 Fixed #156295, #122480 The original ast matcher based member initializer detection is bug prone. In this PR we introduce a new recusively detection which can be easier extended to detect whether we can move

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

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. https://github.com/llvm/llvm-project/pull/159371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Fix an assertion failure in TypeName::getFullyQualifiedName (PR #159312)

2025-09-17 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov created https://github.com/llvm/llvm-project/pull/159312 This popped up during our internal integrates of upstream changes. It started happening after ba9d1c41c41d568a798e0a8c38a89d294647c28d, which started using `TemplateSpecializationType` in this place and t

[clang] 2ef58b6 - [DTLTO][TEST] Make Clang driver tests more robust (#159151)

2025-09-17 Thread via cfe-commits
Author: bd1976bris Date: 2025-09-17T08:54:19+01:00 New Revision: 2ef58b603883c724805fc209ca753987efce3957 URL: https://github.com/llvm/llvm-project/commit/2ef58b603883c724805fc209ca753987efce3957 DIFF: https://github.com/llvm/llvm-project/commit/2ef58b603883c724805fc209ca753987efce3957.diff LO

[clang] Add IWYU export pragma to Type.h (PR #159154)

2025-09-17 Thread Kim Gräsman via cfe-commits
kimgr wrote: @mizvekov Does this make sense to you? Hoping I interpreted your intent correctly. https://github.com/llvm/llvm-project/pull/159154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-09-17 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I spoke offline with @tahonermann last week and gave another week for review. I'm going to proceed with the merge. Please feel free to do post commit review! https://github.com/llvm/llvm-project/pull/139566 ___ cfe-commits mailing lis

[clang] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-17 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/159277 >From e982d802000131cd76a1b581142d5c13abfdd349 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Wed, 17 Sep 2025 00:04:24 -0700 Subject: [PATCH] [clang-format] Fix for BreakTemplateDeclarations and

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

2025-09-17 Thread Victor Chernyakin via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: @@ -88,12 +90,22 @@ class FindEnumMember : public TypeVisitor { InvalidEnumDefaultInitializationCheck::InvalidEnumDefaultInitializationCheck( StringRef Name, ClangTidyCont

[clang] [flang] [llvm] [clang] [OpenMP] New OpenMP 6.0 - Parsing and Sema support for groupprivate (PR #158134)

2025-09-17 Thread via cfe-commits
https://github.com/Ritanya-B-Bharadwaj updated https://github.com/llvm/llvm-project/pull/158134 >From a9dbb90836fb5f99ce282445a893a10bfaa74903 Mon Sep 17 00:00:00 2001 From: Ritanya B Bharadwaj Date: Thu, 11 Sep 2025 13:49:20 -0500 Subject: [PATCH 1/3] Parsing and Sema support for groupprivate

[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
@@ -1,4 +1,4 @@ -// RUN: %check_clang_tidy -std=c++14-or-later %s modernize-return-braced-init-list %t +// RUN: %check_clang_tidy %s modernize-return-braced-init-list %t localspook wrote: ```suggestion // RUN: %check_clang_tidy -std=c++11-or-later %s modernize-

[clang] [llvm] [mlir] [MLIR][Standalone] test Standalone against installed distribution (PR #157944)

2025-09-17 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/157944 >From 514f5574c5e5f2d1db63d3e55105be16a509de82 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Thu, 11 Sep 2025 07:53:48 -0700 Subject: [PATCH 01/17] [CI] Update monolithic-linux.sh --- .ci/monolithi

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

2025-09-17 Thread Anchu Rajendran S 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] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S 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] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S 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] [flang] [flang][Driver] Enables lto-partitions and fat-lto-object. (PR #158125)

2025-09-17 Thread Anchu Rajendran S via cfe-commits
@@ -0,0 +1,19 @@ +! UNSUPPORTED: system-windows +! check flto-partitions is passed to lld, fc1 +! RUN: %flang -### -fuse-ld=lld -flto=full -flto-partitions=16 %s 2>&1 | FileCheck %s --check-prefixes=LLD-PART,FC1-PART + +! FC1-PART: "-fc1" +! FC1-PART-SAME: "-flto=full" +! FC1-PAR

[clang] [llvm] [mlir] [MLIR][Standalone] test Standalone against installed distribution (PR #157944)

2025-09-17 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/157944 >From 514f5574c5e5f2d1db63d3e55105be16a509de82 Mon Sep 17 00:00:00 2001 From: Maksim Levental Date: Thu, 11 Sep 2025 07:53:48 -0700 Subject: [PATCH 01/17] [CI] Update monolithic-linux.sh --- .ci/monolithi

[clang] [clang] check constant template parameters in dependent contexts (PR #159463)

2025-09-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I think this makes sense, it seems to do as described at least. I'm not sure WHAT, but it feels like we could/should do a better job with some demonstrative tests though. https://github.com/llvm/llvm-project/pull/159463 ___

[clang] Fix __builtin_object_size calculation for references of unknown origin in C++23 (PR #157778)

2025-09-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: In any context where the standard requires constant evaluation, we have to return false, probably. (This corresponds, roughly, to Info.InConstantContext. I don't think we have a bit that precisely corresponds, though.) We probably do want to fold in tryEvaluateObjectSize

[libclc] [libclc] Remove __attribute__((always_inline)) (PR #158791)

2025-09-17 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. https://github.com/llvm/llvm-project/pull/158791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check constant template parameters in dependent contexts (PR #159463)

2025-09-17 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > I think this makes sense, it seems to do as described at least. I'm not sure > WHAT, but it feels like we could/should do a better job with some > demonstrative tests though. I am open to suggestions, I can't think of anything which would demonstrate this better or show some

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

2025-09-17 Thread kadir çetinkaya via cfe-commits
@@ -0,0 +1,66 @@ +//===--- FeatureModulesRegistryTests.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: Apa

[clang] [HLSL][DirectX] Fix resource lowering when using structs with `select` (PR #158361)

2025-09-17 Thread Sarah Spall via cfe-commits
https://github.com/spall commented: Can you add an array test? https://github.com/llvm/llvm-project/pull/158361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e7429c2 - Remove extra include - fixes bazel build, introduced by 55bef46 (#158037)

2025-09-17 Thread via cfe-commits
Author: Karlo Basioli Date: 2025-09-11T11:55:59+01:00 New Revision: e7429c2e10b1e30a0b1a18cc7290ab95a7e83b6a URL: https://github.com/llvm/llvm-project/commit/e7429c2e10b1e30a0b1a18cc7290ab95a7e83b6a DIFF: https://github.com/llvm/llvm-project/commit/e7429c2e10b1e30a0b1a18cc7290ab95a7e83b6a.diff

[clang] [clang] Add missing readonly/readnone annotations (PR #158424)

2025-09-17 Thread Eli Friedman via cfe-commits
@@ -3011,6 +3016,37 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, } assert(ArgNo == FI.arg_size()); + ArgNo = 0; + if (AddedPotentialArgAccess && MemAttrForPtrArgs) { +llvm::SmallSet ArgsToSkip; +if (IRFunctionArgs.hasSRetArg()) { + ArgsToSk

[clang] [llvm] [Driver][AMDGPU][HIP][SPIRV] Disable optimizations for AMDGCN SPIR-V (PR #154765)

2025-09-17 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/154765 >From 3e0abe10c53e08cc1ebf16662d8d58cd7245f70f Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 15 May 2025 23:27:42 +0100 Subject: [PATCH 1/2] Add pass which forwards unimplemented math builtins / libcalls

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

2025-09-17 Thread via cfe-commits
@@ -3680,6 +3681,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { Results.push_back(Tmp1); break; } + case ISD::STACKADDRESS: case ISD::STACKSAVE: // Expand to CopyFromReg if the target set // StackPointerRegisterToSaveRestore.

[clang] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-17 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav updated https://github.com/llvm/llvm-project/pull/159277 >From 44820a90771957eea02fb88a65dfe5d2e348f22d Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Wed, 17 Sep 2025 00:04:24 -0700 Subject: [PATCH] [clang-format] Fix for BreakTemplateDeclarations and

[clang] 30f9fb7 - [clang][ExprConst][NFC] Move EvalMode enum to State (#157988)

2025-09-17 Thread via cfe-commits
Author: Timm Baeder Date: 2025-09-11T11:21:00+02:00 New Revision: 30f9fb7ca896a64701fda35f1a6629be912e086a URL: https://github.com/llvm/llvm-project/commit/30f9fb7ca896a64701fda35f1a6629be912e086a DIFF: https://github.com/llvm/llvm-project/commit/30f9fb7ca896a64701fda35f1a6629be912e086a.diff L

<    1   2   3   4   5   6   7   >