[clang-tools-extra] [clang-tidy] Add new check bugprone-capture-this-by-field (PR #130297)

2025-03-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,36 @@ +.. title:: clang-tidy - bugprone-capturing-this-in-member-variable + +bugprone-capturing-this-in-member-variable +== + +Finds lambda captures that capture the ``this`` pointer and store it as class +members without handle t

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
cor3ntin wrote: /cherry-pick https://github.com/llvm/llvm-project/pull/131450 ___ 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 new check bugprone-capture-this-by-field (PR #130297)

2025-03-15 Thread Denis Mikhailov via cfe-commits
@@ -0,0 +1,36 @@ +.. title:: clang-tidy - bugprone-capturing-this-in-member-variable + +bugprone-capturing-this-in-member-variable +== + +Finds lambda captures that capture the ``this`` pointer and store it as class +members without handle t

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin milestoned https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
llvmbot wrote: Failed to create pull request for issue131450 https://github.com/llvm/llvm-project/actions/runs/13876789590 https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

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

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mészáros Gergely (Maetveis) Changes - Fix false positive when divisor is a real number - Fix false negative when divident is real, but divisor is complex - Fix false negative when due to promotion the division is performed in higher precis

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

2025-03-15 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis created https://github.com/llvm/llvm-project/pull/131477 - Fix false positive when divisor is a real number - Fix false negative when divident is real, but divisor is complex - Fix false negative when due to promotion the division is performed in higher precision tha

[clang-tools-extra] [clang-tidy] Add new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: "What about separating this check in two: construct-reusable-objects-once and initialize-big-containers-once?" No point, try making generic check without a code specific for selected objects like std::regexp or containers. Add ExcludeRegexp, to be able to make it work for all ob

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Release notes entry missing. Now, to be honest I do not like idea behind those changes. Simply because if diagnostic is raised for example for an surrogate type, there is no way to apply fixes, and as this check is "modernize", main purpose of it is to ap

[clang-tools-extra] 5e65b40 - [clang-tidy] detect explicit casting within modernize-use-default-member-init (#129408)

2025-03-15 Thread via cfe-commits
Author: David Rivera Date: 2025-03-15T23:15:12+01:00 New Revision: 5e65b40f9c0fd9fc9bc17c36dbd5ee1beec15d4f URL: https://github.com/llvm/llvm-project/commit/5e65b40f9c0fd9fc9bc17c36dbd5ee1beec15d4f DIFF: https://github.com/llvm/llvm-project/commit/5e65b40f9c0fd9fc9bc17c36dbd5ee1beec15d4f.diff

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
@@ -96,6 +97,26 @@ void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) { diag(ArrayType->getBeginLoc(), "do not declare %select{C-style|C VLA}0 arrays, use %1 instead") << IsVLA << llvm::join(RecommendTypes, " or "); + + if (CheckSugaredTypes)

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
@@ -96,6 +97,26 @@ void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) { diag(ArrayType->getBeginLoc(), "do not declare %select{C-style|C VLA}0 arrays, use %1 instead") << IsVLA << llvm::join(RecommendTypes, " or "); + + if (CheckSugaredTypes)

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
@@ -43,7 +43,8 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { AvoidCArraysCheck::AvoidCArraysCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), - AllowStringArrays(Options.get("AllowStringArrays", false)) {} + AllowStringArrays(

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
@@ -21,12 +21,12 @@ AST_MATCHER(clang::TypeLoc, hasValidBeginLoc) { return Node.getBeginLoc().isValid(); } -AST_MATCHER_P(clang::TypeLoc, hasType, - clang::ast_matchers::internal::Matcher, - InnerMatcher) { +AST_MATCHER_P(clang::TypeLoc, hasArrayTyp

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,126 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ PiotrZSL wrote: try merge this file with exist one, you can set macro suffix, to distinguish diagnostic https://github.com/llvm/llvm-project/pull/131468

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

2025-03-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/129408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/127629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. No changelog because we want to backport? LGTM but i think this could use some comments https://github.com/llvm/llvm-project/pull/127629 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/131468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce "binary" StringLiteral for #embed data (PR #127629)

2025-03-15 Thread via cfe-commits
@@ -1752,7 +1752,8 @@ enum class StringLiteralKind { UTF8, UTF16, UTF32, - Unevaluated + Unevaluated, + Binary cor3ntin wrote: Can you add a comment explaining this is for embed? I'm sorry it took me a while to understand how this patch works. (The r

[clang-tools-extra] [clang-tidy] Add new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor converted_to_draft https://github.com/llvm/llvm-project/pull/131455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-asan` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/6817 Here is the relevan

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-15 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/25] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-15 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: We are aiming to land this on Monday, but let us know if @jkorous-apple, @malavikasamak, @dtarditi or other reviewers have potential concerns and need more time. https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits ma

[clang] [HLSL] add extra scalar vector overloads for clamp (PR #129939)

2025-03-15 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/129939 >From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Tue, 4 Mar 2025 09:53:56 -0800 Subject: [PATCH 01/12] extra scalar vector overloads for clamp --- .../lib/Headers/h

[clang] [flang] [llvm] [NFC][AMDGPU] Replace more direct arch comparison with isAMDGCN() (PR #131379)

2025-03-15 Thread Shilei Tian via cfe-commits
shiltian wrote: > I wonder if we should just make all of these `isAMDGPU()` as well. No at the moment, since we still support r600. https://github.com/llvm/llvm-project/pull/131379 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

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

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 660ec19fc5f59aa7c08331b5066388f3f5af14b9 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/4] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
DanielCChen wrote: @Meinersbur and all other reviewers, In the attempt to make building the path of flant-rt more general as well as customizable in response to the review comment, I made the following change in this latest commit (sorry about a couple of more commits that fixed some typos).

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 660ec19fc5f59aa7c08331b5066388f3f5af14b9 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/5] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (stmuench) Changes There are use cases where people need to diagnose also sugared types, such as type aliases, decltypes or template parameter types, as use of C-Style arrays in case their referenced type falls into such categor

[clang-tools-extra] [clang-tidy] offer option to check sugared types in avoid-c-arrays check (PR #131468)

2025-03-15 Thread via cfe-commits
https://github.com/stmuench ready_for_review https://github.com/llvm/llvm-project/pull/131468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 660ec19fc5f59aa7c08331b5066388f3f5af14b9 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/6] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 660ec19fc5f59aa7c08331b5066388f3f5af14b9 Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/7] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang] [llvm] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-15 Thread Daniel Chen via cfe-commits
https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/131041 >From 9d3e16f3e7c5adf4b5e0c1c6ba861d9e0ffea23b Mon Sep 17 00:00:00 2001 From: Daniel Chen Date: Wed, 12 Mar 2025 18:23:14 -0400 Subject: [PATCH 1/7] [flang-rt] Pass the whole path of libflang_rt.runtime.a t

[clang-tools-extra] [clang-tidy] detect explicit casting within modernize-use-default-member-init (PR #129408)

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

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-15 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 updated https://github.com/llvm/llvm-project/pull/131402 >From 28f6d8b6677e32f45f5fa55c7c73df5a841d7127 Mon Sep 17 00:00:00 2001 From: Ayush Pareek Date: Sat, 15 Mar 2025 03:43:18 +0530 Subject: [PATCH] Optimize Cache Insertion with try_emplace for Reduced Loo

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-15 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 updated https://github.com/llvm/llvm-project/pull/131402 >From 28f6d8b6677e32f45f5fa55c7c73df5a841d7127 Mon Sep 17 00:00:00 2001 From: Ayush Pareek Date: Sat, 15 Mar 2025 03:43:18 +0530 Subject: [PATCH 1/2] Optimize Cache Insertion with try_emplace for Reduced

[clang] Optimize Cache Insertion with try_emplace for Reduced Lookups (PR #131402)

2025-03-15 Thread Ayush Pareek via cfe-commits
https://github.com/ayushpareek2003 commented: Removed unnecessary spaces https://github.com/llvm/llvm-project/pull/131402 ___ 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 new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Baranov Victor via cfe-commits
vbvictor wrote: Thank you for the fast feedback. As for general approach, I will limit the usage to classes that are marked `const` and provide reference to `misc-const-correctness` in docs. Also, I will add support for initializer-list constructors. However, I think we should not give warning

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-15 Thread Mallikarjuna Gouda via cfe-commits
@@ -43,7 +43,7 @@ class MipsSubtarget : public MipsGenSubtargetInfo { Mips3, Mips4, Mips5, Mips64, Mips64r2, Mips64r3, Mips64r5, Mips64r6 }; - enum class CPU { P5600 }; + enum class CPU { P5600, I6400 }; mgoudar wrote: Thanks for quick review! yes. i6

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-15 Thread Jonathan Thackray via cfe-commits
@@ -85,6 +85,9 @@ Changes to the AMDGPU Backend Changes to the ARM Backend -- +* The `+nosimd` attribute is now fully supported. Previously, this had no effect when being used with +AArch32 targets, however will now disable NEON instructions being gene

[clang] [llvm] [DirectX] Implement Shader Flags Analysis for ResMayNotAlias (PR #131070)

2025-03-15 Thread Deric C. via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/131070 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [analysis] Software Bill of Mitigations (PR #130103)

2025-03-15 Thread Matthew Levy via cfe-commits
https://github.com/matthewlevy97 updated https://github.com/llvm/llvm-project/pull/130103 >From fb04b7bf5f2b668bf354632fc53e7521f44880c9 Mon Sep 17 00:00:00 2001 From: Matt Levy Date: Wed, 5 Mar 2025 12:36:02 -0500 Subject: [PATCH 1/6] [clang][CodeGen] Software Bill of Mitigations Metadata The

[clang] [llvm] [VectorCombine] Shrink loads used in shufflevector rebroadcasts (PR #128938)

2025-03-15 Thread Leon Clark via cfe-commits
https://github.com/PeddleSpam updated https://github.com/llvm/llvm-project/pull/128938 >From f1c09277af268256fce71df9a858959b69385ef1 Mon Sep 17 00:00:00 2001 From: Leon Clark Date: Wed, 26 Feb 2025 15:59:02 + Subject: [PATCH 1/7] [AggressiveInstCombine] Shrink loads used in shufflevector

[clang-tools-extra] [clang-tidy] Add IgnoreMacros to readability-function-size (PR #131406)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Extend readability-function-size check by adding IgnoreMacros option. Fixes #112835 --- Full diff: https://github.com/llvm/llvm-project/pull/131406.diff 5 Files Affected: - (modified) clang-tools-ext

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/131166 >From 92e26f7fd99774ea9716389d3108547dbb878f90 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Thu, 13 Mar 2025 12:24:18 -0400 Subject: [PATCH 1/6] [C23] Add __builtin_c23_va_start This builtin is suppo

[clang] [alpha.webkit.ForwardDeclChecker] Add a new WebKit checker for forward declarations (PR #130554)

2025-03-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff c8ec8073aa5d8e87a15d101ded149de399518bc1 0fbe30f8f95cb764d078617b767ae4cd5c31de85 --e

[clang] [C2y] Claim conformance to WG14 N3460 (PR #131196)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/131196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -121,29 +375,174 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2025-03-15 Thread via cfe-commits
@@ -3403,16 +3405,20 @@ bool FunctionDecl::isReplaceableGlobalAllocationFunction( if (!getDeclContext()->getRedeclContext()->isTranslationUnit()) return false; + bool IsTypeAware = isTypeAwareOperatorNewOrDelete(); + unsigned MaxParamCount = IsTypeAware + 4; -

[clang] [Clang] Treat `ext_vector_type` as a regular type attribute (PR #130177)

2025-03-15 Thread Joseph Huber via cfe-commits
@@ -1721,17 +1721,10 @@ def EnableIf : InheritableAttr { let Documentation = [EnableIfDocs]; } -def ExtVectorType : Attr { - // This is an OpenCL-related attribute and does not receive a [[]] spelling. - let Spellings = [GNU<"ext_vector_type">]; - // FIXME: This subject l

[clang] [HLSL] make semantic matching case insensitive (PR #129773)

2025-03-15 Thread Chris B via cfe-commits
@@ -141,6 +141,8 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs, return; } + II = PP.getIdentifierInfo(II->getName().lower()); llvm-beanz wrote: Can we keep the original identifier around and use that for the diagnostics so that the diag

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-15 Thread Nick Sarnie via cfe-commits
sarnex wrote: @arsenm Any comments on the above? Thx https://github.com/llvm/llvm-project/pull/126956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][modules] Introduce new `ModuleCache` interface (PR #131193)

2025-03-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/131193 >From 3ac8635ed7e647be49d3b5e59b4e5be0d19bc629 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 13 Mar 2025 10:31:39 -0700 Subject: [PATCH 1/2] [clang][modules] Introduce new `ModuleCache` interface -

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-03-15 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 created https://github.com/llvm/llvm-project/pull/130623 `+simd` and `+nosimd` are used to emable or disable NEON Instructions when compiling for AArch32 Targets. However, up until now, using these has not been possible. To enable this, these options are mapped to th

[clang] [flang] [flang/clang] Adding use of Clang's diagnostics in Flang (PR #130593)

2025-03-15 Thread Jean-Didier PAILLEUX via cfe-commits
https://github.com/JDPailleux created https://github.com/llvm/llvm-project/pull/130593 Hello, Here's a proposal to support diagnostics in Flang using the `DiagnosticEngine` provided by Clang. The goal is to have a shared diagnostic system between Clang and Flang. A small modification has bee

[clang] [llvm] [SPIRV] GPU intrinsics (PR #131190)

2025-03-15 Thread Michal Paszkowski via cfe-commits
michalpaszkowski wrote: I need to read through the RFC and the changes in the PR yet but I think `llvm/test/CodeGen/SPIRV/` is not really the best place for this test as it is not testing the SPIR-V backend. https://github.com/llvm/llvm-project/pull/131190 __

[clang] 737a0ae - [NFC][PowerPC] cleaned dead code of PPC.cpp and PPC.h (#130994)

2025-03-15 Thread via cfe-commits
Author: zhijian lin Date: 2025-03-14T09:24:44-04:00 New Revision: 737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8 URL: https://github.com/llvm/llvm-project/commit/737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8 DIFF: https://github.com/llvm/llvm-project/commit/737a0aeb6b4ec5bee87af6b5b1cb987427aef5f8.diff L

[clang] [Clang] Do not emit nodiscard warnings for the base expr of static member access (PR #131450)

2025-03-15 Thread via cfe-commits
cor3ntin wrote: @elbeno thanks for reporting anyway. I'm a bit worried that it was reported twice in a day... we are going to backport it asap! https://github.com/llvm/llvm-project/pull/131450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang-tools-extra] [clang-tidy] Add new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread via cfe-commits
@@ -0,0 +1,103 @@ +//===--- ConstructReusableObjectsOnceCheck.cpp - clang-tidy ---===// EugeneZelenko wrote: Please make same length as closing comment. https://github.com/llvm/llvm-project/pull/131455 ___

[clang] [Clang] Remove use of 'temporary' toolchains for offload deduction (PR #131332)

2025-03-15 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/131332 Summary: We neededa toolchain to get the GPU architectures when compiling with OpenMP. This kind of breaks the toolchain model because these are cached all over the place. Instead of making a new one, just create

[clang] 467ad6a - [clang-format] Add support for absl nullability macros (#130346)

2025-03-15 Thread via cfe-commits
Author: Jan Voung Date: 2025-03-14T00:01:35-07:00 New Revision: 467ad6a03583ba0566ec4f7c8ca4e2dabc60c8f6 URL: https://github.com/llvm/llvm-project/commit/467ad6a03583ba0566ec4f7c8ca4e2dabc60c8f6 DIFF: https://github.com/llvm/llvm-project/commit/467ad6a03583ba0566ec4f7c8ca4e2dabc60c8f6.diff LOG

[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)

2025-03-15 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/130228 >From 295b8173b6913d9014c5786eb4af0112384afa65 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Fri, 7 Mar 2025 11:38:11 +0800 Subject: [PATCH 1/7] [Clang] Implement P0963R3 "Structured binding declaration as

[clang] [analyzer] Introduce per-entry-point statistics (PR #131175)

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,27 @@ +=== +Analysis Statistics +=== + +CSA enjoys two facilities to collect statistics: per translation unit and per entry point. +We use llvm/ADT/Statistic.h for numbers describing the entire translation unit (TU). +We use clang/Stati

[clang] [Clang] Treat `ext_vector_type` as a regular type attribute (PR #130177)

2025-03-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > It completely changes the type, it's much more aggressive than a type > attribute? sizeof is no longer the same We already have type-level vector attributes, like the vector size or NEON attributes. Some of them also have `clang::` spellings. https://github.com/llvm/llvm-proj

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

2025-03-15 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] [clang] Fix inaccurate wording of warn_second_arg_of_va_start_not_last_named_param (PR #131238)

2025-03-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/131238 ___ 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 new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/131455 New check to find variable declarations of expensive-to-construct classes that are constructed from only constant literals and so can be reused to avoid repeated construction costs on each function invocation.

[clang-tools-extra] [clang-tidy] Add new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Baranov Victor (vbvictor) Changes New check to find variable declarations of expensive-to-construct classes that are constructed from only constant literals and so can be reused to avoid repeated construction costs on each fun

[clang-tools-extra] [clang-tidy] Add new `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/131455 >From 0b98489770f380f209d7b7a0a9223dd80c782478 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Sat, 15 Mar 2025 17:36:23 +0300 Subject: [PATCH] add new construct-reusable-objects-once check --- .../clang-

[clang] [Clang][NFC] Extend cmplx range tests for #131129 (PR #131447)

2025-03-15 Thread Mészáros Gergely via cfe-commits
Maetveis wrote: * **#131447** https://app.graphite.dev/github/pr/llvm/llvm-project/131447?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/131

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-03-15 Thread via cfe-commits
whatisthis-dot wrote: > 💌 https://github.com/llvm/llvm-project/pull/128274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-03-15 Thread via cfe-commits
whatisthis-dot wrote: 💌 https://github.com/llvm/llvm-project/pull/128274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-15 Thread via cfe-commits
Megan0704-1 wrote: @cor3ntin Thank you for flagging the test failures! I’ve investigated them, and here’s what I found: Failed Tests in constructor-template.cpp: - The failures occurred because the test wasn’t annotated to expect the new diagnostics introduced by the fix (e.g., A instantiat

[clang] [NFC][analyzer] Framework for multipart checkers (PR #130985)

2025-03-15 Thread Donát Nagy via cfe-commits
NagyDonat wrote: The reason why I the support for multiple `RegisteredNames` instead of a single `Name` is directly introduced within `CheckerBase` is that this significantly simplifies the implementation. [1] However if you wish so I could easily introduce a `static_assert` which ensures tha

[clang] [llvm] [Support] Remove output file checks from `LockFileManager` (PR #130395)

2025-03-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/130395 >From a9969c43be752ccaa70959fd4527a57dc2981881 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Thu, 6 Mar 2025 17:29:34 -0800 Subject: [PATCH 1/2] [Support] Remove output file checks from `LockFileManager

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -202,6 +202,18 @@ mlir::Type CIRGenTypes::convertType(QualType type) { break; } + case Type::ConstantArray: { +const ConstantArrayType *arrTy = cast(ty); +mlir::Type elemTy = convertTypeForMem(arrTy->getElementType()); + +// FIXME: In LLVM, "lower arrays

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-15 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: Can you also add a test for lowering to LLVM IR? https://github.com/llvm/llvm-project/pull/130502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Warn about virtual methods in `final` classes (PR #131188)

2025-03-15 Thread Devon Loehr via cfe-commits
@@ -0,0 +1,29 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wunnecessary-virtual-specifier %s + +struct Foo final { + Foo() = default; + virtual ~Foo() = default; // expected-warning {{virtual method}} + virtual Foo& operator=(Foo& other) = default; // ex

[clang] Revert "[Fuchsia] Support PGO" (PR #126293)

2025-03-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/1142 Here is the relevant piece of the

[clang-tools-extra] [clang-tidy] support different precisions (PR #130540)

2025-03-15 Thread Baranov Victor via cfe-commits
@@ -136,6 +136,10 @@ Changes in existing checks ` check by updating suppress warnings logic for ``nullptr`` in ``std::find``. +- Improved :doc:`modernize-use-std-numbers + ` check to support math functions vbvictor wrote: Please make lines no more than

[clang] [C23] Add __builtin_c23_va_start (PR #131166)

2025-03-15 Thread Aaron Ballman via cfe-commits
@@ -6,27 +6,20 @@ #include -#define DERP this is an error - void func(...) { // expected-warning {{'...' as the only parameter of a function is incompatible with C standards before C23}} // Show that va_start doesn't require the second argument in C23 mode. va_list l

[clang] Forbid co_await and co_yield in invalid expr contexts (PR #130455)

2025-03-15 Thread via cfe-commits
github-actions[bot] wrote: @NewSigma Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-15 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > Wouldn't it be more maintainable to just force the value to OFF for AIX where > the `option()` is defined? Unfortunately, the cmake command line option `-D LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` overrides the `option()` in the cmake file. https://github.com/llvm/llvm-pro

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-15 Thread Andy Kaylor via cfe-commits
@@ -121,29 +364,173 @@ mlir::Value CIRGenFunction::emitScalarExpr(const Expr *e) { return ScalarExprEmitter(*this, builder).Visit(const_cast(e)); } +[[maybe_unused]] static bool MustVisitNullValue(const Expr *e) { + // If a null pointer expression's type is the C++0x nullp

[clang] [clang][test] Don't require specific alignment in test case (PR #130589)

2025-03-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Thanks for taking care of this for me. https://github.com/llvm/llvm-project/pull/130589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add isOffloadingTarget function to LangOpts (PR #126956)

2025-03-15 Thread Nick Sarnie via cfe-commits
sarnex wrote: > The target isn't part of the language, why is it in LangOpts? If you have a better suggestion I'm all areas, we seem to already have similar stuff in `LangOpts` such as `OMPTargetTriples`, `OMPHostIRFile`, `GPUDefaultStream`, and `CUID`. https://github.com/llvm/llvm-project/pu

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-03-15 Thread Matt Arsenault via cfe-commits
@@ -1,23 +1,23 @@ -//===- AMDGPUOpenCLEnqueuedBlockLowering.h ---*- C++-*-===// +//===- AMDGPUExportKernelRuntimeHandles.h ---*- C++-*-===// arsenm wrote: My emacs certainly needs it https://github.com/llvm/llvm-project/

[clang] [compiler-rt] [lld] [llvm] [InstrProf] Remove -forder-file-instrumentation (PR #130192)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ellis Hoag (ellishg) Changes Completely remove `-forder-file-instrumentation`. This was deprecated in https://github.com/llvm/llvm-project/pull/121514 and removal was planned in https://discourse.llvm.org/t/deprecate-forder-file-instrumen

[clang] [SystemZ][z/OS] Add visibility features for z/OS (eg. _Export, pragma export) (PR #111035)

2025-03-15 Thread Sean Perry via cfe-commits
https://github.com/perry-ca commented: @AaronBallman Thanks for the feedback. I'll make the changes and look into why _Exxport wasn't implemented like the other declspecs. I did consider these to be the same feature (two ways to set the same information). If it's easier for reviewing I can l

[clang-tools-extra] [clang-tidy][NFC] clean ReleaseNotes.rst (PR #130626)

2025-03-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor created https://github.com/llvm/llvm-project/pull/130626 1. Fixed ordering to be alphabetical 2. Made lines no more than 80 characters long 3. Fixed typos >From 2add09ddbc3cdeeb77257170de9f349bf3a47b94 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 10 Mar

[clang] [C++20][Modules] Fix incomplete decl chains (PR #129982)

2025-03-15 Thread Michael Park via cfe-commits
https://github.com/mpark edited https://github.com/llvm/llvm-project/pull/129982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] disable unary, vector mask (PR #130400)

2025-03-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: It sounds a little weird to allow the vector+int version only in codegen and not in constant evaluation. If we reject it, we should do that in Sema I think. git blame for `Sema::BuiltinShuffleVector` is all over the place, so pinging @AaronBallman @cor3ntin to see if this goes

[clang] [clang][test] Don't require specific alignment in test case (PR #130589)

2025-03-15 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/130589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] support pointee mutation check in misc-const-correctness (PR #130494)

2025-03-15 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/130494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   >