[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145200)

2025-06-21 Thread Joseph Huber via cfe-commits
@@ -341,11 +341,23 @@ Expected> createLTO(const ArgList &Args) { Conf.CPU = Args.getLastArgValue(OPT_arch); Conf.Options = codegen::InitTargetOptionsFromCodeGenFlags(Triple); - Conf.RemarksFilename = RemarksFilename; - Conf.RemarksPasses = RemarksPasses; - Conf.Remarks

[clang] [llvm] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction (PR #145152)

2025-06-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/145152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][AST] Adopt `llvm::copy` in Clang AST (PR #145192)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/145192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][AST] Drop `llvm::` in front of `ArrayRef`/`MutableArrayRef` (PR #145207)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/145207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][AST] Drop `llvm::` in front of `ArrayRef` (PR #145207)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/145207 >From 2e43d4b182cbc998fd19c4bb016123fc0bc15ee3 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sat, 21 Jun 2025 22:32:22 -0700 Subject: [PATCH] [NFC][Clang][AST] Drop `llvm::` in front of `ArrayRef` --- clang

[clang] [llvm] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction (PR #145152)

2025-06-21 Thread Stanislav Mekhanoshin via cfe-commits
@@ -0,0 +1,34 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc -march=amdgcn -mcpu=gfx1250 -show-mc-encoding -verify-machineinstrs < %s | FileCheck -check-prefix=GFX1250 %s rampitec wrote: Done https://github.com/llv

[clang] [llvm] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction (PR #145152)

2025-06-21 Thread Stanislav Mekhanoshin via cfe-commits
@@ -636,5 +636,11 @@ TARGET_BUILTIN(__builtin_amdgcn_bitop3_b16, "IUi", "nc", "bitop3-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf16_f32, "V2yV2yfUiIb", "nc", "f32-to-f16bf16-cvt-sr-insts") TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_f16_f32, "V2hV2hfUiIb", "nc", "f32-to-

[clang] [llvm] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction (PR #145152)

2025-06-21 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/145152 >From d8bfe8fad4f1ca7436dd8697b24cdfdb91be7a48 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Fri, 20 Jun 2025 12:24:47 -0700 Subject: [PATCH] [AMDGPU] Add s_setprio_inc_wg gfx1250 instruction ---

[clang] [NFC][Clang][AST] Drop `llvm::` in front of `ArrayRef` (PR #145207)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/145207 None >From 3c87dfeac55948d4e4ba45f8164f0877485f2f6a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sat, 21 Jun 2025 22:32:22 -0700 Subject: [PATCH] [NFC][Clang][AST] Drop `llvm::` in front of `ArrayRef` ---

[clang-tools-extra] [clang-doc] document global variables (PR #145070)

2025-06-21 Thread Erick Velez via cfe-commits
@@ -25,7 +24,7 @@ typedef int MyTypedef; // CHECK-NEXT: { // CHECK-NEXT:"Location": { // CHECK-NEXT: "Filename": "{{.*}}namespace.cpp", -// CHECK-NEXT: "LineNumber": 15 +// CHECK-NEXT: "LineNumber": 14 evelez7 wrote: Aft

[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #142324)

2025-06-21 Thread via cfe-commits
@@ -136,6 +136,13 @@ New checks Finds unintended character output from ``unsigned char`` and ``signed char`` to an ``ostream``. +- New :doc:`misc-bool-bitwise-operation EugeneZelenko wrote: Please keep alphabetical order (by check name) in this section.

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145044 >From ef3da9bb1debb04c3f3109cc10f8776f024265b6 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Fri, 20 Jun 2025 10:51:04 -0400 Subject: [PATCH] Explain why 'is_empty' evaluates to false Add tests for var

[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)

2025-06-21 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: I am seeing a backend error when building the Linux kernel for PowerPC after this change. `cvise` spits out the following C reproducer: ```c typedef unsigned __u8; typedef unsigned __u32; typedef long __u64; typedef __u8 u8; typedef __u32 u32; typedef __u64 u64; enum { true

[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145200)

2025-06-21 Thread Joseph Huber via cfe-commits
@@ -72,6 +72,25 @@ def : Joined<["--", "-"], "plugin-opt=emit-llvm">, Flags<[WrapperOnlyOption]>, Alias; def : Joined<["--", "-"], "plugin-opt=emit-asm">, Flags<[WrapperOnlyOption]>, Alias; + +def opt_remarks_filename : Separate<["--"], "opt-remarks-filename">, + Flags<[Wr

[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145200)

2025-06-21 Thread Miguel Cárdenas via cfe-commits
https://github.com/miguelcsx created https://github.com/llvm/llvm-project/pull/145200 ## Problem When using `-fsave-optimization-record` with offloading, the Clang driver passes optimization record options like `-plugin-opt=opt-remarks-format=yaml` to `clang-nvlink-wrapper`. However, the wrapp

[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145200)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Miguel Cárdenas (miguelcsx) Changes ## Problem When using `-fsave-optimization-record` with offloading, the Clang driver passes optimization record options like `-plugin-opt=opt-remarks-format=yaml` to `clang-nvlink-wrapper`. However, the

[clang] [clang][nvlink-wrapper] Add support for opt-remarks command line options (PR #145200)

2025-06-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] [clangd] Improve Markup Rendering (PR #140498)

2025-06-21 Thread via cfe-commits
mccakit wrote: Yeah, I saw it. Hope they look into it. This PR is like 2 months old, doxygen parsing at clang have some patches I found online that date back to 2019. I'm currently using tcottins PR branch right now, because that is the only way of getting doxygen comments on my editor, which

[clang] [Clang] Implement diagnostics for why `std::is_standard_layout` is false (PR #144161)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/144161 >From a149c93c3f49b6a51de972dc8418299f4074ddf8 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Fri, 13 Jun 2025 23:22:18 +0200 Subject: [PATCH 1/7] Implement diagnostics for why `std::is_standard_layout`

[clang] [NFC][Clang] Adopt `llvm::copy` in Clang AST (PR #145192)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes --- Patch is 28.38 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/145192.diff 13 Files Affected: - (modified) clang/include/clang/AST/ASTContext.h (+1-1) - (m

[clang] [NFC][Clang] Adopt `llvm::copy` in Clang AST (PR #145192)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/145192 ___ 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 misc-bool-bitwise-operation check (PR #142324)

2025-06-21 Thread Denis Mikhailov via cfe-commits
@@ -36,6 +37,8 @@ class PerformanceModule : public ClangTidyModule { public: void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { CheckFactories.registerCheck("performance-avoid-endl"); +CheckFactories.registerCheck( +"performance-bool-bi

[clang-tools-extra] [clang-tidy] Add misc-bool-bitwise-operation check (PR #142324)

2025-06-21 Thread Denis Mikhailov via cfe-commits
https://github.com/denzor200 edited https://github.com/llvm/llvm-project/pull/142324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang] Adopt `llvm::copy` in Clang AST (PR #145192)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/145192 None >From 5300020f16ac2e9a8449242b3c743616b2b2186b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Sat, 21 Jun 2025 16:04:54 -0700 Subject: [PATCH] [NFC][Clang] Adopt `llvm::copy` in Clang AST --- clang/inc

[clang] [NFC][Clang][AST] Use `llvm::copy` instead of `memcpy` in StringLiteral (PR #145187)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Also change the constructor and `StringLiteral::Create` to take an `ArrayRef` instead of a pointer and size, so that it can be directly passed to `llvm::copy`. This also eliminates the need of

[clang] [NFC][Clang][AST] Use `llvm::copy` instead of `memcpy` in StringLiteral (PR #145187)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/145187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] document global variables (PR #145070)

2025-06-21 Thread Erick Velez via cfe-commits
https://github.com/evelez7 edited https://github.com/llvm/llvm-project/pull/145070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-21 Thread Marco Vitale via cfe-commits
https://github.com/mrcvtl edited https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-21 Thread Marco Vitale via cfe-commits
mrcvtl wrote: > Could you associate this PR with the issue to fix, if any? Done! https://github.com/llvm/llvm-project/pull/145164 ___ 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 `readability-use-numeric-limits` (PR #127430)

2025-06-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: Buildbots failures seems irrelevant https://github.com/llvm/llvm-project/pull/127430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-06-21 Thread Aaron Liu via cfe-commits
aaronliu0130 wrote: @mccakit It looks like there's currently a reply from @tcottin to emaxx-google's last comment needed. https://github.com/llvm/llvm-project/pull/140498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang-tools-extra] [clang-tidy] Warn about misuse of sizeof operator in loops. (PR #143205)

2025-06-21 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/143205 >From 52e4413ea1e701dfe0b24cf957a26bb72732f066 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Wed, 21 May 2025 16:06:44 -0700 Subject: [PATCH 1/9] Place holder message for sizeof operator in loops. --

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-06-21 Thread via cfe-commits
@@ -411,7 +412,48 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); +llvm::Type *ExpectedType = Expected

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-06-21 Thread via cfe-commits
https://github.com/huixie90 updated https://github.com/llvm/llvm-project/pull/78707 >From 904f24aa69b5df2e52a9f19c3e96fa94b47aec82 Mon Sep 17 00:00:00 2001 From: Hui Date: Fri, 19 Jan 2024 12:33:43 + Subject: [PATCH 1/3] [libc++] fix _Atomic c11 compare exchange does not update expected re

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-06-21 Thread via cfe-commits
@@ -411,7 +412,48 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); +llvm::Type *ExpectedType = Expected

[clang] [NFC][Clang][AST] Use `llvm::copy` instead of `memcpy` in StringLiteral (PR #145187)

2025-06-21 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/145187 Also change the constructor and `StringLiteral::Create` to take an `ArrayRef` instead of a pointer and size, so that it can be directly passed to `llvm::copy`. This also eliminates the need of a specialized si

[clang] [libcxx] [clang] [libc++] fix _Atomic c11 compare exchange does not update expected results (PR #78707)

2025-06-21 Thread via cfe-commits
@@ -411,7 +412,48 @@ static void emitAtomicCmpXchg(CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, CGF.Builder.SetInsertPoint(StoreExpectedBB); // Update the memory at Expected with Old's value. - CGF.Builder.CreateStore(Old, Val1); +llvm::Type *ExpectedType = Expected

[clang-tools-extra] [clang-doc] mangle template specialization file names (PR #144617)

2025-06-21 Thread Erick Velez via cfe-commits
evelez7 wrote: After our offline discussion, I think I'm going to close this PR in favor of implementing mangling for all names. https://github.com/llvm/llvm-project/pull/144617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Could you please run clang-tidy over your file and fix the errors, clangd can detect them, too. https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-06-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang-tools-extra` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/11917 Here is the rel

[clang-tools-extra] [clang-doc] document global variables (PR #145070)

2025-06-21 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/145070 >From f3e1d5e735b42bb8c123fe16fbe8317ded219331 Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Wed, 18 Jun 2025 16:36:49 -0700 Subject: [PATCH] [clang-doc] document global variables --- clang-tools-extra/clan

[clang-tools-extra] [clang-doc] Precommit test for global variables (PR #145069)

2025-06-21 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/145069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 056b52d - [clang-doc] Precommit test for global variables (#145069)

2025-06-21 Thread via cfe-commits
Author: Erick Velez Date: 2025-06-21T11:56:35-07:00 New Revision: 056b52df344f688fd3831a07bc477f77f883a696 URL: https://github.com/llvm/llvm-project/commit/056b52df344f688fd3831a07bc477f77f883a696 DIFF: https://github.com/llvm/llvm-project/commit/056b52df344f688fd3831a07bc477f77f883a696.diff L

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: I played with matchers a bit, one `hasDescendant` may be eliminated by: ```diff diff --git a/clang-tools-extra/clang-tidy/bugprone/MoveSharedPointerContentsCheck.cpp b/clang-tools-extra/clang-tidy/bugprone/MoveSharedPointerContentsCheck.cpp index 4d5c25bf9f27..ab5e13fbb9cc 1006

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,136 @@ +//===--- MoveSharedPointerContentsCheck.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 bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/67467 ___ 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 bugprone-move-shared-pointer-contents check. (PR #67467)

2025-06-21 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,23 @@ +.. title:: clang-tidy - bugprone-move-shared-pointer-contents + +bugprone-move-shared-pointer-contents += + + +Detects calls to move the contents out of a ``std::shared_ptr`` rather +than moving the pointer itself. In other wor

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 004e79ee856a965459ce0372de97f4a89d0c Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH] Suppress noreturn warning if last statement in a function is

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

2025-06-21 Thread via cfe-commits
github-actions[bot] wrote: @stellar-aria Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a b

[clang-tools-extra] e7dd223 - [clang-tidy] Add new check `readability-use-numeric-limits` (#127430)

2025-06-21 Thread via cfe-commits
Author: Katherine Whitlock Date: 2025-06-21T21:10:20+03:00 New Revision: e7dd223ec451d4e8e522aa4f2c2baaa3d027f347 URL: https://github.com/llvm/llvm-project/commit/e7dd223ec451d4e8e522aa4f2c2baaa3d027f347 DIFF: https://github.com/llvm/llvm-project/commit/e7dd223ec451d4e8e522aa4f2c2baaa3d027f347.

[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

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

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

2025-06-21 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] [clang/docs] add a missing brace in ClangFormatStyleOptions.rst (PR #145145)

2025-06-21 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks closed https://github.com/llvm/llvm-project/pull/145145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2ed089f - [clang/docs] add a missing brace in ClangFormatStyleOptions.rst (#145145)

2025-06-21 Thread via cfe-commits
Author: Tal Kedar Date: 2025-06-21T20:00:22+02:00 New Revision: 2ed089fb18b92ad668509076b9830f55d96d27fe URL: https://github.com/llvm/llvm-project/commit/2ed089fb18b92ad668509076b9830f55d96d27fe DIFF: https://github.com/llvm/llvm-project/commit/2ed089fb18b92ad668509076b9830f55d96d27fe.diff LOG

[clang] [clang/docs] add a missing brace in ClangFormatStyleOptions.rst (PR #145145)

2025-06-21 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/145145 ___ 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 'IgnoreMarcos' option to 'special-member-functions' check (PR #143550)

2025-06-21 Thread Baranov Victor via cfe-commits
vbvictor wrote: > Actually, the cxxRecordDecl might not be in a macro, but the special member > functions are. The checker doc states: `The check finds classes where some but not all of the special member functions are defined.` I think we only need to ignore if the whole class expands from ma

[clang] [CIR] Initial extra attributes for call operation (PR #145178)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sirui Mu (Lancern) Changes This patch adds extra function attributes to the `cir.call` operation. The extra attributes now may contain a single `cir.nothrow` attribute that indicates whether the callee throws. --- Full diff: https://gith

[clang] [CIR] Initial extra attributes for call operation (PR #145178)

2025-06-21 Thread Sirui Mu via cfe-commits
https://github.com/Lancern created https://github.com/llvm/llvm-project/pull/145178 This patch adds extra function attributes to the `cir.call` operation. The extra attributes now may contain a single `cir.nothrow` attribute that indicates whether the callee throws. >From ca4ea5e82bb67f41004f

[clang] ea32139 - [C++][Modules] A module directive may only appear as the first preprocessing tokens in a file (#144233)

2025-06-21 Thread via cfe-commits
Author: yronglin Date: 2025-06-21T18:58:56+08:00 New Revision: ea321392ebc487c1000e43576f44af99edf28a5f URL: https://github.com/llvm/llvm-project/commit/ea321392ebc487c1000e43576f44af99edf28a5f DIFF: https://github.com/llvm/llvm-project/commit/ea321392ebc487c1000e43576f44af99edf28a5f.diff LOG:

[clang] [clang/docs] add a missing brace in ClangFormatStyleOptions.rst (PR #145145)

2025-06-21 Thread Tal Kedar via cfe-commits
https://github.com/kedartal updated https://github.com/llvm/llvm-project/pull/145145 >From 1d024e85d38452d5d149d97d830f12b2126b3c95 Mon Sep 17 00:00:00 2001 From: Tal Kedar Date: Sat, 21 Jun 2025 10:23:42 -0400 Subject: [PATCH] [clang/docs] add a missing brace in ClangFormatStyleOptions.rst .

[clang] [CodeGen] Use range-based for loops (NFC) (PR #145142)

2025-06-21 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/145142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WPD]: Apply speculative WPD in non-lto mode. (PR #145031)

2025-06-21 Thread Hassnaa Hamdi via cfe-commits
hassnaaHamdi wrote: About the failing test, after modifying the Microsoft ABI to allow emitting vtable MD -similarly to what I did for Itanium ABI-, I found out that the GlobalOpt pass can't eliminate the generated unused Vtable aliases because their linkage is `ExternalLinkage` which is expli

[clang] [Sema] Fix lifetime extension for temporaries in range-based for loops in C++23 (PR #145164)

2025-06-21 Thread A. Jiang via cfe-commits
frederick-vs-ja wrote: Could you associate this PR with the issue to fix, if any? https://github.com/llvm/llvm-project/pull/145164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
snarang181 wrote: > Thank you for the patch! Please add a release note in > `clang/docs/ReleaseNotes.rst`. @zwuis, added a description of the patch in the release notes and addressed your review comments. https://github.com/llvm/llvm-project/pull/145166 _

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH 1/4] Suppress noreturn warning if last statement in a functio

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-21 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/143554 >From 5c975c6b59c02b0464a9bfc1b424b89b4d7dd662 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 10 Jun 2025 18:27:12 +0300 Subject: [PATCH 1/4] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' ch

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -872,20 +895,122 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( } else if (info.getCC() == CC_Swift || info.getCC() == CC_SwiftAsync) { swiftcall::computeABIInfo(CGM, *FI); } else { -CGM.getABIInfo().computeInfo(*FI); +if (isBPF) + CGM.

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -858,12 +865,28 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( // Construct the function info. We co-allocate the ArgInfos. FI = CGFunctionInfo::create(CC, isInstanceMethod, isChainCall, isDelegateCall, info, paramInfos,

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -167,6 +167,7 @@ add_clang_library(clangCodeGen LINK_LIBS clangAST + LLVMABI nikic wrote: This should be part of LLVM_LINK_COMPONENTS instead. https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commit

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -858,12 +865,28 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( // Construct the function info. We co-allocate the ArgInfos. FI = CGFunctionInfo::create(CC, isInstanceMethod, isChainCall, isDelegateCall, info, paramInfos,

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -858,12 +865,28 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( // Construct the function info. We co-allocate the ArgInfos. FI = CGFunctionInfo::create(CC, isInstanceMethod, isChainCall, isDelegateCall, info, paramInfos,

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -104,6 +106,17 @@ static CGCXXABI *createCXXABI(CodeGenModule &CGM) { llvm_unreachable("invalid C++ ABI kind"); } +static std::unique_ptr +makeTargetCodeGenInfo(llvm::abi::TypeBuilder TB) { nikic wrote: The pass by value here is probably not intentional?

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,241 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-06-21 Thread Nikita Popov via cfe-commits
@@ -858,12 +865,28 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo( // Construct the function info. We co-allocate the ArgInfos. FI = CGFunctionInfo::create(CC, isInstanceMethod, isChainCall, isDelegateCall, info, paramInfos,

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH 1/3] Suppress noreturn warning if last statement in a functio

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH 1/2] Suppress noreturn warning if last statement in a functio

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -681,6 +705,30 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.diag_FallThrough_HasNoReturn) S.Diag(RBrace, CD.diag_FallThrough_HasNoReturn) << CD.FunKind; } else if (!ReturnsVoid && CD.diag_FallThrough_ReturnsNonVoi

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
https://github.com/zwuis commented: Thank you for the patch! Please add a release note in `clang/docs/ReleaseNotes.rst`. I'm not sure if this case should be handled: ```cpp if (condition) { throw 1; } else { throw 2; } ``` Maybe we need to open an issue for it. https://github.com/llvm/llvm

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -624,8 +624,32 @@ struct CheckFallThroughDiagnostics { } }; -} // anonymous namespace +bool isKnownToAlwaysThrow(const FunctionDecl *FD) { + if (!FD->hasBody()) +return false; + const Stmt *Body = FD->getBody(); + const Stmt *OnlyStmt = nullptr; + + if (const auto

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Yanzuo Liu via cfe-commits
@@ -681,6 +705,30 @@ static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body, if (CD.diag_FallThrough_HasNoReturn) S.Diag(RBrace, CD.diag_FallThrough_HasNoReturn) << CD.FunKind; } else if (!ReturnsVoid && CD.diag_FallThrough_ReturnsNonVoi

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

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

[clang] [C++][Modules] A module directive may only appear as the first preprocessing tokens in a file (PR #144233)

2025-06-21 Thread via cfe-commits
yronglin wrote: > This causes a large compile-time regression: > https://llvm-compile-time-tracker.com/compare.php?from=1b5d6ec6855369d109fcb740ecd3812231b7a279&to=ea321392ebc487c1000e43576f44af99edf28a5f&stat=instructions:u Thanks report this issue! This my first time to use this website and I

[clang] ae372bf - [CodeGen] Use range-based for loops (NFC) (#145142)

2025-06-21 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-06-21T08:20:57-07:00 New Revision: ae372bfca890cc7a67553b3cb19134359b66c0e1 URL: https://github.com/llvm/llvm-project/commit/ae372bfca890cc7a67553b3cb19134359b66c0e1 DIFF: https://github.com/llvm/llvm-project/commit/ae372bfca890cc7a67553b3cb19134359b66c0e1.diff L

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH 1/3] Suppress noreturn warning if last statement in a functio

[clang] [CodeGen] Use range-based for loops (NFC) (PR #145142)

2025-06-21 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/145142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-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 HEAD~1 HEAD --extensions cpp -- clang/test/SemaCXX/wreturn-always-throws.cpp clang/l

[clang] [lldb] [llvm] [lldb] Fix object format in the Triple of Mach-O files (approach 4) (PR #145157)

2025-06-21 Thread via cfe-commits
https://github.com/royitaqi edited https://github.com/llvm/llvm-project/pull/145157 ___ 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 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-21 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/143554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH 1/2] Suppress noreturn warning if last statement in a functio

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samarth Narang (snarang181) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/145166.diff 2 Files Affected: - (modified) clang/lib/Sema/AnalysisBasedWarnings.cpp (+45) - (added) clang/test/SemaCXX/wreturn-always-throws.

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 edited https://github.com/llvm/llvm-project/pull/145166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 ready_for_review https://github.com/llvm/llvm-project/pull/145166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 359dfb1a835617a83ae13865817480e68aa67750 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH] Suppress noreturn warning if last statement in a function is

[clang] Suppress noreturn warning if last statement in a function is a throw (PR #145166)

2025-06-21 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 updated https://github.com/llvm/llvm-project/pull/145166 >From 2c2324a684f32266aace70fc12bec297971625e6 Mon Sep 17 00:00:00 2001 From: Samarth Narang Date: Sat, 21 Jun 2025 08:42:00 -0400 Subject: [PATCH] Suppress noreturn warning if last statement in a function is

  1   2   >