[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. thanks, I think the biggest concern is about initial performance of this approach until cache warms up. also can we have some tests? it should be possible to unittest by injecting a custom CDB into modules builder. https://gi

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread kadir çetinkaya via cfe-commits
@@ -380,30 +381,114 @@ llvm::SmallVector getAllRequiredModules(ProjectModules &MDB, return ModuleNames; } +class CachingProjectModules : public ProjectModules { +public: + CachingProjectModules(const GlobalCompilationDatabase &CDB) : CDB(CDB) {} + + std::vector getRequire

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-13 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: I think so, but I would rather do it as a separate PR. There are a couple of other things that could do with tidying up too. https://github.com/llvm/llvm-project/pull/126945 ___ cfe-commits maili

[clang] 60493ed - [NFC] format c-index-test.c

2025-02-13 Thread Mikhail Goncharov via cfe-commits
Author: Mikhail Goncharov Date: 2025-02-13T13:55:20+01:00 New Revision: 60493ede24a758771a0b34067a30ceb929525b73 URL: https://github.com/llvm/llvm-project/commit/60493ede24a758771a0b34067a30ceb929525b73 DIFF: https://github.com/llvm/llvm-project/commit/60493ede24a758771a0b34067a30ceb929525b73.d

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-13 Thread Ricardo Jesus via cfe-commits
rj-jesus wrote: Sounds good, thanks! :) https://github.com/llvm/llvm-project/pull/126945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-13 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/126945 >From e618aba47c0e7244105bf325ab8019a085e1ed99 Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Wed, 12 Feb 2025 14:31:47 + Subject: [PATCH 1/4] Add missing Neon Types The AAPCS64 adds a number of

[clang] [ARM][AArch64] Add missing Neon Types (PR #126945)

2025-02-13 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm updated https://github.com/llvm/llvm-project/pull/126945 >From e618aba47c0e7244105bf325ab8019a085e1ed99 Mon Sep 17 00:00:00 2001 From: Tomas Matheson Date: Wed, 12 Feb 2025 14:31:47 + Subject: [PATCH 1/3] Add missing Neon Types The AAPCS64 adds a number of

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/127056 This exercises the codepath where we create `DITemplateValueParameter`s whose `TemplateArgument::ArgKind` is `StructuralValue`, which was added in (https://github.com/llvm/llvm-project/pull/78041). Previousl

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Buch (Michael137) Changes This exercises the codepath where we create `DITemplateValueParameter`s whose `TemplateArgument::ArgKind` is `StructuralValue`, which was added in (https://github.com/llvm/llvm-project/pull/78041). Previo

[clang] [flang] [lld] [llvm] [Flang][NFC] Move runtime library files to flang-rt. (PR #110298)

2025-02-13 Thread via cfe-commits
https://github.com/jeanPerier approved this pull request. Works with my testing, thanks. https://github.com/llvm/llvm-project/pull/110298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-13 Thread Balazs Benics via cfe-commits
steakhal wrote: > @steakhal : Sure I can do some tests if you come up with a fix. Right now, > with an EXPENSIVE_CHECKS build it fails in 30-40% of the runs for me so it > should be pretty quick to see if a fix works or not. I've never seen it fail > without EXPENSIVE_CHECKS. I could reproduc

[clang] b88c5d6 - [analyzer] Disable a flaky test while triaging why its flaky (#127034)

2025-02-13 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-13T10:55:08+01:00 New Revision: b88c5d638a00d723f521c907911e42115717937e URL: https://github.com/llvm/llvm-project/commit/b88c5d638a00d723f521c907911e42115717937e DIFF: https://github.com/llvm/llvm-project/commit/b88c5d638a00d723f521c907911e42115717937e.diff

[clang] [analyzer] Disable a flaky test while triaging why its flaky (PR #127034)

2025-02-13 Thread Balazs Benics via cfe-commits
steakhal wrote: Now it says: ``` UNSUPPORTED: Clang :: Analysis/live-stmts.cpp (1 of 1) Test does not support the following features and/or targets: true, true

[clang] [analyzer] Disable a flaky test while triaging why its flaky (PR #127034)

2025-02-13 Thread Balazs Benics via cfe-commits
steakhal wrote: ``` ValueError: Error in UNSUPPORTED list: couldn't parse text: '*'

[clang] [analyzer] Disable a flaky test while triaging why its flaky (PR #127034)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/127034 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move __clc_ldexp to CLC library (PR #126078)

2025-02-13 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > I'll go add that builtin and come back to this - thanks. > > What do you think about libclc making use of weak linkage in principle? > > Weak should be handled properly by the targets, the one downside is that it > prevents optimization within a TU because the symbol's in

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 approved this pull request. Looks great! Thank you for moving all this functionality into Clang LGTM (just one minor comment left) https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@

[clang] [analyzer] StackAddrEscapeChecker: also check return for child stack frames (PR #126986)

2025-02-13 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG, thanks! https://github.com/llvm/llvm-project/pull/126986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-13 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: Oh, for functions that are documented to not block on invalid `fd`s, I think it makes sense to skip the warnings when the `fd` is `-1`. https://github.com/llvm/llvm-project/pull/126752 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Michael Buch via cfe-commits
@@ -8476,27 +8476,20 @@ bool TypeSystemClang::CompleteTagDeclarationDefinition( clang::ASTContext &ast = lldb_ast->getASTContext(); - /// TODO This really needs to be fixed. + unsigned NumNegativeBits = 0; Michael137 wrote: Can we move this block back in

[libclc] [libclc] Move __clc_ldexp to CLC library (PR #126078)

2025-02-13 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Oh, also for context, there was https://github.com/llvm/llvm-project/pull/124709 a few weeks ago. So it appears that there are other people interested in moving libclc to the runtimes infrastructure. https://github.com/llvm/llvm-project/pull/126078 _

[clang] b963d37 - [clang] CTAD: Remove an incorrect assertion in BuildDeductionGuideForTypeAlias (#126532)

2025-02-13 Thread via cfe-commits
Author: Haojian Wu Date: 2025-02-13T12:15:24+01:00 New Revision: b963d3768c0e88d2cac043d4754ce90a19a7e1ec URL: https://github.com/llvm/llvm-project/commit/b963d3768c0e88d2cac043d4754ce90a19a7e1ec DIFF: https://github.com/llvm/llvm-project/commit/b963d3768c0e88d2cac043d4754ce90a19a7e1ec.diff LO

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (Lukacma) Changes Currently arm_neon.h emits C-style casts to do vector type casts. This relies on implicit conversion between vector types to be enabled, which is currently deprecated behaviour and soon will disappear. To

[clang] [Clang][Sema] Add special handling of mfloat8 in initializer lists (PR #125097)

2025-02-13 Thread via cfe-commits
Lukacma wrote: Ping https://github.com/llvm/llvm-project/pull/125097 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-02-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (Lukacma) Changes Currently arm_neon.h emits C-style casts to do vector type casts. This relies on implicit conversion between vector types to be enabled, which is currently deprecated behaviour and soon will disappear. To en

[clang] [llvm] [AARCH64][Neon] switch to using bitcasts in arm_neon.h where appropriate (PR #127043)

2025-02-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: undef deprecator found issues in your code. :warning: You can test this locally with the following command: ``bash git diff -U0 --pickaxe-regex -S '([^a-zA-Z0-9#_-]undef[^a-zA-Z0-9_-]|UndefValue::get)' 242aa8c743fe4344844753d8faf59744235319df

[clang] [clang] CTAD: Remove an incorrect assertion in BuildDeductionGuideForTypeAlias (PR #126532)

2025-02-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein closed https://github.com/llvm/llvm-project/pull/126532 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/8] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,99 @@ +//===- DoConcurrentConversion.cpp -- map `DO CONCURRENT` to OpenMP loops --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-02-13 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: > We can't keep waiting for this to get in the release I'll merge later today once CI passes. https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-02-13 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move __clc_ldexp to CLC library (PR #126078)

2025-02-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > I think the correct place is the clang resource directory Tough to say, the compiler resource directory is for things the compiler emits as a part of the language, yet we don't store `libomp` there. I'd say it makes sense, if you had `lib/clang/21/lib/amdgcn-amd-amdhsa/libcl

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-13 Thread Egor Zhdan via cfe-commits
https://github.com/egorzhdan approved this pull request. I'm not an expert in the area, but this change LGTM. https://github.com/llvm/llvm-project/pull/126683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-13 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand approved this pull request. https://github.com/llvm/llvm-project/pull/127001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move __clc_ldexp to CLC library (PR #126078)

2025-02-13 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Yeah, amdgcn-amd-amdhsa should be roughly equivalent to amdgcn-- These are not equivalent https://github.com/llvm/llvm-project/pull/126078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-13 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Hi, Heads up that I see a miscompile with this patch where a needed store is removed. I'll try to extract some kind of reproducer. https://github.com/llvm/llvm-project/pull/125880 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][DebugInfo][test] Add tests for C++20 non-type template parameters (PR #127056)

2025-02-13 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/127056 >From b84ebf9c696ffc3867a52ed1540d59d18d2e5ece Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 13 Feb 2025 13:00:28 + Subject: [PATCH 1/2] [clang][DebugInfo][test] Add tests for C++20 non-type tem

[libclc] [libclc] Move __clc_ldexp to CLC library (PR #126078)

2025-02-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Yeah, amdgcn-amd-amdhsa should be roughly equivalent to amdgcn-- > > These are not equivalent That's something I've been meaning to ask, the difference I know of right now is that `amdgcn--` will not create a ROCm toolchain so we don't do any of that. However, I don't know

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Benjamin Maxwell via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { MacDue wrote: Please add a doc comment that explains what this does

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Benjamin Maxwell via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { + SDValue InnerRev = N->getOperand(1); + if (!InnerRev.hasOneUse()) +return SDVal

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Benjamin Maxwell via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { + SDValue InnerRev = N->getOperand(1); + if (!InnerRev.hasOneUse()) +return SDVal

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Benjamin Maxwell via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { + SDValue InnerRev = N->getOperand(1); + if (!InnerRev.hasOneUse()) +return SDVal

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > That's what the initial proposal / patch was, but that got reverted > > > because it broke some CUDA on Arm sources. See #121839. > > > > > > Yeah, but I'm suggesting that seems like a bug with CUDA on Arm sources. > > (But it also depends on how GCC behaves with off

[clang] f6e3d33 - [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (#126567)

2025-02-13 Thread via cfe-commits
Author: Joseph Huber Date: 2025-02-13T07:59:08-06:00 New Revision: f6e3d33c009cada0437c11d3fd1beace74c5dcfa URL: https://github.com/llvm/llvm-project/commit/f6e3d33c009cada0437c11d3fd1beace74c5dcfa DIFF: https://github.com/llvm/llvm-project/commit/f6e3d33c009cada0437c11d3fd1beace74c5dcfa.diff

[clang] [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (PR #126567)

2025-02-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/126567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/116422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1e64ea9 - Revert "[CaptureTracking][FunctionAttrs] Add support for CaptureInfo (#125880)"

2025-02-13 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2025-02-13T14:56:12+01:00 New Revision: 1e64ea9914d3cc839b52e50d2d497600e03c8b6e URL: https://github.com/llvm/llvm-project/commit/1e64ea9914d3cc839b52e50d2d497600e03c8b6e DIFF: https://github.com/llvm/llvm-project/commit/1e64ea9914d3cc839b52e50d2d497600e03c8b6e.diff

[clang] 27e78e6 - [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (#127001)

2025-02-13 Thread via cfe-commits
Author: Jan Voung Date: 2025-02-13T08:57:54-05:00 New Revision: 27e78e68a6788a08ea591250b6600284b360cff2 URL: https://github.com/llvm/llvm-project/commit/27e78e68a6788a08ea591250b6600284b360cff2 DIFF: https://github.com/llvm/llvm-project/commit/27e78e68a6788a08ea591250b6600284b360cff2.diff LOG

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-13 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/127001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libc] [libclc] [llvm] [AMDGPU] Replace gfx940 and gfx941 with gfx942 in offload and libclc (PR #125826)

2025-02-13 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a edited https://github.com/llvm/llvm-project/pull/125826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-13 Thread via cfe-commits
@@ -1592,6 +1592,11 @@ class CGObjCNonFragileABIMac : public CGObjCCommonMac { bool isClassLayoutKnownStatically(const ObjCInterfaceDecl *ID) { // Test a class by checking its superclasses up to // its base class if it has one. + +// Cannot check a null class +

[clang] [clang] Fix preprocessor output from #embed (PR #126742)

2025-02-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman milestoned https://github.com/llvm/llvm-project/pull/126742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __has_target_builtin macro (PR #126324)

2025-02-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > CC @jdoerfert (we don't have a CUDA maintainer, so I'm not certain who else > to tag) Closest is @Artem-B, there's also a few NVIDIA people floating around like @gonzalobg. https://github.com/llvm/llvm-project/pull/126324 ___ cfe-co

[clang] [clang] Fix preprocessor output from #embed (PR #126742)

2025-02-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: This seems like a reasonable one to backport, so I'm adding it to the 20.x milestone. https://github.com/llvm/llvm-project/pull/126742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -194,3 +194,34 @@ char test_comparison_with_extent_symbol(struct incomplete *p) { return ((char *)p)[-1]; // no-warning } +int table[256], small_table[128]; +int test_cast_to_unsigned(signed char x) { + unsigned char y = x; + if (x >= 0) +return x; + // FIXME: Her

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. Makes sense. https://github.com/llvm/llvm-project/pull/127062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-13 Thread Nikita Popov via cfe-commits
nikic wrote: Thanks for the report! I've reverted the change for now. ```llvm declare ptr @passthrough(ptr) define i16 @test() { %a = alloca i16, align 1 store i16 1, ptr %a, align 1 %call = call ptr @passthrough(ptr readnone captures(ret: address, provenance) %a) %v = load i16, ptr %

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/127062 From c3dc63db8914d759b6c58611b7448d4e83c66752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 13 Feb 2025 11:35:45 +0100 Subject: [PATCH 1/2] [analyzer][NFC] Add ArrayBound tests to doc

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Balazs Benics via cfe-commits
=?utf-8?q?Don=C3=A1t?= Nagy Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. Looks great. Thanks. https://github.com/llvm/llvm-project/pull/127062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Donát Nagy via cfe-commits
@@ -194,3 +194,34 @@ char test_comparison_with_extent_symbol(struct incomplete *p) { return ((char *)p)[-1]; // no-warning } +int table[256], small_table[128]; +int test_cast_to_unsigned(signed char x) { + unsigned char y = x; + if (x >= 0) +return x; + // FIXME: Her

[clang] [analyzer][NFC] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/127062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Introduce `--offloadlib` positive flag for `nogpulib` and alias to `--no-offloadlib` (PR #126567)

2025-02-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/19921 Here is the rele

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-13 Thread via cfe-commits
https://github.com/AZero13 deleted https://github.com/llvm/llvm-project/pull/85465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-13 Thread Michael Flanders via cfe-commits
Flandini wrote: @steakhal, looks like the premerge checks built with clang 20 https://buildkite.com/llvm-project/github-pull-requests/builds/145477#0194f106-3262-4d2b-922c-b3810220acd1/6-4595. I build locally with clang 18. This type of error is caught by g++, not clang++: https://godbolt.or

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-13 Thread Alex Bradbury via cfe-commits
https://github.com/asb updated https://github.com/llvm/llvm-project/pull/126352 >From 446b59bd47eb5356454665eeb82e75a77862350a Mon Sep 17 00:00:00 2001 From: Alex Bradbury Date: Sat, 8 Feb 2025 06:27:26 + Subject: [PATCH 1/2] [doc] Add Discord invite link alongside channel links By far the

[clang-tools-extra] [tool] Remove legacy argument `-ignore-insert-conflict` from `run-clang-tidy.py` (PR #127066)

2025-02-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > Remove legacy argument `-ignore-insert-conflict` flag from `run-clang-tidy.py` Could you explain more about `legacy` argument `-ignore-insert-conflict`. It still in `clang-apply-replacements` tool. ``` USAGE: clang-apply-replacements [options] OPTIONS: Formatting Option

[clang] [libc] [libcxx] [lldb] [llvm] [doc] Add Discord invite link alongside channel links (PR #126352)

2025-02-13 Thread Alex Bradbury via cfe-commits
https://github.com/asb closed https://github.com/llvm/llvm-project/pull/126352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] db2953d - [doc] Add Discord invite link alongside channel links (#126352)

2025-02-13 Thread via cfe-commits
Author: Alex Bradbury Date: 2025-02-13T15:00:21Z New Revision: db2953d80148870ee22b0ffaed883a02174485c4 URL: https://github.com/llvm/llvm-project/commit/db2953d80148870ee22b0ffaed883a02174485c4 DIFF: https://github.com/llvm/llvm-project/commit/db2953d80148870ee22b0ffaed883a02174485c4.diff LOG:

[clang] [NFC] [analyzer]Add ArrayBound tests to document casting bug (PR #127062)

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

[clang] [analyzer] Remove some false negatives in StackAddrEscapeChecker (PR #125638)

2025-02-13 Thread Michael Flanders via cfe-commits
Flandini wrote: Worth adding a g++ pre-merge build? Can individual subprojects change their pre-merge checks? https://github.com/llvm/llvm-project/pull/125638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[flang] [libc] [libclc] [llvm] [AMDGPU] Replace gfx940 and gfx941 with gfx942 in offload and libclc (PR #125826)

2025-02-13 Thread Fabian Ritter via cfe-commits
https://github.com/ritter-x2a updated https://github.com/llvm/llvm-project/pull/125826 >From bdee20130567c0a2f4d492f2b573f1681c5afbdf Mon Sep 17 00:00:00 2001 From: Fabian Ritter Date: Wed, 5 Feb 2025 04:19:00 -0500 Subject: [PATCH] [AMDGPU] Replace gfx940 and gfx941 with gfx942 in offload and

[clang] [NFC] [analyzer] Add ArrayBound tests to document casting bug (PR #127062)

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

[clang-tools-extra] [tool] Remove legacy argument `-ignore-insert-conflict` from `run-clang-tidy.py` (PR #127066)

2025-02-13 Thread Vicente Mataix Ferrándiz via cfe-commits
loumalouomega wrote: > > Remove legacy argument `-ignore-insert-conflict` flag from > > `run-clang-tidy.py` > > Could you explain more about `legacy` argument `-ignore-insert-conflict`. It > still in `clang-apply-replacements` tool. > > ``` > USAGE: clang-apply-replacements [options] > > OP

[clang] [NFC] [analyzer] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/127062 From c3dc63db8914d759b6c58611b7448d4e83c66752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Thu, 13 Feb 2025 11:35:45 +0100 Subject: [PATCH 1/2] [analyzer][NFC] Add ArrayBound tests to doc

[clang] d2240cd - [NFC] [analyzer] Add ArrayBound tests to document casting bug (#127062)

2025-02-13 Thread via cfe-commits
Author: Donát Nagy Date: 2025-02-13T16:09:09+01:00 New Revision: d2240cd314102ed99d35b84d43006e324f344163 URL: https://github.com/llvm/llvm-project/commit/d2240cd314102ed99d35b84d43006e324f344163 DIFF: https://github.com/llvm/llvm-project/commit/d2240cd314102ed99d35b84d43006e324f344163.diff LO

[clang] [NFC] [analyzer] Add ArrayBound tests to document casting bug (PR #127062)

2025-02-13 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/127062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-13 Thread Nick Sarnie via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-13 Thread Nick Sarnie via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a GPU which can be offloaded to. + bool isOffloadingTargetGPU() const { sarnex wrote: sure, thats good point. i think doing that will reso

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126956 >From 967dec47f3d369effa0defdc0d39547a173aca67 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 12 Feb 2025 11:03:34 -0800 Subject: [PATCH 1/2] [LLVM][Triple][NFCI] Add function to test for GPU offloadin

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-13 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex updated https://github.com/llvm/llvm-project/pull/126956 >From 967dec47f3d369effa0defdc0d39547a173aca67 Mon Sep 17 00:00:00 2001 From: "Sarnie, Nick" Date: Wed, 12 Feb 2025 11:03:34 -0800 Subject: [PATCH 1/3] [LLVM][Triple][NFCI] Add function to test for GPU offloadin

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG but wait for a review from @steakhal https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/127049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Gábor Horváth via cfe-commits
@@ -306,6 +314,25 @@ void BlockInCriticalSectionChecker::handleUnlock( C.addTransition(State); } +void BlockInCriticalSectionChecker::handleOpen(const CallEvent &Call, + CheckerContext &C) const { + const auto *Flag = Call.getAr

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #127049)

2025-02-13 Thread Gábor Horváth via cfe-commits
@@ -315,16 +342,54 @@ bool BlockInCriticalSectionChecker::isBlockingInCritSection( void BlockInCriticalSectionChecker::checkPostCall(const CallEvent &Call, CheckerContext &C) const { if (isBlockingInCritSection(Call, C)) { +

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via cfe-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From dd65babbf4c73a0b2fc2e4aa47a9a346bd5a9adf Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/15] [lldb] Analyze enum promotion type during parsing --- clang/

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Sander de Smalen via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { + SDValue InnerRev = N->getOperand(1); + if (!InnerRev.hasOneUse()) +return SDVal

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Sander de Smalen via cfe-commits
@@ -21962,6 +21962,35 @@ SDValue tryLowerPartialReductionToWideAdd(SDNode *N, return DAG.getNode(TopOpcode, DL, AccVT, BottomNode, ExtOp); } +static SDValue foldRevInvolution(SDNode *N) { + SDValue InnerRev = N->getOperand(1); + if (!InnerRev.hasOneUse()) +return SDVal

[clang] [llvm] [Arch64][SVE] Lower svrev_* to llvm.vector.reverse and fold svrev(svrev(x)) -> x (PR #116422)

2025-02-13 Thread Sander de Smalen via cfe-commits
@@ -22270,6 +22299,15 @@ static SDValue performIntrinsicCombine(SDNode *N, return tryConvertSVEWideCompare(N, ISD::SETULT, DCI, DAG); case Intrinsic::aarch64_sve_cmpls_wide: return tryConvertSVEWideCompare(N, ISD::SETULE, DCI, DAG); + case Intrinsic::aarch64_sve_rev:

[clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via cfe-commits
kuilpd wrote: @Michael137 Thank you for seeing this through! https://github.com/llvm/llvm-project/pull/115005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-13 Thread Tarun Prabhu via cfe-commits
@@ -0,0 +1,155 @@ + + +# `DO CONCURRENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing h

[clang] [Clang] allow restrict qualifier for array types with pointer types as element types (PR #120896)

2025-02-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Please wait a bit before landing in case @efriedma-quic has any additional comments. https://github.com/llvm/llvm-project/pull/120896 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] Add support for dynamic libraries in CLANG_BOLT (PR #127020)

2025-02-13 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/127020 >From c2d1352aba4872957e34633b92d87c39d0eb7e45 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 11 Feb 2025 18:20:15 +0100 Subject: [PATCH 1/2] [clang][cmake] Sanitize CLANG_BOLT values Thi

[clang] [NFC] Avoid potential null dereference. (PR #127017)

2025-02-13 Thread Balazs Benics via cfe-commits
@@ -314,6 +314,7 @@ void MacOSKeychainAPIChecker::checkPreStmt(const CallExpr *CE, RegionArgIsBad = true; } + assert(ArgSM); steakhal wrote: I'm okay with this assert. It shouldn't change much though because the very next lookup would fail if this wa

[clang] [clang][NFC] Avoid potential null dereferences (PR #127017)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/127017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Disable a flaky test while triaging why its flaky (PR #127034)

2025-02-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/127034 >From 518e232d68b73c884bc6c9a56b0d7c7e217e3d13 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Thu, 13 Feb 2025 10:36:42 +0100 Subject: [PATCH 1/2] [analyzer] Disable a flaky test while triaging why its fla

[clang] [llvm] [reland][DebugInfo] Update DIBuilder insertion to take InsertPosition (PR #126967)

2025-02-13 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/126967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Add scanning cache (PR #125988)

2025-02-13 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > * Now the ScanningProjectModules are owned by different calls to > > `ModulesBuilder::buildPrerequisiteModulesFor`. So we don't need to care > > about thread safety in ScanningProjectModules. And if we make it the > > underlying ProjectModules, we need to care about the t

<    1   2   3   4   5   >