[clang] [analysis] support mutation analysis for pointee wip (PR #118593)

2024-12-03 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 4ad4d34a226043a5d594b261a9c2a50efd292a76 04e220ec2c16c65a3c785a586653ea4bc47337f5 --e

[clang] [Clang] Don't add top-level const qualifiers to captured function types (PR #118050)

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

[clang] Make armv6 iOS by default instead of macOS when targeting Darwin (PR #117243)

2024-12-03 Thread via cfe-commits
https://github.com/Un1q32 updated https://github.com/llvm/llvm-project/pull/117243 >From 4a746cbe467f4ad22436dc206a8966ecaa77892f Mon Sep 17 00:00:00 2001 From: Un1q32 Date: Thu, 21 Nov 2024 17:31:07 -0500 Subject: [PATCH] make armv6-darwin iOS by default --- clang/lib/Driver/ToolChains/Darwi

[clang] [aarch64] Add support for the __{inc|add}x18{byte|word|dword|qword intrinsics (PR #117752)

2024-12-03 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
shafik wrote: Looks like this caused a regression: https://github.com/llvm/llvm-project/issues/117975 https://github.com/llvm/llvm-project/pull/112521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [clang] Improve diagnostic on [[nodiscard]] attribute (PR #112521)

2024-12-03 Thread Shafik Yaghmour via cfe-commits
@@ -1615,22 +1615,24 @@ QualType CallExpr::getCallReturnType(const ASTContext &Ctx) const { return FnType->getReturnType(); } -const Attr *CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +std::pair +CallExpr::getUnusedResultAttr(const ASTContext &Ctx) const { +

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #118580)

2024-12-03 Thread Adam Yang via cfe-commits
https://github.com/adam-yang created https://github.com/llvm/llvm-project/pull/118580 - add clang builtin to Builtins.td - link builtin in hlsl_intrinsics - add codegen for spirv intrinsic and two directx intrinsics to retain signedness information of the operands in CGBuiltin.cpp - add s

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 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 fdb050a5024320ec29d2edf3f2bc686c3a84abaa 46775c380244e47ddd9a3188651f37c3a3b33d23 --e

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I see, so because we no longer allow inconsistent options when importing, we > now issue a lot of error diagnostics. But for many of the options, > differences between TUs should have no impact on modules anyway, and so those > errors are false positives. Is that about corr

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/117507 >From a6c9b5ca52f35fe451a52c590ce93584c2b4f3ac Mon Sep 17 00:00:00 2001 From: Aidan Goldfarb <47676355+aidangoldf...@users.noreply.github.com> Date: Fri, 22 Nov 2024 19:06:29 -0500 Subject: [PATCH 01/10] Up

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > Does this change the behavior with amdgcn-- or amdgcn-mesa-mesa3d? > > Those both use the `AMDGPUToolChain`. I suppose you could make the argument > that `--target=amdgcn--` is the intended target for "standalone amd" stuff. Mostly I'm just wondering if it breaks whatever clo

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > Does this change the behavior with amdgcn-- or amdgcn-mesa-mesa3d? > > > > > > Those both use the `AMDGPUToolChain`. I suppose you could make the argument > > that `--target=amdgcn--` is the intended target for "standalone amd" stuff. > > Mostly I'm just wondering if it b

[clang] Add support for referencable labels for attribute documentation (PR #118428)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -5178,6 +5178,9 @@ GetAttributeHeadingAndSpellings(const Record &Documentation, static void WriteDocumentation(const RecordKeeper &Records, const DocumentationData &Doc, raw_ostream &OS) { + if (const StringRef label = Doc.Documentation->get

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Does this change the behavior with amdgcn-- or amdgcn-mesa-mesa3d? Those both use the `AMDGPUToolChain`. I suppose you could make the argument that `--target=amdgcn--` is the intended target for "standalone amd" stuff. https://github.com/llvm/llvm-project/pull/99687 _

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Does this change the behavior with amdgcn-- or amdgcn-mesa-mesa3d? https://github.com/llvm/llvm-project/pull/99687 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)

2024-12-03 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman commented: Generally speaking, this looks like it's heading in the right direction. https://github.com/llvm/llvm-project/pull/117671 ___ cfe-commits mailing list cf

[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)

2024-12-03 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -454,62 +454,43 @@ void DiagnosticRenderer::emitSingleMacroExpansion( SpellingRanges, {}); } -/// Check that the macro argument location of Loc starts with ArgumentLoc. -/// The starting location of the mac

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread via cfe-commits
github-actions[bot] wrote: @AidanGoldfarb 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

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/118421 >From 45da9c47e9cfb6c24a6a3e0bba89fa25a4bf2a2a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 27 Nov 2024 09:15:12 -0800 Subject: [PATCH 1/2] [StaticAnalyzer] Migrate away from PointerUnion::{is,ge

[clang] [clang] Add source range to 'use of undeclared identifier' diagnostics (PR #117671)

2024-12-03 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -996,19 +996,22 @@ CharSourceRange SourceManager::getExpansionRange(SourceLocation Loc) const { bool SourceManager::isMacroArgExpansion(SourceLocation Loc, SourceLocation *StartLoc)

[clang-tools-extra] [clang-tidy][docs] improve documentation on cppcoreguidelines-narrowing-conversions (#111510) (PR #118209)

2024-12-03 Thread Jonas Toth via cfe-commits
https://github.com/JonasToth updated https://github.com/llvm/llvm-project/pull/118209 >From f4345664e10ac6a9e87b33b1e816b685a1355bb6 Mon Sep 17 00:00:00 2001 From: Jonas Toth Date: Sun, 1 Dec 2024 12:02:13 +0100 Subject: [PATCH] [clang-tidy][docs] improve documentation on cppcoreguidelines-nar

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -1068,10 +1068,10 @@ const VarRegion *MemRegionManager::getVarRegion(const VarDecl *D, llvm::PointerUnion V = getStackOrCaptureRegionForDeclContext(LC, DC, D); -if (V.is()) - return V.get(); +if (isa(V)) kazutakahirata wrote: Switch

[clang] [clang][sema] Add support and documentation for `__has_extension(c_fixed_enum)` (PR #117507)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/117507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-03 Thread Lei Huang via cfe-commits
https://github.com/lei137 edited https://github.com/llvm/llvm-project/pull/118004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-03 Thread Lei Huang via cfe-commits
@@ -473,7 +473,7 @@ class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo { this->IntMaxType = TargetInfo::SignedLongLong; this->Int64Type = TargetInfo::SignedLongLong; this->SizeType = TargetInfo::UnsignedInt; -this->resetDataLayout("E-m:e-p:32:

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -196,13 +196,13 @@ const PointerToMemberData *BasicValueFactory::accumCXXBase( const NamedDecl *ND = nullptr; llvm::ImmutableList BaseSpecList; - if (PTMDT.isNull() || PTMDT.is()) { -if (PTMDT.is()) - ND = PTMDT.get(); + if (PTMDT.isNull() || isa(PTMDT)) { +

[clang] [llvm] [AArch64] Add initial support for FUJITSU-MONAKA (PR #118432)

2024-12-03 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/118432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 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 6ef4990daa1da215b25b1802f5d03cf1044f72bf f5e2453dd5d96ee8038fb07cbf5f49098e2ac41e --e

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -222,23 +222,23 @@ void ExplodedNode::NodeGroup::addNode(ExplodedNode *N, ExplodedGraph &G) { GroupStorage &Storage = reinterpret_cast(P); if (Storage.isNull()) { Storage = N; -assert(Storage.is()); +assert(isa(Storage)); return; } ExplodedNodeV

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -196,13 +196,13 @@ const PointerToMemberData *BasicValueFactory::accumCXXBase( const NamedDecl *ND = nullptr; llvm::ImmutableList BaseSpecList; - if (PTMDT.isNull() || PTMDT.is()) { -if (PTMDT.is()) - ND = PTMDT.get(); + if (PTMDT.isNull() || isa(PTMDT)) { +

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -211,8 +211,8 @@ class MallocSizeofChecker : public Checker { continue; const TypeSourceInfo *TSI = nullptr; -if (CallRec.CastedExprParent.is()) { - TSI = CallRec.CastedExprParent.get() +if (isa(CallRec.CastedExprParent)) { --

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/118421 >From 45da9c47e9cfb6c24a6a3e0bba89fa25a4bf2a2a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 27 Nov 2024 09:15:12 -0800 Subject: [PATCH 1/3] [StaticAnalyzer] Migrate away from PointerUnion::{is,ge

[clang] [clang] Format bitfield width diagnostics with thousands-separators (PR #117763)

2024-12-03 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: AaronBallman wrote: > > Is the lifetime for the APSInt here OK? When I call `Diag()`, will the be > > diagnostic emitted immediately? Or does the APSInt need to life longer? > > Iirc that cause problems if e.g. `PDiag` is used since the diagnos

[clang] [StaticAnalyzer] Migrate away from PointerUnion::{is,get} (NFC) (PR #118421)

2024-12-03 Thread Kazu Hirata via cfe-commits
@@ -205,10 +205,10 @@ const NamedDecl *nonloc::PointerToMember::getDecl() const { return nullptr; const NamedDecl *ND = nullptr; - if (PTMD.is()) -ND = PTMD.get(); + if (isa(PTMD)) kazutakahirata wrote: Done. https://github.com/llvm/llvm-project

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-12-03 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/117368 >From 599370a06008092f6aa883bf11600d0b66707bc0 Mon Sep 17 00:00:00 2001 From: Min-Yih Hsu Date: Wed, 20 Nov 2024 14:37:57 -0800 Subject: [PATCH 1/3] [XRay][RISCV] RISCV support for XRay Add RISC-V support fo

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/118515 >From 8ba940796d4092c225ce34ff883b80d36fee58fe Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Tue, 3 Dec 2024 11:25:37 -0500 Subject: [PATCH] [AMDGPU] Use COV6 by default --- clang/docs/ReleaseNotes.rst

[clang] Define a diagnostic group for missing variadic macro arguments (PR #116855)

2024-12-03 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/116855 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,7 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa %s -o - | FileCheck %s + +; CHECK: .amdhsa_code_object_version 6 shiltian wrote: We already have multiple tests that have explicit module flag and checks for the match. https://github.com/llvm/llvm-project/

[clang] c8b7ec2 - Define a diagnostic group for missing variadic macro arguments (#116855)

2024-12-03 Thread via cfe-commits
Author: Akira Hatanaka Date: 2024-12-03T15:17:39-08:00 New Revision: c8b7ec2edd8d84729070e455002d1e78bdceddc5 URL: https://github.com/llvm/llvm-project/commit/c8b7ec2edd8d84729070e455002d1e78bdceddc5 DIFF: https://github.com/llvm/llvm-project/commit/c8b7ec2edd8d84729070e455002d1e78bdceddc5.diff

[clang] [compiler-rt] [llvm] [XRay][RISCV] RISCV support for XRay (PR #117368)

2024-12-03 Thread Min-Yih Hsu via cfe-commits
@@ -57,6 +57,10 @@ static const int16_t cSledLength = 64; static const int16_t cSledLength = 8; #elif defined(__hexagon__) static const int16_t cSledLength = 20; +#elif SANITIZER_RISCV64 +static const int16_t cSledLength = 76; +#elif defined(__riscv) && (__riscv_xlen == 32) ---

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,7 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa %s -o - | FileCheck %s + +; CHECK: .amdhsa_code_object_version 6 arsenm wrote: It seems we have no other tests checking this field, which seems hard to believe. We probably should have one that tests it with

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -818,6 +818,8 @@ Target Specific Changes AMDGPU Support ^^ +- Bump the default code object version to 6. arsenm wrote: Also should update the llvm release notes https://github.com/llvm/llvm-project/pull/118515

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,7 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa %s -o - | FileCheck %s + +; CHECK: .amdhsa_code_object_version 6 arsenm wrote: `git grep "\.amdhsa_code_object_version" llvm/test/CodeGen/AMDGPU/` does not find them https://github.com/llvm/llvm-project/pul

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/118515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Thanks! I think this is an improvement as-is, but while we're looking at this it'd be useful to make the existing diagnostics (and the new ones that are mirroring them) a little bit more precise about what the problem is. https://github.com/llvm/llvm-proj

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
@@ -91,11 +91,15 @@ def note_constexpr_pointer_subtraction_zero_size : Note< "subtraction of pointers to type %0 of zero size">; def note_constexpr_pointer_comparison_unspecified : Note< "comparison between '%0' and '%1' has unspecified value">; +def note_constexpr_pointer_

[clang] [ast matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

2024-12-03 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
@@ -14548,8 +14548,21 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { return Error(E); const Expr *LHSExpr = LHSValue.Base.dyn_cast(); const Expr *RHSExpr = RHSValue.Base.dyn_cast(); - if (!LHSExpr || !RHSExpr) -return

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/118475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
@@ -14548,8 +14548,21 @@ bool IntExprEvaluator::VisitBinaryOperator(const BinaryOperator *E) { return Error(E); const Expr *LHSExpr = LHSValue.Base.dyn_cast(); const Expr *RHSExpr = RHSValue.Base.dyn_cast(); - if (!LHSExpr || !RHSExpr) -return

[clang] 25b1896 - Fix test for bots where -std=c99 is the default

2024-12-03 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-12-03T13:56:15-05:00 New Revision: 25b1896686177673dcd548489e92c7880d576948 URL: https://github.com/llvm/llvm-project/commit/25b1896686177673dcd548489e92c7880d576948 DIFF: https://github.com/llvm/llvm-project/commit/25b1896686177673dcd548489e92c7880d576948.diff

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I don't think the discussion here has run its course > > > #115416 > > > > > > Yeah, I had explicitly asked for a review from @Bigcheese before that > > landed, so I was surprised to see that get merged. > > I misread it. I thought it wasn't message to me. It would b

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Loïc Joly via cfe-commits
@@ -1237,7 +1237,8 @@ class MatchASTVisitor : public RecursiveASTVisitor, // Make sure we do not visit the same node twice. // Otherwise, we'll visit the common ancestors as often as there // are splits on the way down. - if (Visited.inse

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka commented: @5chmidti removed the recursive visitor and refactored it, hope this is correct now, added the test cases, you mentioned, and you where right in the complex version they failed, work now! https://github.com/llvm/llvm-project/pull/118074

[clang] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-03 Thread Aaron Ballman via cfe-commits
@@ -3876,8 +3876,17 @@ bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const { FunctionTypeLoc FunctionDecl::getFunctionTypeLoc() const { const TypeSourceInfo *TSI = getTypeSourceInfo(); - return TSI ? TSI->getTypeLoc().IgnoreParens().getAs() -

[clang] [llvm] [PowerPC] Update data layout aligment of i128 to 16 (PR #118004)

2024-12-03 Thread via cfe-commits
@@ -473,7 +473,7 @@ class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo { this->IntMaxType = TargetInfo::SignedLongLong; this->Int64Type = TargetInfo::SignedLongLong; this->SizeType = TargetInfo::UnsignedInt; -this->resetDataLayout("E-m:e-p:32:

[clang] [HLSL] Implement `Append` and `Consume` methods on `Append`/`ConsumeStructuredBuffer` (PR #118536)

2024-12-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/118536 The methods are using existing clang builtins `__builtin_hlsl_buffer_update_counter` and `__builtin_hlsl_resource_getpointer` to update the buffer counter and then load or store the value. Fixes #112968 >From

[clang] b5b15c1 - [ast matcher][NFC] make dump_ast_matchers.py run in any path (#117942)

2024-12-03 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-04T05:21:07+08:00 New Revision: b5b15c1973935da943e8cee26dc961c6dbe339b9 URL: https://github.com/llvm/llvm-project/commit/b5b15c1973935da943e8cee26dc961c6dbe339b9 DIFF: https://github.com/llvm/llvm-project/commit/b5b15c1973935da943e8cee26dc961c6dbe339b9.diff

[clang] [ast matcher][NFC] make dump_ast_matchers.py run in any path (PR #117942)

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

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/118515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-03 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118568 >From b43a2602025bdacea06ced5171904fb5d765de9f Mon Sep 17 00:00:00 2001 From: chomosuke Date: Tue, 3 Dec 2024 07:10:33 + Subject: [PATCH] fixed removeFunctionArgs don't remove comma --- .../clang-tidy/ut

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Richard Li (chomosuke) Changes The problem: When running the code action for `mordernize-use-ranges` on `std::reverse(v.begin(), v.end())`, the code gets modified to `std::reverse(v,)` instead of `std::reverse(v)`. This PR fix

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-hip-vega20` running on `hip-vega20-0` while building `clang,libc,llvm,offload` at step 3 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/10534 Here is the relevant piece o

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang,libc,llvm,offload` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/11492

[clang-tools-extra] clangd cleanupAroundReplacements just as clang-tidy does (PR #118569)

2024-12-03 Thread Richard Li via cfe-commits
https://github.com/chomosuke created https://github.com/llvm/llvm-project/pull/118569 None >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH] clangd cleanupAroundReplacements just as clang-tidy does ---

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-03 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

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-03 Thread Richard Li via cfe-commits
https://github.com/chomosuke created https://github.com/llvm/llvm-project/pull/118568 The problem: When running the code action for `mordernize-use-ranges` on `std::reverse(v.begin(), v.end())`, the code gets modified to `std::reverse(v,)` instead of `std::reverse(v)`. This PR fixes both `mor

[clang-tools-extra] clangd cleanupAroundReplacements just as clang-tidy does (PR #118569)

2024-12-03 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

[clang] [clang] Informative error for lifetimebound in decl-spec (PR #118567)

2024-12-03 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/118567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd][clang-tidy] Make clangd run `format::cleanupAroundReplacements()` for all code actions just as clang-tidy does (PR #118569)

2024-12-03 Thread Richard Li via cfe-commits
https://github.com/chomosuke edited https://github.com/llvm/llvm-project/pull/118569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread Shilei Tian via cfe-commits
shiltian wrote: The OpenMP failure has nothing to do with this PR. Please update ROCm to a version that supports COV6. https://github.com/llvm/llvm-project/pull/118515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [libc] [llvm] [AMDGPU] Use COV6 by default (PR #118515)

2024-12-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang,libc,llvm,offload` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/955

[clang-tools-extra] clangd cleanupAroundReplacements just as clang-tidy does (PR #118569)

2024-12-03 Thread Richard Li via cfe-commits
https://github.com/chomosuke updated https://github.com/llvm/llvm-project/pull/118569 >From d2257eb43bbd9ce2dfd8a13123c2048e1cf8b439 Mon Sep 17 00:00:00 2001 From: chomosuke Date: Wed, 4 Dec 2024 00:07:31 + Subject: [PATCH] clangd cleanupAroundReplacements just as clang-tidy does --- clan

[clang-tools-extra] [clang-tidy][clangd] Fixed removeFunctionArgs don't remove comma for use-ranges check (PR #118568)

2024-12-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Richard Li (chomosuke) Changes The problem: When running the code action for `mordernize-use-ranges` on `std::reverse(v.begin(), v.end())`, the code gets modified to `std::reverse(v,)` instead of `std::reverse(v)`. This PR fixes both

[clang-tools-extra] 94d6b1c - [clangd] Fix warnings

2024-12-03 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-12-03T23:17:57-08:00 New Revision: 94d6b1cce5bb9449971a027e352385e72b059a3a URL: https://github.com/llvm/llvm-project/commit/94d6b1cce5bb9449971a027e352385e72b059a3a DIFF: https://github.com/llvm/llvm-project/commit/94d6b1cce5bb9449971a027e352385e72b059a3a.diff L

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2024-12-03 Thread Nathan Ridge via cfe-commits
@@ -1639,11 +1639,19 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + if (const auto *Method = + dyn_cast_if_present(getCalleeDecl()); HighCommander4 wrote: Sorry, I'm not qui

[clang] [Serialization] Downgrade error to warning for inconsistent language flags (PR #117840)

2024-12-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I think going down this path is going to cause real issues for users. There's > a reason this behavior was added in the first place for Clang modules, as > Clang makes assumptions about the shape of the AST which can lead to crashes > in some cases. For example, in real wor

[clang] [analysis] support mutation analysis for pointee wip (PR #118593)

2024-12-03 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/118593 >From 019ee3d59bedac7090798d3acd22b1767900b529 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 4 Dec 2024 15:30:41 +0800 Subject: [PATCH] [analysis] support mutation analysis for pointee wip --- ...

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-12-03 Thread via cfe-commits
@@ -0,0 +1,101 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1-triple aarch64-none-linux-gnu -target-feature +sve -target-feature +sve2 -target-feature +fp8 -disable-O0-optnone -Werror -Wall -em

[clang-tools-extra] [clang-tidy] Add readability-use-span-first-last check (PR #118074)

2024-12-03 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/118074 >From cb748c34d35b8c0c9ca93a67b111dcf5d7665b34 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Fri, 29 Nov 2024 10:17:49 +0100 Subject: [PATCH 01/22] [clang-tidy] Add modernize-use-span-first-last check

[clang] Fix a bug with the hasAncestor AST matcher when a node has several parents without pointer identity (PR #118511)

2024-12-03 Thread Loïc Joly via cfe-commits
https://github.com/loic-joly-sonarsource updated https://github.com/llvm/llvm-project/pull/118511 From 8c6882a360d0f810346dd89f20d8af0ddf0bdfb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Joly?= Date: Tue, 3 Dec 2024 17:20:18 +0100 Subject: [PATCH 1/2] Fix a bug with the hasAncestor AS

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 Thread via cfe-commits
https://github.com/jijjijj created https://github.com/llvm/llvm-project/pull/118537 If the std::initializer_list is exported out of module, its `DeclContext` is not a namespace as `Sema::isStdInitializerList` expects, but an `Decl::Kind::Export` and only its parent is a namespace. So this comm

[clang] [clang][modules] Fix std::initializer_list recognition if it's exported out of a module (PR #118537)

2024-12-03 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

[clang] FunctionDecl::getFunctionTypeLoc: ignore function type attributes (PR #118420)

2024-12-03 Thread Robert Dazi via cfe-commits
@@ -3876,8 +3876,17 @@ bool FunctionDecl::doesDeclarationForceExternallyVisibleDefinition() const { FunctionTypeLoc FunctionDecl::getFunctionTypeLoc() const { const TypeSourceInfo *TSI = getTypeSourceInfo(); - return TSI ? TSI->getTypeLoc().IgnoreParens().getAs() -

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -6292,6 +6534,10 @@ SDValue SystemZTargetLowering::LowerOperation(SDValue Op, return lowerGET_ROUNDING(Op, DAG); case ISD::READCYCLECOUNTER: return lowerREADCYCLECOUNTER(Op, DAG); + case ISD::EH_SJLJ_SETJMP: + case ISD::EH_SJLJ_LONGJMP: +return Op; --

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,255 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; Simulate register pressure around setjmp call for integer arguments. +; Test assembly of funtion call foo in func() in setjmp if and else part. +; extern foo

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,25 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 uweigand wrote: I don't think we need a -backchain version of the test case here - what's tested here is completely identical as far as the fro

[clang] [clang][ExprConst] Add diagnostics for invalid binary arithmetic (PR #118475)

2024-12-03 Thread Richard Smith via cfe-commits
@@ -91,11 +91,15 @@ def note_constexpr_pointer_subtraction_zero_size : Note< "subtraction of pointers to type %0 of zero size">; def note_constexpr_pointer_comparison_unspecified : Note< "comparison between '%0' and '%1' has unspecified value">; +def note_constexpr_pointer_

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-03 Thread Mészáros Gergely via cfe-commits
@@ -5572,7 +5572,8 @@ def : Flag<["-"], "nocudalib">, Alias; def gpulibc : Flag<["-"], "gpulibc">, Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>, HelpText<"Link the LLVM C Library for GPUs">; def nogpulibc : Flag<["-"], "nogpulibc">, Visibility<[ClangOption, C

[clang] [flang] [flang][Driver] Support -nostdlib and -nodefaultlibs (PR #108868)

2024-12-03 Thread Mészáros Gergely via cfe-commits
https://github.com/Maetveis edited https://github.com/llvm/llvm-project/pull/108868 ___ 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 readability-use-span-first-last check (PR #118074)

2024-12-03 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-span-first-last + +readability-use-span-first-last +=== + +Suggests using ``std::span::first()`` and ``std::span::last()`` member functions +instead of equivalent ``subspan()``. These dedicated

[clang] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (PR #99687)

2024-12-03 Thread Matt Arsenault via cfe-commits
arsenm wrote: I skimmed clover and I'm not sure it's even using the clang driver. It seems to be doing its own thing and directly using CompilerInstance https://github.com/llvm/llvm-project/pull/99687 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-12-03 Thread via cfe-commits
@@ -10753,10 +10758,45 @@ class sve2_fp8_down_cvt_single opc, string mnemonic, let Inst{5} = 0b0; let Inst{4-0} = Zd; let Uses = [FPMR, FPCR]; + + let mayLoad = 1; + let mayStore = 0; } -multiclass sve2_fp8_down_cvt_single opc, string mnemonic, RegisterOperand src

[clang] [llvm] [AArch64] Implement FP8 SVE Intrinsics for narrowing conversions (PR #118124)

2024-12-03 Thread via cfe-commits
https://github.com/CarolineConcatto commented: Hi Momchil, Thank you for the patch. Can you also update the commit message here before you merge? https://github.com/llvm/llvm-project/pull/118124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -940,6 +945,240 @@ bool SystemZTargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT, return SystemZVectorConstantInfo(Imm).isVectorConstantLegal(Subtarget); } +MachineBasicBlock * +SystemZTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI, +

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -4619,6 +4619,31 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, // Buffer is a void**. Address Buf = EmitPointerWithAlignment(E->getArg(0)); +if (getTarget().getTriple().getArch() == llvm::Triple::systemz) { + // Call L

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
@@ -0,0 +1,123 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 uweigand wrote: Here I think it would be good to add one more test, to verify that the *frame pointer* is saved if it is live - this is curren

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

2024-12-03 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand 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] [llvm] [SystemZ] Add support for __builtin_setjmp and __builtin_longjmp (PR #116642)

2024-12-03 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand commented: I think we're getting close now - but I still have a few comments below. Thanks! https://github.com/llvm/llvm-project/pull/116642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang-tools-extra] 0ccd18e - Typo fix; NFC

2024-12-03 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-12-03T14:06:49-05:00 New Revision: 0ccd18ead138e9efc56b6c16ded6c3f4df86ae91 URL: https://github.com/llvm/llvm-project/commit/0ccd18ead138e9efc56b6c16ded6c3f4df86ae91 DIFF: https://github.com/llvm/llvm-project/commit/0ccd18ead138e9efc56b6c16ded6c3f4df86ae91.diff

<    1   2   3   4   5   6   >