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

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (flovent) Changes This check detect code which can be transfered to c++17 structured binding, and provides fix-it. Limitations: 1. Ignore variables with attributes or qualifiers except `const` and `&` since it's not very commo

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent created https://github.com/llvm/llvm-project/pull/158462 This check detect code which can be transfered to c++17 structured binding, and provides fix-it. Limitations: 1. Ignore variables with attributes or qualifiers except `const` and `&` since it's not very commo

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/158461 >From d828397b1ece13b9617b54e5bd75f00c2c69fd64 Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 13 Sep 2025 10:22:28 +0200 Subject: [PATCH 1/4] Fixes clangd/clangd#1797 Do not restrict HeaderSourceSwitch to swit

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/16059 Here is the relevant piece of the build log f

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

2025-09-14 Thread Victor Chernyakin via cfe-commits
localspook wrote: Some statistics: if we decide to force specifying `-std`, we would need to fix ~620 test files (number found by looking for `*.{c,cpp,m,mm}` files under `clang-tools-extra/test/clang-tidy` that don't contain the string `-std`). Doable if a bit tedious. https://github.com/llv

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

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

2025-09-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang-tools-extra` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/27382

[clang] [CIR][NFC] Remove Covered MissingFeatures flags for Complex (PR #158425)

2025-09-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/158425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Remove Covered MissingFeatures flags for Complex (PR #158425)

2025-09-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/16057 Here is the relevant piece of the build log f

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,67 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ flovent wrote: Merged in aa3bf50 https://github.com/llvm/llvm-project/pull/158462 __

[clang-tools-extra] [clang-tidy][NFC] Switch to new file header style (PR #158497)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Victor Chernyakin (localspook) Changes As decided in #118553 and following up #153942. `rename_check.py` has small logic changes, everything else is a mechanical replacement. --- Patch is 558.41 KiB, truncated to 20.00 KiB below, f

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

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

2025-09-14 Thread via cfe-commits
https://github.com/koachan updated https://github.com/llvm/llvm-project/pull/155829 >From a8707a6452b77b75603dc780213835f6e5e4b582 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Thu, 28 Aug 2025 19:48:38 +0700 Subject: [PATCH 1/4] [clang][SPARC] Pass 16-aligned 16-byte structs as i128 in CC Thi

[clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/158489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/158461 >From d828397b1ece13b9617b54e5bd75f00c2c69fd64 Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 13 Sep 2025 10:22:28 +0200 Subject: [PATCH 1/7] Fixes clangd/clangd#1797 Do not restrict HeaderSourceSwitch to swit

[clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/158489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

2025-09-14 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions cpp,h -- clang/include/clang/Analysis/Analyses/Lifetime

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-14 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/158276 >From a02784c3fb5bd1c4b4110e05a6de3869a4f8887c Mon Sep 17 00:00:00 2001 From: Vince Bridgers Date: Fri, 12 Sep 2025 13:19:40 +0200 Subject: [PATCH] [analyzer] Correct crash in Z3 wrapper If a UnarySymExpr wi

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 1/7] [clang-tidy] Add new check `modernize-use-structured-binding` --

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

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/15] [clang-tidy] Add new check `modernize-use-structured-binding`

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/20] [clang-tidy] Add new check `modernize-use-structured-binding`

[clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/158489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/158461 >From d828397b1ece13b9617b54e5bd75f00c2c69fd64 Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 13 Sep 2025 10:22:28 +0200 Subject: [PATCH 1/3] Fixes clangd/clangd#1797 Do not restrict HeaderSourceSwitch to swit

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/158461 >From d828397b1ece13b9617b54e5bd75f00c2c69fd64 Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 13 Sep 2025 10:22:28 +0200 Subject: [PATCH 1/6] Fixes clangd/clangd#1797 Do not restrict HeaderSourceSwitch to swit

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

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

[clang] lifetime-analysis-lifetimebound (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/158489 None >From 0f103748146c260fc0abfb738446d0a0dc71daf9 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Sun, 14 Sep 2025 14:46:45 + Subject: [PATCH] lifetime-analysis-lifetimebound --- .../clang/Analysis/An

[clang] lifetime-analysis-lifetimebound (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: * **#158489** https://app.graphite.dev/github/pr/llvm/llvm-project/158489?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/158489

[clang] [CIR] Support type promotion for Scalar unary plus & minus ops (PR #158486)

2025-09-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/158486 Support type promotion for Scalar unary plus & minus ops >From 3f4e35ee085cdf8f451daf68fe1fe9305a7486dd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 14 Sep 2025 15:18:48 +0200 Subject: [PATCH] [C

[clang] [CLANG][CUDA] Enable nan/nanf from libdevice in device code (PR #158301)

2025-09-14 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/158301 >From 100645ecb2f8d406fb8c1b59c3e4f3e85ca81100 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 12 Sep 2025 17:13:21 +0300 Subject: [PATCH] [CLANG][CUDA] Enable nan/nanf from libdevice in device code

[clang] [CIR] Support type promotion for Scalar unary plus & minus ops (PR #158486)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes Support type promotion for Scalar unary plus & minus ops --- Full diff: https://github.com/llvm/llvm-project/pull/158486.diff 2 Files Affected: - (modified) clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp (+

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide ready_for_review https://github.com/llvm/llvm-project/pull/158480 ___ 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-structured-binding` (PR #158462)

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 1/9] [clang-tidy] Add new check `modernize-use-structured-binding` --

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen updated https://github.com/llvm/llvm-project/pull/158461 >From d828397b1ece13b9617b54e5bd75f00c2c69fd64 Mon Sep 17 00:00:00 2001 From: JVApen Date: Sat, 13 Sep 2025 10:22:28 +0200 Subject: [PATCH 1/5] Fixes clangd/clangd#1797 Do not restrict HeaderSourceSwitch to swit

[clang] 2740e4b - [clang] Remove shell requirements from tests

2025-09-14 Thread via cfe-commits
Author: Aiden Grossman Date: 2025-09-11T17:51:47-07:00 New Revision: 2740e4b73682eb7a6869c333991a608304938952 URL: https://github.com/llvm/llvm-project/commit/2740e4b73682eb7a6869c333991a608304938952 DIFF: https://github.com/llvm/llvm-project/commit/2740e4b73682eb7a6869c333991a608304938952.diff

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/14] [clang-tidy] Add new check `modernize-use-structured-binding`

[clang] [CIR] Support type promotion for Scalar unary real & imag ops (PR #158473)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for type promotion in Scalar unary real & imag ops Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/158473.diff

[clang] [CIR] Support type promotion for Scalar unary real & imag ops (PR #158473)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for type promotion in Scalar unary real & imag ops Issue: https://github.com/llvm/llvm-project/issues/141365 --- Full diff: https://github.com/llvm/llvm-project/pull/158473.diff

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/154009 >From c13b6a0a04a311b284c484ed6cda63cf76657805 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 4 Sep 2025 14:27:37 + Subject: [PATCH 1/2] all-lvalues-have-origin >From 83a9c8091d3d0a267963e87a8a0b5e

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: None (capitan-davide) Changes Contributes to https://github.com/llvm/llvm-project/issues/156150 --- Full diff: https://github.com/llvm/llvm-project/pull/158480.diff 2 Files Affected: - (modifi

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/158480 >From ee6b425409d0b0958b2094a06a6b5c70999a4abd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject: [PATCH] [clang-tidy] Fix a couple of suspicious StringRef::data()

[clang] [LifetimeSafety] Implement support for lifetimebound attribute (PR #158489)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/158489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/158480 >From d70698939c4a7bb43c2eba139852079b6d3b3bcd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject: [PATCH] [clang-tidy] Fix a couple of suspicious StringRef::data()

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide edited https://github.com/llvm/llvm-project/pull/158480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious `StringRef::data()` usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide edited https://github.com/llvm/llvm-project/pull/158480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-14 Thread via cfe-commits
@@ -13,3 +13,29 @@ int negate(int x, int y) { return 0; return 1; } + +void c(); +void case004(int *a, int *b) { + void *e; + b != a; + c(e); // expected-warning{{1st function call argument is an uninitialized value}} +} + +void z3crash(int a, int b) { + b = a || b;

[clang] 94213a4 - [LifetimeSafety] Add support for GSL Pointer types (#154009)

2025-09-14 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2025-09-14T12:19:19Z New Revision: 94213a4aefc8dda671493aed993f0c6665c5f146 URL: https://github.com/llvm/llvm-project/commit/94213a4aefc8dda671493aed993f0c6665c5f146 DIFF: https://github.com/llvm/llvm-project/commit/94213a4aefc8dda671493aed993f0c6665c5f146.diff LOG

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/154009 ___ 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-structured-binding` (PR #158462)

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// EugeneZelenko wrote: ```suggestion //===--===// ``` https://github.com/llvm/llvm-project/pull

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,36 @@ +//===--- UseStructuredBindingCheck.h - clang-tidy ---*- C++ -*-===// EugeneZelenko wrote: ```suggestion //===--===// ``` https://github.com/llvm/llvm-project/pull/

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

2025-09-14 Thread Krish Gupta via cfe-commits
https://github.com/KrxGu updated https://github.com/llvm/llvm-project/pull/158146 >From 1d2f9ac071d436e6be4d693833a3b630e4a7fc15 Mon Sep 17 00:00:00 2001 From: Krish Gupta Date: Wed, 10 Sep 2025 03:41:06 +0530 Subject: [PATCH 1/2] [flang][OpenMP] Add lowering test: lastprivate on DO is scoped

[clang] [LifetimeSafety] Add support for GSL Pointer types (PR #154009)

2025-09-14 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/154009 >From 598c803c93eeb4c32737938482e24fd98bf7fa8d Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Thu, 4 Sep 2025 14:27:37 + Subject: [PATCH 1/2] all-lvalues-have-origin >From 4f1e0b70d9118379bb0afabf50bba7

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

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

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

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

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-structured-binding + +modernize-use-structured-binding + + +Suggests using C++17 structured bindings to decompose pairs. + +This check finds three code patterns and recommends using structured

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,419 @@ +//===--- UseStructuredBindingCheck.cpp - clang-tidy ---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

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

2025-09-14 Thread via cfe-commits
@@ -0,0 +1,216 @@ +// RUN: %check_clang_tidy -std=c++17-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ + +#include "fake_std_pair_tuple.h" + +template +void MarkUsed(T x); + +struct TestClass { + int a; + int b; + TestClass() : a(0),

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/16] [clang-tidy] Add new check `modernize-use-structured-binding`

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

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/17] [clang-tidy] Add new check `modernize-use-structured-binding`

[clang] [CIR] Support type promotion for Scalar unary real & imag ops (PR #158473)

2025-09-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/158473 This change adds support for type promotion in Scalar unary real & imag ops Issue: https://github.com/llvm/llvm-project/issues/141365 >From 33c950f74487540f4eea498a778866a10f267f64 Mon Sep 17 00:00:00 2001

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
https://github.com/JVApen created https://github.com/llvm/llvm-project/pull/158461 Do not restrict HeaderSourceSwitch to switching between .h and .cpp. For templates, the relevant 'source' is the header containing the implementation of the templated functions. Instead of considering every sym

[clang] [clang] fix partial ordering of NTTP packs (PR #134461)

2025-09-14 Thread Matheus Izvekov via cfe-commits
@@ -7085,18 +7102,24 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, ? Context.getIntWidth(IntegerType) : Context.getTypeSize(IntegerType)); - SugaredConverted = TemplateArgum

[clang] [Sema] Fix missing warnings for unused args with invalid printf specs. (PR #158514)

2025-09-14 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] NFC: non-type template argument check cleanup (PR #158515)

2025-09-14 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/158515 This is a follow-up to #134461, reverting some unnecessary changes. This cleans up some checks around the assumption that a pack expansion on the argument side could appear when checking non-type template argu

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

2025-09-14 Thread Matheus Izvekov via cfe-commits
@@ -1257,4 +1256,35 @@ template concept PerfectSquare = [](){} // expected-note 2{{here}} ([](auto) { return true; }) < PerfectSquare ; // expected-error@-1 {{declaration of 'T' shadows template parameter}} \ // expected-error@-1 {{a concept definition cannot refer to itself}

[clang] [CLANG][CUDA] Enable nan/nanf from libdevice in device code (PR #158301)

2025-09-14 Thread via cfe-commits
https://github.com/DenisGZM updated https://github.com/llvm/llvm-project/pull/158301 >From 100645ecb2f8d406fb8c1b59c3e4f3e85ca81100 Mon Sep 17 00:00:00 2001 From: Denis Gerasimov Date: Fri, 12 Sep 2025 17:13:21 +0300 Subject: [PATCH] [CLANG][CUDA] Enable nan/nanf from libdevice in device code

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-14 Thread Tomáš Slanina via cfe-commits
https://github.com/itzexpoexpo updated https://github.com/llvm/llvm-project/pull/154580 From 877d155b65a054a240490d3c7e2015673f964466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Slanina?= Date: Wed, 20 Aug 2025 19:28:23 +0200 Subject: [PATCH 01/17] [clang-format] Add option Allo

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

2025-09-14 Thread Matheus Izvekov via cfe-commits
@@ -1379,216 +1890,327 @@ static void diagnoseWellFormedUnsatisfiedConstraintExpr(Sema &S, S.DiagnoseTypeTraitDetails(SubstExpr); } -template static void diagnoseUnsatisfiedConstraintExpr( -Sema &S, const llvm::PointerUnion &Record, -bool First = true) { - if (a

[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-14 Thread via cfe-commits
=?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= Slanina , =?utf-8?q?Tomáš?= S

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

2025-09-14 Thread Matheus Izvekov via cfe-commits
@@ -1257,4 +1256,35 @@ template concept PerfectSquare = [](){} // expected-note 2{{here}} ([](auto) { return true; }) < PerfectSquare ; // expected-error@-1 {{declaration of 'T' shadows template parameter}} \ // expected-error@-1 {{a concept definition cannot refer to itself}

[clang] [clang] NFC: non-type template argument check cleanup (PR #158515)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This is a follow-up to #134461, reverting some unnecessary changes. This cleans up some checks around the assumption that a pack expansion on the argument side could appear when checking non-type templat

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-14 Thread Vassil Vassilev via cfe-commits
@@ -32,8 +32,11 @@ #ifndef LLVM_CLANG_INTERPRETER_VALUE_H #define LLVM_CLANG_INTERPRETER_VALUE_H - +#include "llvm/ADT/FunctionExtras.h" #include "llvm/Config/llvm-config.h" // for LLVM_BUILD_LLVM_DYLIB, LLVM_BUILD_SHARED_LIBS +#include "llvm/ExecutionEngine/Orc/LLJIT.h" +#i

[clang-tools-extra] Fixes clangd/clangd#1797 (PR #158461)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: None (JVApen) Changes Do not restrict HeaderSourceSwitch to switching between .h and .cpp. For templates, the relevant 'source' is the header containing the implementation of the templated functions. Instead of considering every symbol

[clang] b01cdde - [Clang][Cygwin] Cygwin x86_64 should accept __stdcall (#158385)

2025-09-14 Thread via cfe-commits
Author: Tomohiro Kashiwada Date: 2025-09-14T10:09:46-07:00 New Revision: b01cddee0e69bd283a0f1830f24fae326371f1de URL: https://github.com/llvm/llvm-project/commit/b01cddee0e69bd283a0f1830f24fae326371f1de DIFF: https://github.com/llvm/llvm-project/commit/b01cddee0e69bd283a0f1830f24fae326371f1de.

[clang-tools-extra] [clang-tidy][NFC] Switch to new file header style (PR #158497)

2025-09-14 Thread via cfe-commits
https://github.com/EugeneZelenko approved this pull request. https://github.com/llvm/llvm-project/pull/158497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide created https://github.com/llvm/llvm-project/pull/158480 Contributes to https://github.com/llvm/llvm-project/issues/156150 >From ee6b425409d0b0958b2094a06a6b5c70999a4abd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158480 ___ 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-structured-binding` (PR #158462)

2025-09-14 Thread via cfe-commits
https://github.com/flovent updated https://github.com/llvm/llvm-project/pull/158462 >From a1941312179171a8752c27f886158ce4fd90db33 Mon Sep 17 00:00:00 2001 From: flovent Date: Sun, 14 Sep 2025 14:33:59 +0800 Subject: [PATCH 01/19] [clang-tidy] Add new check `modernize-use-structured-binding`

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/158480 >From d70698939c4a7bb43c2eba139852079b6d3b3bcd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject: [PATCH 1/2] [clang-tidy] Fix a couple of suspicious StringRef::da

[clang] [Clang][Interp] Assert on virtual func call from array elem (PR #158502)

2025-09-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: marius doerner (mariusdr) Changes Fixes #152893. An assert was raised when a constexpr virtual function was called from an constexpr array element with -fexperimental-new-constant-interpreter set. --- Full diff: https://github.com/llvm/l

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -116,7 +119,10 @@ void yamlize(IO &IO, ClangTidyOptions::OptionMap &Val, bool, } else if (isa(I.getCurrentNode())) { IO.beginMapping(); for (StringRef Key : IO.keys()) { +// NOLINTNEXTLINE(bugprone-suspicious-stringview-data-usage): Requires +

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -116,7 +119,10 @@ void yamlize(IO &IO, ClangTidyOptions::OptionMap &Val, bool, } else if (isa(I.getCurrentNode())) { IO.beginMapping(); for (StringRef Key : IO.keys()) { +// NOLINTNEXTLINE(bugprone-suspicious-stringview-data-usage): Requires +

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -99,7 +99,10 @@ void yamlize(IO &IO, ClangTidyOptions::OptionMap &Val, bool, for (auto &Option : SortedOptions) { bool UseDefault = false; void *SaveInfo = nullptr; + // NOLINTBEGIN(bugprone-suspicious-stringview-data-usage): Requires + // updates t

[clang] [Clang][Interp] Assert on virtual func call from array elem (PR #158502)

2025-09-14 Thread marius doerner via cfe-commits
https://github.com/mariusdr created https://github.com/llvm/llvm-project/pull/158502 Fixes #152893. An assert was raised when a constexpr virtual function was called from an constexpr array element with -fexperimental-new-constant-interpreter set. >From 26e222a60af111c638d87176c20e9cb6a11a4ce

[clang] [clang-format] Handle C digit separators (PR #158418)

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

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

2025-09-14 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-14T11:45:55+03:00 New Revision: 9c91d4a31d758cbddc0fc6347470604c2040ab2f URL: https://github.com/llvm/llvm-project/commit/9c91d4a31d758cbddc0fc6347470604c2040ab2f DIFF: https://github.com/llvm/llvm-project/commit/9c91d4a31d758cbddc0fc6347470604c2040ab2f.diff

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
vbvictor wrote: > > LGTM But there are still some violations left? > > Yes, two more. Unfortunately, they require some refactoring as > `llvm::yaml::IO` API uses C-strings only. We can use a `// NOLINT(bugprone-suspicious-stringview-data-usage)` or `// NOLINTNEXTLINE(bugprone-suspicious-strin

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/158480 >From d70698939c4a7bb43c2eba139852079b6d3b3bcd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject: [PATCH 1/2] [clang-tidy] Fix a couple of suspicious StringRef::da

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread via cfe-commits
https://github.com/capitan-davide updated https://github.com/llvm/llvm-project/pull/158480 >From d70698939c4a7bb43c2eba139852079b6d3b3bcd Mon Sep 17 00:00:00 2001 From: Davide Cunial Date: Sun, 14 Sep 2025 15:16:17 +0200 Subject: [PATCH 1/2] [clang-tidy] Fix a couple of suspicious StringRef::da

[clang] [Clang][Cygwin] Cygwin x86_64 should accept __stdcall (PR #158385)

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

[clang-tools-extra] [clang-tidy][NFC] Fix a couple of suspicious StringRef::data() usages (PR #158480)

2025-09-14 Thread Baranov Victor via cfe-commits
@@ -99,7 +99,10 @@ void yamlize(IO &IO, ClangTidyOptions::OptionMap &Val, bool, for (auto &Option : SortedOptions) { bool UseDefault = false; void *SaveInfo = nullptr; + // NOLINTBEGIN(bugprone-suspicious-stringview-data-usage): Requires + // updates t

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-09-14 Thread Avi Kivity via cfe-commits
avikivity wrote: > This error is [produced for the following > code](https://github.com/carbon-language/carbon-lang/pull/5170): > > ```c++ > template > class SetView { > SetView(SetView> other_view) > requires(!std::same_as>); > }; > ``` > > ... which is never an eligible copy construct

[clang] 30f4781 - [clang-format] Handle C digit separators (#158418)

2025-09-14 Thread via cfe-commits
Author: owenca Date: 2025-09-14T14:20:59-07:00 New Revision: 30f4781eef567b99214e02137a57c7ac91279a48 URL: https://github.com/llvm/llvm-project/commit/30f4781eef567b99214e02137a57c7ac91279a48 DIFF: https://github.com/llvm/llvm-project/commit/30f4781eef567b99214e02137a57c7ac91279a48.diff LOG: [

  1   2   >