[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-24 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: The design is, the higher 32 bits are used for module file index and the lower bits are used for offsets. Could you give a concrete example why the current implementation is problematic? https://github.com/llvm/llvm-project/pull/145529 ___

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/145243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add alignment attr & propagate alignment through make.buffer.rsrc inst (PR #145278)

2025-06-24 Thread via cfe-commits
https://github.com/Shoreshen updated https://github.com/llvm/llvm-project/pull/145278 >From 888df5412b37bd3f232bdb38c9f89786d042fe75 Mon Sep 17 00:00:00 2001 From: shore <372660...@qq.com> Date: Mon, 23 Jun 2025 14:12:15 +0800 Subject: [PATCH 1/4] Add alignment attr & propagate alignment through

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-24 Thread Haojian Wu via cfe-commits
hokein wrote: > Sorry. I failed to understand the problem. In what case, may the encoder > produce up to 33 bits? The newly-added testcase shows the issue -- the encoded value for the delta is `1<<32`, relevant code https://github.com/llvm/llvm-project/blob/c3c923c8d62c1e85fe396a499c921c8a475

[clang] [RISCV] Add missing required features for Zvfbfmin intrinsics (PR #145646)

2025-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes Although `checkRVVTypeSupport` can prevent the use of bf16 vector types without Zvfbfmin, the required features for Zvfbfmin intrinsics may still be needed if bf16 vector types can someday be enabled by

[clang] [RISCV] Add missing required features for Zvfbfmin intrinsics (PR #145646)

2025-06-24 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/145646 Although `checkRVVTypeSupport` can prevent the use of bf16 vector types without Zvfbfmin, the required features for Zvfbfmin intrinsics may still be needed if bf16 vector types can someday be enabled by other

[clang] Reland [Driver] Add support for GCC installation detection in Baremetal toolchain (PR #145390)

2025-06-24 Thread Garvit Gupta via cfe-commits
quic-garvgupt wrote: Hi @mysterymath, could you please initiate a build for this PR (#145390) along with PR #144649 on the Fuchsia buildbot? These two PRs contain the necessary fixes to resolve the failure previously encountered on the [fuchsia buildbots](https://luci-milo.appspot.com/ui/p/fuc

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

2025-06-24 Thread via cfe-commits
@@ -164,7 +164,8 @@ QualTypeMapper::convertArrayType(const clang::ArrayType *AT) { /// \return LLVM ABI VectorType with element type, count, and alignment const llvm::abi::Type *QualTypeMapper::convertVectorType(const VectorType *VT) { const llvm::abi::Type *ElementType = c

[clang] Ast importer visitors (PR #138838)

2025-06-24 Thread via cfe-commits
https://github.com/ganenkokb-yandex updated https://github.com/llvm/llvm-project/pull/138838 >From 6a4d62ce1c72639d7fe82565744b3e8808dce4c3 Mon Sep 17 00:00:00 2001 From: Evianaive <153540...@qq.com> Date: Tue, 25 Mar 2025 01:54:06 +0800 Subject: [PATCH 01/13] Implement missing visit function -

[clang] [Clang][Preprocessor] Expand UCNs in macro concatenation (PR #145351)

2025-06-24 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Owen Pan via cfe-commits
@@ -1295,13 +1305,18 @@ FormatToken *FormatTokenLexer::getNextToken() { case '/': // The text was entirely whitespace when this loop was entered. Thus // this has to be an escape sequence. -assert(Text.substr(i, 2) == "\\\r" || Text.substr(i, 2) ==

[clang] [llvm] [Transforms] Add LifetimeMovePass (PR #144319)

2025-06-24 Thread Weibo He via cfe-commits
https://github.com/NewSigma updated https://github.com/llvm/llvm-project/pull/144319 >From 584d47295f7719f96ee77d32a6b4329f82be Mon Sep 17 00:00:00 2001 From: NewSigma Date: Mon, 16 Jun 2025 15:36:53 +0800 Subject: [PATCH 01/10] Add LifetimeMovePass --- clang/test/CodeGenCoroutines/pr5691

[clang] 70bedc7 - [CIR] Upstream ChooseExpr for ComplexType (#145163)

2025-06-24 Thread via cfe-commits
Author: Amr Hesham Date: 2025-06-24T18:23:32+02:00 New Revision: 70bedc74b91a659572ef57d1395409820a20b279 URL: https://github.com/llvm/llvm-project/commit/70bedc74b91a659572ef57d1395409820a20b279 DIFF: https://github.com/llvm/llvm-project/commit/70bedc74b91a659572ef57d1395409820a20b279.diff LO

[clang] [clang-tools-extra] [clang-tidy] `bugprone-unchecked-optional-access`: handle `BloombergLP::bdlb:NullableValue::makeValue` to prevent false-positives (PR #144313)

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

[clang] [analyzer] Enforce not making overly complicated symbols (PR #144327)

2025-06-24 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/144327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Capture mapped pointers on `target` by reference. (PR #145454)

2025-06-24 Thread Abhinav Gaba via cfe-commits
@@ -1,174 +1,178 @@ -// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-fileche

[clang] [llvm] [RISCV] Add Support of RISCV Zibimm Experimental Extension (PR #127463)

2025-06-24 Thread Boyao Wang via cfe-commits
https://github.com/BoyaoWang430 updated https://github.com/llvm/llvm-project/pull/127463 >From e740d8cfb8b689d766841396c5a6ab9a1d389ec7 Mon Sep 17 00:00:00 2001 From: wangboyao Date: Mon, 17 Feb 2025 17:35:52 +0800 Subject: [PATCH 1/3] [RISCV] Add Support of RISCV Zibimm Experimental Extension

[clang] [clang][clang-scan-deps] Add named modules to format 'experimental-full' (PR #145221)

2025-06-24 Thread Jan Svoboda via cfe-commits
@@ -0,0 +1,347 @@ +// This checks that clang-scan-deps properly outputs named module dependencies +// when using the the scanning output format 'experimental-full'. +// +// See commit 72304. +// UNSUPPORTED: target={{.*}}-aix{{.*}} +// +// The slash direction in linux and windows

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

2025-06-24 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] a0ce3e6 - [C++20] [Modules] Avoid crash with calls to (this auto) syntax

2025-06-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-25T14:12:32+08:00 New Revision: a0ce3e691c199145b55b6a7f86468b438eb14264 URL: https://github.com/llvm/llvm-project/commit/a0ce3e691c199145b55b6a7f86468b438eb14264 DIFF: https://github.com/llvm/llvm-project/commit/a0ce3e691c199145b55b6a7f86468b438eb14264.diff LO

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread Tony Varghese via cfe-commits
https://github.com/tonykuttai approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [NFC][libclc] Replace and delete _CLC_DEFINE_UNARY/BINARY/TERNARY_BUILTIN macros (PR #145458)

2025-06-24 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/145458 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 13a9b86 - [NFC][libclc] Replace and delete _CLC_DEFINE_UNARY/BINARY/TERNARY_BUILTIN macros (#145458)

2025-06-24 Thread via cfe-commits
Author: Wenju He Date: 2025-06-25T13:48:53+08:00 New Revision: 13a9b86f627934ccf898e85f86e2a0a0df5f85da URL: https://github.com/llvm/llvm-project/commit/13a9b86f627934ccf898e85f86e2a0a0df5f85da DIFF: https://github.com/llvm/llvm-project/commit/13a9b86f627934ccf898e85f86e2a0a0df5f85da.diff LOG:

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread via cfe-commits
@@ -567,6 +567,12 @@ TARGET_BUILTIN(__builtin_altivec_vextsh2w, "V4SiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsh2d, "V2SLLiV8Ss", "", "power9-vector") TARGET_BUILTIN(__builtin_altivec_vextsw2d, "V2SLLiV4Si", "", "power9-vector") +// P9 Binary-coded dec

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread via cfe-commits
https://github.com/Himadhith updated https://github.com/llvm/llvm-project/pull/142723 >From ccaa61d070ba3df59a75945d4e8c3275c71500a9 Mon Sep 17 00:00:00 2001 From: himadhith Date: Wed, 4 Jun 2025 06:13:13 + Subject: [PATCH] [PowerPC] Support for Packed BCD conversion builtins --- clang/in

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-24 Thread via cfe-commits
sivadeilra wrote: I've updated the comments and the PR description so that the tone is more neutral, and describes the state of LLVM after the PR, with less emphasis on LLVM's old behavior. https://github.com/llvm/llvm-project/pull/144745 ___ cfe-com

[clang] [RISCV] Implement intrinsics for XAndesVBFHCVT (PR #145634)

2025-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-risc-v Author: Jim Lin (tclin914) Changes This patch implements clang intrinsic support for XAndesVBFHCVT. The clang intrinsicis for XAndesVBFHCVT is similar to Zvfbfmin, but it doesn't have mask variants. The docume

[clang] [RISCV] Implement intrinsics for XAndesVBFHCVT (PR #145634)

2025-06-24 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/145634 This patch implements clang intrinsic support for XAndesVBFHCVT. The clang intrinsicis for XAndesVBFHCVT is similar to Zvfbfmin, but it doesn't have mask variants. The document for the intrinsics can be found

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-24 Thread via cfe-commits
https://github.com/sivadeilra edited https://github.com/llvm/llvm-project/pull/144745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Check constexpr int->enum conversions consistently. (PR #143034)

2025-06-24 Thread James Y Knight via cfe-commits
jyknight wrote: > This might not actually be fixed in the latest boost::mpl. Hm, indeed. It seems that the "[trick](https://github.com/boostorg/mpl/issues/69#issuecomment-1316152037)" they used to solve it in mpl indeed was fixed/obsoleted by this change -- the trick no longer avoids the er

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-24 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/144745 >From 205ef34cc6e210577f51875f690783336ba03fc0 Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Fri, 13 Jun 2025 12:45:34 -0700 Subject: [PATCH] Fix IP2State tables style: revert one change Adjust tests ad

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread via cfe-commits
@@ -2304,7 +2304,8 @@ class Preprocessor { /// Check whether the next pp-token is one of the specificed token kind. this /// method should have no observable side-effect on the lexed tokens. - template bool isNextPPTokenOneOf() { + template + bool isNextPPTokenOneOf(t

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-06-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/21962 Here is the relevant piece of the build log fo

[clang] [llvm] [RISCV] Add Support of RISCV Zibimm Experimental Extension (PR #127463)

2025-06-24 Thread Boyao Wang via cfe-commits
https://github.com/BoyaoWang430 updated https://github.com/llvm/llvm-project/pull/127463 >From e740d8cfb8b689d766841396c5a6ab9a1d389ec7 Mon Sep 17 00:00:00 2001 From: wangboyao Date: Mon, 17 Feb 2025 17:35:52 +0800 Subject: [PATCH 1/3] [RISCV] Add Support of RISCV Zibimm Experimental Extension

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

2025-06-24 Thread Samarth Narang via cfe-commits
snarang181 wrote: Thank you for reviewing, @AaronBallman. Requesting a re-review. https://github.com/llvm/llvm-project/pull/145044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (PR #138360)

2025-06-24 Thread Reid Kleckner via cfe-commits
https://github.com/rnk closed https://github.com/llvm/llvm-project/pull/138360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 948cc91 - Reapply "[Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (#115099)" (#138360)

2025-06-24 Thread via cfe-commits
Author: Reid Kleckner Date: 2025-06-24T22:07:07-06:00 New Revision: 948cc91188e5a2d60917ff5bc953987a80a3949c URL: https://github.com/llvm/llvm-project/commit/948cc91188e5a2d60917ff5bc953987a80a3949c DIFF: https://github.com/llvm/llvm-project/commit/948cc91188e5a2d60917ff5bc953987a80a3949c.diff

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-06-24 Thread Farzon Lotfi via cfe-commits
farzonl wrote: There is an advantage to intrinsics that builtins lack in that intrinsics being entirely a backend feature set makes it easier to support non clang based frontends. Say we wanted to do something MLIR based. https://github.com/llvm/llvm-project/pull/143909 __

[clang] [HLSL] Add option for VK layouts (PR #145327)

2025-06-24 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/145327 ___ 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-24 Thread Marco Vitale via cfe-commits
mrcvtl wrote: I’ve taken some time to better understand the code and think through the solution. I tried using `isInLifetimeExtendingContext()`, but it still returns false, and I believe I now understand why. In your PR, the flag is set here: https://github.com/llvm/llvm-project/blob/b581f9d05

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

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

[clang] [llvm] [InstrProf] Factor out getRecord() and use NamedInstrProfRecord (PR #145417)

2025-06-24 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg updated https://github.com/llvm/llvm-project/pull/145417 >From 5ba3eab61982f9989c665091c672283b610b539d Mon Sep 17 00:00:00 2001 From: Ellis Hoag Date: Mon, 23 Jun 2025 15:11:01 -0700 Subject: [PATCH 1/3] [InstrProf] Factor out getRecord and use NamedRecord --- clan

[clang] [llvm] Non constant size and offset in DWARF (PR #141106)

2025-06-24 Thread Tom Tromey via cfe-commits
tromey wrote: I've rebased this and addressed the review comments. I am leaving the one sub-thread open since I wasn't sure if I should send a separate PR (I don't have push rights so I can't land something separately on my own) -- just let me know if you'd like that, it's no trouble. Thanks

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

2025-06-24 Thread Alex MacLean via cfe-commits
@@ -2174,23 +2129,40 @@ let mayStore = true in { []>; } -let isCall=1 in { - multiclass CALL { - def PrintCallNoRetInst : NVPTXInst<(outs), (ins), - OpcStr # " ", [(OpNode 0)]>; - def PrintCallRetInst1 : NVPTXInst<(outs), (ins), - OpcStr

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

2025-06-24 Thread Alex MacLean via cfe-commits
@@ -1750,19 +1739,31 @@ def BFMOV16i : MOVi; def FMOV32i : MOVi; def FMOV64i : MOVi; -def : Pat<(i32 (Wrapper texternalsym:$dst)), (IMOV32i texternalsym:$dst)>; -def : Pat<(i64 (Wrapper texternalsym:$dst)), (IMOV64i texternalsym:$dst)>; + +def to_tglobaladdr : SDNodeXFormgetTa

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

2025-06-24 Thread Alex MacLean via cfe-commits
@@ -2174,23 +2129,40 @@ let mayStore = true in { []>; } -let isCall=1 in { - multiclass CALL { - def PrintCallNoRetInst : NVPTXInst<(outs), (ins), - OpcStr # " ", [(OpNode 0)]>; - def PrintCallRetInst1 : NVPTXInst<(outs), (ins), - OpcStr

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

2025-06-24 Thread Alex MacLean via cfe-commits
@@ -909,20 +907,9 @@ bool NVPTXDAGToDAGISel::tryIntrinsicNoChain(SDNode *N) { switch (IID) { AlexMaclean wrote: Oops, removed https://github.com/llvm/llvm-project/pull/145581 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] Fix Windows EH IP2State tables (remove +1 bias) (PR #144745)

2025-06-24 Thread via cfe-commits
https://github.com/sivadeilra updated https://github.com/llvm/llvm-project/pull/144745 >From 541863ffca616120ab27d252618137c021d60148 Mon Sep 17 00:00:00 2001 From: Arlie Davis Date: Fri, 13 Jun 2025 12:45:34 -0700 Subject: [PATCH] Fix IP2State tables style: revert one change Adjust tests ad

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread Erich Keane via cfe-commits
@@ -101,11 +101,8 @@ class Token { /// "if (Tok.is(tok::l_brace)) {...}". bool is(tok::TokenKind K) const { return Kind == K; } bool isNot(tok::TokenKind K) const { return Kind != K; } - bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { -return is(K1) || is(

[clang] 6a8899c - [HLSL][RootSignature] Enable resource range analysis for remaining `RootElement`s (#145109)

2025-06-24 Thread via cfe-commits
Author: Finn Plummer Date: 2025-06-24T09:11:24-07:00 New Revision: 6a8899cee7131c7678d72f29cc080bc6f1d3a124 URL: https://github.com/llvm/llvm-project/commit/6a8899cee7131c7678d72f29cc080bc6f1d3a124 DIFF: https://github.com/llvm/llvm-project/commit/6a8899cee7131c7678d72f29cc080bc6f1d3a124.diff

[clang] [clang][Preprocessor] Handle the first pp-token in EnterMainSourceFile (PR #145244)

2025-06-24 Thread via cfe-commits
@@ -2302,10 +2295,41 @@ class Preprocessor { } } - /// Determine whether the next preprocessor token to be - /// lexed is a '('. If so, consume the token and return true, if not, this + /// Check whether the next pp-token is one of the specificed token kind. this

[clang] Fix `pragma-comment.c` test failing on false match (PR #145455)

2025-06-24 Thread Dave Bartolomeo via cfe-commits
https://github.com/dbartol created https://github.com/llvm/llvm-project/pull/145455 Sometimes the forbidden text `foo` or `bar` could appear in the Clang version string metadata. Treating the version string as a `CHECK-LABEL:` prevents this. Fixes #145453 >From 252441c2a828d9bda1d74cec2f1f37

[clang] [mlir] [mlir] Migrate away from std::nullopt (NFC) (PR #145523)

2025-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-linalg Author: Kazu Hirata (kazutakahirata) Changes ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::optional

[clang] [Clang] Diagnose unsatisfied `std::is_assignable`. (PR #144836)

2025-06-24 Thread Ross Kirsling via cfe-commits
@@ -2285,6 +2286,31 @@ static void DiagnoseNonTriviallyCopyableReason(Sema &SemaRef, SemaRef.Diag(D->getLocation(), diag::note_defined_here) << D; } +static void DiagnoseNonAssignableReason(Sema &SemaRef, SourceLocation Loc, +QualType

[clang] [analyzer][docs] Mention perfetto for visualizing trace JSONs (PR #145500)

2025-06-24 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource closed https://github.com/llvm/llvm-project/pull/145500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ddecfa6 - [KeyInstr][Clang] Atomic ops atoms (#141624)

2025-06-24 Thread via cfe-commits
Author: Orlando Cazalet-Hyams Date: 2025-06-24T12:20:44+01:00 New Revision: ddecfa696c4929ac364053f3eef66fefe4873448 URL: https://github.com/llvm/llvm-project/commit/ddecfa696c4929ac364053f3eef66fefe4873448 DIFF: https://github.com/llvm/llvm-project/commit/ddecfa696c4929ac364053f3eef66fefe48734

[clang] [analyzer][NFC] Add xrefs to a test case that has poor git blame (PR #145501)

2025-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Benics (balazs-benics-sonarsource) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/145501.diff 1 Files Affected: - (modified) clang/test/Analysis/PR38208.c (+5) ``diff diff --git a/c

[clang] [clang-format] Handle Trailing Whitespace After Line Continuation (P2223R2) (PR #145243)

2025-06-24 Thread Owen Pan via cfe-commits
@@ -1205,14 +1206,23 @@ static size_t countLeadingWhitespace(StringRef Text) { while (Cur < End) { if (isspace(Cur[0])) { owenca wrote: ```suggestion if (isWhitespace(Cur[0])) { ``` https://github.com/llvm/llvm-project/pull/145243 ___

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

2025-06-24 Thread via cfe-commits
@@ -2302,10 +2302,41 @@ class Preprocessor { } } - /// Determine whether the next preprocessor token to be - /// lexed is a '('. If so, consume the token and return true, if not, this + /// Check whether the next pp-token is one of the specificed token kind. this

[clang] 8b0d112 - [Clang][Preprocessor] Expand UCNs in macro concatenation (#145351)

2025-06-24 Thread via cfe-commits
Author: yronglin Date: 2025-06-25T00:56:01+08:00 New Revision: 8b0d112478cec296517660c1c741b8e97aeaf684 URL: https://github.com/llvm/llvm-project/commit/8b0d112478cec296517660c1c741b8e97aeaf684 DIFF: https://github.com/llvm/llvm-project/commit/8b0d112478cec296517660c1c741b8e97aeaf684.diff LOG:

[clang] [llvm] [SPIRV] Add more id and range builtIns (PR #143909)

2025-06-24 Thread Victor Lomuller via cfe-commits
Naghasan wrote: > all built-ins are represented using global variables in a specific AS with > the associated metadata to generate the decoration. For the HLSL FE, there are already a few ids represented using intrinsics (unfortunately they use the DXIL naming rather than the SPIR-V but that's

[clang] [Clang][Preprocessor] Expand UCNs in macro concatenation (PR #145351)

2025-06-24 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/145351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,54 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// Semantic tests for sycl_external attribute + +[[clang::sycl_external]] // expected-error {{'sycl_external' can only be applied to functions with external linkage}} +static void func1() {} + +name

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/145546 >From 19b65ac2c76e7b6610a2d135848f9a468fae1610 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 25 Jun 2025 00:18:25 +0800 Subject: [PATCH] [NFC][Clang][Preprocessor] Optimize the implementation of isNextPPT

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

2025-06-24 Thread 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] [analyzer] Fix crash when modelling 'getline' function in checkers (PR #145229)

2025-06-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/145229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -208,6 +208,15 @@ void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) { Diag(AL.getLoc(), diag::err_sycl_attribute_invalid_linkage); return; } + std::string FunctionName = StringRef(FD->getNameInfo().getAsString()).lower(); + if (FunctionName.find(

[clang] [CIR] Upstream ChooseExpr for ComplexType (PR #145163)

2025-06-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/145163 ___ 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-24 Thread Erich Keane via cfe-commits
@@ -681,6 +702,28 @@ 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] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -0,0 +1,54 @@ +// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s + +// Semantic tests for sycl_external attribute + +[[clang::sycl_external]] // expected-error {{'sycl_external' can only be applied to functions with external linkage}} +static void func1() {} + +name

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/145546 >From 19b65ac2c76e7b6610a2d135848f9a468fae1610 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 25 Jun 2025 00:18:25 +0800 Subject: [PATCH 1/2] [NFC][Clang][Preprocessor] Optimize the implementation of isNex

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -12856,6 +12856,14 @@ def err_sycl_special_type_num_init_method : Error< "types with 'sycl_special_class' attribute must have one and only one '__init' " "method defined">; +// SYCL external attribute diagnostics +def err_sycl_attribute_invalid_linkage : Error< + "'sy

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -202,6 +202,25 @@ void SemaSYCL::handleKernelAttr(Decl *D, const ParsedAttr &AL) { handleSimpleAttribute(*this, D, AL); } +void SemaSYCL::handleExternalAttr(Decl *D, const ParsedAttr &AL) { + auto *FD = cast(D); + if (!FD->isExternallyVisible()) { +Diag(AL.getLoc()

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. Additional comments for diagnostics and tests. https://github.com/llvm/llvm-project/pull/140282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [CIR] Restore the underscore in dso_local (PR #145551)

2025-06-24 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/145551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Preprocessor] Handle the first pp-token in EnterMainSourceFile (PR #145244)

2025-06-24 Thread via cfe-commits
@@ -139,10 +139,9 @@ class TokenLexer { void Init(const Token *TokArray, unsigned NumToks, bool DisableMacroExpansion, bool OwnsTokens, bool IsReinject); - /// If the next token lexed will pop this macro off the - /// expansion stack, return 2. If the next un

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-06-24 Thread Tom Honermann via cfe-commits
@@ -7206,6 +7206,9 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, const ParsedAttr &AL, case ParsedAttr::AT_EnumExtensibility: handleEnumExtensibilityAttr(S, D, AL); break; + case ParsedAttr::AT_SYCLExternal: +S.SYCL().handleExternalAttr(D, AL); ---

[clang] [llvm] Revert "Add support for Windows Secure Hot-Patching" (PR #145553)

2025-06-24 Thread Qinkun Bao via cfe-commits
https://github.com/qinkunbao created https://github.com/llvm/llvm-project/pull/145553 Reverts llvm/llvm-project#138972 >From 661839d189f825fbb6305e6ac5d8d1cc19ccc42e Mon Sep 17 00:00:00 2001 From: Qinkun Bao Date: Tue, 24 Jun 2025 13:11:32 -0400 Subject: [PATCH] Revert "Add support for Windows

[clang] [clang][analyzer] fix crash when modelling 'getline' function in checkers (PR #145229)

2025-06-24 Thread Balazs Benics via cfe-commits
@@ -1060,6 +1060,9 @@ impact the linker behaviour like the other `-static-*` flags. Crash and bug fixes ^^^ +- Fixed a crash in ``UnixAPIMisuseChecker`` and ``MallocChecker`` when analyzing + code with non-standard ``getline`` or ``getdelim`` function signat

[clang] [llvm] Test 142948, please ignore (PR #144873)

2025-06-24 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum updated https://github.com/llvm/llvm-project/pull/144873 >From 704d36bdd22efd4645feaf8988e918ccfdf641a5 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Thu, 5 Jun 2025 13:40:26 +0200 Subject: [PATCH 1/4] [clang][python][test] Move python binding tests to lit fr

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/145546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix crash when modelling 'getline' function in checkers (PR #145229)

2025-06-24 Thread Baranov Victor via cfe-commits
@@ -1518,14 +1518,18 @@ void MallocChecker::checkGetdelim(ProgramStateRef State, const CallEvent &Call, if (!CE) return; - const auto LinePtr = - getPointeeVal(Call.getArgSVal(0), State)->getAs(); - const auto Size = - getPointeeVal(Call.getArgSVal(1), State

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread Ulrich Weigand via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [analyzer][docs] Mention perfetto for visualizing trace JSONs (PR #145500)

2025-06-24 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource created https://github.com/llvm/llvm-project/pull/145500 None From 274a38f83b2c5c81968de865403cf114fc9550c0 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 24 Jun 2025 13:42:42 +0200 Subject: [PATCH] [analyzer][docs] Mention perfetto for vis

[clang] [clang][Preprocessor] Handle the first pp-token in EnterMainSourceFile (PR #145244)

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

[clang] [HLSL][SPIRV] Handle `uint` type for spec constant (PR #145577)

2025-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Steven Perron (s-perron) Changes The testing only tried `unsigned int` and not `uint`. We want to correctly handle these surgared types as specialization constants. --- Full diff: https://github.com/llvm/llvm-project/pull/145577.diff 2 F

[clang] [llvm] [PowerPC] Support for Packed BCD conversion builtins (PR #142723)

2025-06-24 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/142723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Preprocessor] Handle the first pp-token in EnterMainSourceFile (PR #145244)

2025-06-24 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/145244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e04c938 - [analyzer][NFC] Add xrefs to a test case that has poor git blame (#145501)

2025-06-24 Thread via cfe-commits
Author: Balázs Benics Date: 2025-06-24T14:50:14+02:00 New Revision: e04c938cc08a90ae60440ce22d072ebc69d67ee8 URL: https://github.com/llvm/llvm-project/commit/e04c938cc08a90ae60440ce22d072ebc69d67ee8 DIFF: https://github.com/llvm/llvm-project/commit/e04c938cc08a90ae60440ce22d072ebc69d67ee8.diff

[clang] [analyzer][NFC] Add xrefs to a test case that has poor git blame (PR #145501)

2025-06-24 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource created https://github.com/llvm/llvm-project/pull/145501 None From b67c2c5bfadc80121899690723ba938b398c4e65 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 24 Jun 2025 13:14:31 +0200 Subject: [PATCH] [analyzer][NFC] Add xrefs to a test case

[clang] [NFC][-Wunsafe-buffer-usage] Refactor safe pattern check for pointer-size pairs (PR #145626)

2025-06-24 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/145626 >From 8c07b277562bd3d4f332a341eb1e0127545c8280 Mon Sep 17 00:00:00 2001 From: Ziqing Luo Date: Tue, 24 Jun 2025 11:25:52 +0800 Subject: [PATCH 1/2] [NFC][-Wunsafe-buffer-usage] Refactor safe pattern check

[clang] [Serialization] Fix source location data loss during decoding. (PR #145529)

2025-06-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: Sorry. I failed to understand the problem. In what case, may the encoder produce up to 33 bits? https://github.com/llvm/llvm-project/pull/145529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [CIR] Restore the underscore in dso_local (PR #145551)

2025-06-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/145551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix `pragma-comment.c` test failing on false match (PR #145455)

2025-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/145455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add support for flag output operand "=@cc" for SystemZ. (PR #125970)

2025-06-24 Thread via cfe-commits
@@ -8781,8 +8961,445 @@ static bool combineCCMask(SDValue &CCReg, int &CCValid, int &CCMask) { return false; } -SDValue SystemZTargetLowering::combineBR_CCMASK( -SDNode *N, DAGCombinerInfo &DCI) const { +// Combine (select_cc_a (select_cc_b)), where select_cc_a has one

[clang] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/145546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Upstream computeVolatileBitfields (PR #145414)

2025-06-24 Thread via cfe-commits
https://github.com/Andres-Salamanca closed https://github.com/llvm/llvm-project/pull/145414 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-06-24 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,157 @@ +//===- AMDGPUExpandFeaturePredicates.cpp - Feature Predicate Expander Pass ===// +// +// 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] [NFC][Clang][Preprocessor] Refine the implementation of isNextPPTokenOneOf (PR #145546)

2025-06-24 Thread Yanzuo Liu via cfe-commits
@@ -101,11 +101,10 @@ class Token { /// "if (Tok.is(tok::l_brace)) {...}". bool is(tok::TokenKind K) const { return Kind == K; } bool isNot(tok::TokenKind K) const { return Kind != K; } - bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const { -return is(K1) || is

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

2025-06-24 Thread Erick Velez via cfe-commits
https://github.com/evelez7 updated https://github.com/llvm/llvm-project/pull/145595 >From df4ddc4f8bdaaf7cf47865f2c9c98622ca4941fa Mon Sep 17 00:00:00 2001 From: Erick Velez Date: Tue, 24 Jun 2025 11:19:06 -0700 Subject: [PATCH] [clang-doc] refactor JSONGenerator array usage Improve code reuse

  1   2   3   4   5   >