[clang] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-18 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov edited https://github.com/llvm/llvm-project/pull/116642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-11-18 Thread Vinay Deshmukh via cfe-commits
@@ -1200,3 +1200,20 @@ void ExprEngine::VisitLambdaExpr(const LambdaExpr *LE, ExplodedNode *Pred, // FIXME: Move all post/pre visits to ::Visit(). getCheckerManager().runCheckersForPostStmt(Dst, Tmp, LE, *this); } + +void ExprEngine::VisitAttributedStmt(const AttributedStm

[clang] [amdgpu-arch] Replace use of HSA with reading sysfs directly (PR #116651)

2024-11-18 Thread Matt Arsenault via cfe-commits
@@ -1,122 +0,0 @@ -//===- AMDGPUArchByHSA.cpp - list AMDGPU installed --*- C++ -*-===// -// -// 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] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-11-18 Thread Vinay Deshmukh via cfe-commits
@@ -1200,3 +1200,20 @@ void ExprEngine::VisitLambdaExpr(const LambdaExpr *LE, ExplodedNode *Pred, // FIXME: Move all post/pre visits to ::Visit(). getCheckerManager().runCheckersForPostStmt(Dst, Tmp, LE, *this); } + +void ExprEngine::VisitAttributedStmt(const AttributedStm

[clang] [compiler-rt] [llvm] [X86] Support -march=diamondrapids (PR #113881)

2024-11-18 Thread Nico Weber via cfe-commits
nico wrote: Looks like this breaks tests: http://45.33.8.238/linux/153081/step_6.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/113881 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #116413)

2024-11-18 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/116413 >From 92ccbe72ca95ad2df5a81b76244a8a8d7cedef40 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 15 Nov 2024 09:00:15 -0800 Subject: [PATCH 1/3] update new tests --- clang/lib/Sema/HLSLExternalSemaSour

[clang] [llvm] Adjust MSVC disabled optimization pragmas to be _MSC_VER only (PR #116704)

2024-11-18 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/116704 Alter the #ifdef values from #110986 and #115292 to use _MSC_VER instead of _WIN32 to stop the pragmas being used on gcc/mingw builds Noticed by @mstorsjo >From e247c69d20cb4b2cb8b52ebb89bc2002c708f54d Mon Sep

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,233 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" + +struct X { + const int *x; + void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x =

[clang] [Clang] SemaFunctionEffects: Fix bug where lambdas produced by template expansion weren't verified. (PR #116505)

2024-11-18 Thread Doug Wyatt via cfe-commits
https://github.com/dougsonos closed https://github.com/llvm/llvm-project/pull/116505 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [Clang] Add __builtin_invoke and detect std::invoke as a builtin (PR #116709)

2024-11-18 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 811186764d1add4d83972db3ad0d2e7c96bb15a7 b72d52b8cbadc460feb813d40433146c2dc9f780 --e

[clang] [HLSL] Rename resource's "h" member to "__handle". NFC (PR #116696)

2024-11-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/116696 This makes it clearer that the handle is an implementation detail by using a name that's reserved. >From 23eeca7761e1af49be14d36ab7c6a0aa004a4232 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Sun, 3 Nov 20

[clang] [HLSL] Rename resource's "h" member to "__handle". NFC (PR #116696)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes This makes it clearer that the handle is an implementation detail by using a name that's reserved. --- Full diff: https://github.com/llvm/llvm-project/pull/116696.diff 10 Files Affected: - (modified) clan

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-11-18 Thread Sam Clegg via cfe-commits
sbc100 wrote: Perhaps yes. Do you know of any way to reduce the input program into something we can try to inspect. The preprocessed C++ file is over 100,000 lines :-/ https://github.com/llvm/llvm-project/pull/107257 ___ cfe-commits mailing list cf

[clang] [HLSL] Fix placement of `const` for resource operator[] (PR #116698)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes We had an incorrect AST here - We want `const T &`, not `T &const`. --- Full diff: https://github.com/llvm/llvm-project/pull/116698.diff 7 Files Affected: - (modified) clang/lib/Sema/HLSLExternalSemaSource

[clang] [HLSL] Fix placement of `const` for resource operator[] (PR #116698)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Justin Bogner (bogner) Changes We had an incorrect AST here - We want `const T &`, not `T &const`. --- Full diff: https://github.com/llvm/llvm-project/pull/116698.diff 7 Files Affected: - (modified) clang/lib/Sema/HLSLExternalSemaSource.

[clang] [HLSL] Fix placement of `const` for resource operator[] (PR #116698)

2024-11-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/116698 We had an incorrect AST here - We want `const T &`, not `T &const`. >From 7b8f568725dc3828c6ce1fdfac2151de9359ae2d Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Wed, 13 Nov 2024 13:56:28 -0800 Subject: [PAT

[clang] [HLSL] Rename resource's "h" member to "__handle". NFC (PR #116696)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Justin Bogner (bogner) Changes This makes it clearer that the handle is an implementation detail by using a name that's reserved. --- Full diff: https://github.com/llvm/llvm-project/pull/116696.diff 10 Files Affected: - (modified) clang

[clang] Reland "[clang] Add nuw attribute to GEPs (#105496)" (PR #107257)

2024-11-18 Thread Nikita Popov via cfe-commits
nikic wrote: @sbc100 That wasm is not necessarily a miscompile, it may be UB in the source program, if it uses a negative number in an *unsigned* variable to index an array. Is the affected code clean under ubsan? (See https://github.com/llvm/llvm-project/issues/108770 for a similar report tha

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-18 Thread via cfe-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/116699 This is the first one in a series of PRs adding the requirements for #58654 This PR adds `ByteAddressBuffer` definition as well as the handle lowering to `dx.RawBuffer`. >From c3b3c87db9b6a47bea9ed69575d4

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/3] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Haojian Wu via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" hokein wrote: In my experience, a single and well-organized test file works effectively, as it

[clang] [llvm] AMDGPU: Add first gfx950 mfma instructions (PR #116312)

2024-11-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/116312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable LIBCXX_INCLUDE_BENCHMARKS in Fuchsia cmake (PR #116446)

2024-11-18 Thread Caslyn Tonelli via cfe-commits
https://github.com/Caslyn closed https://github.com/llvm/llvm-project/pull/116446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Improved readability redundant casting with enums (PR #111424)

2024-11-18 Thread Congcong Cai via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin, =?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: HerrCai0907 wrote: I am not the expect of cpp standard, in my opinion, enum is not a type alias. it is a new type. https://github.com/llvm/llvm-project/pul

[clang] [ARM] Fix NaN behaviour for MVE compare intrinsics (PR #116371)

2024-11-18 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/116371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ARM] Fix NaN behaviour for MVE compare intrinsics (PR #116371)

2024-11-18 Thread David Green via cfe-commits
https://github.com/davemgreen approved this pull request. https://github.com/llvm/llvm-project/pull/116371 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/116591 None >From ba1a73e0220937e26618ce0417a7aeadd0ed3792 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 18 Nov 2024 15:09:34 +0800 Subject: [PATCH] [clang-tidy] fix cppcoreguidelines-narrowing-conversion

[clang-tools-extra] [clang-tidy] fix cppcoreguidelines-narrowing-conversions false positives when narrowing integer to signed integer in C++20 (PR #116591)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/116591.diff 12 Files Affected: - (modified) clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp (+7-1) - (modi

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/116243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/116243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Handle [[assume(cond)]] as __builtin_assume(cond) (PR #116462)

2024-11-18 Thread Balazs Benics via cfe-commits
steakhal wrote: This looks really good. I'll come back and push some changes to your branch to make it more similar with our coding style. And maybe adding a few more tests. I'll expect you to then have a look at the commits I push and report back if you agree with those. Once that is done, we

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Haojian Wu via cfe-commits
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation { let Category = DocCatFunction; let Content = [{ Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a function -parameter or implicit object parameter indicates that that objects t

[clang] [clang][RISCV] Bump RVV intrinsic to version 1.0 (PR #116597)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Brandon Wu (4vtomat) Changes The spec: https://github.com/riscv-non-isa/rvv-intrinsic-doc/releases/tag/v1.0.0-rc4 Also remove __riscv_v_intrinsic_overloading since it's no longer in spec, the overloading

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-18 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea updated https://github.com/llvm/llvm-project/pull/116257 >From eb6fea771b0824fef979e5eef26718ecbc8c7f56 Mon Sep 17 00:00:00 2001 From: Alexandros Lamprineas Date: Thu, 14 Nov 2024 16:07:32 + Subject: [PATCH 1/3] [NFC][clang][FMV][TargetInfo] Refactor API for FMV

[clang] [clang][RISCV] Bump RVV intrinsic to version 1.0 (PR #116597)

2024-11-18 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp commented: Add ReleaseNote to Clang? https://github.com/llvm/llvm-project/pull/116597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread Mariya Podchishchaeva via cfe-commits
@@ -13528,6 +13528,24 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, return Success(DidOverflow, E); } + case Builtin::BI__builtin_reduce_add: { +APValue Source; +if (!EvaluateAsRValue(Info, E->getArg(0), Source)) + return false; + +

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Tom Eccles via cfe-commits
@@ -490,6 +490,16 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + StringRef V = A->getVa

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-11-18 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. The description of the PR is stale and needs to be updated. https://github.com/llvm/llvm-project/pull/111616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang-tools-extra] [clangd] Check for other clangd extension capabilities under 'experimental' (PR #116531)

2024-11-18 Thread Haojian Wu via cfe-commits
https://github.com/hokein approved this pull request. https://github.com/llvm/llvm-project/pull/116531 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('Pr') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
lenary wrote: Kito and I have agreed `R` is a good way forwards for GPR pairs, and the c-api-doc PR is approved (but not landed). I'll reword the description/message to update our constraint choice when I land this, which I hope to get to later today. https://github.com/llvm/llvm-project/pul

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread David Truby via cfe-commits
https://github.com/DavidTruby edited https://github.com/llvm/llvm-project/pull/116432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation { let Category = DocCatFunction; let Content = [{ Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a function -parameter or implicit object parameter indicates that that objects t

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation { let Category = DocCatFunction; let Content = [{ Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a function -parameter or implicit object parameter indicates that that objects t

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,233 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" + +struct X { + const int *x; + void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x =

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread David Truby via cfe-commits
@@ -490,6 +490,16 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + StringRef V = A->getVa

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -0,0 +1,233 @@ +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s + +#include "Inputs/lifetime-analysis.h" + +struct X { + const int *x; + void captureInt(const int& x [[clang::lifetime_capture_by(this)]]) { this->x =

[clang] [llvm] [SPIR-V] DRAFT: Shader built-ins - no spec change (PR #116393)

2024-11-18 Thread Nathan Gauër via cfe-commits
@@ -59,6 +59,9 @@ enum class LangAS : unsigned { // HLSL specific address spaces. hlsl_groupshared, + // Vulkan specific address spaces. + vulkan_private, + Keenuts wrote: My understanding is we have 2 ways to convey this information from the FE to the

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

2024-11-18 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Could anyone with a windows machine see if you can work out what is happening with the windows test failure? I don't understand why the tests are failing on the windows bot as it seems like it should simply fail everything (e.g. windows driver is going wrong) or it should work h

[clang] 1e4646d - [clang] constexpr built-in reduce add function. (#116243)

2024-11-18 Thread via cfe-commits
Author: c8ef Date: 2024-11-18T20:47:07+08:00 New Revision: 1e4646d8191b13ac9c4d8c2cd3bb20a184f1966f URL: https://github.com/llvm/llvm-project/commit/1e4646d8191b13ac9c4d8c2cd3bb20a184f1966f DIFF: https://github.com/llvm/llvm-project/commit/1e4646d8191b13ac9c4d8c2cd3bb20a184f1966f.diff LOG: [cl

[clang-tools-extra] [clangd] Let DefineOutline tweak handle member function templates (PR #112345)

2024-11-18 Thread Christian Kandeler via cfe-commits
@@ -443,13 +461,26 @@ class DefineOutline : public Tweak { SameFile = true; // Bail out if the template parameter is unnamed. +// FIXME: Is this really needed? It inhibits application on ckandeler wrote: I've moved the comment down to

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -3922,16 +3922,41 @@ def LifetimeCaptureByDocs : Documentation { let Category = DocCatFunction; let Content = [{ Similar to `lifetimebound`_, the ``lifetime_capture_by(X)`` attribute on a function -parameter or implicit object parameter indicates that that objects t

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread via cfe-commits
@@ -13528,6 +13528,24 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, return Success(DidOverflow, E); } + case Builtin::BI__builtin_reduce_add: { +APValue Source; +if (!EvaluateAsRValue(Info, E->getArg(0), Source)) + return false; + +

[clang] [clang] constexpr built-in reduce add function. (PR #116243)

2024-11-18 Thread via cfe-commits
https://github.com/c8ef closed https://github.com/llvm/llvm-project/pull/116243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-18 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-18 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Commit message should be adjusted, it's talking about the old pass https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang-tools-extra] [clangd] Support symbolTags for document symbol (PR #113669)

2024-11-18 Thread Dietrich Travkin via cfe-commits
travkin79 wrote: Thank you @chouzz, I'll adapt the CDT LSP project (and maybe others like LSP4E and LSP4J) accordingly. https://github.com/llvm/llvm-project/pull/113669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [amdgpu-arch] Replcae use of HSA with reading sysfs directly (PR #116651)

2024-11-18 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/116651 Summary: For Linux systems, we currently use the HSA library to determine the installed GPUs. However, this isn't really necessary and adds a dependency on the HSA runtime as well as a lot of overhead. Instead, t

[clang] [amdgpu-arch] Replcae use of HSA with reading sysfs directly (PR #116651)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: For Linux systems, we currently use the HSA library to determine the installed GPUs. However, this isn't really necessary and adds a dependency on the HSA runtime as well as a lot of overhead. Instead

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-18 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)

2024-11-18 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/107627 >From 5edfc3a8558b42e143d58041f0f77a8bfc39b847 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Fri, 6 Sep 2024 14:16:15 -0400 Subject: [PATCH] Propagate lifetimebound from formal parameters to

[clang] [NFC][Clang][AArch64]Refactor implementation of Neon vectors MFloat8… (PR #114804)

2024-11-18 Thread via cfe-commits
https://github.com/CarolineConcatto updated https://github.com/llvm/llvm-project/pull/114804 >From fc97e36c08964c42debda9ad1a289d15b5327d23 Mon Sep 17 00:00:00 2001 From: Caroline Concatto Date: Wed, 30 Oct 2024 16:20:16 + Subject: [PATCH 1/2] [NFC][Clang][AArch64]Refactor implementation of

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Tom Eccles via cfe-commits
@@ -490,6 +490,16 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +if (A->getNumValues() == 1) { + StringRef V = A->getVa

[clang] [llvm] [clang] Implement lifetime analysis for lifetime_capture_by(X) (PR #115921)

2024-11-18 Thread Utkarsh Saxena via cfe-commits
@@ -3229,6 +3230,52 @@ void Sema::CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl, << ParamName << (FDecl != nullptr) << FDecl; } +void Sema::checkLifetimeCaptureBy(FunctionDecl *FD, bool IsMemberFunction, + const Expr *ThisArg,

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-18 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] Propagate lifetimebound from formal parameters to those in the canonical declaration and use that for analysis (PR #107627)

2024-11-18 Thread via cfe-commits
@@ -266,6 +262,20 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { LifetimeBoundAttr::CreateImplicit(Context, FD->getLocation())); } } + } else if (auto *CanonDecl = FD->getCanonicalDecl(); FD != CanonDecl) { +// Propagate the lifetimeb

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

2024-11-18 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 01/10] `sret` args should always point to the `alloca` AS, so we ca

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/116432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][Driver] Add RPATH by default (PR #115286)

2024-11-18 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed https://github.com/llvm/llvm-project/pull/115286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 23b4bcdf52041aad1c5581e0f7dc01028770a154 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH 1/4] [clang-tidy] Enhance modernize-use-starts-ends-with wi

[clang] [clang] constexpr built-in reduce mul function. (PR #116626)

2024-11-18 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/116626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce mul function. (PR #116626)

2024-11-18 Thread via cfe-commits
https://github.com/c8ef ready_for_review https://github.com/llvm/llvm-project/pull/116626 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parse] Remove ParseDiagnostic.h (PR #116496)

2024-11-18 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/116496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-18 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 bbc0e631d2d3facd5952aeafc7400761813acc3a fb082f6093d5c58b899bfc4b2373966e38b6e763 --e

[clang] Disable LIBCXX_INCLUDE_BENCHMARKS in Fuchsia cmake (PR #116446)

2024-11-18 Thread Caslyn Tonelli via cfe-commits
https://github.com/Caslyn updated https://github.com/llvm/llvm-project/pull/116446 >From eacaefef7cb0efe7dec5560803663200cc42302d Mon Sep 17 00:00:00 2001 From: Caslyn Tonelli Date: Fri, 15 Nov 2024 12:24:37 -0800 Subject: [PATCH 1/2] Disable LIBCXX_INCLUDE_BENCHMARKS for Fuchsia --- clang/cm

[clang] [llvm] Support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (anoopkg6) Changes Implementation for __builtin_setjmp and __builtin_longjmp for SystemZ. --- Patch is 665.11 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/116642.diff 76 Files

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-11-18 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm updated https://github.com/llvm/llvm-project/pull/116432 >From 392192f186be03186cd53e2f94b56a21c5db27aa Mon Sep 17 00:00:00 2001 From: Pawel Osmialowski Date: Fri, 15 Nov 2024 15:22:21 + Subject: [PATCH] [clang][driver] When -fveclib=ArmPL flag is in use, alway

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-18 Thread David Salinas via cfe-commits
@@ -6440,7 +6440,8 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = std::make_unique(*this, Target, Args, +

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-clang-codegen Author: Benjamin Maxwell (MacDue) Changes If `__attribute__((flatten))` is used on a function don't inline any callees with incompatible streaming attributes. Without this check, clang may produce inco

[clang] [clang][SME] Ignore flatten for callees with mismatched streaming attributes (PR #116391)

2024-11-18 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue ready_for_review https://github.com/llvm/llvm-project/pull/116391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-18 Thread Joseph Huber via cfe-commits
@@ -6440,7 +6440,8 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = std::make_unique(*this, Target, Args, +

[clang] [amdgpu-arch] Replace use of HSA with reading sysfs directly (PR #116651)

2024-11-18 Thread via cfe-commits
b-sumner wrote: > > @jhuber6 can you comment on "lot of overhead" and if that matters? Also, > > not sure why the HSA library dependence is a problem. This seems to be > > exposing amdgpu-arch to more maintenance overhead. > > Sometimes the driver will hang and since this is used inside of `cl

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('R') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Inline Assembly Support for GPR Pairs ('R') (PR #112983)

2024-11-18 Thread Sam Elliott via cfe-commits
https://github.com/lenary edited https://github.com/llvm/llvm-project/pull/112983 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] constexpr built-in reduce mul function. (PR #116626)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes Part of #51787. Follow up of #116243. This patch adds constexpr support for the built-in reduce mul function. --- Full diff: https://github.com/llvm/llvm-project/pull/116626.diff 4 Files Affected: - (modified) clang

[clang] [clang] Replace "can't" and "can not" in diagnostics with "cannot" (PR #116623)

2024-11-18 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: I (visually) looked at all occurrences of `can\>` in the td files, and I didn't see any occurring at the end of a line, or in a place where a `not` could be pasted into the message following the `can`. It was a "best effort" inspection, but there weren't too many of these, so

[clang] [Clang][Parser] Make 'T...[N]' within a function parameter a valid pack expansion prior to C++2c (PR #116332)

2024-11-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > We basically have the following options here: > > 1. Use C++23 semantics in C++23 mode, with a warning. > 2. Use C++2c semantics in C++23 mode, with a warning. > 3. Reject the construct with a hard error in C++23 mode. > > (2) and (3) are basically removing the pack expansio

[clang-tools-extra] [clang-tidy][NFC] fix typo in ExceptionAnalyzer; `replace count()>0` with `contains` (PR #116635)

2024-11-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/116635.diff 3 Files Affected: - (modified) clang-tools-extra/clang-tidy/bugprone/ExceptionEscapeChe

[clang-tools-extra] [clang-tidy][NFC] fix typo in ExceptionAnalyzer; `replace count()>0` with `contains` (PR #116635)

2024-11-18 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/116635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 834dfd2 - [Parse] Remove ParseDiagnostic.h (#116496)

2024-11-18 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-11-18T07:19:33-08:00 New Revision: 834dfd23155351c9885eddf7b9664f7697326946 URL: https://github.com/llvm/llvm-project/commit/834dfd23155351c9885eddf7b9664f7697326946 DIFF: https://github.com/llvm/llvm-project/commit/834dfd23155351c9885eddf7b9664f7697326946.diff L

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -243,8 +243,9 @@ Changes in existing checks ``NULL``/``__null`` (but not ``0``) when used with a templated type. - Improved :doc:`modernize-use-starts-ends-with - ` check to handle two cases - that can be replaced with ``ends_with`` + ` check to handle two new

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -71,6 +71,17 @@ struct NotLengthExprForStringNode { ASTContext *Context; }; +static bool isNegativeComparison(const Expr *ComparisonExpr) { + if (const auto *BO = llvm::dyn_cast(ComparisonExpr)) { +return BO->getOpcode() == BO_NE; + } nicovank wrote

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -71,6 +71,17 @@ struct NotLengthExprForStringNode { ASTContext *Context; }; +static bool isNegativeComparison(const Expr *ComparisonExpr) { + if (const auto *BO = llvm::dyn_cast(ComparisonExpr)) { +return BO->getOpcode() == BO_NE; + } + + if (const auto *Op = llvm:

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +209,44 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
@@ -171,10 +182,25 @@ void UseStartsEndsWithCheck::registerMatchers(MatchFinder *Finder) { hasRHS(lengthExprForStringNode("needle") .bind("expr"), this); + + Finder->addMatcher( nicovank wrote: Nit for consist

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-18 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][Driver] Add the ability to specify that RPATH should be added by default (PR #115163)

2024-11-18 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm closed https://github.com/llvm/llvm-project/pull/115163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >