[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

[clang] b19ed9c - [C2y] Implement WG14 N3409 (#130299)

2025-03-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-03-07T14:46:29-05:00 New Revision: b19ed9c0435c5f7c89cba40285df3a1395a782fd URL: https://github.com/llvm/llvm-project/commit/b19ed9c0435c5f7c89cba40285df3a1395a782fd DIFF: https://github.com/llvm/llvm-project/commit/b19ed9c0435c5f7c89cba40285df3a1395a782fd.diff

[clang] [clang][DependencyScanning] Track modules that resolve from sysroot. (PR #130634)

2025-03-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese commented: Overall I think this looks good. I'm not sure I share the same concerns. The situation this covers is how likely is it that the build system is going to determine this needs to be rebuilt, and that happens (in most cases) purely based on the reported dep

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

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes 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 cre

[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -0,0 +1,28 @@ +//===--===// +// +// 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: Apac

[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/3] [clang][CodeGen] Software Bill of Mitigations Metadata The

[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)

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

[clang] [Clang driver] Diagnose `-maix-shared-lib-tls-model-opt` on wrong targets (PR #130865)

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

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

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -0,0 +1,201 @@ +//===- EntryPointStats.cpp --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

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

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -35,9 +35,10 @@ class DivZeroChecker : public Checker> { public: /// This checker class implements several user facing checkers enum CheckKind { CK_DivideZero, CK_TaintedDivChecker, CK_NumCheckKinds }; - bool ChecksEnabled[CK_NumCheckKinds] = {false}; - CheckerNameRef

[clang-tools-extra] [clang-tidy] Add an option to treat warnings as errors (PR #128221)

2025-03-15 Thread via cfe-commits
https://github.com/juru1234 updated https://github.com/llvm/llvm-project/pull/128221 >From 057d62357c813dcfccf7ecfa8b272e2564fe07f3 Mon Sep 17 00:00:00 2001 From: Julian Ruess Date: Fri, 21 Feb 2025 20:42:46 +0100 Subject: [PATCH 1/2] [clang-tidy] Add an option to treat warnings as errors This

[clang] [Clang][NFC] Rename SecondArgIsLastNamedArgument for clarity and consistency (PR #131346)

2025-03-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm in favor, but lets let @AaronBallman take a look/click merge if is OK too. https://github.com/llvm/llvm-project/pull/131346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-15 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/128150 >From a4f57f491efd075c4788e31e3c52a090a6960a64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Thu, 20 Feb 2025 12:37:15 + Subject: [PATCH] [clang-tidy] Avoid processing declarati

[clang] [clang-format] Correctly annotate user-defined conversion functions (PR #131434)

2025-03-15 Thread Björn Schäpers via cfe-commits
@@ -3856,6 +3856,59 @@ TEST_F(TokenAnnotatorTest, AfterPPDirective) { EXPECT_TOKEN(Tokens[2], tok::minusminus, TT_AfterPPDirective); } +TEST_F(TokenAnnotatorTest, UserDefinedConversionFunction) { + auto Tokens = annotate("operator int();"); + ASSERT_EQ(Tokens.size(), 6u) <

[clang] [Format] Do not crash on non-null terminated strings (PR #131299)

2025-03-15 Thread via cfe-commits
cor3ntin wrote: It would be useful to have a repro or a stack trace here. In particular, in `SourceManagerForFile`, `RequiresNullTerminator` is `false`, so the assert should _not_ fire on a non-null terminated file https://github.com/llvm/llvm-project/pull/131299 __

[clang-tools-extra] [clang-doc] [feat] add --repository-line-prefix argument (PR #131280)

2025-03-15 Thread Mohamed Emad via cfe-commits
hulxv wrote: @ilovepi Hey, could you please review this PR whenever you have a moment? I’d really appreciate your feedback! https://github.com/llvm/llvm-project/pull/131280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [llvm] [clang][DebugInfo] Add symbol for debugger with VTable information. (PR #130255)

2025-03-15 Thread Carlos Alberto Enciso via cfe-commits
@@ -2518,6 +2518,59 @@ StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) { return internString("_vptr$", RD->getNameAsString()); } +// Emit symbol for the debugger that points to the vtable address for +// the given class. The symbol is named as '_vtable$'. +//

[libclc] a2b0576 - [libclc] Stop installing CLC headers (#126908)

2025-03-15 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-03-06T08:52:23Z New Revision: a2b05761724e5243056988d9d6bf1a5a94715b74 URL: https://github.com/llvm/llvm-project/commit/a2b05761724e5243056988d9d6bf1a5a94715b74 DIFF: https://github.com/llvm/llvm-project/commit/a2b05761724e5243056988d9d6bf1a5a94715b74.diff LOG

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

2025-03-15 Thread Björn Schäpers via cfe-commits
HazardyKnusperkeks wrote: I still think Google should have to say what their style in clang-format is, extending to the default values of `AttributeMacros`. I also wouldn't have such a big issue with adding it to the base style, because of the prefix and I think it's nice that Boost or Qt most

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-15 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor updated https://github.com/llvm/llvm-project/pull/126434 >From 45d80294dd6fdab4bd85d51b0f952b515486bc8b Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 3 Mar 2025 09:25:03 +0300 Subject: [PATCH 1/4] [clang-tidy] add scoped-lock-check --- .../clang-tidy/mod

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Maxim Zhukov (Mephistophiles) Changes Added ability to build together with -fsanitize=cfi and -fsanitize-coverage=trace-cmp at the same time. --- Full diff: https://github.com/llvm/llvm-project/pull/13129

[clang] [clang] Fix a segfault when M is a nullptr (PR #130712)

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/130712 ___ 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 Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/131166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d781ac1 - [C23] Add __builtin_c23_va_start (#131166)

2025-03-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-03-15T11:01:53-04:00 New Revision: d781ac1cf0d561b79f6ff834d786c6a999429901 URL: https://github.com/llvm/llvm-project/commit/d781ac1cf0d561b79f6ff834d786c6a999429901 DIFF: https://github.com/llvm/llvm-project/commit/d781ac1cf0d561b79f6ff834d786c6a999429901.diff

[clang] [clang][CodeComplete] Use HeuristicResolver in getAsRecordDecl() (PR #130473)

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

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

2025-03-15 Thread Devon Loehr via cfe-commits
@@ -2706,6 +2706,9 @@ def warn_final_dtor_non_final_class : Warning< InGroup; def note_final_dtor_non_final_class_silence : Note< "mark %0 as '%select{final|sealed}1' to silence this warning">; +def warn_unnecessary_virtual_specifier : Warning< + "virtual method %0 is insi

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

2025-03-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,124 @@ +//===--- CapturingThisInMemberVariableCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-15 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/128150 ___ 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 edited 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 Ben Deane via cfe-commits
elbeno wrote: Thanks @cor3ntin, apologies for dupe. 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 `construct-reusable-objects-once` check (PR #131455)

2025-03-15 Thread Oliver Stöneberg via cfe-commits
firewave wrote: Nice. It looks like it does not consider that static initializations within functions are only thread-safe starting with C++11. Also this may obviously only be applied to read-only objects. That would require an existing `const` object or usage in tandem with `misc-const-corr

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

2025-03-15 Thread via cfe-commits
https://github.com/cor3ntin created https://github.com/llvm/llvm-project/pull/131450 …mber access For an expression `nodiscard_function().static_member(), the nodiscard warnings added by #120223, are not useful or actionable, and are disruptive to some library implementations; we just remove

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

2025-03-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mészáros Gergely (Maetveis) Changes - Add tests for complex divdent and real divisor - Add tests for complex * real multiplication - Add tests for multiply/divide and assign (`/=`,`*=`) operators --- Patch is 510.90 KiB, truncated to 20.0

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

2025-03-15 Thread Jack Styles via cfe-commits
Stylie777 wrote: No worries 😀 If we remove `ARM::AEK_SIMD` is removed, the target will not be able to process or generate NEON instructions. I have added it to all ArmV8-a (and beyond) architectures and the Cortex-R52 CPU. This should cover all the Cortex-A and Cortex-R targets that support i

[clang] [libc][nfc] Steps to allow sharing code between gpu intrin.h headers (PR #131134)

2025-03-15 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield updated https://github.com/llvm/llvm-project/pull/131134 >From 0466c31d1e0b10aa2d2352bb6befd36eb5306f9c Mon Sep 17 00:00:00 2001 From: Jon Chesterfield Date: Thu, 13 Mar 2025 12:49:42 + Subject: [PATCH] [libc][nfc] Steps to allow sharing code between gpu i

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

2025-03-15 Thread Donát Nagy via cfe-commits
@@ -353,6 +353,12 @@ ANALYZER_OPTION(bool, DisplayCTUProgress, "display-ctu-progress", "the analyzer's progress related to ctu.", false) +ANALYZER_OPTION( +StringRef, DumpSEStatsToCSV, "dump-se-stats-to-csv", NagyDonat wrot

[clang] [RISCV][Sema] Add feature check for target attribute to VSETVL intrinsics (PR #126064)

2025-03-15 Thread Brandon Wu via cfe-commits
4vtomat wrote: Ping~ https://github.com/llvm/llvm-project/pull/126064 ___ 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 an option to treat warnings as errors (PR #128221)

2025-03-15 Thread Carlos Galvez via cfe-commits
@@ -97,6 +97,9 @@ Improvements to clang-tidy Note: this may lead to false negatives; downstream users may need to adjust their checks to preserve existing behavior. +- Improved :program:`clang-tidy-diff.py` script. Add the `-warnings-as-errors` carlosgalve

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2025-03-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Noted. Sorry I haven't responded yet, I have other priorities and it might take a while before I get back to this patch. https://github.com/llvm/llvm-project/pull/107942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-15 Thread Andy Kaylor via cfe-commits
@@ -568,6 +568,128 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMUnaryOpLowering::matchAndRewrite( +cir::UnaryOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

2025-03-15 Thread Erich Keane via cfe-commits
@@ -10033,15 +10040,24 @@ class Sema final : public SemaBase { bool InOverloadResolution, QualType &ConvertedType); + enum class CheckMemberPointerConversionResult { erichkeane wrote: Is `Chec

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

2025-03-15 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. Ok, given the specific conditions that: 1. there are 3 parameters 2. the first parameter should always be the vector type 3. and there should be at most one base type among all the parameters This macro should work for that specific case. I

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-15 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,102 @@ +.. title:: clang-tidy - modernize-use-scoped-lock + +modernize-use-scoped-lock += + +Finds uses of ``std::lock_guard`` and suggests replacing them with C++17's +alternative ``std::scoped_lock``. The check will automatically transform only

[clang-tools-extra] [clang-tidy] Avoid processing declarations in system headers (PR #128150)

2025-03-15 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= , Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: carlosgalvezp wrote: @PiotrZSL @5chmidti @HerrCai0907 Do you have any objections to this patch? I would like to go ahead and land it now that all tests pass. The more we delay this, the higher the risk that new ch

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/121957 >From 2feb85c15f64546cb6874e1ca0a1310bd1e1bedd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 7 Jan 2025 07:57:09 -0800 Subject: [PATCH 1/7] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

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

2025-03-15 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis ready_for_review https://github.com/llvm/llvm-project/pull/131447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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 Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. Wouldn't it be more maintainable to just set the value to off for AIX where the `option()` is defined? https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2025-03-15 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/95004 >From c3b6943c236990c9f0ba363b4335b3c0e048ef2c Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 10 Jun 2024 16:54:02 +0100 Subject: [PATCH 1/3] [clang] Add value_type attr, use it to add noalias when pass-by-

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

2025-03-15 Thread Hans Wennborg 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] 0f98d1b - [CIR] Don't generate ClangIR after an unrecoverable error occured (#130971)

2025-03-15 Thread via cfe-commits
Author: Morris Hafner Date: 2025-03-14T07:20:42-07:00 New Revision: 0f98d1b9fa56c19dcbf1b002608e51047ac56d60 URL: https://github.com/llvm/llvm-project/commit/0f98d1b9fa56c19dcbf1b002608e51047ac56d60 DIFF: https://github.com/llvm/llvm-project/commit/0f98d1b9fa56c19dcbf1b002608e51047ac56d60.diff

[clang] [flang] [llvm] [mlir] [TargetRegistry] Accept Triple in createTargetMachine() (NFC) (PR #130940)

2025-03-15 Thread Matt Arsenault via cfe-commits
@@ -84,10 +84,9 @@ TargetMachine *EngineBuilder::selectTarget(const Triple &TargetTriple, } // Allocate a target... - TargetMachine *Target = - TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr, - Options, Re

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

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

[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 created https://github.com/llvm/llvm-project/pull/131468 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
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

  1   2   3   4   >