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

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread via cfe-commits
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slanina , =?utf-8?q?Tom=C3=A1=C5=A1?= Slani

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

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [llvm] [ARM] enable FENV_ACCESS pragma support for hard-float targets (PR #137101)

2025-09-21 Thread David Green via cfe-commits
davemgreen wrote: Am I right that the bits of FPSCR that are read by the instruction are just the rounding mode? Can we add a new register for just those bits, like FPSCR_NZCV. FPSCR_RM would alias with FPSCR but not FPSCR_NZCV. ``` def FPSCR_RM : ARMReg<3, "fpscr_rm"> { let Aliases = [FPS

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

2025-09-21 Thread via cfe-commits
https://github.com/flovent edited https://github.com/llvm/llvm-project/pull/158462 ___ 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-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ 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-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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] [Clang] Fix an error-recovery crash after d1a80dea (PR #159976)

2025-09-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/159976 ___ 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-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 Thread Tomáš Slanina via cfe-commits
@@ -498,13 +508,9 @@ class LineJoiner { ShouldMerge = Style.AllowShortEnumsOnASingleLine; } else if (TheLine->Last->is(TT_CompoundRequirementLBrace)) { ShouldMerge = Style.AllowShortCompoundRequirementOnASingleLine; - } else if (TheLine->Last->isOneOf

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

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %check_clang_tidy -check-suffix=ALL,CPP20ORLATER -std=c++20-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ +// RUN: %check_clang_tidy -check-suffix=ALL -std=c++17 %s modernize-use-structured-binding %t -- --

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

2025-09-21 Thread Tomáš Slanina via cfe-commits
itzexpoexpo wrote: I'm sorry for the review requests, I messed up rebasing to get rid of the merges. Can I cancel them somehow? https://github.com/llvm/llvm-project/pull/154580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

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

2025-09-21 Thread via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread via cfe-commits
@@ -0,0 +1,433 @@ +// RUN: %check_clang_tidy -check-suffix=ALL,CPP20ORLATER -std=c++20-or-later %s modernize-use-structured-binding %t -- -- -I %S/Inputs/use-structured-binding/ +// RUN: %check_clang_tidy -check-suffix=ALL -std=c++17 %s modernize-use-structured-binding %t -- --

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

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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] [clang-format] Fix for BreakTemplateDeclarations and RequiresClausePosition (PR #159277)

2025-09-21 Thread NagaChaitanya Vellanki via cfe-commits
https://github.com/chaitanyav closed https://github.com/llvm/llvm-project/pull/159277 ___ 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-21 Thread NagaChaitanya Vellanki via cfe-commits
chaitanyav wrote: Closing this PR since its not a bug as per https://github.com/llvm/llvm-project/issues/150845#issuecomment-3315305337 https://github.com/llvm/llvm-project/pull/159277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang-tools-extra] [clang] NFC: change more places to use Type::getAsTagDecl and friends (PR #155313)

2025-09-21 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @bgra8 thanks, this will be fixed here: https://github.com/llvm/llvm-project/pull/159996 https://github.com/llvm/llvm-project/pull/155313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] [clang-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-21 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-tools-extra] Fix python syntax - pull in Queue from module queue (PR #159997)

2025-09-21 Thread Moinak Bhattacharyya via cfe-commits
https://github.com/moinakb001 created https://github.com/llvm/llvm-project/pull/159997 No such module as Queue - the Queue class is part of the queue module. >From 8132ae2cdd93094c7f86322f07022d927ac5b6c1 Mon Sep 17 00:00:00 2001 From: Moinak Bhattacharyya Date: Sun, 21 Sep 2025 13:42:02 -0500

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

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/158462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-21 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/158489 >From f105e5a5c094e3bfc8f3ceb6331651eaed5823e9 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 19 Sep 2025 20:00:17 + Subject: [PATCH 1/3] fix-add-immutable-set --- clang/lib/Analysis/LifetimeSafety

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
Sirraide wrote: Also, it’d probably also be a good idea to add a test like ```c++ struct A { A(double f) {} }; float f; A a{f}; ``` to make sure we only suppress the diagnostic if the type we’re list-initialising is actually `double`/`long double`. https://github.com/llvm/llvm-project/pull/

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

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang-tools-extra] [llvm] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 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 -- clang-tools-extra/test/clang-tidy/infrastructure

[clang-tools-extra] [llvm] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH 1/2] [clang-tidy] Remove 'clang-analyzer-*' checks from default

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/158151 >From f24956299044d7278fa9de634fdd436d357fff1f Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 11 Sep 2025 23:29:55 +0300 Subject: [PATCH] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-st

[clang-tools-extra] [clang-tidy] Remove 'clang-analyzer-*' checks from default checks. (PR #157306)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157306 >From 4ab549990f3dc3f59a6346b32687e5ecbd495586 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 6 Sep 2025 22:54:31 +0300 Subject: [PATCH] [clang-tidy] Remove 'clang-analyzer-*' checks from default che

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

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > > There is a related problem that preprocessing the file first would > > (naturally) generate different behaviour for such a case. > > Do you have any suggestion about this? @Bigcheese The warning I suggested earlier is one approach (i.e., leave it as a problem

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

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/4] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang] [NFC][Clang][OpenMP] Add helper functions/utils for finding/comparing attach base-ptrs. (PR #155625)

2025-09-21 Thread Abhinav Gaba via cfe-commits
@@ -6765,12 +6765,255 @@ llvm::Value *CGOpenMPRuntime::emitNumThreadsForTargetDirective( namespace { LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); +/// Utility to compare expression locations. +/// Returns true if expr-loc of LHS is less-than that of RHS. +/// This function asser

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

2025-09-21 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 h,c -- clang/include/clang/StaticAnalyzer/Core/PathSens

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

2025-09-21 Thread via cfe-commits
vabridgers wrote: Thanks for the comments @NagyDonat . I believe all comments have been resolved. https://github.com/llvm/llvm-project/pull/158276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

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

2025-09-21 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] [analyzer] Correct crash in Z3 wrapper (PR #158276)

2025-09-21 Thread via cfe-commits
https://github.com/vabridgers updated https://github.com/llvm/llvm-project/pull/158276 >From f96f8e27968a5dfd74b97441b6d8182a46a5c6fe 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] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

2025-09-21 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] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > > We don't need check `tok::string_literal`, just check `tok::header_name` is > > enouth. > > I agree in principle. I think the standard has a defect: the wording makes it > necessary to check `tok::string_literal` because `u8"string"` is a > _string-literal_ b

[clang] [clang][NFC] Create CodeGenShared component for shared code with ClangIR (PR #157936)

2025-09-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/157936 >From 70a5ef22022e220d1cfe36aaa8b56e2e87153fb4 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 21 Sep 2025 13:04:32 +0200 Subject: [PATCH] [CIR] Upstream RTTI Builder & RTTI for VTable Definitions -

[clang] [clang][NFC] Create CodeGenShared component for shared code with ClangIR (PR #157936)

2025-09-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/157936 >From e9b8c1220b2b42162dd7a654b1bc9ed6182bca12 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 21 Sep 2025 13:04:32 +0200 Subject: [PATCH] [CIR] Upstream RTTI Builder & RTTI for VTable Definitions -

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Marcel Jacobse (mjacobse) Changes Resolves https://github.com/llvm/llvm-project/issues/33409. The information `IsListInit` is already passed to function `CheckImplicitConversion` for another use-case which makes adding a condition for th

[clang] [clang] fix using enum redecl in template regression (PR #159996)

2025-09-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/159996 This fixes a regression reported here: https://github.com/llvm/llvm-project/pull/155313#issuecomment-3315883183 Since this regression was never released, there are no release notes. >From ba72adf11519440ceffe

[clang] [clang] fix using enum redecl in template regression (PR #159996)

2025-09-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a regression reported here: https://github.com/llvm/llvm-project/pull/155313#issuecomment-3315883183 Since this regression was never released, there are no release notes. --- Full diff: https

[clang] [clang] fix using enum redecl in template regression (PR #159996)

2025-09-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov auto_merge_enabled https://github.com/llvm/llvm-project/pull/159996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Create CodeGenShared component for shared code with ClangIR (PR #157936)

2025-09-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/157936 >From 30ffdaddbf3d082a305d98c6ac01effd38418f39 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 9 Sep 2025 20:37:27 +0200 Subject: [PATCH] [clang][NFC] Create CodeGenShared component for shared code

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

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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] [clang-format] Add AllowBreakBeforeQtProperty option (PR #159909)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -33,6 +33,18 @@ const char *getTokenTypeName(TokenType Type) { return nullptr; } +static SmallVector QtPropertyKeywords = { HazardyKnusperkeks wrote: ```suggestion static constexpr std::array QtPropertyKeywords = { ``` This can be constructed at compile

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -4901,6 +4901,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, // Handle builtins like identifiers. if (Line.Type != LT_PreprocessorDirective && (Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) { + // Check for special

[clang] [clang-format] Correctly handle backward compatibility of C headers (PR #159908)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -1294,11 +1294,14 @@ TEST(ConfigParseTest, HandleNonCppDotHFile) { Style = {}; Style.Language = FormatStyle::LK_Cpp; - EXPECT_EQ(parseConfiguration("Language: ObjC", &Style, HazardyKnusperkeks wrote: Why remove this? https://github.com/llvm/llvm-proj

[clang] [CIR] Upstream RTTI Builder & RTTI for VTable Definitions (PR #160002)

2025-09-21 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: Notes: - Anything inside the anonymous namespace will be removed after https://github.com/llvm/llvm-project/pull/157936 lands, and import the same code either from the new shared component or the AST/basics lib https://github.com/llvm/llvm-project/pull/160002 _

[clang] [clang] fix using enum redecl in template regression (PR #159996)

2025-09-21 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/183

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

2025-09-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/158276 ___ 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-21 Thread Donát Nagy via cfe-commits
@@ -1,15 +1,49 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s \ // RUN: -analyzer-constraints=z3 +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core,debug.ExprInspection \ +// RUN: -analyzer-config crosscheck-with-z

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

2025-09-21 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat commented: I agree that it's unfortunate that we don't have a more general solution for this problem. However, not crashing is still better than crashing, so if nobody has capacity to develop a more general solution, then I think we should still merge this PR (with

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

2025-09-21 Thread Donát Nagy via cfe-commits
@@ -455,6 +455,14 @@ class SMTConv { QualType OperandTy; llvm::SMTExprRef OperandExp = getSymExpr(Solver, Ctx, USE->getOperand(), &OperandTy, hasComparison); + + if (const BinarySymExpr *BSE = + dyn_cast(USE->getOperand())) { +if

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

2025-09-21 Thread Donát Nagy via cfe-commits
@@ -455,6 +455,14 @@ class SMTConv { QualType OperandTy; llvm::SMTExprRef OperandExp = getSymExpr(Solver, Ctx, USE->getOperand(), &OperandTy, hasComparison); + + if (const BinarySymExpr *BSE = + dyn_cast(USE->getOperand())) { +if

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -4901,6 +4901,12 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, // Handle builtins like identifiers. if (Line.Type != LT_PreprocessorDirective && (Left.Tok.getIdentifierInfo() || Left.is(tok::r_paren))) { + // Check for special

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -4667,6 +4667,16 @@ struct FormatStyle { /// \version 7 bool SpaceBeforeInheritanceColon; + /// If ``false``, spaces will be removed between underscore and an opening + /// parenthesis. This is specifically for the gettext macro ``_()`` commonly + /// used in GNU pro

[clang] [clang-format] Add SpaceBeforeUnderscoreParens option for GNU gettext… (PR #159925)

2025-09-21 Thread Björn Schäpers via cfe-commits
@@ -17852,6 +17852,59 @@ TEST_F(FormatTest, ConfigurableSpacesInParens) { Spaces); } +TEST_F(FormatTest, SpaceBeforeUnderscoreParens) { + // Test with SpaceBeforeParens = Always to clearly show the difference HazardyKnusperkeks wrote: I think

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-09-21 Thread via cfe-commits
@@ -5360,7 +5360,8 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, Decl *EnumDecl, T.consumeOpen(); // C does not allow an empty enumerator-list, C++ does [dcl.enum]. - if (Tok.is(tok::r_brace) && !getLangOpts().CPlusPlus) + if (Tok.is(tok::r_brace) && !getLangOp

[clang] [clang] Accept empty enum in MSVC compatible C (PR #159981)

2025-09-21 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/159981 ___ 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 readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,54 @@ + +//===--===// +// +// 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 readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,31 @@ + +//===--===// +// +// 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 readability-redundant-parentheses (PR #159911)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %check_clang_tidy %s readability-redundant-parentheses %t vbvictor wrote: By default test use `c++11-or-later`, could we manually set `c++98-or-later` because it should work in any standard? https://github.com/llvm/llvm-project/pull/15

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Developer Policy](https://llvm.org/docs/DeveloperPol

[clang] [llvm] [FMV][AArch64] Allow user to override version priority. (PR #150267)

2025-09-21 Thread Alexandros Lamprineas via cfe-commits
@@ -348,6 +350,76 @@ entry: ret i32 %call } +declare i32 @test_explicit_priority._Mmops() #18 +declare i32 @test_explicit_priority._Msve2() #19 +declare i32 @test_explicit_priority._Msve() #20 +declare i32 @test_explicit_priority.default() #0 + +define weak_odr ptr @test_exp

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
https://github.com/Sirraide commented: The implementation lgtm, but I think we can do some deduplication in the tests by adding a second `RUN` line to the `.c` file that specifies `-x c++` and then only adding tests for truly C++-specific constructs in the `.cpp` file. Also, while you’re at it

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread via cfe-commits
Sirraide wrote: > Before this PR, all three initializations give the warning. After this PR, > `d0` and `d1` give the warning but `d2` doesn't. Yeah, imo those should all warn and if you don’t want a warning you have to write e.g. `double d3{double(f)}`, which, sure, is rather verbose, but I’d

[clang] [clang] fix using enum redecl in template regression (PR #159996)

2025-09-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/159996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > We don't need check `tok::string_literal`, just check `tok::header_name` is > enouth. I agree in principle. I think the standard has a defect: the wording makes it necessary to check `tok::string_literal` because `u8"string"` is a _string-literal_ but not a _he

[clang] 290f5b5 - [clang] fix using enum redecl in template regression (#159996)

2025-09-21 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-09-21T18:16:46Z New Revision: 290f5b5639717d12765401c2f51311d47c894990 URL: https://github.com/llvm/llvm-project/commit/290f5b5639717d12765401c2f51311d47c894990 DIFF: https://github.com/llvm/llvm-project/commit/290f5b5639717d12765401c2f51311d47c894990.diff LO

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

2025-09-21 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Sorry, I don't understand here, extern is a keyword, this `import` will be > treated as `kw_import` Exactly, in phase 4 we are supposed to transform the import into `kw_import`. In phase 7, we should get an error about an invalid module import declaration. I am

[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

2025-09-21 Thread Wael Yehia via cfe-commits
@@ -3361,6 +3382,194 @@ void PPCAIXAsmPrinter::emitModuleCommandLines(Module &M) { OutStreamer->emitXCOFFCInfoSym(".GCC.command.line", RSOS.str()); } +static bool TOCRestoreNeeded(const GlobalIFunc &GI) { + auto IsLocalFunc = [&](const Value *V) { +if (!isa(V)) +

[clang-tools-extra] [clang-tidy][NFC] Enable 'readability-named-parameter' check (PR #158774)

2025-09-21 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > so I vote for keeping this check disable to avoid unnecessary churn I agree! It might however be worth briefly documenting why we want to keep this check disabled, so we don't accidentally have the same discussion again in the future. https://github.com/llvm/llvm-projec

[clang] [NFC][Clang][OpenMP] Add helper functions/utils for finding/comparing attach base-ptrs. (PR #155625)

2025-09-21 Thread Alexey Bataev via cfe-commits
@@ -6765,12 +6765,255 @@ llvm::Value *CGOpenMPRuntime::emitNumThreadsForTargetDirective( namespace { LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE(); +/// Utility to compare expression locations. +/// Returns true if expr-loc of LHS is less-than that of RHS. +/// This function asser

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

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] [clang-tidy] Add new check `modernize-use-structured-binding` (PR #158462)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,409 @@ +//===--===// +// +// 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-tools-extra] 096c62c - [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (#158151)

2025-09-21 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-22T00:37:27+03:00 New Revision: 096c62cf21adcfae73dfcb5a39ab2f10c14b595a URL: https://github.com/llvm/llvm-project/commit/096c62cf21adcfae73dfcb5a39ab2f10c14b595a DIFF: https://github.com/llvm/llvm-project/commit/096c62cf21adcfae73dfcb5a39ab2f10c14b595a.diff

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err58-cpp' to 'bugprone-throwing-static-initialization' (PR #158151)

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/158151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/157737 >From a6dd8c9b21422404c690f14453b100bc762173c8 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 9 Sep 2025 22:26:21 +0300 Subject: [PATCH 1/3] [clang-tidy] Rename 'cert-dcl50-cpp' to 'modernize-avoid-v

[clang] [clang] Fix -Wdouble-promotion in C++ list-initialization (PR #159992)

2025-09-21 Thread Marcel Jacobse via cfe-commits
mjacobse wrote: Thanks, your `struct B` example raises a very good point, because with this PR no warning would be thrown anymore for the promotion of `f` to `double` in the initialization of member `B::d`. Using parantheses ```c++ B(float f) : d(f) {} ``` would bring back the warning. Somethin

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

2025-09-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: code-lint failure would be fixed in https://github.com/llvm/llvm-project/pull/160014. https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

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

2025-09-21 Thread via cfe-commits
Author: Baranov Victor Date: 2025-09-22T00:41:55+03:00 New Revision: 2bcccdddc8cb98fd7d126be85273f66d436428d9 URL: https://github.com/llvm/llvm-project/commit/2bcccdddc8cb98fd7d126be85273f66d436428d9 DIFF: https://github.com/llvm/llvm-project/commit/2bcccdddc8cb98fd7d126be85273f66d436428d9.diff

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

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/157737 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
@@ -3,8 +3,6 @@ cert-err52-cpp == -This check flags all call expressions involving ``setjmp()`` and ``longjmp()``. - -This check corresponds to the CERT C++ Coding Standard rule -`ERR52-CPP. Do not use setjmp() or longjmp() -

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/159813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Rename 'cert-err52-cpp' to 'bugprone-avoid-setjmp-longjmp' (PR #159813)

2025-09-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: After looking at the rule, I think we should place in "modernize" category: `modernize-avoud-setjmp-longjmp`. "bugprone" checks in general are expected to give only warnings for real problems: `setjmp` can be perfectly fine but it's not how exceptions sho

[clang] [clang] WIP: implement ConstantTemplateParamCastExpr (PR #160018)

2025-09-21 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/160018 This fixes a bunch of bugs with how non-type template parameters are transformed and used in template argument deduction. >From a0db4a10c306786d3ab689c4094a2676c18f2c53 Mon Sep 17 00:00:00 2001 From: Matheus I

  1   2   3   >