[clang] [clang][TableGen] Change SVE Emitter to use const RecordKeeper (PR #108503)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/108503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TableGen] Change RISCVVEmitter to use const RecordKeeper (PR #108502)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Change RISCVVEmitter to use const RecordKeeper. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefini

[clang] [clang][TableGen] Change SVE Emitter to use const RecordKeeper (PR #108503)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Change SVE Emitter to use const RecordKeeper. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefiniti

[clang] [clang][TableGen] Change MVE Emitter to use const RecordKeeper (PR #108500)

2024-09-13 Thread Rahul Joshi via cfe-commits
jurahul wrote: Just a minor clang-format diff between what I have locally vs what the CI uses. Otherwise, checks were green earlier. https://github.com/llvm/llvm-project/pull/108500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do (PR #108549)

2024-09-13 Thread Martin 'JaMa' Jansa via cfe-commits
https://github.com/shr-project created https://github.com/llvm/llvm-project/pull/108549 * other libraries are installed in 'lib64' or 'lib32' based on LLVM_LIBDIR_SUFFIX value, but libscanbuild files were always installed in 'lib' >From e2f395036234aa26da290dd827b787ea48011d0b Mon Sep 17 00:00

[clang] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do (PR #108549)

2024-09-13 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] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do (PR #108549)

2024-09-13 Thread Martin 'JaMa' Jansa via cfe-commits
https://github.com/shr-project updated https://github.com/llvm/llvm-project/pull/108549 >From 736d42d3c160edb5303a07da3c5315051838d963 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Fri, 13 Sep 2024 13:38:08 +0200 Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do

[clang] [clang][TableGen] Change MVE Emitter to use const RecordKeeper (PR #108500)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul ready_for_review https://github.com/llvm/llvm-project/pull/108500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TableGen] Change MVE Emitter to use const RecordKeeper (PR #108500)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rahul Joshi (jurahul) Changes Change MVE Emitter to use const RecordKeeper. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefiniti

[clang] [clang][TableGen] Change NeonEmitter to use const RecordKeeper (PR #108501)

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

[clang] [clang][TableGen] Change MVE Emitter to use const RecordKeeper (PR #108500)

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

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-13 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,34 @@ +/*=== avx10_2copyintrin.h - AVX10.2 Copy intrinsics ---=== + * + * 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: Apache

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-13 Thread Phoebe Wang via cfe-commits
@@ -1537,3 +1537,67 @@ defm VFNMADD132NEPBF16 : avx10_fma3p_132_bf16<0x9C, "vfnmadd132nepbf16", X86any_ defm VFNMSUB132NEPBF16 : avx10_fma3p_132_bf16<0x9E, "vfnmsub132nepbf16", X86any_Fnmsub, X86Fnmsub, SchedWriteFMA>; } + +//

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -21,6 +25,7 @@ void a() { EVALF((2. + 3i) + (4. + 5i), 6. + 8i); EVALF((2. + 3i) - (4. + 5i), -2. - 2i); EVALF((2. + 3i) * (4. + 5i), -7. + 22i); + // div-precision-warning@+1 {{excess precision is requested but the target does not support excess precision which may

[clang] [clang] Fix various typos and whitespace in HelpText. (PR #108527)

2024-09-13 Thread Ryan Mansfield via cfe-commits
rjmansfield wrote: Could someone with commit access please merge on my behalf? Thanks. https://github.com/llvm/llvm-project/pull/108527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Build out AST consumer patterns to reach the entry point into CIRGen (PR #91007)

2024-09-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > My concerns have been addressed, but there's still a small open question on > the driver flag behavior though, so please give @MaskRay a chance to respond > before landing. > > Otherwise, LGTM! CC @MaskRay now that you may be back from vacation https://github.com/llvm/l

[clang] 50d2b6a - [clang] Fix various typos and whitespace in HelpText. (#108527)

2024-09-13 Thread via cfe-commits
Author: Ryan Mansfield Date: 2024-09-13T08:53:38-04:00 New Revision: 50d2b6ac9e2aabd25724768a822a0398f2ca5a06 URL: https://github.com/llvm/llvm-project/commit/50d2b6ac9e2aabd25724768a822a0398f2ca5a06 DIFF: https://github.com/llvm/llvm-project/commit/50d2b6ac9e2aabd25724768a822a0398f2ca5a06.diff

[clang] [clang] Fix various typos and whitespace in HelpText. (PR #108527)

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

[clang] [llvm] [X86][AVX10.2] Support AVX10.2 MOVZXC new Instructions. (PR #108537)

2024-09-13 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: llvm-mc -triple i386 --show-encoding %s | FileCheck %s + +// CHECK: vmovd %xmm2, %xmm1 +// CHECK: encoding: [0x62,0xf1,0x7e,0x08,0x7e,0xca] + vmovd %xmm2, %xmm1 phoebewang wrote: Missing memory tests. https://github.com/llv

[clang] 90a2e0b - [clang] Silence GCC warnings about control reaching end of non void function

2024-09-13 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2024-09-13T15:55:03+03:00 New Revision: 90a2e0bb423629b7e70f4b91adb44851199dd5ea URL: https://github.com/llvm/llvm-project/commit/90a2e0bb423629b7e70f4b91adb44851199dd5ea DIFF: https://github.com/llvm/llvm-project/commit/90a2e0bb423629b7e70f4b91adb44851199dd5ea.diff

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2024-09-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Are we sure this is going to do what we think? > > https://github.com/llvm/llvm-project/blob/a41bb71f2216cef08ab04f1d730ae1701c145f3c/libcxx/include/cstdlib#L127 > > https://github.com/gcc-mirror/gcc/blob/494d3c3faaee0dbde696ea334f8e242ae85ae2b5/libstdc%2B%2B-v3/include/c_co

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/108555 None >From 35742b5f2f085b8f6626456cd0d21ebecbe8f831 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 12 Sep 2024 23:11:51 +0800 Subject: [PATCH] [clang-tidy]suggest use `std::span` as replacement of c

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/108555.diff 7 Files Affected: - (modified) clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp (+23-3) - (modified) clan

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/107867 >From 31b01c0cd3fc809e5451853b820d021dd43d16c7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 9 Sep 2024 22:32:48 +0800 Subject: [PATCH 1/6] [clang-tidy] add default error message for performance-av

[clang-tools-extra] 471360b - [clang-tidy][NFC] fix typo in release note

2024-09-13 Thread Congcong Cai via cfe-commits
Author: Congcong Cai Date: 2024-09-13T21:03:12+08:00 New Revision: 471360b2241aaca8ffe457ac796e01d4f0988e6a URL: https://github.com/llvm/llvm-project/commit/471360b2241aaca8ffe457ac796e01d4f0988e6a DIFF: https://github.com/llvm/llvm-project/commit/471360b2241aaca8ffe457ac796e01d4f0988e6a.diff

[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. + BTK__type_list_de

[clang-tools-extra] [clang-tidy] add default error message for performance-avoid-endl (PR #107867)

2024-09-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/107867 >From 31b01c0cd3fc809e5451853b820d021dd43d16c7 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Mon, 9 Sep 2024 22:32:48 +0800 Subject: [PATCH 1/7] [clang-tidy] add default error message for performance-av

[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. ily

[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 %s -verify ilya-biryukov wrote: Done. I have also added a few tests with arrays and pointers, which should also exhibit a few more combinations of types that subsume qualifiers and could be different when canonical/non-canon

[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -3158,6 +3161,33 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, int64_t N = Index.getExtValue(); return Ts.getPackAsArray()[N].getAsType(); } + case BTK__type_list_dedup: { +assert(Converted.size() == 2 && + "__type_list_dedu

[clang] [compiler-rt] [llvm] [X86] AMD Zen 5 Initial enablement (PR #107964)

2024-09-13 Thread Tobias Hieta via cfe-commits
tru wrote: I think it's better it land as it should be in `main` and then you can create a new PR against the ` release/19.x` branch with the different enum layout. https://github.com/llvm/llvm-project/pull/107964 ___ cfe-commits mailing list cfe-comm

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-09-13 Thread Giuliano Belinassi via cfe-commits
@@ -1243,12 +1247,19 @@ bool ASTUnit::Parse(std::shared_ptr PCHContainerOps, } std::unique_ptr Act( - new TopLevelDeclTrackerAction(*this)); + new TopLevelDeclTrackerAction(*this, true)); giulianobelinassi wrote: The problem is that when you ar

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: I'm not sure I understand this change. `std::span` is not a replacement for a C array, since it does not own memory. I don't understand also the change from suggesting to use `std::vector` instead of `std::array` https://github.com/llvm/llvm-project/pull/108555 ___

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread Carlos Galvez via cfe-commits
@@ -1,9 +1,9 @@ -// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ // RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays: true }}' const char name[] = "name"; const

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2024-09-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > Are we sure this is going to do what we think? > > https://github.com/llvm/llvm-project/blob/a41bb71f2216cef08ab04f1d730ae1701c145f3c/libcxx/include/cstdlib#L127 > > > > https://github.com/gcc-mirror/gcc/blob/494d3c3faaee0dbde696ea334f8e242ae85ae2b5/libstdc%2B%2B-v3/inclu

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2024-09-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > Are we sure this is going to do what we think? > > > https://github.com/llvm/llvm-project/blob/a41bb71f2216cef08ab04f1d730ae1701c145f3c/libcxx/include/cstdlib#L127 > > > > > > https://github.com/gcc-mirror/gcc/blob/494d3c3faaee0dbde696ea334f8e242ae85ae2b5/libstdc%2B%2B-v3

[clang] [C++20] [Modules] Warn for importing implementation partition unit in interface units (PR #108493)

2024-09-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/108493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Warn for importing implementation partition unit in interface units (PR #108493)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -439,6 +439,10 @@ def warn_deprecated_literal_operator_id: Warning< "is deprecated">, InGroup, DefaultIgnore; def warn_reserved_module_name : Warning< "%0 is a reserved name for a module">, InGroup; +def warn_import_implementation_partition_unit_in_interface_unit : Warni

[clang] [C++20] [Modules] Warn for importing implementation partition unit in interface units (PR #108493)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -650,6 +650,14 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, else VisibleModules.setVisible(Mod, ImportLoc); + assert((!Mod->isModulePartitionImplementation() || getCurrentModule()) && + "We can only import a partition unit in a named module.

[clang] [C++20] [Modules] Warn for importing implementation partition unit in interface units (PR #108493)

2024-09-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: This should probably come with a release note so that users know about the improved diagnostic behavior. https://github.com/llvm/llvm-project/pull/108493 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-13 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/2] [Clang] Emit error for duplicate mangled names wit

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-13 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: > I don't think the rfc has reached its conclusion yet, and consensus has not > been called (for example, i still need to think about whether my questions > were addressed) so we should wait for the RFC process before continuing with > that PR. > > Thanks Thanks for expl

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-13 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > > I'm having a bit of trouble understanding the way the new code is structured. > What makes the definition of lambda call operators special here? Do we not > call GetOrCreateLLVMFunction with IsForDefinition set? When I added this error I incorrectly thought GetOrCre

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-13 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw==?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: dmpolukhin wrote: > [repro.zip](https://github.com/user-attachments/files/16986643/repro.zip) > > edit: got a better reduced repro, see attachment Thank you for the reprod

[clang] [compiler-rt] [llvm] [X86] AMD Zen 5 Initial enablement (PR #107964)

2024-09-13 Thread via cfe-commits
https://github.com/ganeshgit updated https://github.com/llvm/llvm-project/pull/107964 >From b68bcc1415151bd84b5868aa2c98663069f45469 Mon Sep 17 00:00:00 2001 From: Ganesh Gopalasubramanian Date: Thu, 29 Aug 2024 08:54:35 + Subject: [PATCH 1/2] [X86] AMD Zen 5 Initial enablement --- clang/

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -835,6 +835,17 @@ void Parser::ParseLexedAttribute(LateParsedAttribute &LA, Diag(Tok, diag::warn_attribute_on_function_definition) << &LA.AttrName; + const auto &SM = PP.getSourceManager(); + CharSourceRange ExpansionRange = SM.getExpansionRange(LA.AttrNameLoc);

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -I%S/Inputs -fsyntax-only -triple x86_64-linux-gnu %s 2>&1 | FileCheck %s + +#include + +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior +void Func_system_macro() { + int _SYS_NODEREF

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -493,9 +500,11 @@ class ParsedAttr final /// Set the macro identifier info object that this parsed attribute was /// declared in if it was declared in a macro. Also set the expansion location /// of the macro. - void setMacroIdentifier(IdentifierInfo *MacroName, Sour

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,4 @@ +#pragma clang system_header + +#define _SYS_NODEREF __attribute__((noderef)) +#define _SYS_LIBCPP_FLOAT_ABI __attribute__((pcs("aapcs"))) AaronBallman wrote: Please also have tests using `__declspec` and `[[]]` style attributes as well. https://

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -1105,16 +1120,16 @@ enum AttributeDeclKind { inline const StreamingDiagnostic &operator<<(const StreamingDiagnostic &DB, const ParsedAttr &At) { - DB.AddTaggedVal(reinterpret_cast(At.getAttrName()), + const IdentifierInfo *Att

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -493,9 +500,11 @@ class ParsedAttr final /// Set the macro identifier info object that this parsed attribute was /// declared in if it was declared in a macro. Also set the expansion location /// of the macro. - void setMacroIdentifier(IdentifierInfo *MacroName, Sour

[clang] [Parser][BoundsSafety] Print attribute as macro if it's system defined (PR #107619)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -I%S/Inputs -fsyntax-only -triple x86_64-linux-gnu %s 2>&1 | FileCheck %s + +#include + +// The diagnostic message is hard-coded as 'noderef' so using a system macro doesn't change the behavior AaronBallman wrote: This seem

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread Congcong Cai via cfe-commits
@@ -1,9 +1,9 @@ -// RUN: %check_clang_tidy %s modernize-avoid-c-arrays %t -- \ +// RUN: %check_clang_tidy -std=c++17 %s modernize-avoid-c-arrays %t -- \ // RUN: -config='{CheckOptions: { modernize-avoid-c-arrays.AllowStringArrays: true }}' const char name[] = "name"; const

[clang] [clang-tools-extra] [llvm] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -3158,6 +3161,33 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, int64_t N = Index.getExtValue(); return Ts.getPackAsArray()[N].getAsType(); } + case BTK__type_pack_dedup: { +assert(Converted.size() == 2 && "__builtin_type_pack_dedup sh

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2024-09-13 Thread Nikolas Klauser via cfe-commits
philnik777 wrote: If the implementation is conforming this doesn't do anything. In fact, they have to be the same function. https://github.com/llvm/llvm-project/pull/108529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: > I'm not sure I understand this change. `std::span` is not a replacement for a > C array, since it does not own memory. I don't understand also the change > from suggesting to use `std::vector` instead of `std::array` The C-Array in parameter also does not own memory. It is

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

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

[clang] -ast-dump-decl-types crashes on codes involving concepts #94928 (PR #108142)

2024-09-13 Thread Aaron Ballman via cfe-commits
@@ -101,7 +101,8 @@ namespace { if (DumpDeclTypes) { Decl *InnerD = D; if (auto *TD = dyn_cast(D)) - InnerD = TD->getTemplatedDecl(); + if (TD->getTemplatedDecl()) +InnerD = TD->getTemplatedDecl(); AaronBallma

[clang] -ast-dump-decl-types crashes on codes involving concepts #94928 (PR #108142)

2024-09-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/108142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] -ast-dump-decl-types crashes on codes involving concepts #94928 (PR #108142)

2024-09-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the fix! Can you also add a release note to `clang/docs/ReleaseNotes.rst` so that users know about the fix? Also, please add the example code from the linked issue to `ast-dump-concepts.cpp` so that we more clearly demonstrate that the i

[clang] [compiler-rt] [llvm] [X86] AMD Zen 5 Initial enablement (PR #107964)

2024-09-13 Thread via cfe-commits
https://github.com/ganeshgit updated https://github.com/llvm/llvm-project/pull/107964 >From b68bcc1415151bd84b5868aa2c98663069f45469 Mon Sep 17 00:00:00 2001 From: Ganesh Gopalasubramanian Date: Thu, 29 Aug 2024 08:54:35 + Subject: [PATCH 1/3] [X86] AMD Zen 5 Initial enablement --- clang/

[clang] [llvm] Prefer std::getenv to ::getenv (PR #108529)

2024-09-13 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > If the implementation is conforming this doesn't do anything. In fact, they > have to be the same function. That was my understanding as well, thanks! So it sounds like the problem is that there's an underlying `::getenv` that isn't thread safe (which is conforming accor

[clang-tools-extra] [clang-tidy]suggest use `std::span` as replacement of c array in C++20 for modernize-avoid-c-arrays (PR #108555)

2024-09-13 Thread via cfe-commits
@@ -72,11 +81,22 @@ void AvoidCArraysCheck::registerMatchers(MatchFinder *Finder) { void AvoidCArraysCheck::check(const MatchFinder::MatchResult &Result) { const auto *ArrayType = Result.Nodes.getNodeAs("typeloc"); - + bool const IsInParam = EugeneZelenko

[clang] [Modules] Add -cc1 -flate-module-map-file to load module maps after PCMs (PR #88893)

2024-09-13 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/88893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Add -cc1 -flate-module-map-file to load module maps after PCMs (PR #88893)

2024-09-13 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/88893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO][NFC] Prep for two-codegen rounds (PR #108569)

2024-09-13 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com created https://github.com/llvm/llvm-project/pull/108569 None >From dd7de1a900dceb411931d9d5a49b164096c314a2 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 20:02:52 -0700 Subject: [PATCH] [ThinLTO][NFC] Prep for two-codegen rounds --- clang/l

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/108570 This PR registers the writeout and reset functions for `gcov` for all modules in the PGO runtime, instead of registering them using global constructors in each module. The change is made for AIX only, but the

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes This PR registers the writeout and reset functions for `gcov` for all modules in the PGO runtime, instead of registering them using global constructors in each module. The change is made for AIX only, but th

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Qiongsi Wu (qiongsiwu) Changes This PR registers the writeout and reset functions for `gcov` for all modules in the PGO runtime, instead of registering them using global constructors in each module. The change is made for AIX onl

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-13 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/107397 >From 621578de568be1e71665254060956ea1971965c9 Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 5 Sep 2024 05:42:26 -0700 Subject: [PATCH 1/7] [NFC] Move warning from COdeGen to Sema. --- clang/i

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-13 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: Let's see if this is better. https://github.com/llvm/llvm-project/pull/107397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: I would like to get input from the community if it is a good idea to use this initialization mechanism on more platforms, such as on Linux/macOS. If it works on more platforms, I will revise this PR so that we can perform the initialization in the runtime on as many platforms

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 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 8625eb0b87c86d3ef42a365d7593eed664b379e8 7c6b1d734a23ddbffc67fdafd171ea0f5515891d --e

[clang] [clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (PR #108575)

2024-09-13 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/108575 There's currently no code path that can reach this crash, but: ``` Instruction *Inst = cast(Call.getScalarVal()); ``` fails if the call returns `void`. This could happen if a builtin for something like `void si

[clang] [clang][codegen] Fix possible crash when setting TBAA metadata on FP math libcalls (PR #108575)

2024-09-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-codegen Author: Benjamin Maxwell (MacDue) Changes There's currently no code path that can reach this crash, but: ``` Instruction *Inst = cast(Call.getScalarVal()); ``` fails if the call returns `void`

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-09-13 Thread Xiang Li via cfe-commits
@@ -0,0 +1,56 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// valid +cbuffer cbuf { +RWBuffer r : register(u0, space0); +} + +cbuffer cbuf2 { +struct x { +// expected-error@+1 {{'register' attribute only ap

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-09-13 Thread via cfe-commits
cor3ntin wrote: Usually the process requires someone like Aaron to call consensus either way. we are aware that establishing consensus is a bit nebulous at the moment but it's something we are working on improving. On Fri, Sep 13, 2024, 16:03 Ilya Biryukov ***@***.***> wrote: > I don't think th

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, jroelofs wrote: https://github.com/llvm/llvm-project/pull/88965#discussion_r1567997481 https://github.com/llvm/llvm-project/pull/108024 _

[clang] 387ef59 - [clang][TableGen] Change TypeNodesEmitter to use const RecordKeeper (#108476)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:50:45-07:00 New Revision: 387ef59ab9520c0811bf555679dd8ff0a60417c6 URL: https://github.com/llvm/llvm-project/commit/387ef59ab9520c0811bf555679dd8ff0a60417c6 DIFF: https://github.com/llvm/llvm-project/commit/387ef59ab9520c0811bf555679dd8ff0a60417c6.diff L

[clang] [clang][TableGen] Change TypeNodesEmitter to use const RecordKeeper (PR #108476)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f637273 - [clang][TableGen] Change SACheckersEmitter to use const RecordKeeper (#108477)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:51:17-07:00 New Revision: f637273d7708da0a01c3adb2bb85ae1c541f46a1 URL: https://github.com/llvm/llvm-project/commit/f637273d7708da0a01c3adb2bb85ae1c541f46a1 DIFF: https://github.com/llvm/llvm-project/commit/f637273d7708da0a01c3adb2bb85ae1c541f46a1.diff L

[clang] [clang][TableGen] Change SACheckersEmitter to use const RecordKeeper (PR #108477)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d757bbf - [clang][TableGen] Change SyntaxEmitter to use const RecordKeeper (#108478)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:51:42-07:00 New Revision: d757bbf68f35dbcfd68580e3798cf301862dd314 URL: https://github.com/llvm/llvm-project/commit/d757bbf68f35dbcfd68580e3798cf301862dd314 DIFF: https://github.com/llvm/llvm-project/commit/d757bbf68f35dbcfd68580e3798cf301862dd314.diff L

[clang] [clang][TableGen] Change SyntaxEmitter to use const RecordKeeper (PR #108478)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 75d8724 - [clang][TableGen] Change MVE Emitter to use const RecordKeeper (#108500)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:52:14-07:00 New Revision: 75d87247871110efe83edcb0107176614f88a5d9 URL: https://github.com/llvm/llvm-project/commit/75d87247871110efe83edcb0107176614f88a5d9 DIFF: https://github.com/llvm/llvm-project/commit/75d87247871110efe83edcb0107176614f88a5d9.diff L

[clang] [clang][TableGen] Change MVE Emitter to use const RecordKeeper (PR #108500)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a4b1617 - [clang][TableGen] Change NeonEmitter to use const RecordKeeper (#108501)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:52:37-07:00 New Revision: a4b161736881634baac52163ceca62a595843054 URL: https://github.com/llvm/llvm-project/commit/a4b161736881634baac52163ceca62a595843054 DIFF: https://github.com/llvm/llvm-project/commit/a4b161736881634baac52163ceca62a595843054.diff L

[clang] [clang][TableGen] Change NeonEmitter to use const RecordKeeper (PR #108501)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, jroelofs wrote: https://github.com/llvm/llvm-project/pull/88965#discussion_r1567997481 > Did any implementation ship __aarch64_cpu_features in a way that

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs deleted https://github.com/llvm/llvm-project/pull/108024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 974fa85 - [clang][TableGen] Change RISCVVEmitter to use const RecordKeeper (#108502)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:53:01-07:00 New Revision: 974fa8522be37eb0a111fee004b0bc8a9debf9fc URL: https://github.com/llvm/llvm-project/commit/974fa8522be37eb0a111fee004b0bc8a9debf9fc DIFF: https://github.com/llvm/llvm-project/commit/974fa8522be37eb0a111fee004b0bc8a9debf9fc.diff L

[clang] [clang][TableGen] Change RISCVVEmitter to use const RecordKeeper (PR #108502)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 711278e - [clang][TableGen] Change SVE Emitter to use const RecordKeeper (#108503)

2024-09-13 Thread via cfe-commits
Author: Rahul Joshi Date: 2024-09-13T07:53:30-07:00 New Revision: 711278e273826f3903cef448f433fe2135c569c6 URL: https://github.com/llvm/llvm-project/commit/711278e273826f3903cef448f433fe2135c569c6 DIFF: https://github.com/llvm/llvm-project/commit/711278e273826f3903cef448f433fe2135c569c6.diff L

[clang] [clang][TableGen] Change SVE Emitter to use const RecordKeeper (PR #108503)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul closed https://github.com/llvm/llvm-project/pull/108503 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-09-13 Thread Ilya Biryukov via cfe-commits
@@ -462,14 +462,16 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call, } } - for (unsigned I = 0, -N = std::min(Callee->getNumParams(), Args.size()); - I != N; ++I) { -if (CheckCoroCall || Callee->getParamDecl(I)->ha

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

2024-09-13 Thread Ilya Biryukov 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] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From 8774b4b073b5ebb52bdf35a7c44c613c6fcf56fc Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 13 Sep 2024 17:55:15 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove feature sha1 from FMV. (PR #108383)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -33,7 +33,6 @@ enum CPUFeatures { FEAT_FP, FEAT_SIMD, FEAT_CRC, - FEAT_SHA1, jroelofs wrote: Here are the other threads: https://github.com/llvm/llvm-project/pull/108024#discussion_r1757249346 https://github.com/llvm/llvm-project/pull/88965#discussio

[clang] [NFC][Clang][TableGen] Refactor ClangASTNodesEmitter (PR #108580)

2024-09-13 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/108580 Change macroName() to accept a StringRef to avoid extra string copy. Simplify ASTNode comparison function. Use equal_range() instead of calling lower_bound() and upper_bound() separately for std::multimap. No n

<    1   2   3   4   5   >