[libclc] [libclc] Relicense gen_convert.py (PR #132213)

2025-03-20 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/132213 Similar to work done in 82912fd6, this commit re-licenses both the gen_convert.py script, and the it generates. It previously possessed an MIT license, with three additional individual copyrights. The file

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-03-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/132242 There can be concerns about the usefulness of this check but for some code it can be useful. From e3064b600ea726ab7b3dea054e9f11e1ce028297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Da

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG, thanks https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-20 Thread via cfe-commits
https://github.com/metkarpoonam updated https://github.com/llvm/llvm-project/pull/131900 >From 7ef40ee7d88872dbee1345cbd822e4aed8a22626 Mon Sep 17 00:00:00 2001 From: Poonam Vilas Metkar Date: Tue, 18 Mar 2025 11:30:15 -0700 Subject: [PATCH 01/12] Add codegen tests, Sema tests, SPIR-V backend t

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Donát Nagy via cfe-commits
@@ -491,7 +503,7 @@ void NullabilityChecker::reportBugIfInvariantHolds( N = C.addTransition(OriginalState, N); } - reportBug(Msg, Error, CK, N, Region, C.getBugReporter(), ValueExpr); + reportBug(Msg, Error, Idx, N, Region, C.getBugReporter(), ValueExpr); -

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-03-20 Thread via cfe-commits
@@ -155,6 +155,38 @@ class DefaultWarnNoWerror { } class DefaultRemark { Severity DefaultSeverity = SEV_Remark; } +// C++ compatibility warnings. +multiclass CXXCompat< +string message, +int std_ver, +bit ext_warn = true, +string std_ver_override = ""#std_ver>

[clang] [clang][AArch64] Don't #define __ARM_FEATURE_CRC32 when -crc is specified in -target-feature (PR #132167)

2025-03-20 Thread Sam Elliott via cfe-commits
lenary wrote: There are lots of bugs like this in this area, this is not the only feature like this. Should this be fixed in a more general way? https://github.com/llvm/llvm-project/pull/132167 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] 15ad84f - [clang][deps] Explicitly link pthreads

2025-03-20 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2025-03-20T09:37:10-07:00 New Revision: 15ad84fffd76e845ce48f7cb8a917eb6532b93c9 URL: https://github.com/llvm/llvm-project/commit/15ad84fffd76e845ce48f7cb8a917eb6532b93c9 DIFF: https://github.com/llvm/llvm-project/commit/15ad84fffd76e845ce48f7cb8a917eb6532b93c9.diff L

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-03-20 Thread via cfe-commits
@@ -10555,6 +10555,43 @@ static void checkArithmeticNull(Sema &S, ExprResult &LHS, ExprResult &RHS, << LHS.get()->getSourceRange() << RHS.get()->getSourceRange(); } +static void DetectPrecisionLossInComplexDivision(Sema &S, QualType DivisorTy, +

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 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)' 9b1f905b483a2b42e4681bbef42b2641f8ccf5ad

[clang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-20 Thread Shilei Tian via cfe-commits
Juan Manuel Martinez =?utf-8?q?Caamaño?= , Juan Manuel Martinez =?utf-8?q?Caamaño?= Message-ID: In-Reply-To: shiltian wrote: > I've also seen that gfx11 seem to have some kind of BUFFER_LOAD_LDS_(SIZE) > instruction (different from the BUFFER_LOAD_(SIZE)_LDS instructions > associated with th

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Donát Nagy (NagyDonat) Changes Simplify `NullabilityChecker.cpp` with new multipart checker framework introduced in 27099982da2f5a6c2d282d6b385e79d080669546. This is part of a commit series tha

[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

2025-03-20 Thread Balazs Benics via cfe-commits
@@ -491,7 +503,7 @@ void NullabilityChecker::reportBugIfInvariantHolds( N = C.addTransition(OriginalState, N); } - reportBug(Msg, Error, CK, N, Region, C.getBugReporter(), ValueExpr); + reportBug(Msg, Error, Idx, N, Region, C.getBugReporter(), ValueExpr); -

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: I'm super happy to see this change. The AMDGPU part looks good to me! Thanks! https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [llvm] [HLSL] Buffer handle globals should not be constants (PR #130231)

2025-03-20 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/130231 >From bf5e5b4b1060f51d37b05c905b4327a40316f158 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Thu, 6 Mar 2025 17:50:12 -0800 Subject: [PATCH 1/4] [HLSL] Buffer handle globals should not be constants If these

[clang] [clang][bytecode] Fix union copy/move operator active check (PR #132238)

2025-03-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/132238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change adds support for empty for-loops. This will be the infrastructre needed for complete for loops, but that depends on compare operations, which have not been upstreamed yet. --- Patch is 46.3

[clang] [Clang] add emit -Wignored-cv-qualifiers diagnostic for cv-qualified base classes (PR #132116)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -497,6 +497,7 @@ def GNUImaginaryConstant : DiagGroup<"gnu-imaginary-constant">; def IgnoredGCH : DiagGroup<"ignored-gch">; def IgnoredReferenceQualifiers : DiagGroup<"ignored-reference-qualifiers">; def IgnoredQualifiers : DiagGroup<"ignored-qualifiers", [IgnoredReference

[clang] [llvm] [RISCV] Implement the implications of C extension (PR #132259)

2025-03-20 Thread Sam Elliott via cfe-commits
@@ -378,6 +370,14 @@ def FeatureStdExtZca "part of the C extension, excluding compressed " "floating point loads/stores">; +def FeatureStdExtC +: RISCVExtension<2, 0, "Compressed Instructions", [FeatureStdExtZca]>, + RISCVExte

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/132266 This change adds support for empty for-loops. This will be the infrastructre needed for complete for loops, but that depends on compare operations, which have not been upstreamed yet. >From 20c016291947451b

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-20 Thread Michael Jones via cfe-commits
michaelrj-google wrote: Right now we don't really have a "freestanding" mode, we've got "baremetal" targets which are meant for systems without an OS but they have a lot more than just those four memory functions. You may be thinking of "fullbuild" vs "overlay", which determines if we provide

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Erich Keane via cfe-commits
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return cir::BoolAttr::get(getContext(), getBoolTy(), state); } + /// Create a for operation. + cir::ForOp createFor( + mlir::Location loc, + llvm::function_ref condBuilder,

[clang] [clang][ExprConst] Check record base classes for valid structs (PR #132270)

2025-03-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/132270 In error cases, the base might be None. Fixes https://github.com/llvm/llvm-project/issues/132257 >From 63f8f058a14286bd29a2c54307a90d326ac57aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Dat

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-20 Thread Craig Topper via cfe-commits
@@ -0,0 +1,1079 @@ +//===-- RISCVInstrInfoP.td - RISC-V 'P' instructions ---*- tablegen -*-===// +// +// 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: A

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-20 Thread Rahul Joshi via cfe-commits
@@ -114,22 +114,23 @@ static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { CMP = CGF->Builder.CreateIntrinsic( CGF->Builder.getInt1Ty(), CGF->CGM.getHLSLRuntime().getAnyIntrinsic(), {FCompInst}, nullptr); - } else + } else { CMP =

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132234)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Matheus Izvekov (mizvekov) Changes Original PR: #130537 Reland after updating lldb too. This changes the MemberPointerType representation to use a NestedNameSpecifier instead of a Type to represent the base class. Since the qualifiers are

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132234)

2025-03-20 Thread Erich Keane via cfe-commits
erichkeane wrote: Clang stuff is unchanged, correct? If so I'm fine when the LLDB folks are happy. https://github.com/llvm/llvm-project/pull/132234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang][CodeGen][AVR] Fix a crash in AVRABIInfo (PR #131976)

2025-03-20 Thread Patryk Wychowaniec via cfe-commits
https://github.com/Patryk27 approved this pull request. https://github.com/llvm/llvm-project/pull/131976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Add equality comparison operators for File (PR #130383)

2025-03-20 Thread Vlad Serebrennikov via cfe-commits
@@ -16,3 +17,16 @@ def test_file(self): self.assertEqual(str(file), "t.c") self.assertEqual(file.name, "t.c") self.assertEqual(repr(file), "") + +def test_file_eq(self): +path = os.path.join(kInputsDir, "hello.cpp") +header_path = os.

[clang] [Docs] Document freestanding requirements (PR #132232)

2025-03-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Text reads fine, though I cannot approve accuracy :D https://github.com/llvm/llvm-project/pull/132232 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-20 Thread Romaric Jodin via cfe-commits
rjodinchr wrote: I tend to agree. let's keep it that way. https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Handle Binary StingLiteral kind in one more place (PR #132201)

2025-03-20 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon closed https://github.com/llvm/llvm-project/pull/132201 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-20 Thread David Rivera via cfe-commits
https://github.com/RiverDave edited https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Balázs Kéri (balazske) Changes There can be concerns about the usefulness of this check but for some code it can be useful. --- Full diff: https://github.com/llvm/llvm-project/pull/132242.diff 6 Files Affected: - (modified)

[clang-tools-extra] [clang-tidy] Add check bugprone-misleading-setter-of-reference (PR #132242)

2025-03-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Balázs Kéri (balazske) Changes There can be concerns about the usefulness of this check but for some code it can be useful. --- Full diff: https://github.com/llvm/llvm-project/pull/132242.diff 6 Files Affected: - (modified) clang-

[clang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-20 Thread Juan Manuel Martinez Caamaño via cfe-commits
@@ -162,6 +162,8 @@ BUILTIN(__builtin_amdgcn_raw_buffer_load_b64, "V2UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b96, "V3UiQbiiIi", "n") BUILTIN(__builtin_amdgcn_raw_buffer_load_b128, "V4UiQbiiIi", "n") +BUILTIN(__builtin_amdgcn_raw_ptr_buffer_load_lds, "vQbv*3IU

[clang] [llvm] [Clang][AMDGPU] Expose buffer load lds as a clang builtin (PR #132048)

2025-03-20 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: I've also seen that gfx11 seem to have some kind of BUFFER_LOAD_LDS_(SIZE) instruction (different from the BUFFER_LOAD_(SIZE)_LDS instructions associated with this builtin). However, I'm not sure they actually exists: we do not have any test where we generate them and the g

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-20 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/132061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][MC] Implement MC for Base P extension (PR #123271)

2025-03-20 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/123271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Make -mcpu=v3 as the default (PR #107008)

2025-03-20 Thread Yuval Deutscher via cfe-commits
yuvald-sweet-security wrote: > > Hey, > > I didn't see this change on the [LLVM 20.1.0 Release > > Notes](https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html) - it would > > be nice if you could add those in the future as a heads up. > > Anyway, I got here after tracing a regression in eBPF

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Seems something with AArch64 has made the CI unhappy as well. https://github.com/llvm/llvm-project/pull/132252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Introduce helpers for defining compatibilty warnings (PR #132129)

2025-03-20 Thread via cfe-commits
Sirraide wrote: Added a comment that should explain how the multiclasses are used and what they do https://github.com/llvm/llvm-project/pull/132129 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] 523cf65 - [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (#124609)

2025-03-20 Thread via cfe-commits
Author: TilakChad Date: 2025-03-20T16:29:23-03:00 New Revision: 523cf65b668e2c7c572c8b5a54e28388d5e955a4 URL: https://github.com/llvm/llvm-project/commit/523cf65b668e2c7c572c8b5a54e28388d5e955a4 DIFF: https://github.com/llvm/llvm-project/commit/523cf65b668e2c7c572c8b5a54e28388d5e955a4.diff LOG

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-03-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/124609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not create dependent CallExpr having UnresolvedLookupExpr inside non-dependent context (PR #124609)

2025-03-20 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/124609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4