[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

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

[clang-tools-extra] [clang-tidy] Add bugprone-smartptr-reset-ambiguous-call check (PR #121291)

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

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many call-sites (PR #123737)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/123737 >From f88945b08138e01601121bcdf4dd4893bed21a90 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 17 Jan 2025 17:49:05 + Subject: [PATCH 1/3] [NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many

[clang] [llvm] [polly] [NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many call-sites (PR #123737)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse updated https://github.com/llvm/llvm-project/pull/123737 >From f88945b08138e01601121bcdf4dd4893bed21a90 Mon Sep 17 00:00:00 2001 From: Jeremy Morse Date: Fri, 17 Jan 2025 17:49:05 + Subject: [PATCH 1/2] [NFC][DebugInfo] Use iterator-flavour getFirstNonPHI at many

[clang] [Modules] Delay deserialization of preferred_name attribute at r… (PR #122726)

2025-01-24 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @benlangmuir thanks for pointing this out, we should definitely keep that in mind when relanding. We'll try to run the bootstrap process to fix that too. Are the particular steps for the bootstraping you do documented somewhere? E.g. maybe we're lucky and one of the files

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Jeremy Morse via cfe-commits
@@ -412,6 +412,20 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-variable-liveness`` flag has been added to allow for imp

[clang] [clang] __STDC_NO_THREADS__ is no longer necessary for VS 2022 1939 and above (PR #117149)

2025-01-24 Thread Dipesh Sharma via cfe-commits
https://github.com/dipeshs809 updated https://github.com/llvm/llvm-project/pull/117149 >From e89b89f6361e92b9900c03ddd08bed247fc19a67 Mon Sep 17 00:00:00 2001 From: dipeshs809 Date: Thu, 21 Nov 2024 17:48:22 +0530 Subject: [PATCH] [clang] guard __STDC_NO_THREADS__ defination for MSVCVersion 20

[clang] [clangd] Add code completion for if constexpr (PR #124315)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: FantasqueX (FantasqueX) Changes C++17 supports `if constexpr` statement. This patch implements this in code completion. --- Full diff: https://github.com/llvm/llvm-project/pull/124315.diff 3 Files Affected: - (modified) clang/include/c

[clang] [Clang] Enable -fextend-lifetimes at -Og (PR #118026)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse commented: This looks good, but I'd like to reword some of it https://github.com/llvm/llvm-project/pull/118026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -329,6 +329,7 @@ C++17 Feature Support ^ - The implementation of the relaxed template template argument matching rules is more complete and reliable, and should provide more accurate diagnostics. + This implements `P3310R5: Solving issues introduced b

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: I can't claim to completely understand what is going on here, but most of this seems to be pretty mechanical. I THINK this seems about right? 2 nits/style concerns, else this looks about right to me. If someone else could spend some additional time on

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

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

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-24 Thread James Y Knight via cfe-commits
@@ -547,11 +547,9 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) { StringRef DiagGroup = SectionEntry->getKey(); if (Diags.getDiagnosticIDs()->getDiagnosticsInGroup( WarningFlavor, DiagGroup, GroupDiags)) { - StringRef Sugge

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne edited https://github.com/llvm/llvm-project/pull/124319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 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 0cd794d4860e376698bb4da24bcdf8cbf331835c eb4dd9012e36f973b4f05f9bb3e1d2f1a56d3e1e --e

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/124313 This fixes the core issue described in P3579, following the design intent of P0522 to not introduce any new cases where a template template parameter match is allowed for a template which is not valid for all

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (4m4n-x-B4w4ne) Changes This Pull Request is to fix issue #24841. I am also cherry-pick commit a3c7fca28faee679a59afd58c2e814025771ff63. @LegalizeAdulthood @PiotrZSL --- Full diff: https://github.com/llvm/llvm-project/pul

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/3] This commit is to resolve the issue #24841 -

[clang] e4009ed - [clang][docs] Update bytecode interpreter docs (#124252)

2025-01-24 Thread via cfe-commits
Author: Timm Baeder Date: 2025-01-24T19:17:51+01:00 New Revision: e4009ed3d68ba8d9e78721ce5afc2b3a7edd6f36 URL: https://github.com/llvm/llvm-project/commit/e4009ed3d68ba8d9e78721ce5afc2b3a7edd6f36 DIFF: https://github.com/llvm/llvm-project/commit/e4009ed3d68ba8d9e78721ce5afc2b3a7edd6f36.diff L

[clang-tools-extra] [clang-tidy] Replace /* ... */ single-line comments with // ... comments (PR #124319)

2025-01-24 Thread via cfe-commits
https://github.com/4m4n-x-B4w4ne updated https://github.com/llvm/llvm-project/pull/124319 >From 581cc0eda9d42458ff71f2c913a2e03d2de0b5f2 Mon Sep 17 00:00:00 2001 From: NagaChaitanya Vellanki Date: Fri, 19 Jul 2024 14:26:23 -0700 Subject: [PATCH 1/4] This commit is to resolve the issue #24841 -

[clang] 825e712 - [HLSL] cbuffer: create host layout structs (#122820)

2025-01-24 Thread via cfe-commits
Author: Helena Kotas Date: 2025-01-24T10:24:09-08:00 New Revision: 825e712959d48f14b47e579871bcf9b5e25fff7a URL: https://github.com/llvm/llvm-project/commit/825e712959d48f14b47e579871bcf9b5e25fff7a DIFF: https://github.com/llvm/llvm-project/commit/825e712959d48f14b47e579871bcf9b5e25fff7a.diff

[clang] [clang][docs] Update bytecode interpreter docs (PR #124252)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/124252 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor deleted https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: Please, update Release Notes in clang-tools-extra/docs/ReleaseNotes.rst https://github.com/llvm/llvm-project/pull/124265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
@@ -13464,6 +13464,14 @@ Decl *Sema::ActOnAliasDeclaration(Scope *S, AccessSpecifier AS, } TemplateParameterList *TemplateParams = TemplateParamLists[0]; +// Check shadowing of a template parameter name +for (NamedDecl *TP : TemplateParams->asArray()) { +

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Amr Hesham via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Thorsten Klein via cfe-commits
thorsten-klein wrote: Thanks a lot for your review @vbvictor! I have resolved your review findings. What do you think about the option's name? Is `AllowNoNamespaceComments` fine for you or shall I rename to `AllowOmittingNamespaceComments` (or any other suggestion)? https://github.com/llvm/

[clang] [Clang] Fix warning for non std functions with name `infinity` (PR #123417)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) { // no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the currently enabled floating-point options}} // no-inf-warning@+1 {{use of infinity is undefined behavior due to the currently enabled floatin

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Valentyn Yukhymenko via cfe-commits
https://github.com/BaLiKfromUA edited https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb updated https://github.com/llvm/llvm-project/pull/123119 >From 51372333df218cfb4fa8dcc0cebee03c0e3ebc5f Mon Sep 17 00:00:00 2001 From: Aidan Date: Wed, 15 Jan 2025 15:24:12 -0500 Subject: [PATCH 1/7] __nullptr -> KEYALL, added relevant test --- clang/include/c

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
@@ -11682,6 +11683,7 @@ class Sema final : public SemaBase { SmallVectorImpl &SugaredConverted, SmallVectorImpl &CanonicalConverted, CheckTemplateArgumentKind CTAK, bool PartialOrdering, +

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/123119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add __nullptr as a keyword to C (PR #123119)

2025-01-24 Thread Erich Keane via cfe-commits
@@ -113,5 +113,3 @@ void foo(void *); void bar() { foo(__nullptr); } static_assert(nullptr == __nullptr); static_assert(_Generic(typeof(__nullptr), nullptr_t: true, default: false)); -_Static_assert(__nullptr == 0); // Test that its value matches that of NULL e

[clang] [clang] disallow narrowing when matching template template parameters (PR #124313)

2025-01-24 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/124313 >From 1d9605013487b8361ff471ef494b4be94bd37470 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Sun, 12 Jan 2025 14:45:24 -0300 Subject: [PATCH] [clang] disallow narrowing when matching template template p

[clang] [Clang][Sema] Reject declaring an alias template with the same name as its template parameter. (PR #123533)

2025-01-24 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/123533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
vbvictor wrote: > What do you think about the option's name? Is `AllowNoNamespaceComments` > fine for you or shall I rename to `AllowOmittingNamespaceComments` (or any > other suggestion)? As for now I can not think of a better name, maybe others will suggest. https://github.com/llvm/llvm-

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: CC @llvm/clang-vendors : this changes the behavior of -fwrapv. Internally, I expect it's going to be a bit painful to communicate to all our internal teams that they need to change their -fwrapv usage to -fno-strict-overflow, but if we think it's imp

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Eli Friedman via cfe-commits
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, // GEP indexes are signed, and scaling an index isn't permitted to // signed-overflow, so we use the same semantics for our explicit // multiply. We suppress this i

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/122486 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/99687 >From a6df42bc9a7a9f3779f598f77db45e5334910bc2 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 24 Jan 2025 16:15:57 -0600 Subject: [PATCH] [AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly S

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Baranov Victor via cfe-commits
@@ -39,3 +39,11 @@ Options An unsigned integer specifying the number of spaces before the comment closing a namespace definition. Default is `1U`. + + +.. option:: AllowNoNamespaceComments + + When true, the check will allow that namespace comments are ommitted + ent

[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Wael Yehia (w2yehia) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/124353.diff 6 Files Affected: - (modified) clang/docs/UsersManual.rst (+8) - (modified) clang/include/clang/Basic/CodeGenOptions.def (+1) -

[clang] [Driver][FreeBSD] Remove FreeBSD/loongarch32 support (PR #122515)

2025-01-24 Thread Brooks Davis via cfe-commits
https://github.com/brooksdavis commented: Retroactive, but LGTM. No need to leave riscv32 around providing a confusing trail for future architectures. https://github.com/llvm/llvm-project/pull/122515 ___ cfe-commits mailing list cfe-commits@lists.llvm

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

2025-01-24 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Updated this to be simpler. This logic is *only* run when compiled from `clang --target=amdgcn-amd-amdhsa`, which means it will only show up for OpenCL and direct C++ targeting, HIP uses a different method to get the Toolchain. For regular C++ I do not want to depend on the ROCm

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Eli Friedman via cfe-commits
@@ -4311,14 +4311,14 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, // GEP indexes are signed, and scaling an index isn't permitted to // signed-overflow, so we use the same semantics for our explicit // multiply. We suppress this i

[clang] [clang] Return larger CXX records in memory (PR #120670)

2025-01-24 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Shouldn't this have some sort of Release not maybe under the X86 section? https://github.com/llvm/llvm-project/pull/120670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang-tools-extra] added option `google-readability-namespace-comments.AllowNoNamespaceComments` (PR #124265)

2025-01-24 Thread Thorsten Klein via cfe-commits
https://github.com/thorsten-klein updated https://github.com/llvm/llvm-project/pull/124265 >From 608ceb0bb475aad65abb55a1dd02bf84d62ec99c Mon Sep 17 00:00:00 2001 From: "Klein, Thorsten (GDE-EDSI1)" Date: Fri, 24 Jan 2025 13:46:24 +0100 Subject: [PATCH] added option AllowNoNamespaceComments for

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From 09bb2152cdcb9e9051fe69223d96bb78c53691c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124228)

2025-01-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124229)

2025-01-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/124229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-24 Thread kadir çetinkaya via cfe-commits
@@ -547,11 +547,9 @@ void WarningsSpecialCaseList::processSections(DiagnosticsEngine &Diags) { StringRef DiagGroup = SectionEntry->getKey(); if (Diags.getDiagnosticIDs()->getDiagnosticsInGroup( WarningFlavor, DiagGroup, GroupDiags)) { - StringRef Sugge

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Nikita Popov via cfe-commits
nikic wrote: If we want to make this change, I think doing it for Clang 20 would be ideal, because it is related to the pointer overflow optimization changes in that release. https://github.com/llvm/llvm-project/pull/122486 ___ cfe-commits mailing li

[clang] [llvm] [RISCV] Add MIPS extensions (PR #121394)

2025-01-24 Thread Djordje Todorovic via cfe-commits
djtodoro wrote: @lenary thanks! >You still have a whitespace change to this file? No, the whitespaces are there on `main` branch. I applied `clang-format` initially, and that is why it was included in one of my previous patches. https://github.com/llvm/llvm-project/pull/121394 ___

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang Author: Pengcheng Wang (wangpc-pp) Changes **NOTE: This is an early-access support only for evaluation, not going to be merged and may be changable during the process of fast-track proposal.** This PR con

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp updated https://github.com/llvm/llvm-project/pull/124239 >From 2ce077b011a9dcac0f9649493a50819971695b73 Mon Sep 17 00:00:00 2001 From: Wang Pengcheng Date: Tue, 16 Jul 2024 16:08:16 +0800 Subject: [PATCH 1/2] [RISCV][MC] Support Zvabd instructions Support of these

[clang] [clang-format] Fix a bug in annotating overloaded co_await decl (PR #124240)

2025-01-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/124240 Fixes #124223. >From dbaee952414957db7b43232b82929e8d04e51564 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 24 Jan 2025 00:05:11 -0800 Subject: [PATCH] [clang-format] Fix a bug in annotating overloaded co_a

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp created https://github.com/llvm/llvm-project/pull/124239 **NOTE: This is an early-access support only for evaluation, not going to be merged and may be changable during the process of fast-track proposal.** This PR contains the MC/CodeGen support of ByteDance

[clang] [clang][ExprConst] Let diagnostics point to std::allocator calls (PR #123744)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/123744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a bug in annotating overloaded co_await decl (PR #124240)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #124223. --- Full diff: https://github.com/llvm/llvm-project/pull/124240.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+1-1) - (modified) clang/unittests/Format/TokenAnn

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/124239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/124239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP][RISCV] Support for Zvabd fast-track proposal (PR #124239)

2025-01-24 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp edited https://github.com/llvm/llvm-project/pull/124239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Silently ignore unknown warnings in `--warning-suppression-mappings` (PR #124141)

2025-01-24 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet requested changes to this pull request. https://github.com/llvm/llvm-project/pull/124141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AST] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124228)

2025-01-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b4ef11d - [AST] Migrate away from PointerUnion::dyn_cast (NFC) (#124228)

2025-01-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-24T01:12:30-08:00 New Revision: b4ef11d0e20b8263012613697503533fbb2119d6 URL: https://github.com/llvm/llvm-project/commit/b4ef11d0e20b8263012613697503533fbb2119d6 DIFF: https://github.com/llvm/llvm-project/commit/b4ef11d0e20b8263012613697503533fbb2119d6.diff L

[clang] [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (PR #124229)

2025-01-24 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/124229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 148da06 - [Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124229)

2025-01-24 Thread via cfe-commits
Author: Kazu Hirata Date: 2025-01-24T01:12:45-08:00 New Revision: 148da06628507123f340c68b0ba732c31c3b6de9 URL: https://github.com/llvm/llvm-project/commit/148da06628507123f340c68b0ba732c31c3b6de9 DIFF: https://github.com/llvm/llvm-project/commit/148da06628507123f340c68b0ba732c31c3b6de9.diff L

[clang] [clang][bytecode] Use std::allocator calls for Descriptor source (PR #123900)

2025-01-24 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/123900 >From 35560b9d91793fdf6e0de0f37ada110a5086a4ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 21 Jan 2025 12:31:05 +0100 Subject: [PATCH] [clang][bytecode] Use std::allocator calls for

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-01-24 Thread Erich Keane via cfe-commits
erichkeane wrote: >For example, we know about the gnu namespace, but there are a ton of >attributes GCC supports but we do not. Sure, but we've never needed/wanted that before for general attributes, right? I am seeing THAT as particularly novel for this patch. I would be open to reviewing

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/124288 As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. The call-sites updated in this patch are those where the dyn_cast_or_nu

[clang] [llvm] [NFC][DebugInfo] Use iterators for instruction insertion in more places (PR #124291)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-compiler-rt-sanitizer @llvm/pr-subscribers-backend-hexagon Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. This patch chang

[clang] [llvm] [NFC][DebugInfo] Use iterators for instruction insertion in more places (PR #124291)

2025-01-24 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 c546b5317c518987a5f45dd4c4d25321a955c758 8bafca72573c7ba5e7b7711c5168e0609571661f --e

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
@@ -11714,13 +11714,49 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)

2025-01-24 Thread Aaron Ballman via cfe-commits
@@ -79,7 +79,15 @@ code bases. Undefined behavior due to pointer addition overflow can be reliably detected using ``-fsanitize=pointer-overflow``. It is also possible to use ``-fno-strict-overflow`` to opt-in to a language dialect where signed integer - and pointer overf

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-24 Thread Jan Voung via cfe-commits
jvoung wrote: > It would be better to use `GtestCmp` if you really want clang-tidy support > gtest in this check. Here is an unfinished example which can match > > ``` > TEST(a, b) { > std::optional a; > if (v) { > a = 1; > } > ASSERT_NE(a, std::nullopt); > a.value(); > } > ``` >

[clang] [llvm] [HLSL] Create HLSL legalization passes (PR #123811)

2025-01-24 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/123811 >From 4e62f38b70c0c0ae130d0379ebee4d3f3bcb4797 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Thu, 16 Jan 2025 11:32:16 -0500 Subject: [PATCH 1/2] [HLSL] Create HLSL legalization passes The semantics of HL

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. The call-sites updated in this patch are those where the dyn_cast_or

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-llvm-transforms Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. The call-sites updated in thi

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Jeremy Morse (jmorse) Changes As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. The call-sites updated in this patch are those where the dyn

[clang] [llvm] [NFC][DebugInfo] Use iterators for instruction insertion in more places (PR #124291)

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse created https://github.com/llvm/llvm-project/pull/124291 As part of the "RemoveDIs" work to eliminate debug intrinsics, we're replacing methods that use Instruction*'s as positions with iterators. This patch changes some more complex call-sites, those crossing file bo

[clang] [llvm] [NFC][DebugInfo] Rewrite more call-sites to insert with iterators (PR #124288)

2025-01-24 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 c546b5317c518987a5f45dd4c4d25321a955c758 b60342427447c46d646d3de5b91fcbdbcb8585d3 --e

[clang-tools-extra] [clang-tidy] Filter out googletest TUs in bugprone-unchecked-optional-access (PR #115051)

2025-01-24 Thread Jan Voung via cfe-commits
jvoung wrote: > > I'm not really that opposed to this solution, but the other solutions sound > > better to me, though with their own caveats (time, work, GTest macros are > > only for GTest). I'm fine with this, if all other options are not feasible > > to implement in the near to mid term, b

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Aidan Goldfarb via cfe-commits
https://github.com/AidanGoldfarb edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM with an inline question that's probably me misunderstanding something. https://github.com/llvm/llvm-project/pull/110102 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2025-01-24 Thread Jeremy Morse via cfe-commits
@@ -3595,15 +3595,26 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) { llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock(); if (IP->empty()) return nullptr; -// Look at directly preceding instruction, skipping bitcasts and lifetim

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
https://github.com/Michael137 created https://github.com/llvm/llvm-project/pull/124305 Adds test that confirms that we import the explicit object parameter location for `ParmVarDecl`s. This is how Clang determines whether a parameter `isExplicitObjectParamater`. The LLDB expression evaluator r

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Buch (Michael137) Changes Adds test that confirms that we import the explicit object parameter location for `ParmVarDecl`s. This is how Clang determines whether a parameter `isExplicitObjectParamater`. The LLDB expression evaluato

[clang] [clang][ASTImporter][test] Add test for importing explicit object parameter (PR #124305)

2025-01-24 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/124305 >From 2fbabc9802e09a175bd71624b2ff89a2d9b7f3a1 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 24 Jan 2025 11:59:42 + Subject: [PATCH] [clang][ASTImporter][test] Add test for importing explicit ob

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

2025-01-24 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse edited 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

[clang] [llvm] [LLVM][Clang][AArch64] Implement AArch64 build attributes (PR #118771)

2025-01-24 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,117 @@ +//===-- AArch64BuildAttributes.cpp - AArch64 Build Attributes -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2025-01-24 Thread Paul T Robinson via cfe-commits
@@ -3595,15 +3595,26 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) { llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock(); if (IP->empty()) return nullptr; -// Look at directly preceding instruction, skipping bitcasts and lifetim

[clang] [clang][ASTImporter] Fix possible crash at import of function template (PR #124273)

2025-01-24 Thread via cfe-commits
=?utf-8?q?Balázs_Kéri?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes During import of a function template at specific conditions an assertion "TemplateOrSpecialization.isNull()" can be triggered. This can happen when the new A

[clang] [Clang] raise extension warning for unknown namespaced attributes (PR #120925)

2025-01-24 Thread Erich Keane via cfe-commits
erichkeane wrote: > Thanks for this patch. > > Sorry I did not see this sooner. > > I am not convinced this the best way to resolve #120875 - and I suspect in > practice it would be a bit difficult to use/be under used. I'm not convinced here? I think a flag that says "warn me about unknown

[clang] [TySan] Add initial documentation for Type Sanitizer (PR #123595)

2025-01-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM assuming @fhahn is happy as well. Thank you for the docs! https://github.com/llvm/llvm-project/pull/123595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)

2025-01-24 Thread Nikita Popov via cfe-commits
nikic wrote: > That's an interesting situation! I'm not sure what I'd expect the LLVM IR to > be there. For Clang AST, we want to keep around the expression AST nodes. But > for LLVM IR, perhaps it makes sense to drop anything without a value rather > than mark it as undef? No strong opinion,

<    1   2   3   4   >