[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: >From the context, it feels like clang is going to try turning groups of >initializers into memcpys, is that right? If so, does that affect the desired >stepping behaviour, i.e. would multiple assignments be grouped into one >memcpy? I suppose it's not majo

[clang] [KeyInstr][Clang] Copy ctor/assignment operator source atoms (PR #144346)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -0,0 +1,59 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions %s -gno-column-info -debug-info-kind=line-tables-only -emit-llvm -o - \ +// RUN: | FileCheck %s + +// g::h and i can be memcpy'd, check the assignment gets Key Instructions metadata. + +struct e { +

[clang] [-Wunsafe-buffer-usage] Support safe patterns of "%.*s" in printf functions (PR #145862)

2025-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes The character buffer passed to a "%.*s" specifier may be safely bound if the precision is properly specified, even if the buffer does not guarantee null-termination. For example, ``` void f(std::span

[clang] [KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions (PR #144115)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -8,8 +8,14 @@ // HELP-NOT: key-instructions // KEY-INSTRUCTIONS: "-gkey-instructions" -// KEY-INSTRUCTIONS: "-mllvm" "-dwarf-use-key-instructions" // NO-KEY-INSTRUCTIONS-NOT: key-instructions - TODO: Add smoke test once some functionality has been added. +// RUN %c

[clang] [KeyInstr][Clang][NFC] Don't set -dwarf-use-key-instructions (PR #144115)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -8,8 +8,14 @@ // HELP-NOT: key-instructions jmorse wrote: Not an issue with this patch but, with no positive HELP: prefixes, this check passes vacuously. https://github.com/llvm/llvm-project/pull/144115 ___ cfe-

[clang] [Clang][LoongArch] Fixed incorrect _BitInt(N>64) alignment (PR #145297)

2025-06-26 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/145297 >From 9210e8bfccd63dcbe6e9629f1855e6be7af25a11 Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Wed, 25 Jun 2025 17:59:13 +0800 Subject: [PATCH 1/2] [LoongArch] Pre-commit test for _BitInt(N) --- clang/test/Co

[clang] [Clang][LoongArch] Fixed incorrect _BitInt(N>64) alignment (PR #145297)

2025-06-26 Thread via cfe-commits
@@ -0,0 +1,122 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple loongarch32 -fexperimental-max-bitint-width=1024 -emit-llvm %s -o - | FileCheck %s --check-prefix=LA32 +// RUN: %clang_cc1 -triple l

[clang] [-Wunsafe-buffer-usage] Support safe patterns of "%.*s" in printf functions (PR #145862)

2025-06-26 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/145862 The character buffer passed to a "%.*s" specifier may be safely bound if the precision is properly specified, even if the buffer does not guarantee null-termination. For example, ``` void f(std::span span)

[clang] [-Wunsafe-buffer-usage] Support safe patterns of "%.*s" in printf functions (PR #145862)

2025-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes The character buffer passed to a "%.*s" specifier may be safely bound if the precision is properly specified, even if the buffer does not guarantee null-termination. For example, ``` void f(std::s

[clang] [-Wunsafe-buffer-usage] Support safe patterns of "%.*s" in printf functions (PR #145862)

2025-06-26 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: This PR depends on https://github.com/llvm/llvm-project/pull/145626 https://github.com/llvm/llvm-project/pull/145862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -922,8 +922,8 @@ template <> struct MDNodeKeyImpl { MDString *LinkageName; Metadata *File; unsigned Line; - Metadata *Type; unsigned ScopeLine; + Metadata *Type; jmorse wrote: SGTM https://github.com/llvm/llvm-project/pull/144107 ___

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
@@ -1904,7 +1904,8 @@ CGDebugInfo::createInlinedSubprogram(StringRef FuncName, /*ScopeLine=*/0, /*Flags=*/llvm::DINode::FlagArtificial, /*SPFlags=*/llvm::DISubprogram::SPFlagDefinition, -/*TParams=*/nullptr, /*ThrownTypes=*/nullptr, /*Annotations

[clang] [clang-format][NFC] Remove `\brief` from comments (PR #145853)

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

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. No strong opinion on the arguments really, thing can always be re-rationalised in the future. > Not sure I follow this question - can you elaborate? It's a draft fragment of one of the questions I asked that floated to the bottom, whoops.

[clang] [llvm] [KeyInstr] Add DISubprogram::keyInstructions bit (PR #144107)

2025-06-26 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited https://github.com/llvm/llvm-project/pull/144107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-26 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Björn Schäpers via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

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

2025-06-26 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin ready_for_review https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-26 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: There are still a few test failures, including in libc++, but I think we are are at the stage where this could benefit from more eyes https://github.com/llvm/llvm-project/pull/141776 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

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

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

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

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

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

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

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

[clang] [Clang] Fix '-Wformat-overflow' FP when floats had field-width and plus prefix (PR #144274)

2025-06-26 Thread Baranov Victor via cfe-commits
@@ -43,6 +43,11 @@ void call_snprintf(double d, int n, int *ptr) { __builtin_snprintf(node_name, sizeof(node_name), "%pOFn", ptr); // nonkprintf-warning {{'snprintf' will always be truncated; specified size is 6, but format string expands to at least 7}} __builtin_snprintf

[clang-tools-extra] [clang-tidy] Improve `bugprone-exception-escape`: add stacktrace of escaped exception (PR #134375)

2025-06-26 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping @HerrCai0907 if you wish to re-review tests https://github.com/llvm/llvm-project/pull/134375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix false negatives with type aliases in `cppcoreguidlines-pro-bounds-pointer-arithmetic` check (PR #139430)

2025-06-26 Thread Baranov Victor via cfe-commits
vbvictor wrote: Ping, changes are quite easy https://github.com/llvm/llvm-project/pull/139430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-26 Thread Tom Weaver via cfe-commits
TomWeaver18 wrote: @ziqingluo-90 Hello and greetings form the UK! Are you aware that this change caused the following build bot failure? : https://lab.llvm.org/buildbot/#/builders/144/builds/28591 Are you looking into a fix? The bot has been red for some time now. If a quick fix is not possibl

[clang] [clang] Add option for -nolibc in Driver/ToolChains/Baremetal.cpp (PR #145700)

2025-06-26 Thread William Huynh via cfe-commits
https://github.com/saturn691 ready_for_review https://github.com/llvm/llvm-project/pull/145700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add option for -nolibc in Driver/ToolChains/Baremetal.cpp (PR #145700)

2025-06-26 Thread William Huynh via cfe-commits
https://github.com/saturn691 updated https://github.com/llvm/llvm-project/pull/145700 >From 97c87ceb781eee0a04bd93299a341e03cbe68ddd Mon Sep 17 00:00:00 2001 From: William Huynh Date: Wed, 25 Jun 2025 14:25:22 +0100 Subject: [PATCH 1/2] [clang] Add option for -nolibc in Driver/ToolChains/Barem

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-26 Thread Rana Pratap Reddy via cfe-commits
@@ -128,6 +160,16 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, return false; } +bool SemaAMDGPU::checkImageImmArgFunctionCall(CallExpr *TheCall, + unsigned ArgCount) { + llvm::APSInt Result; + if (!(Se

[clang] [Clang][LoongArch] Fixed incorrect _BitInt(N>64) alignment (PR #145297)

2025-06-26 Thread via cfe-commits
https://github.com/Ami-zhang updated https://github.com/llvm/llvm-project/pull/145297 >From 3d388ed03c57ef6f15ef168d82589e1466aa3d4f Mon Sep 17 00:00:00 2001 From: Ami-zhang Date: Wed, 25 Jun 2025 17:59:13 +0800 Subject: [PATCH 1/2] [LoongArch] Pre-commit test for _BitInt(N) --- clang/test/Co

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-26 Thread Rana Pratap Reddy via cfe-commits
@@ -0,0 +1,31 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown %s -emit-llvm -o - | FileCheck %s + +#pragma OPENCL EXTENSION cl_khr_fp64:enable + +typedef int v8i __attribut

[clang] [Clang][LoongArch] Fixed incorrect _BitInt(N>64) alignment (PR #145297)

2025-06-26 Thread via cfe-commits
@@ -0,0 +1,36 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple loongarch64 -fexperimental-max-bitint-width=1024 -emit-llvm %s -o - | FileCheck %s Ami-zhang wrote: Okay, I have ad

[clang] [clang] Add option for -nolibc in Driver/ToolChains/Baremetal.cpp (PR #145700)

2025-06-26 Thread William Huynh via cfe-commits
https://github.com/saturn691 edited https://github.com/llvm/llvm-project/pull/145700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-26 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: rm -fr %t vbvictor wrote: Test file should be placed inside `clang-tools-extra/test/clang-tidy/infrastructure` https://github.com/llvm/llvm-project/pull/145630 ___ cfe-commits mailing list cf

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

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

[clang] Add warning for blocks capturing {'this', raw pointers, references} (PR #144388)

2025-06-26 Thread Sylvain Defresne via cfe-commits
@@ -1641,6 +1641,17 @@ def warn_implicitly_retains_self : Warning < "block implicitly retains 'self'; explicitly mention 'self' to indicate " "this is intended behavior">, InGroup>, DefaultIgnore; +def warn_blocks_capturing_this : Warning<"block implicitly captures 'this'

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

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

[clang] [clang-tools-extra] [clang-tidy] [Modules] Skip checking decls in clang-tidy (PR #145630)

2025-06-26 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: > I think modules are not system headers. For the example in the issue, the > module interface is not system nor headers. It is another TU but we just can > get AST from it. Indeed, they are handled different. Left a minor comment. https://github.com/llv

[clang] [clang] NFC: Add alias for std::pair used in SourceLocation (PR #145711)

2025-06-26 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LG from my side, but I would wait for another approval just to make sure people are on board with a relatively-large NFC refactoring. Code style is a subjective matter, so having a little more backing from @AaronBallman or someone el

[clang] [llvm] [NVPTX] Consolidate and cleanup various NVPTXISD nodes (NFC) (PR #145581)

2025-06-26 Thread Simon Pilgrim via cfe-commits
@@ -1796,27 +1769,6 @@ bool NVPTXDAGToDAGISel::tryStoreParam(SDNode *N) { } } break; - // Special case: if we have a sign-extend/zero-extend node, insert the - // conversion instruction first, and use that as the value operand to - // the selected StoreParam node

[clang] [Sema] Avoid deep recursion in AnalyzeImplicitConversions (PR #145734)

2025-06-26 Thread Qinkun Bao via cfe-commits
qinkunbao wrote: Hi, looks like this PR broke LLVM buildbots https://lab.llvm.org/buildbot/#/builders/52/builds/9317 https://github.com/llvm/llvm-project/pull/145734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [flang] [flang][OpenMP] Remove experimental warning (PR #144915)

2025-06-26 Thread Tom Eccles via cfe-commits
tblah wrote: [ebd2980](https://github.com/llvm/llvm-project/pull/144915/commits/ebd2980051b3994d1c419d06f3cba22927283aec) moves the warning to the frontend driver so it can use the checks added in #145725 https://github.com/llvm/llvm-project/pull/144915

[clang] [flang] [flang][OpenMP] Remove experimental warning (PR #144915)

2025-06-26 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/144915 >From 7bb96a8479a0b351b0d6de33cbab98e498a3ab7c Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 19 Jun 2025 14:57:04 + Subject: [PATCH 1/3] [flang][OpenMP] Remove experimental warning RFC: https://discou

[clang] [clang] Add option for -nolibc in Driver/ToolChains/Baremetal.cpp (PR #145700)

2025-06-26 Thread William Huynh via cfe-commits
https://github.com/saturn691 edited https://github.com/llvm/llvm-project/pull/145700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_invoke and use it in libc++ (PR #116709)

2025-06-26 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/116709 >From e0bb550672326e21a556ac727f2e2a6ef65f0469 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Tue, 1 Oct 2024 11:08:02 +0200 Subject: [PATCH 1/8] [Clang] Add __builtin_invoke and recognize std::invoke a

[clang] 78b7f6a - [Sema] Avoid deep recursion in AnalyzeImplicitConversions (#145734)

2025-06-26 Thread via cfe-commits
Author: Ilya Biryukov Date: 2025-06-26T09:51:25+02:00 New Revision: 78b7f6a03d0f32f37e619dce8557cd1df1898944 URL: https://github.com/llvm/llvm-project/commit/78b7f6a03d0f32f37e619dce8557cd1df1898944 DIFF: https://github.com/llvm/llvm-project/commit/78b7f6a03d0f32f37e619dce8557cd1df1898944.diff

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Björn Schäpers via cfe-commits
@@ -4382,8 +4382,18 @@ struct FormatStyle { ///#include "B/a.h" #include "a/b.h" /// \endcode bool IgnoreCase; +/// When sorting includes in each block, Only take file extensions into HazardyKnusperkeks wrote: ```suggestion //

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Björn Schäpers via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-26 Thread Rainer Orth via cfe-commits
rorth wrote: > I reverted this in #145774 since it causes build-failures. It seems that the > substitution `` CLANG_LIBRARY_PATH=`llvm-config --libdir `` doesn't work in > some cases Thanks. When the failure reports began to trickle in, I started investigating, but it got very late. I'd bee

[clang] [Sema] Avoid deep recursion in AnalyzeImplicitConversions (PR #145734)

2025-06-26 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov closed https://github.com/llvm/llvm-project/pull/145734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][python][test] Move python binding tests to lit framework (PR #142948)

2025-06-26 Thread Rainer Orth via cfe-commits
@@ -0,0 +1,35 @@ +#!/bin/sh + +# UNSUPPORTED: !libclang-loadable + +# Tests fail on Windows, and need someone knowledgeable to fix. +# It's not clear whether it's a test or a valid binding problem. +# XFAIL: target={{.*windows.*}} rorth wrote: I suspected somethi

[clang-tools-extra] [clang-doc] refactor JSONGenerator array usage (PR #145595)

2025-06-26 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. Looks great! One idea for future improvement would be to wrap `std::optional RepositoryUrl` in a object (e.g. `SerializationContext`) so in the future if we need to pass around more information beside the URL, we don't need to modify eve

[clang] [clang-format][NFC] Remove `\brief` from comments (PR #145853)

2025-06-26 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/145853 This was done before in https://reviews.llvm.org/D46320 >From 889e392fcf49c05ceea7949690b207b73f83d49b Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 26 Jun 2025 01:14:58 -0700 Subject: [PATCH] [clang-format

[clang] [clang-format][NFC] Remove `\brief` from comments (PR #145853)

2025-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang Author: Owen Pan (owenca) Changes This was done before in https://reviews.llvm.org/D46320 --- Full diff: https://github.com/llvm/llvm-project/pull/145853.diff 6 Files Affected: - (modified) clang/docs/ClangForm

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-26 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/28591

[clang] [win][clang] Align scalar deleting destructors with MSABI (PR #139566)

2025-06-26 Thread Mariya Podchishchaeva via cfe-commits
@@ -194,9 +217,31 @@ I::~I() { call_in_dtor(); } // CHECK-MSABI32-LABEL: define {{.*}} @"??_GI@@UAEPAXI@Z"( // CHECK-MSABI-NOT: call{{ }} // CHECK-MSABI: load i32 -// CHECK-MSABI: icmp eq i32 {{.*}}, 0 -// CHECK-MSABI: br i1 +// CHECK-MSABI-NEXT: and i32 %[[IMP_PARAM:.*]], 4 +/

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Naveen Seth Hanig via cfe-commits
https://github.com/naveen-seth created https://github.com/llvm/llvm-project/pull/145857 The test `test/ClangScanDeps/P1689.cppm` was previously not supported on Windows due to the differences in path separators between Windows and Linux. This normalizes the paths, allowing this test to run on

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Naveen Seth Hanig (naveen-seth) Changes The test `test/ClangScanDeps/P1689.cppm` was previously not supported on Windows due to the differences in path separators between Windows and Linux. This normalizes the paths, allowing this test to

[clang] [REAPPLY][Clang-Repl] Add support for out-of-process execution. #110418 (PR #144064)

2025-06-26 Thread via cfe-commits
https://github.com/SahilPatidar updated https://github.com/llvm/llvm-project/pull/144064 >From 05943c9542cd89ae672ddc0f14514e0c7b1e0bd7 Mon Sep 17 00:00:00 2001 From: SahilPatidar Date: Tue, 3 Dec 2024 15:07:56 +0530 Subject: [PATCH 1/6] Re-Land: [Clang-Repl] Add support for out-of-process exe

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 0827e9c4152485a280dc9e65ca8a0eaa3a9a385f Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Add IgnoreExtension option to SortIncludesOpt

[clang] d144eb1 - [Clang] Back out the source location workaround for CXXConstructExpr (#145260)

2025-06-26 Thread via cfe-commits
Author: Younan Zhang Date: 2025-06-26T17:02:13+08:00 New Revision: d144eb1d8cd3abdaec23c902aa3e5a129c9827ef URL: https://github.com/llvm/llvm-project/commit/d144eb1d8cd3abdaec23c902aa3e5a129c9827ef DIFF: https://github.com/llvm/llvm-project/commit/d144eb1d8cd3abdaec23c902aa3e5a129c9827ef.diff

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/145260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-06-26 Thread via cfe-commits
https://github.com/ukalappa-mips updated https://github.com/llvm/llvm-project/pull/145647 >From 8a1f98820b280b02f0662c7129a078680d67497f Mon Sep 17 00:00:00 2001 From: Umesh Kalappa Date: Wed, 25 Jun 2025 06:58:37 + Subject: [PATCH 1/2] Added prefetch extensions for MIPS RV64 P8700 and enab

[clang] [clang][CompundLiteralExpr] Don't defer evaluation for CLEs (PR #137163)

2025-06-26 Thread kadir çetinkaya via cfe-commits
@@ -9125,9 +9126,25 @@ bool LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) { assert((!Info.getLangOpts().CPlusPlus || E->isFileScope()) && "lvalue compound literal in c++?"); - // Defer visiting the literal until the lvalue-to-rvalue con

[clang] [clang-scan-deps] Enable test P1689.cppm on Windows (PR #145857)

2025-06-26 Thread Naveen Seth Hanig via cfe-commits
naveen-seth wrote: I also checked the other tests in `test/ClangScanDeps`. This is currently the only test where Windows is disabled only because of the path seperator difference. https://github.com/llvm/llvm-project/pull/145857 ___ cfe-commits maili

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 607b938f548fcb734893e4082ce135e986353759 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Add IgnoreExtension option to SortIncludesOpt

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-26 Thread Rana Pratap Reddy via cfe-commits
@@ -83,6 +83,38 @@ bool SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, case AMDGPU::BI__builtin_amdgcn_update_dpp: { return checkMovDPPFunctionCall(TheCall, 6, 2); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-26 Thread Rana Pratap Reddy via cfe-commits
@@ -683,6 +683,206 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin_amdgcn_image_load_1darray_v4f32_i32: + case A

[clang] [WIP][AMDGPU] Support for type inferring image load/store builtins for AMDGPU (PR #140210)

2025-06-26 Thread Rana Pratap Reddy via cfe-commits
@@ -683,6 +683,206 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned BuiltinID, return Builder.CreateInsertElement(I0, A, 1); } + case AMDGPU::BI__builtin_amdgcn_image_load_1d_v4f32_i32: + case AMDGPU::BI__builtin_amdgcn_image_load_1darray_v4f32_i32: + case A

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Daan De Meyer via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

[clang] [OpenMP-5.2] deprecate delimited form of 'declare target' (PR #145854)

2025-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Urvi Rav (ravurvi20) Changes According to OpenMP 5.2 (Section 7.8.2), the directive name `declare target` may be used as a synonym for `begin declare target` only when no clauses are specified. This clause-less delimited form is now depre

[clang] [OpenMP-5.2] deprecate delimited form of 'declare target' (PR #145854)

2025-06-26 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 created https://github.com/llvm/llvm-project/pull/145854 According to OpenMP 5.2 (Section 7.8.2), the directive name `declare target` may be used as a synonym for `begin declare target` only when no clauses are specified. This clause-less delimited form is now depr

[clang] [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-26 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -0,0 +1,98 @@ +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=CL -finclude-default-header %s +// RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -Wconversion -Werror -fsyntax-only -cl-std=C

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Owen Pan via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
@@ -81,18 +83,52 @@ getNewFieldsOrder(const RecordDecl *Definition, return NewFieldsOrder; } +struct ReorderedStruct { legrosbuffle wrote: If you can pull out this refactoring (`ReorderedStruct` + `addRepacement`) to a separate commit that'd be great. htt

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
@@ -0,0 +1,256 @@ +//===-- tools/extra/clang-reorder-fields/utils/Designator.cpp ---*- C++ -*-===// +// +// 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-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: I would put this in the parent directory, the `utils/` subdir does not bring that much IMO. https://github.com/llvm/llvm-project/pull/142150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
@@ -0,0 +1,256 @@ +//===-- tools/extra/clang-reorder-fields/utils/Designator.cpp ---*- C++ -*-===// +// +// 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-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
@@ -289,35 +321,213 @@ static void reorderFieldsInConstructor( Replacements); } +/// Replacement for broken InitListExpr::isExplicit function. +/// TODO: Remove when InitListExpr::isExplicit is fixed. legrosbuffle wrote: s/TODO/FIXME/ If

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle edited https://github.com/llvm/llvm-project/pull/142150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle commented: Nice ! Conceptually this looks good, only stylistic comments. https://github.com/llvm/llvm-project/pull/142150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-06-26 Thread Clement Courbet via cfe-commits
@@ -289,35 +321,213 @@ static void reorderFieldsInConstructor( Replacements); } +/// Replacement for broken InitListExpr::isExplicit function. +/// TODO: Remove when InitListExpr::isExplicit is fixed. +static bool isImplicitILE(const InitListExpr *ILE, con

[clang] [llvm] [AArch64][VecLib] Add libmvec support for AArch64 targets (PR #143696)

2025-06-26 Thread KAWASHIMA Takahiro via cfe-commits
kawashima-fj wrote: Thanks for your excellent work! I'll add the same support to Flang. If you (or anyone) are already working on this, please let me know. https://github.com/llvm/llvm-project/pull/143696 ___ cfe-commits mailing list cfe-commits@lists

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-26 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/145260 >From 504c05c3a076ecafb4f11ce0703caddfac6e06d1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 23 Jun 2025 12:31:39 +0800 Subject: [PATCH 1/2] [Clang] Back out the source location workaround for CXXConst

[clang] [Clang] Back out the source location workaround for CXXConstructExpr (PR #145260)

2025-06-26 Thread Younan Zhang via cfe-commits
@@ -98,7 +98,36 @@ namespace { CXXCastPath BasePath; bool IsARCUnbridgedCast; -SourceRange OpRange; +struct OpRangeType { + SourceLocation Ranges[3]; zyn0217 wrote: Renamed to Locations :) https://github.com/llvm/llvm-project/pull/145260

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-06-26 Thread Owen Pan via cfe-commits
@@ -1647,7 +1647,7 @@ FormatStyle getLLVMStyle(FormatStyle::LanguageKind Language) { LLVMStyle.SeparateDefinitionBlocks = FormatStyle::SDS_Leave; LLVMStyle.ShortNamespaceLines = 1; LLVMStyle.SkipMacroDefinitionBody = false; - LLVMStyle.SortIncludes = {/*Enabled=*/true,

[clang] [llvm] Triple: Forward declare Twine and remove include (PR #145685)

2025-06-26 Thread Nikolas Klauser via cfe-commits
@@ -349,7 +350,12 @@ class Triple { /// triple fields unknown. Triple() = default; + LLVM_ABI explicit Triple(std::string &&Str); philnik777 wrote: That is indeed the case. Technically there is an additional `move`, OTOH that pretty much never matters,

[clang] [clang] NFC: Add alias for std::pair used in SourceLocation (PR #145711)

2025-06-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/145711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 30de98c - Revert "[-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (#143487)"

2025-06-26 Thread via cfe-commits
Author: Weaver Date: 2025-06-26T11:51:42+01:00 New Revision: 30de98c283f5795dc10cc1c754d87f46a61d15ac URL: https://github.com/llvm/llvm-project/commit/30de98c283f5795dc10cc1c754d87f46a61d15ac DIFF: https://github.com/llvm/llvm-project/commit/30de98c283f5795dc10cc1c754d87f46a61d15ac.diff LOG: R

[clang] [-Wunterminated-string-initialization] Handle C string literals ending with explicit '\0' (PR #143487)

2025-06-26 Thread Tom Weaver via cfe-commits
TomWeaver18 wrote: My apologies but I've had to revert this change to get the build bot green again. Reverted in 30de98c283f5795dc10cc1c754d87f46a61d15ac https://github.com/llvm/llvm-project/pull/143487 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-06-26 Thread via cfe-commits
@@ -2925,6 +2925,49 @@ bool RISCVDAGToDAGISel::SelectAddrRegImm(SDValue Addr, SDValue &Base, return true; } +/// Similar to SelectAddrRegImm, except that the offset restricted for +/// unsinged nine bits. +bool RISCVDAGToDAGISel::SelectAddrRegImm9(SDValue Addr, SDValue &Bas

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-06-26 Thread via cfe-commits
https://github.com/ukalappa-mips edited https://github.com/llvm/llvm-project/pull/145647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-06-26 Thread via cfe-commits
@@ -103,9 +109,41 @@ class SWPFormat let Inst{6-0} = OPC_CUSTOM_0.Value; } +// Prefetch format. +let hasSideEffects = 0, mayLoad = 1, mayStore = 1 in +class Mips_prefetch_ri +: RVInst { + bits<9> imm9; + bits<5> rs1; + bits<5> hint; + + let Inst{31-29} = 0b000; + le

[clang] [SystemZ][z/OS] Implement #pragma export (PR #141671)

2025-06-26 Thread Sean Perry via cfe-commits
https://github.com/perry-ca updated https://github.com/llvm/llvm-project/pull/141671 >From 33413248f61e899f6d4dbbddec9c1cec7bf0e44a Mon Sep 17 00:00:00 2001 From: Sean Perry Date: Fri, 23 May 2025 04:36:46 + Subject: [PATCH 1/4] #pragma export support --- clang/docs/ReleaseNotes.rst

[clang] [llvm] AMDGPU: Add MC layer support for load transpose instructions for gfx1250 (PR #146024)

2025-06-26 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/146024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Added the MIPS prefetch extensions for MIPS RV64 P8700. (PR #145647)

2025-06-26 Thread via cfe-commits
@@ -1523,6 +1524,10 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, return generateImmOutOfRangeError( Operands, ErrorInfo, 0, (1 << 8) - 8, "immediate must be a multiple of 8 bytes in the range"); + case Match_InvalidUImm9:

[clang] [llvm] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-26 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141937 >From 8fe2bd74609cf0c14466ff82a9c966c07eecd6c8 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 19:36:42 + Subject: [PATCH 1/4] [debuginfo][coro] Emit debug info labels for coro

[clang] [llvm] [debuginfo][coro] Emit debug info labels for coroutine resume points (PR #141937)

2025-06-26 Thread Adrian Vogelsgesang via cfe-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >