[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] [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-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] [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] [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
@@ -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] [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] [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] [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] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-21 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: FWIW, this appears to fix a compilation error in LLVM for `mips-netbsd`: ``` /home/alexrp/Source/ziglang/zig-bootstrap/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:444:26: error: no matching function for call to 'min' 444 | UsedByIndices.resize(std::min(UsedByIndices.si

[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] [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] 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] [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] [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-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'special-member-functions' check (PR #143550)

2025-06-21 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/143550 ___ 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 Julian Schmidt via cfe-commits
https://github.com/5chmidti approved this pull request. LGTM but I'm +- on the default Let's see if others have a stronger opinion on the default --- Not directly part of this, but: I'd prefer to see a warning for expansions of macros defined inside the code base, but not from macros defined

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

[clang] [clang][Preprocessor] Add peekNextPPToken, makes look ahead next token without side-effects (PR #143898)

2025-06-21 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/143898 >From 373daed324ca99f0b327c424c64a101f7d0f99a3 Mon Sep 17 00:00:00 2001 From: yronglin Date: Thu, 12 Jun 2025 21:46:13 +0800 Subject: [PATCH 1/2] [Clang] Add peekNextPPToken, makes peek next token without side

[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 looks correct to me. Thanks for the review! https://github.com/llvm/llvm-project/pull/144233 ___ 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-06-21 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/107168 ___ 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
@@ -50,3 +50,12 @@ Modern C++ needs ``goto`` only to jump out of nested loops. some_operation(); All other uses of ``goto`` are diagnosed in `C++`. + + +Options +--- + +.. option:: IgnoreMacros + + If set to `true`, the check will not warn if ``goto`` statement is plac

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

2025-06-21 Thread Julian Schmidt via cfe-commits
@@ -1,27 +1,34 @@ // RUN: %check_clang_tidy %s cppcoreguidelines-avoid-goto %t +// RUN: %check_clang_tidy -check-suffix=MACRO %s cppcoreguidelines-avoid-goto %t -- -config="{CheckOptions: { cppcoreguidelines-avoid-goto.IgnoreMacros: true }}" 5chmidti wrote: Yo

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'special-member-functions' check (PR #143550)

2025-06-21 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Actually, the cxxRecordDecl might not be in a macro, but the special member functions are. E.g.: ``` ` ` cpp #define DEF_COPY(name) \ name(const name&) = default; \ name& operator=(const name&) = default; ` ` ` https://github.com/llvm/llvm-project/pull/143550 __

[clang-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'special-member-functions' check (PR #143550)

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

[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] [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] [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-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][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] [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 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 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] c69f97c - [Clang] Add WG21 papers from the Sofia meeting to the status page

2025-06-21 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2025-06-21T11:17:19+03:00 New Revision: c69f97cb95a2579fc561af30624d744811d4d287 URL: https://github.com/llvm/llvm-project/commit/c69f97cb95a2579fc561af30624d744811d4d287 DIFF: https://github.com/llvm/llvm-project/commit/c69f97cb95a2579fc561af30624d744811d4d287.diff

[clang] [CIR] Upstream BinAssign for ComplexType (PR #144868)

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

[clang] [Clang][NFC] Use `llvm::sort()` (PR #140337)

2025-06-21 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/140337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 1b5d6ec - [clang-tidy] count class member initializers as statements in 'readability-function-size' (#131669)

2025-06-21 Thread via cfe-commits
Author: Baranov Victor Date: 2025-06-21T13:14:19+03:00 New Revision: 1b5d6ec6855369d109fcb740ecd3812231b7a279 URL: https://github.com/llvm/llvm-project/commit/1b5d6ec6855369d109fcb740ecd3812231b7a279 DIFF: https://github.com/llvm/llvm-project/commit/1b5d6ec6855369d109fcb740ecd3812231b7a279.diff

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

2025-06-21 Thread Owen Pan via cfe-commits
@@ -6992,7 +6992,7 @@ the configuration (without a prefix: ``Auto``). .. code-block:: c++ namespace N1 { - namespace N2 + namespace N2 { owenca wrote: This file is generated from `clang/include/clang/Format/Format.h`. Please edit that fil

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-21 Thread Hervé Poussineau via cfe-commits
https://github.com/hpoussin created https://github.com/llvm/llvm-project/pull/145158 Mips was the only architecture having PtrDiffType = SignedInt and IntPtrType = SignedLong This fixes a problem on mipsel-windows-gnu triple, where uintptr_t was wrongly defined as unsigned long instead of uns

[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
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (royitaqi) Changes Context: See previous approaches: #142704, #143633, #144177 # This approach This approach follows this [previous suggestion](https://github.com/llvm/llvm-project/pull/144177#issuecomment-2981087019): 1. Create a ne

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-mips Author: Hervé Poussineau (hpoussin) Changes Mips was the only architecture having PtrDiffType = SignedInt and IntPtrType = SignedLong This fixes a problem on mipsel-windows-gnu triple, where uintptr_t was wrongly defined as unsigned long

[clang] [Mips] Correctly define IntPtrType (PR #145158)

2025-06-21 Thread Hervé Poussineau via cfe-commits
https://github.com/hpoussin updated https://github.com/llvm/llvm-project/pull/145158 From f7e8c0fcc45e727ce69a453f53ad3f40d6f5fd95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Sat, 21 Jun 2025 11:52:27 +0200 Subject: [PATCH] [Mips] Correctly define IntPtrType Mips w

[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-06-21 Thread via cfe-commits
eaeltsin wrote: The tests fail with SIGSEGV without hwasan, so there is some problem revealed by this change either in the compiler or in the tests. Bailing out under hwasan is not a fix. Disallowing function pointers makes the problem go away, so might be a useful hint. Another hint is that

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

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] 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 a5930c939d0dfafa90c913167a6ea09ca7e30385 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 '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] [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] 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] [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
@@ -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-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] 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] 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-tools-extra] [clang-tidy] add 'IgnoreMarcos' option to 'avoid-goto' check (PR #143554)

2025-06-21 Thread Baranov Victor via cfe-commits
@@ -1,27 +1,34 @@ // RUN: %check_clang_tidy %s cppcoreguidelines-avoid-goto %t +// RUN: %check_clang_tidy -check-suffix=MACRO %s cppcoreguidelines-avoid-goto %t -- -config="{CheckOptions: { cppcoreguidelines-avoid-goto.IgnoreMacros: true }}" vbvictor wrote: It

[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 approved this pull request. LGTM minus comments 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] [CIR] Upstream __real__ for ComplexType (PR #144261)

2025-06-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/144261 >From 0e4fd682d5f52ca8c544ba7df6f5944073ada68c Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun, 15 Jun 2025 14:44:11 +0200 Subject: [PATCH] [CIR] Upstream __real__ for ComplexType --- clang/include/

[clang] [CIR] Upstream __real__ for ComplexType (PR #144261)

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,h -- clang/lib/CIR/CodeGen/CIRGenBuilder.h clang/lib/CI

[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 e92129c1d38d20214091694294e659170227522c 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] 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-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
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] [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] [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] [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-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-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] [CIR] Upstream __imag__ for ComplexType (PR #144262)

2025-06-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/144262 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 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] [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] [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-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-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] 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 8a51a2fcff8ea481cbdad513e9217f2c0861b0b4 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] [C++][Modules] A module directive may only appear as the first preprocessing tokens in a file (PR #144233)

2025-06-21 Thread Nikita Popov via cfe-commits
nikic wrote: This causes a large compile-time regression: https://llvm-compile-time-tracker.com/compare.php?from=1b5d6ec6855369d109fcb740ecd3812231b7a279&to=ea321392ebc487c1000e43576f44af99edf28a5f&stat=instructions:u https://github.com/llvm/llvm-project/pull/144233

[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

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

2025-06-21 Thread Tal Kedar via cfe-commits
kedartal wrote: I knew there was a reason why they taught me to read :) 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] 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 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 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 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 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 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 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 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

  1   2   >