[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [llvm] [AMDGPU] Add support for `v_sin_bf16` on gfx1250 (PR #149241)

2025-07-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/2

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Vassil Vassilev via cfe-commits
@@ -300,16 +640,17 @@ llvm::Expected Interpreter::ExtractValueFromExpr(Expr *E) { using namespace clang; // Temporary rvalue struct that need special care. -REPL_EXTERNAL_VISIBILITY void * +REPL_EXTERNAL_VISIBILITY extern "C" void * vgvassilev wrote: I resol

[clang] [clang][bytecode] Use bytecode interpreter in isPotentialConstantExprU… (PR #149462)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/149462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/149504 ___ 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: modernize-use-scoped-lock (PR #126434)

2025-07-18 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,311 @@ +//===--- UseScopedLockCheck.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] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-07-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,155 @@ +== +Clang-Change-Namespace +== + +.. contents:: + +.. toctree:: + :maxdepth: 1 + +:program:`clang-change-namespace` can be used to change the surrounding +namespaces of class/function definitions. + +Classes/functions in

[clang-tools-extra] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-07-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,155 @@ +== +Clang-Change-Namespace +== + +.. contents:: + +.. toctree:: + :maxdepth: 1 + +:program:`clang-change-namespace` can be used to change the surrounding +namespaces of class/function definitions. + +Classes/functions in

[clang-tools-extra] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-07-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,155 @@ +== +Clang-Change-Namespace AaronBallman wrote: ```suggestion clang-change-namespace ``` https://github.com/llvm/llvm-project/pull/148277 ___ cfe-commits mailing list cfe-commits@l

[clang-tools-extra] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-07-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/148277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-07-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on the documentation for this, it's really appreciated! I had a few questions, but in general this is looking good. https://github.com/llvm/llvm-project/pull/148277 ___ cfe-commits maili

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea deleted https://github.com/llvm/llvm-project/pull/149067 ___ 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: modernize-use-scoped-lock (PR #126434)

2025-07-18 Thread via cfe-commits
@@ -0,0 +1,311 @@ +//===--- UseScopedLockCheck.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] [KeyInstr] Enable -gkey-instructions by default if optimisations are enabled (PR #149509)

2025-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Orlando Cazalet-Hyams (OCHyams) Changes That's enabling Clang's -gkey-instructions, cc1's -gkey-instructions remains off by default. Key Instructions improves the optimized-code debug-stepping experience in debuggers that use DWARF's `is

[clang] [KeyInstr] Enable -gkey-instructions by default if optimisations are enabled (PR #149509)

2025-07-18 Thread Orlando Cazalet-Hyams via cfe-commits
https://github.com/OCHyams created https://github.com/llvm/llvm-project/pull/149509 That's enabling Clang's -gkey-instructions, cc1's -gkey-instructions remains off by default. Key Instructions improves the optimized-code debug-stepping experience in debuggers that use DWARF's `is_stmt` line

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \ +// RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s +// UNSUPPORTED: system-aix +// CHECK-DRIVER: i = 10 +// RUN: cat %s | clang-repl -Xcc

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Aaron Ballman via cfe-commits
@@ -3,9 +3,80 @@ // RUN: cat %s | clang-repl -Xcc -xc | FileCheck %s // RUN: cat %s | clang-repl -Xcc -std=c++11 | FileCheck %s -// Fails with `Symbols not found: [ __clang_Interpreter_SetValueNoAlloc ]`. // UNSUPPORTED: hwasan + +char c = 'a'; c +// CHECK: (char) 'a' + c

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/148701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/148701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Alexandros Lamprineas via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Alexandros Lamprineas via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Alexandros Lamprineas via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
@@ -4007,7 +4007,8 @@ SDValue AMDGPUTargetLowering::performIntrinsicWOChainCombine( case Intrinsic::amdgcn_rcp_legacy: case Intrinsic::amdgcn_rsq_legacy: case Intrinsic::amdgcn_rsq_clamp: - case Intrinsic::amdgcn_tanh: { + case Intrinsic::amdgcn_tanh: + case Intrinsic

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/149450 >From e35cd5506ed733fcb62eab4c28ab4e9f5966216f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 18 Jul 2025 00:26:15 -0400 Subject: [PATCH] [AMDGPU] Add support for `v_prng_b32` on gfx1250 Co-authored-by:

[clang] [llvm] [AMDGPU] Add support for `v_prng_b32` on gfx1250 (PR #149450)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/149450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AMDGPU] Add the missing builtin `__builtin_amdgcn_sqrt_bf16` (PR #149447)

2025-07-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/149447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 602d43c - [Clang][AMDGPU] Add the missing builtin `__builtin_amdgcn_sqrt_bf16` (#149447)

2025-07-18 Thread via cfe-commits
Author: Shilei Tian Date: 2025-07-18T08:43:08-04:00 New Revision: 602d43cfd1fe7cc47146b6327d8df6e5e0ec47ae URL: https://github.com/llvm/llvm-project/commit/602d43cfd1fe7cc47146b6327d8df6e5e0ec47ae DIFF: https://github.com/llvm/llvm-project/commit/602d43cfd1fe7cc47146b6327d8df6e5e0ec47ae.diff L

[clang] [Clang][AMDGPU] Add the missing builtin `__builtin_amdgcn_sqrt_bf16` (PR #149447)

2025-07-18 Thread Shilei Tian via cfe-commits
shiltian wrote: ### Merge activity * **Jul 18, 12:42 PM UTC**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/149447). https://github.com/llvm/llvm-project/pull/149447 __

[clang] [flang] [llvm] [openmp] [Flang][OpenMP] Move builtin .mod generation into runtimes (PR #137828)

2025-07-18 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur updated https://github.com/llvm/llvm-project/pull/137828 >From 839198d61f9937b5504d5e036c67266b4b84da8e Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 17 Jul 2025 14:09:57 +0200 Subject: [PATCH 1/8] [Flang][Flang-RT][OpenMP] Move builtin .mod generation i

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/149504 >From f34d340f59e742f6e75397043b0bed8faed7d94a Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 18 Jul 2025 10:27:44 +0200 Subject: [PATCH 1/2] [Clang] Do not assume a perfect match is a better match t

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
@@ -1535,4 +1535,91 @@ bool SemaARM::areLaxCompatibleSveTypes(QualType FirstType, IsLaxCompatible(SecondType, FirstType); } +enum FirstParam { Unsupported, Duplicate, Unknown }; +enum SecondParam { None, CPU, Tune }; +enum ThirdParam { Target, TargetClones, TargetVer

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/149067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][FMV] Refactor sema checking of target_version/clones attributes. (PR #149067)

2025-07-18 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: LGTM, just lots of style comments. Most of them probably apply to the original code too so feel free to address them in a follow up if you prefer. https://github.com/llvm/llvm-project/pull/149067 ___ cfe-com

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/Sema/Overload.h clang/lib/Sema/

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Corentin Jabot (cor3ntin) Changes This fixes a regression introduced by the "perfect match" overload resolution mechanism introduced in 8c5a307. [This does regress the performance noticeably (-0.7% for a stage 2 build)](https://llvm-comp

[clang] [Clang] Do not assume a perfect match is a better match than a non-template non-perfect match (PR #149504)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/149504 This fixes a regression introduced by the "perfect match" overload resolution mechanism introduced in 8c5a307. [This does regress the performance noticeably (-0.7% for a stage 2 build)](https://llvm-compile-t

[clang-tools-extra] [clangd] Add tweak to override pure virtuals (PR #139348)

2025-07-18 Thread Marco Maia via cfe-commits
marcogmaia wrote: Ping https://github.com/llvm/llvm-project/pull/139348 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Unary Inc/Dec for ComplexType (PR #149162)

2025-07-18 Thread Henrich Lauko via cfe-commits
@@ -56,6 +56,26 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitParenExpr(ParenExpr *e); mlir::Value VisitSubstNonTypeTemplateParmExpr(SubstNonTypeTemplateParmExpr *e); + + mlir::Value VisitPrePostIncDec(const UnaryOperator *e, bool isInc, +

[clang] [llvm] [IRBuilder] Improve setting of DebugLoc in SetInsertPoint. (PR #147091)

2025-07-18 Thread Abid Qadeer via cfe-commits
abidh wrote: > I'm not sure I agree with the principle of this change; the current behaviour > of not getting a DebugLoc when setting the insertion point to the end of a > BasicBlock is long-standing and this change might have unexpected knock-on > effects (although if we do make this change,

[clang] [HIP][Clang][Driver] Move BC preference logic into ROCm detection (PR #149294)

2025-07-18 Thread Matt Arsenault via cfe-commits
@@ -77,6 +79,82 @@ class RocmInstallationDetector { SPACKReleaseStr(SPACKReleaseStr.str()) {} }; + struct CommonBitcodeLibsPreferences { +CommonBitcodeLibsPreferences(const Driver &D, + const llvm::opt::ArgList &DriverArgs, +

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-18 Thread Tomohiro Kashiwada via cfe-commits
@@ -107,3 +110,294 @@ void Cygwin::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include"); addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include/w32api"); } + +static bool getStaticPIE(con

[clang] [clang][bytecode] Use bytecode interpreter in isPotentialConstantExprU… (PR #149462)

2025-07-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/149462 >From b944301437294502a1b5dc371ae60fe32437a6c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 18 Jul 2025 08:24:49 +0200 Subject: [PATCH] [clang][bytecode] Use bytecode interprete in i

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -690,6 +1391,23 @@ SYMBOL(atol, None, ) SYMBOL(atoll, std::, ) SYMBOL(atoll, None, ) SYMBOL(atoll, None, ) +SYMBOL(atomic, std::, ) +SYMBOL(atomic, std::, ) +SYMBOL(atomic_bool, std::, ) +SYMBOL(atomic_bool, std::, ) +SYMBOL(atomic_bool, std::, ) kadircet wr

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -232,4 +247,4 @@ def GetSymbols(parse_pages): finally: pool.terminate() pool.join() -return sorted(symbols) +return sorted(set(symbols)) kadircet wrote: each symbol should already have a unique name, why do we need this conversio

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
@@ -2525,6 +3589,10 @@ SYMBOL(remainderf, None, ) SYMBOL(remainderl, std::, ) SYMBOL(remainderl, None, ) SYMBOL(remainderl, None, ) +SYMBOL(remove, std::, ) +SYMBOL(remove, std::, ) kadircet wrote: so we mainly had two reasons for multiple headers per symbol:

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks a lot for working on this, i think this is a great improvement in general! https://github.com/llvm/llvm-project/pull/147720 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [include-cleaner] Support multi-header symbols in mapping generator (PR #147720)

2025-07-18 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/147720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver] Revise Cygwin ToolChain to call linker directly (PR #147960)

2025-07-18 Thread Tomohiro Kashiwada via cfe-commits
kikairoya wrote: > > > $ clang++ -fuse-ld=lld hello.cc > > > > > > Do you have patched to LLD locally? This should fail with `unable to find > > library -lkernel32`. > > this new driver should be passing all the necessary `-L` paths to the linker, > including `/usr/lib/w32api` Ah, yes, I wa

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Vassil Vassilev via cfe-commits
@@ -3,9 +3,80 @@ // RUN: cat %s | clang-repl -Xcc -xc | FileCheck %s // RUN: cat %s | clang-repl -Xcc -std=c++11 | FileCheck %s -// Fails with `Symbols not found: [ __clang_Interpreter_SetValueNoAlloc ]`. // UNSUPPORTED: hwasan + +char c = 'a'; c +// CHECK: (char) 'a' + c

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-18 Thread Andrey Karlov via cfe-commits
https://github.com/negativ edited https://github.com/llvm/llvm-project/pull/146355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Set `dead_on_return` when passing arguments indirectly (PR #148159)

2025-07-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/148159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Remove WIDEKL feature from Pantherlake and Clearwaterforest (PR #148184)

2025-07-18 Thread Phoebe Wang via cfe-commits
@@ -176,10 +176,10 @@ constexpr FeatureBitset FeaturesArrowlakeS = FeaturesArrowlake | FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 | FeatureSM4; constexpr FeatureBitset FeaturesPantherlake = -FeaturesArrowlakeS | FeaturePREFETCHI; +FeaturesArrowlakeS ^ Feat

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Vassil Vassilev via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \ +// RUN:'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s +// UNSUPPORTED: system-aix +// CHECK-DRIVER: i = 10 +// RUN: cat %s | clang-repl -Xcc

[clang] [clang][CodeGen] Set `dead_on_return` when passing arguments indirectly (PR #148159)

2025-07-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/148159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Set `dead_on_return` when passing arguments indirectly (PR #148159)

2025-07-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/148159 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-07-18 Thread David Green via cfe-commits
davemgreen wrote: @john-brawn-arm any ideas? It looks OK to me. (It would need to handle all instructions before HasStrictFP was added though). https://github.com/llvm/llvm-project/pull/137101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang-repl] Lay the basic infrastructure for pretty printing of types (PR #148701)

2025-07-18 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/148701 >From 114e4ec4194afa865bd22f6d76b29200d231bef9 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 16 Jul 2023 21:18:26 + Subject: [PATCH 1/9] [clang-repl] Lay the basic infrastructure for pretty p

[clang] [clang][bytecode] Fix const-in-mutable fields (PR #149286)

2025-07-18 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/149286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-18 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin requested changes to this pull request. There is still unaddressed feedback https://github.com/llvm/llvm-project/pull/147400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang] suppress deprecated field warnings in implicit special-member functions (PR #147400)

2025-07-18 Thread Corentin Jabot via cfe-commits
@@ -547,6 +547,15 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: +// Suppress -Wdeprecated-declarations in purely implicit special-member functions. +if (auto *MD = dyn_cast_if_present(S.getCurFunctionDecl

[clang] b7660a5 - [clang][bytecode] Fix const-in-mutable fields (#149286)

2025-07-18 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-18T11:20:48+02:00 New Revision: b7660a54157fd45e6276acf35176851196f5df71 URL: https://github.com/llvm/llvm-project/commit/b7660a54157fd45e6276acf35176851196f5df71 DIFF: https://github.com/llvm/llvm-project/commit/b7660a54157fd45e6276acf35176851196f5df71.diff L

[clang] [clang][bytecode] Use bytecode interpreter in isPotentialConstantExprU… (PR #149462)

2025-07-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/149462 >From 375d69e31f9c6cb4037fa643e368637cef755daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 18 Jul 2025 08:24:49 +0200 Subject: [PATCH] [clang][bytecode] Use bytecode interprete in i

[clang] [clang][bytecode] Report mutable reads when copying unions (PR #149320)

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

[clang] 3bb4355 - [clang][bytecode] Report mutable reads when copying unions (#149320)

2025-07-18 Thread via cfe-commits
Author: Timm Baeder Date: 2025-07-18T11:10:57+02:00 New Revision: 3bb4355bb83692d9c859043076db16baa86431e1 URL: https://github.com/llvm/llvm-project/commit/3bb4355bb83692d9c859043076db16baa86431e1 DIFF: https://github.com/llvm/llvm-project/commit/3bb4355bb83692d9c859043076db16baa86431e1.diff L

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

2025-07-18 Thread Erik Enikeev via cfe-commits
Varnike wrote: Now I have an approximate volume of work and plan to try to do it. I have provided these edits rather as an example of correction for a particular case (not taking tests into account), by analogy with which other cases can be considered. Therefore, I would like to know how corre

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
@@ -158,12 +158,12 @@ TEST_F(InterpreterTest, UndoCommand) { // Fail to undo. auto Err1 = Interp->Undo(); - EXPECT_EQ("Operation failed. Too many undos", + EXPECT_EQ("Operation failed. No input left to undo", llvm::toString(std::move(Err1))); auto Err2 =

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/149396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make PCH's respect any VFS specified. (PR #106577)

2025-07-18 Thread Neil Henning via cfe-commits
https://github.com/sheredom closed https://github.com/llvm/llvm-project/pull/106577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make PCH's respect any VFS specified. (PR #106577)

2025-07-18 Thread Neil Henning via cfe-commits
sheredom wrote: We ended up running into other issues where more than PCHs wouldn't respect the VFS, and had to use system level directory remapping instead. I'll close this out. https://github.com/llvm/llvm-project/pull/106577 ___ cfe-commits mailin

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/149396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Use bytecode interpreter in isPotentialConstantExprU… (PR #149462)

2025-07-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/149462 >From 216f90bd097904c4f12f7a493b2b0eaeba6b9261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 18 Jul 2025 08:24:49 +0200 Subject: [PATCH] [clang][bytecode] Use bytecode interprete in i

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
DavidSpickett wrote: https://github.com/llvm/llvm-project/pull/149396#issuecomment-3088555387 is one of our automated checks, please follow its guidance. The reason we do this is so we can attribute changes for reasons around the licensing of contributions, there's more info in those links. It

[clang] [llvm] [X86] Remove WIDEKL feature from Pantherlake and Clearwaterforest (PR #148184)

2025-07-18 Thread Simon Pilgrim via cfe-commits
@@ -176,10 +176,10 @@ constexpr FeatureBitset FeaturesArrowlakeS = FeaturesArrowlake | FeatureAVXVNNIINT16 | FeatureSHA512 | FeatureSM3 | FeatureSM4; constexpr FeatureBitset FeaturesPantherlake = -FeaturesArrowlakeS | FeaturePREFETCHI; +FeaturesArrowlakeS ^ Feat

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
@@ -158,12 +158,12 @@ TEST_F(InterpreterTest, UndoCommand) { // Fail to undo. auto Err1 = Interp->Undo(); - EXPECT_EQ("Operation failed. Too many undos", + EXPECT_EQ("Operation failed. No input left to undo", llvm::toString(std::move(Err1))); auto Err2 =

[clang] Issue143668 (PR #149396)

2025-07-18 Thread David Spickett via cfe-commits
@@ -158,12 +158,12 @@ TEST_F(InterpreterTest, UndoCommand) { // Fail to undo. auto Err1 = Interp->Undo(); - EXPECT_EQ("Operation failed. Too many undos", + EXPECT_EQ("Operation failed. No input left to undo", llvm::toString(std::move(Err1))); auto Err2 =

[clang] [Clang][Driver] Expose relocation model as multilib flags (PR #149132)

2025-07-18 Thread Simon Tatham via cfe-commits
https://github.com/statham-arm closed https://github.com/llvm/llvm-project/pull/149132 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3ce06b8 - [Clang][Driver] Expose relocation model as multilib flags (#149132)

2025-07-18 Thread via cfe-commits
Author: Simon Tatham Date: 2025-07-18T09:34:42+01:00 New Revision: 3ce06b8c2196be6368f0e06862ac1849379cce41 URL: https://github.com/llvm/llvm-project/commit/3ce06b8c2196be6368f0e06862ac1849379cce41 DIFF: https://github.com/llvm/llvm-project/commit/3ce06b8c2196be6368f0e06862ac1849379cce41.diff

[clang] [Clang] Add -Wimplicit-fallthrough to -Wextra for GCC compatibility (PR #149474)

2025-07-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (lb90) Changes See also https://github.com/llvm/llvm-project/issues/58375 --- Full diff: https://github.com/llvm/llvm-project/pull/149474.diff 2 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+2) - (modified) clang/incl

[clang] [clang][driver] Improve warning message for complex range overrides and GCC incompatibility (PR #149028)

2025-07-18 Thread Shunsuke Watanabe via cfe-commits
s-watanabe314 wrote: Thank you for the feedback! > IIRC GCC is not even consistent with the combination of these flags. In GCC 14, as I previously mentioned [here](https://discourse.llvm.org/t/the-priority-of-fno-fast-math-regarding-complex-number-calculations/84679/8), `-f[no-]cx-fortran-ru

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-18 Thread Andrey Karlov via cfe-commits
@@ -6298,10 +6308,60 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang] [Clang] Add -Wimplicit-fallthrough to -Wextra for GCC compatibility (PR #149474)

2025-07-18 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [Clang] Add -Wimplicit-fallthrough to -Wextra for GCC compatibility (PR #149474)

2025-07-18 Thread via cfe-commits
https://github.com/lb90 created https://github.com/llvm/llvm-project/pull/149474 See also https://github.com/llvm/llvm-project/issues/58375 >From 42a89816f517718d517bcbd5f9d1bd5f629ac4bb Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Fri, 18 Jul 2025 10:22:22 +0200 Subject: [PATCH] [Clang] Add

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-07-18 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/126434 ___ 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: modernize-use-scoped-lock (PR #126434)

2025-07-18 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,471 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing + +#include + +void Positive() { + std::mutex m; + { +std::lock_guard l(m); +// CHECK-MESSAGES: :[[@LINE-1]

[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)

2025-07-18 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: > > For what it’s worth, it looks like this introduces a series of `-Wformat` > > warnings when building the Linux kernel for 32-bit targets, which `typedef > > size_t` as `unsigned int` in > > [`include/linux/types.h`](https://git.kernel.org/pub/scm/linux/kernel/git/tor

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-18 Thread Andrey Karlov via cfe-commits
@@ -6298,10 +6304,60 @@ static bool isImmediateSinkBlock(const CFGBlock *Blk) { // at least for now, but once we have better support for exceptions, // we'd need to carefully handle the case when the throw is being // immediately caught. - if (llvm::any_of(*Blk, [](const

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-07-18 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,471 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-scoped-lock %t -- -- -isystem %clang_tidy_headers -fno-delayed-template-parsing + +#include + +void Positive() { + std::mutex m; + { +std::lock_guard l(m); +// CHECK-MESSAGES: :[[@LINE-1]

[clang] [clang-tools-extra] [clang]: Propagate `*noreturn` attributes in `CFG` (PR #146355)

2025-07-18 Thread Andrey Karlov via cfe-commits
@@ -693,6 +703,153 @@ TEST_F(NoreturnDestructorTest, ConditionalOperatorNestedBranchReturns) { // FIXME: Called functions at point `p` should contain only "foo". } +class AnalyzerNoreturnTest : public Test { +protected: + template + void runDataflow(llvm::StringRef Code,

[clang-tools-extra] [clang-tidy] Make `bugprone-unhandled-self-assignment` check more general (PR #147066)

2025-07-18 Thread Andrey Karlov via cfe-commits
https://github.com/negativ updated https://github.com/llvm/llvm-project/pull/147066 >From 950b6dce92eb2a831e7bd7e7ba44b3e8cc354dd4 Mon Sep 17 00:00:00 2001 From: Andrey Karlov Date: Fri, 4 Jul 2025 17:13:20 +0300 Subject: [PATCH 1/7] Checking that some kind of constructor is called and followe

  1   2   >