[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -488,6 +490,20 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, continue; } +if (PrevForDefaultArgs->getLexicalDeclContext()->getPrimaryContext() != +ScopeDC->getPrimaryContext() && +!New->isCXXClassMember()) +

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -10960,6 +10960,10 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, EquivalentCands); + // [over.match.best]/4 is checked f

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -27,3 +27,23 @@ extern double(*func2)( P_1(int u) P_1(int v) // expected-error {{too many function parameters; subsequent parameters will be ignored}} int w); + +#define PD_10(x) x, x, x, x, x, x, x, x, x, x, +#define PD_100(x) PD_10(x) PD_10(x) PD_10(x) PD_10

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -5810,6 +5810,62 @@ static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { return false; } +/// @brief Checks that each default argument needed to make the call +/// is defined only once, implementing [over.match.best]/4 rule. +/// +/// @param FDecl Function de

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -73,6 +73,11 @@ C++17 Feature Support Resolutions to C++ Defect Reports ^ +- Clang now diagnoses ambiguous default arguments declared in different scopes + when calling functions, implementing [over.match.best] p4. + (`CWG1: What if two usi

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -5810,6 +5810,62 @@ static bool isParenthetizedAndQualifiedAddressOfExpr(Expr *Fn) { return false; } +/// @brief Checks that each default argument needed to make the call +/// is defined only once, implementing [over.match.best]/4 rule. +/// +/// @param FDecl Function de

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -488,6 +490,20 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, continue; } +if (PrevForDefaultArgs->getLexicalDeclContext()->getPrimaryContext() != +ScopeDC->getPrimaryContext() && +!New->isCXXClassMember()) +

[clang] [clang-format] Fix erroneous BraceWrapping.BeforeLambdaBody column calcs (PR #76673)

2025-01-29 Thread James Grant via cfe-commits
https://github.com/jamesg-nz updated https://github.com/llvm/llvm-project/pull/76673 >From 04885844162b5390d8041a44a1895ad6ac160228 Mon Sep 17 00:00:00 2001 From: James Grant <42079499+jamesg...@users.noreply.github.com> Date: Mon, 1 Jan 2024 20:27:41 +1300 Subject: [PATCH 1/2] [clang-format] Fi

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

2025-01-29 Thread via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } + + void set_handler(const UnsafeBufferUsag

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

2025-01-29 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-29 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [StaticAnalyzer] Fix state update in VisitObjCForCollectionStmt (PR #124477)

2025-01-29 Thread Balazs Benics via cfe-commits
steakhal wrote: I wanted to push to your branch but for some reason I could not. Here is what I would have proposed to unblock this change: ```diff commit ab9670b613be2bdd802342f031bd5e3d20680925 Author: Balazs Benics Date: 2025.01.29 13:02:16 Add a unittest demonstrating that we no longe

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2025-01-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/116786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/124511 >From 806ed62f5c856ad15e5290da3b3b84ddcf9083d3 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Mon, 27 Jan 2025 14:13:22 +0800 Subject: [PATCH 1/2] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx

[clang] [clang][bytecode] Handle non-primitive vector element types (PR #124926)

2025-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes By rejecting them. We would crash before. --- Full diff: https://github.com/llvm/llvm-project/pull/124926.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Program.cpp (+10-4) - (added) clang/tes

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2025-01-29 Thread Fraser Cormack via cfe-commits
@@ -0,0 +1,21 @@ +// TYPE sign(TYPE x) { +// if (isnan(x)) { +// return 0.0F; +// } +// if (x > 0.0F) { +// return 1.0F; +// } +// if (x < 0.0F) { +// return -1.0F; +// } +// return x; /* -0.0 or +0.0 */ +// } +_CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_s

[clang] [AArch64] Refactor implementation of FP8 types (NFC) (PR #123604)

2025-01-29 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: > Is `__mfp8` a floating type? `isFloatingType()` on it returns `false`, was > that the case before as well? It was the case before and it's intentional. That type is more like a union of two floating-point types. https://github.com/llvm/llvm-project/pull/123604 ___

[clang] [clang][bytecode] Handle non-primitive vector element types (PR #124926)

2025-01-29 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/124926 By rejecting them. We would crash before. >From bd1f50f8ef4ea1139f3058b1c24a71e9cbee0823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 29 Jan 2025 15:24:51 +0100 Subject: [PATCH] [cla

[clang] Add clang atomic control options and attribute (PR #114841)

2025-01-29 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,19 @@ +//===--- AtomicOptions.def - Atomic Options database -*- 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] [Fuchsia] Support PGO (PR #120323)

2025-01-29 Thread via cfe-commits
Andarwinux wrote: Any progress on this PR? I'm using Fuchsia Clang as CI compiler and PGO will be able to save a lot of time. https://github.com/llvm/llvm-project/pull/120323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-29 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang updated https://github.com/llvm/llvm-project/pull/124511 >From 806ed62f5c856ad15e5290da3b3b84ddcf9083d3 Mon Sep 17 00:00:00 2001 From: "Wang, Phoebe" Date: Mon, 27 Jan 2025 14:13:22 +0800 Subject: [PATCH 1/2] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx

[clang] [ARM] Forbid use of TLS with execute-only (PR #124806)

2025-01-29 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard updated https://github.com/llvm/llvm-project/pull/124806 >From 2a1fb2ed2a91cf0a3da2c24b7e4c68fd5fc81751 Mon Sep 17 00:00:00 2001 From: Oliver Stannard Date: Tue, 28 Jan 2025 17:49:42 + Subject: [PATCH] [ARM] Forbid use of TLS with execute-only Thread-local code

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-01-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/108332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add ClassHeadName to help annotating StartOfName (PR #124891)

2025-01-29 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/124891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-29 Thread Ilya Biryukov via cfe-commits
@@ -186,106 +213,221 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; } + + void setHandler(const UnsafeBufferUsageHa

[clang] [llvm] [LLVM][AMDGPU] Add Intrinsic and Builtin for ds_bpermute_fi_b32 (PR #124616)

2025-01-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/124616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-29 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/122116 >From bac0f4a9dfbf375d876bc84c4474a533cbecec0e Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 8 Jan 2025 13:07:01 + Subject: [PATCH 1/7] [TBAA] Don't emit pointer-tbaa for void pointers. While there a

[clang] [TBAA] Don't emit pointer-tbaa for void pointers. (PR #122116)

2025-01-29 Thread Florian Hahn via cfe-commits
@@ -2489,6 +2489,30 @@ are listed below. $ clang -fuse-ld=lld -Oz -Wl,--icf=safe -fcodegen-data-use code.cc +Strict Aliasing +--- + +Clang by default applies C/C++'s strict aliasing rules during optimizations. In +cases C and C++ rules diverge, the more conser

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

2025-01-29 Thread via cfe-commits
@@ -186,106 +213,221 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; } + + void setHandler(const UnsafeBufferUsageHa

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

2025-01-29 Thread via cfe-commits
https://github.com/ivanaivanovska edited https://github.com/llvm/llvm-project/pull/124554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 978e083 - [OpenMP] Allow OMP6.0 features. (#122108)

2025-01-29 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2025-01-29T07:51:02-05:00 New Revision: 978e0839ae2feb5ddda3e4e0b5a7ddba1727d2d8 URL: https://github.com/llvm/llvm-project/commit/978e0839ae2feb5ddda3e4e0b5a7ddba1727d2d8 DIFF: https://github.com/llvm/llvm-project/commit/978e0839ae2feb5ddda3e4e0b5a7ddba1727d2d8

[clang] [OpenMP] Allow OMP6.0 features. (PR #122108)

2025-01-29 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam closed https://github.com/llvm/llvm-project/pull/122108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3a29dfe - [LLVM][AMDGPU] Add Intrinsic and Builtin for ds_bpermute_fi_b32 (#124616)

2025-01-29 Thread via cfe-commits
Author: Acim Maravic Date: 2025-01-29T14:04:10+01:00 New Revision: 3a29dfe37c585355dc70c7c614f5bbf071cd7efb URL: https://github.com/llvm/llvm-project/commit/3a29dfe37c585355dc70c7c614f5bbf071cd7efb DIFF: https://github.com/llvm/llvm-project/commit/3a29dfe37c585355dc70c7c614f5bbf071cd7efb.diff

[clang] [llvm] [LLVM][AMDGPU] Add Intrinsic and Builtin for ds_bpermute_fi_b32 (PR #124616)

2025-01-29 Thread Acim Maravic via cfe-commits
https://github.com/Acim-Maravic closed https://github.com/llvm/llvm-project/pull/124616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Cleanup docs and comments relating to -fextend-variable-liveness (PR #124767)

2025-01-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `premerge-monolithic-linux` running on `premerge-linux-1` while building `clang,llvm` at step 6 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/21224 Here is the relev

[clang] [llvm] [mlir] Fix typo "tranpose" (PR #124929)

2025-01-29 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/124929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] Ensure FPU Selection can select mode correctly (PR #124935)

2025-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Jack Styles (Stylie777) Changes Previously, when selecting a Single Precision FPU, LLVM would ensure all elements of the Candidate FPU matched the InputFPU that was given. However, for cases such as Cortex-R52, there are FPU options

[clang] [llvm] [ARM] Ensure FPU Selection can select mode correctly (PR #124935)

2025-01-29 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 created https://github.com/llvm/llvm-project/pull/124935 Previously, when selecting a Single Precision FPU, LLVM would ensure all elements of the Candidate FPU matched the InputFPU that was given. However, for cases such as Cortex-R52, there are FPU options where n

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/122754 >From b6c576fb90362640b2fd4e41bd7f13dfee95d04d Mon Sep 17 00:00:00 2001 From: Aidan Date: Mon, 13 Jan 2025 11:53:39 -0500 Subject: [PATCH 01/22] initial template arg fix push --- .../clang/Basic/Diagnost

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-29 Thread Aidan Goldfarb via cfe-commits
@@ -4870,9 +4870,21 @@ def note_ovl_candidate_inconsistent_deduction_types : Note< "candidate template ignored: deduced values %diff{" "of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|" "%1 and %3 of conflicting types for parameter %0}2,4">; -

[clang] [llvm] [ARM] Ensure FPU Selection can select mode correctly (PR #124935)

2025-01-29 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 12cdf4330d32ce073f88dfaa1ab9a32327b9ef38 1b12ad277c63e707c1b4268fc46f942349bbb1d9 --e

[clang] [llvm] [WIP][clang][DebugInfo] Add new DW_AT_APPLE_enum_kind to encode enum_extensibility (PR #124752)

2025-01-29 Thread Michael Buch via cfe-commits
Michael137 wrote: > (hmm, can't use the foundation library on godbolt/compiler explorer) Can you > show a small example of the code you're interested in and the DWARF it > produces? The documentation I can find seems to suggest that the extensible > enums have ctors that take the underlying in

[libclc] [libclc] Move (add|sub)_sat to CLC; optimize (PR #124903)

2025-01-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/124903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Restrict the use of scalar types in vector builtins (PR #119423)

2025-01-29 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/13711 Here is th

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-01-29 Thread Aniket Lal via cfe-commits
@@ -1582,6 +1582,26 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, // Implicit copy-assignment gets the same special treatment as implicit // copy-constructors. emitImplicitAssignmentOperatorBody(Args); + } else if (FD->hasAttr() && +

[clang] [clang-format] Fix erroneous BraceWrapping.BeforeLambdaBody column calcs (PR #76673)

2025-01-29 Thread James Grant via cfe-commits
https://github.com/jamesg-nz edited https://github.com/llvm/llvm-project/pull/76673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move (add|sub)_sat to CLC; optimize (PR #124903)

2025-01-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/124903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move (add|sub)_sat to CLC; optimize (PR #124903)

2025-01-29 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/124903 Using the __builtin_elementwise_(add|sub)_sat functions allows us to directly optimize to the desired intrinsic, and avoid scalarization for vector types. >From f4570c42ea9adf6b10a911fd57d3152ad6f5c1e4 Mon

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-01-29 Thread Björn Schäpers via cfe-commits
@@ -1169,6 +1181,18 @@ template <> struct MappingTraits { IO.mapOptional("WhitespaceSensitiveMacros", Style.WhitespaceSensitiveMacros); +// If AlignAfterOpenBracket was specified but AlignAfterOpenBracketBreak +// was not, initialize the latter f

[clang] [Clang] Add fake use emission to Clang with -fextend-lifetimes (PR #110102)

2025-01-29 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/110102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move (add|sub)_sat to CLC; optimize (PR #124903)

2025-01-29 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/124903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2025-01-29 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: ping https://github.com/llvm/llvm-project/pull/111885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Update untyped sme intrinsics with fp8 variants (PR #124543)

2025-01-29 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/124543 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] Fix typo "tranpose" (PR #124929)

2025-01-29 Thread Jay Foad via cfe-commits
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/124929 None >From 03ea8ad4f2a7b6589539dbc137c356455225fc15 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Wed, 29 Jan 2025 14:49:05 + Subject: [PATCH] Fix typo "tranpose" --- clang/lib/Headers/amxtf32transposeint

[clang] [llvm] [mlir] Fix typo "tranpose" (PR #124929)

2025-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Jay Foad (jayfoad) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124929.diff 16 Files Affected: - (modified) clang/lib/Headers/amxtf32transposeintrin.h (+1-1) - (modified) llvm/lib/Target/Hexagon/HexagonISelDA

[clang] [llvm] [mlir] Fix typo "tranpose" (PR #124929)

2025-01-29 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. https://github.com/llvm/llvm-project/pull/124929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move sign to the CLC builtins library (PR #115699)

2025-01-29 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +// TYPE sign(TYPE x) { +// if (isnan(x)) { +// return 0.0F; +// } +// if (x > 0.0F) { +// return 1.0F; +// } +// if (x < 0.0F) { +// return -1.0F; +// } +// return x; /* -0.0 or +0.0 */ +// } +_CLC_DEF _CLC_OVERLOAD __CLC_GENTYPE __clc_s

[clang] [Fuchsia] Support PGO (PR #120323)

2025-01-29 Thread Paul Kirth via cfe-commits
ilovepi wrote: We already have full support for PGO in other CMake cache files. This PR is adding that support to the files we use when building the Fuchsia toolchain. you can find details on the existing support here https://llvm.org/docs/HowToBuildWithPGO.html https://github.com/llvm/llvm-

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -5145,6 +5145,10 @@ def err_addr_ovl_not_func_ptrref : Error< def err_addr_ovl_no_qualifier : Error< "cannot form member pointer of type %0 without '&' and class name">; +def err_ovl_ambiguous_default_arg +: Error<"function call relies on ambiguous default argument %s

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -10960,6 +10960,10 @@ OverloadCandidateSet::BestViableFunction(Sema &S, SourceLocation Loc, S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, EquivalentCands); + // [over.match.best]/4 is checked f

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

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

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
@@ -488,6 +490,20 @@ bool Sema::MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, continue; } +if (PrevForDefaultArgs->getLexicalDeclContext()->getPrimaryContext() != +ScopeDC->getPrimaryContext() && +!New->isCXXClassMember()) +

[clang] [clang] Diagnose default arguments defined in different scopes (PR #124844)

2025-01-29 Thread via cfe-commits
https://github.com/cor3ntin commented: Thanks for working on this, I left a few comments https://github.com/llvm/llvm-project/pull/124844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [X86][AVX10] Disable m[no-]avx10.1 and switch m[no-]avx10.2 to alias of 512 bit options (PR #124511)

2025-01-29 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > I've been playing around and found that `-mavx10.2 -mno-avx10.2-512` enables > `avx10.1-512` but `-mavx10.2-512 -mno-avx10.2-512` obviously doesn't. Does it > make sense? It happens because when options match, they are eliminated before > processing. But this is a problem n

[clang] [clang-format] Fix erroneous BraceWrapping.BeforeLambdaBody column calcs (PR #76673)

2025-01-29 Thread James Grant via cfe-commits
@@ -366,8 +366,14 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { const auto &CurrentState = State.Stack.back(); if (Style.BraceWrapping.BeforeLambdaBody && Current.CanBreakBefore && Current.is(TT_LambdaLBrace) && Previous.isNot(TT_LineComment)) { -

[clang] [AArch64] Enable vscale_range with +sme (PR #124466)

2025-01-29 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/124466 >From c43c26262c25ffb99ee411c05d19739d83cf1c05 Mon Sep 17 00:00:00 2001 From: David Green Date: Sun, 26 Jan 2025 13:47:58 + Subject: [PATCH 1/2] [AArch64] Enable vscale_range with +sme If we have +sme bu

[clang] [clang][SME] Account for C++ lambdas in SME builtin diagnostics (PR #124750)

2025-01-29 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/124750 >From cb83182da6b017397111be606c88a4eeecb4ce9d Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Tue, 28 Jan 2025 13:34:54 + Subject: [PATCH 1/3] [clang][SME] Account for C++ lambdas in SME builtin diagn

[clang] [clang][SME] Account for C++ lambdas in SME builtin diagnostics (PR #124750)

2025-01-29 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > Please add some tests for lambdas with streaming attributes, for example: > > ``` > void f() { auto x = []__arm_locally_streaming {}; x(); } > ``` Done :+1: https://github.com/llvm/llvm-project/pull/124750 ___ cfe-commits mailing lis

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Erich Keane via cfe-commits
@@ -7986,6 +7986,12 @@ void Parser::ParseParameterDeclarationClause( if (getLangOpts().HLSL) MaybeParseHLSLAnnotations(DS.getAttributes()); +if (ParmDeclarator.getDeclarationAttributes().size() && erichkeane wrote: ```suggestion if (!ParmDec

[clang] [Clang] disallow attributes on void parameters (PR #124920)

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

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 1/3] [Clang] disallow attributes on void parameters --- clang/

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Oleksandr T. via cfe-commits
@@ -7986,6 +7986,12 @@ void Parser::ParseParameterDeclarationClause( if (getLangOpts().HLSL) MaybeParseHLSLAnnotations(DS.getAttributes()); +if (ParmDeclarator.getDeclarationAttributes().size() && a-tarasyuk wrote: @erichkeane thanks. changed to

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This is a semantic restriction, not a parsing restriction, right? https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Aaron Ballman via cfe-commits
@@ -453,3 +453,12 @@ namespace P2361 { } alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}} + +namespace GH108819 { +void a([[maybe_unused]] void) {} // expected-error {{an attribute list cannot appea

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Oleksandr T. via cfe-commits
@@ -453,3 +453,12 @@ namespace P2361 { } alignas(int) struct AlignAsAttribute {}; // expected-error {{misplaced attributes; expected attributes here}} + +namespace GH108819 { +void a([[maybe_unused]] void) {} // expected-error {{an attribute list cannot appea

[clang] [AArch64] Refactor implementation of FP8 types (NFC) (PR #123604)

2025-01-29 Thread Timm Baeder via cfe-commits
tbaederr wrote: Is `__mfp8` a floating type? `isFloatingType()` on it returns `false`, was that the case before as well? https://github.com/llvm/llvm-project/pull/123604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [flang] [llvm] [Clang] Remove ARCMigrate (PR #119269)

2025-01-29 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM but please wait for @rjmccall to sign off before landing. https://github.com/llvm/llvm-project/pull/119269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin commented: LGTM but let @ChuanqiXu9 approve. https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Dmitry Polukhin via cfe-commits
https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/121245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Dmitry Polukhin via cfe-commits
@@ -0,0 +1,90 @@ +// RUN: rm -rf %t dmpolukhin wrote: Please add a comment that the test results in `llvm_unreachable` in debug builds so debug build should be used to investigate problems with the test. https://github.com/llvm/llvm-project/pull/121245

[clang] [analyzer][docs] CSA release notes for clang-20 (PR #124798)

2025-01-29 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/124798 >From 65f0bce634bce28430fa2c722ee0a396a8935bba Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 28 Jan 2025 18:26:37 +0100 Subject: [PATCH] [analyzer][docs] Release notes for clang-20 The commits were g

[clang] [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of `finishPendingActions`. (PR #121245)

2025-01-29 Thread Michael Park via cfe-commits
https://github.com/mpark updated https://github.com/llvm/llvm-project/pull/121245 >From f1871418523dbd2915e4245e655d283114595730 Mon Sep 17 00:00:00 2001 From: Michael Park Date: Tue, 28 Jan 2025 22:01:37 -0800 Subject: [PATCH 1/3] [C++20][Modules][Serialization] Add a unit test for #121245.

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

2025-01-29 Thread via cfe-commits
@@ -31,27 +35,34 @@ #define FIXABLE_GADGET(name) GADGET(name) #endif +/// A subset of the safe gadgets that may return multiple results. +#ifndef FIXABLE_GADGET_MULTY_RES +#define FIXABLE_GADGET_MULTY_RES(name) GADGET(name) +#endif + WARNING_GADGET(Increment) WARNING_GADGET(

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

2025-01-29 Thread via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { +public: + virtual bool matches(const DynTypedNode &DynNode, ASTContext &Ctx, +

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

2025-01-29 Thread via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { ivanaivanovska wrote: Done. https://github.com/llvm/llvm-project/pull/124554 _

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

2025-01-29 Thread via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { +public: + virtual bool matches(const DynTypedNode &DynNode, ASTContext &Ctx, +

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

2025-01-29 Thread via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { ivanaivanovska wrote: Done. https://github.com/llvm/llvm-project/pull/124554 _

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

2025-01-29 Thread via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } + + void set_handler(const UnsafeBufferUsag

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

2025-01-29 Thread via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } + + void set_handler(const UnsafeBufferUsag

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

2025-01-29 Thread via cfe-commits
@@ -79,21 +81,39 @@ static std::string getDREAncestorString(const DeclRefExpr *DRE, } // namespace #endif /* NDEBUG */ -namespace clang::ast_matchers { +class CustomMatcher { +public: + virtual bool matches(const DynTypedNode &DynNode, ASTContext &Ctx, +

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

2025-01-29 Thread via cfe-commits
@@ -186,106 +205,202 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void set_ast_context(ASTContext &Context) { ActiveASTContext = &Context; } ivanaivanovska wrote: Done

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

2025-01-29 Thread via cfe-commits
@@ -1986,112 +2327,142 @@ class DerefSimplePtrArithFixableGadget : public FixableGadget { } }; -/// Scan the function and return a list of gadgets found with provided kits. -static void findGadgets(const Stmt *S, ASTContext &Ctx, -const UnsafeBufferU

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread via cfe-commits
@@ -7986,6 +7986,13 @@ void Parser::ParseParameterDeclarationClause( if (getLangOpts().HLSL) MaybeParseHLSLAnnotations(DS.getAttributes()); +if (ParmDeclarator.getIdentifier() == nullptr && cor3ntin wrote: I don't think checking checking for an

[clang] [llvm] [LLVM][AMDGPU] Add Intrinsic and Builtin for ds_bpermute_fi_b32 (PR #124616)

2025-01-29 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,llvm` at step 7 "Add check check-offload". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/12659 Here is

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/124920 >From bd731e4be65fc9c1746aa6a8f63d206eb54bb2be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Wed, 29 Jan 2025 15:17:06 +0200 Subject: [PATCH 1/2] [Clang] disallow attributes on void parameters --- clang/

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Oleksandr T. via cfe-commits
@@ -7986,6 +7986,13 @@ void Parser::ParseParameterDeclarationClause( if (getLangOpts().HLSL) MaybeParseHLSLAnnotations(DS.getAttributes()); +if (ParmDeclarator.getIdentifier() == nullptr && a-tarasyuk wrote: @cor3ntin thanks for the feedback. I'

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow attributes on void parameters (PR #124920)

2025-01-29 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 nit, else LGTM. https://github.com/llvm/llvm-project/pull/124920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >