[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-11-13 Thread kadir çetinkaya via cfe-commits
@@ -23,10 +23,15 @@ // simpler because a remark can't be promoted to an error. #include "clang/Basic/AllDiagnostics.h" #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/DiagnosticDriver.h" +#include "clang/Basic/DiagnosticIDs.h" #include "clang/Basic/DiagnosticOptions

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread Nikita Popov via cfe-commits
@@ -852,6 +852,7 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_memrchr); TLI.setUnavailable(LibFunc_ntohl); TLI.setUnavailable(LibFunc_ntohs); +TLI.setUnavailable(LibFunc_reallocarray); ---

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

2024-11-13 Thread Sam Elliott via cfe-commits
@@ -74,7 +74,10 @@ def sub_gpr_odd : SubRegIndex<32, 32> { } } // Namespace = "RISCV" -// Integer registers +//===--===// lenary wrote: I'll do my best to. https://github.com/llvm/llvm-pro

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-13 Thread Utkarsh Saxena via cfe-commits
@@ -1889,6 +1889,43 @@ def LifetimeBound : DeclOrTypeAttr { let SimpleHandler = 1; } +def LifetimeCaptureBy : DeclOrTypeAttr { + let Spellings = [Clang<"lifetime_capture_by", 0>]; + let Subjects = SubjectList<[ParmVar, ImplicitObjectParameter], ErrorDiag>; + let Args = [V

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka created https://github.com/llvm/llvm-project/pull/116033 Adds a new check that finds calls to substr when its first argument is a zero-equivalent expression and can be replaced with starts_with() (introduced in C++20). This modernization improves code readability

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -793,3 +793,108 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -793,3 +793,108 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -249,9 +254,10 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, LocalVisitor Visit); template static bool isRecordWithAttr(QualType Type) { - if (auto *RD = Type->getAsCXXRecordDecl()) -re

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -793,3 +793,108 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -793,3 +793,108 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

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

2024-11-13 Thread Gábor Horváth via cfe-commits
@@ -793,3 +793,108 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

[libclc] [libclc] Create aliases with custom_command (PR #115885)

2024-11-13 Thread Fraser Cormack via cfe-commits
@@ -355,11 +355,13 @@ function(add_libclc_builtin_set) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" ) foreach( a ${ARG_ALIASES} ) set( alias_suffix "${a}-${ARG_TRIPLE}.bc" ) -add_custom_target( ${alias_suffix}

[libclc] 76befc8 - Reland "[libclc] Create aliases with custom_command (#115885)" (#116025)

2024-11-13 Thread via cfe-commits
Author: Fraser Cormack Date: 2024-11-13T11:44:21Z New Revision: 76befc86dea9cad6be870c04732379f7ecf596dd URL: https://github.com/llvm/llvm-project/commit/76befc86dea9cad6be870c04732379f7ecf596dd DIFF: https://github.com/llvm/llvm-project/commit/76befc86dea9cad6be870c04732379f7ecf596dd.diff LOG

[libclc] Reland "[libclc] Create aliases with custom_command (#115885)" (PR #116025)

2024-11-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/116025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Print the PostInitializer target in exploded-graph-rewriter (PR #116034)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This aids debugging PostInitializer program points by knowing what is the location being initialized. ![Screenshot from 2024-11-11 09-50-51](https://github.com/user-attachments/assets/48

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Helmut Januschka (hjanuschka) Changes Adds a new check that finds calls to substr when its first argument is a zero-equivalent expression and can be replaced with starts_with() (introduced in C++20). This modernization improves code

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-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-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 3e3db0d8ee6bf2f87b1c5f51cb02fe9a3ef50ff5 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 2e4fb01caa92c06b17bf93c08c4262a349b74379 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-11-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/115967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

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

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/114818 >From a1ca0d1e0cbc2f1c5eb09639a687f0eed6f6826c Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 4 Nov 2024 16:50:45 +0100 Subject: [PATCH 1/3] [TLI] Add support for reallocarray >From the m

[clang] [clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #111499)

2024-11-13 Thread Utkarsh Saxena via cfe-commits
@@ -1091,21 +1104,22 @@ static bool isAssignmentOperatorLifetimeBound(CXXMethodDecl *CMD) { } static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef, - const AssignedEntity &Entity) { +

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
https://github.com/hjanuschka updated https://github.com/llvm/llvm-project/pull/116033 >From 19059d8671d01ae67e2777aadfb1d8addc6bd8eb Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 13 Nov 2024 12:52:36 +0100 Subject: [PATCH] [clang-tidy] Add modernize-substr-to-starts-with check Ad

[clang] [llvm] [Clang-Repl] Add support for out-of-process execution. (PR #110418)

2024-11-13 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-msan` running on `sanitizer-buildbot10` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/94/builds/2344 Here is the relev

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [Clang] enhance diagnostic message for __builtin_bit_cast size mismatch (PR #115940)

2024-11-13 Thread Timm Baeder via cfe-commits
tbaederr wrote: The changes LGTM but I'm not sure about the wording; I'd like to get some input from a native speaker. https://github.com/llvm/llvm-project/pull/115940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] aba5580 - [ARM] Fix operand order for MVE predicated VFMAS (#115908)

2024-11-13 Thread via cfe-commits
Author: Oliver Stannard Date: 2024-11-13T12:16:28Z New Revision: aba55809e9af5e0d981f10c7f9b44a1f57b423c2 URL: https://github.com/llvm/llvm-project/commit/aba55809e9af5e0d981f10c7f9b44a1f57b423c2 DIFF: https://github.com/llvm/llvm-project/commit/aba55809e9af5e0d981f10c7f9b44a1f57b423c2.diff LO

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Aaron Ballman via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread Nikita Popov via cfe-commits
@@ -8,6 +8,7 @@ int stpncpy; int strdup; int strndup; int index; +int reallocarray; nikic wrote: This change probably shouldn't be here anymore? https://github.com/llvm/llvm-project/pull/114818 ___ cfe-commits maili

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

2024-11-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/115921 >From 3c233df64906972016c26909263cfd53940d87a0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 12 Nov 2024 04:28:37 + Subject: [PATCH 1/4] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]]

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/115823 >From 3c233df64906972016c26909263cfd53940d87a0 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 12 Nov 2024 04:28:37 + Subject: [PATCH 1/6] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]]

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-13 Thread via cfe-commits
https://github.com/SpencerAbson updated https://github.com/llvm/llvm-project/pull/115340 >From 97312bad8a8b7d2d411b4bc4f756733166d64052 Mon Sep 17 00:00:00 2001 From: Spencer Abson Date: Thu, 7 Nov 2024 11:44:27 + Subject: [PATCH] [AArch64][SVE] Fix the immediate argument in svextq The mea

[clang] [analyzer] Print the PostInitializer target in exploded-graph-rewriter (PR #116034)

2024-11-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 4048c64306e23b622443bbe7293057a9b07a13bb...7faee31bc4bc0b1a9fd037a99f54856c84affc91 clang

[libclc] [libclc] Create aliases with custom_command (PR #115885)

2024-11-13 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Relanded in #116025. https://github.com/llvm/llvm-project/pull/115885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-13 Thread via cfe-commits
@@ -852,6 +852,7 @@ static void initializeLibCalls(TargetLibraryInfoImpl &TLI, const Triple &T, TLI.setUnavailable(LibFunc_memrchr); TLI.setUnavailable(LibFunc_ntohl); TLI.setUnavailable(LibFunc_ntohs); +TLI.setUnavailable(LibFunc_reallocarray); ---

[clang] [analyzer] Print the PostInitializer target in exploded-graph-rewriter (PR #116034)

2024-11-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/116034 This aids debugging PostInitializer program points by knowing what is the location being initialized. ![Screenshot from 2024-11-11 09-50-51](https://github.com/user-attachments/assets/481f79f2-5cc5-4d0c-ac7d-

[clang] [llvm] [ARM] Fix operand order for MVE predicated VFMAS (PR #115908)

2024-11-13 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard closed https://github.com/llvm/llvm-project/pull/115908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix division by zero in ACLEIntrinsic constructor (PR #115883)

2024-11-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -1415,7 +1415,10 @@ ACLEIntrinsic::ACLEIntrinsic(EmitterBase &ME, const Record *R, } else if (Bounds->getName() == "IB_LaneIndex") { IA.boundsType = ImmediateArg::BoundsType::ExplicitRange; IA.i1 = 0; - IA.i2 = 128 / Param->sizeInBits()

[clang] [llvm] [ARM] Fix operand order for MVE predicated VFMAS (PR #115908)

2024-11-13 Thread Oliver Stannard via cfe-commits
ostannard wrote: The pre-commit CI failure is an unrelated LLDB test failure, so I'm ignoring it. https://github.com/llvm/llvm-project/pull/115908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang][RISCV] Support `norelax` attribute for RISCV (PR #115981)

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: Two comments: - I don't think the c-api-doc change is going to be accepted at this rate - One of the nice things about the monorepo is that you can do a Clang+Backend change like what this requires in a single PR, rather than committing it bit-by-bit. Seeing the entire change in o

[libclc] [libclc] Create aliases with custom_command (PR #115885)

2024-11-13 Thread Michał Górny via cfe-commits
mgorny wrote: This change broke installing for us, see bug #115942. https://github.com/llvm/llvm-project/pull/115885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance diagnostic message for __builtin_bit_cast size mismatch (PR #115940)

2024-11-13 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman would you be able to assist with the wording for the diagnostic? https://github.com/llvm/llvm-project/pull/115940 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [clang-tidy] Fix false positive in cppcoreguidelines-avoid-const-or-ref-data-members when detecting templated classes with inheritance (PR #115180)

2024-11-13 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/115180 >From 428283c7b61ca50d40ffd3ddc5c08aca39f39533 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 7 Nov 2024 00:35:47 +0800 Subject: [PATCH] [clang-tidy] fix false positive when detecting templated clas

[clang] [analyzer][taint] Recognize tainted LazyCompoundVals (4/4) (PR #115919)

2024-11-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/115919 >From a16c5e514b5a80b20e7a7eb377686012026d2dc4 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 2 Nov 2024 14:13:00 +0100 Subject: [PATCH 1/4] [analyzer] Allow copying empty structs (1/4) We represent c

[clang] [analyzer] Trigger copy event when copying empty structs (3/4) (PR #115918)

2024-11-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/115918 >From a16c5e514b5a80b20e7a7eb377686012026d2dc4 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 2 Nov 2024 14:13:00 +0100 Subject: [PATCH 1/3] [analyzer] Allow copying empty structs (1/4) We represent c

[clang] 6ff41e8 - [Flang][LoongArch] Emit target features for Loongarch64. (#114735)

2024-11-13 Thread via cfe-commits
Author: Zhaoxin Yang Date: 2024-11-13T16:34:34+08:00 New Revision: 6ff41e860fdb69bb9e234e003255aae9accff79a URL: https://github.com/llvm/llvm-project/commit/6ff41e860fdb69bb9e234e003255aae9accff79a DIFF: https://github.com/llvm/llvm-project/commit/6ff41e860fdb69bb9e234e003255aae9accff79a.diff

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-13 Thread Haojian Wu via cfe-commits
@@ -3867,6 +3869,117 @@ static void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) { S.Context, AL, EncodingIndices.data(), EncodingIndices.size())); } +LifetimeCaptureByAttr *Sema::ParseLifetimeCaptureByAttr(const ParsedAttr &AL, +

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/115823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Add 'IgnoreTemplateParmDepth' to structural equivalence cache (PR #115518)

2024-11-13 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/115518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add steakhal to the Clang Static Analyzer maintainers (PR #114991)

2024-11-13 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/114991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[clang] Introduce [[clang::lifetime_capture_by(X)]] (PR #115823)

2024-11-13 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Mostly good, two nits. https://github.com/llvm/llvm-project/pull/115823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 12dcaa2 - [clang] Add steakhal to the Clang Static Analyzer maintainers (#114991)

2024-11-13 Thread via cfe-commits
Author: Balazs Benics Date: 2024-11-13T09:50:09+01:00 New Revision: 12dcaa2e1e6c46d8a1b440d8a836d6b81ab92efb URL: https://github.com/llvm/llvm-project/commit/12dcaa2e1e6c46d8a1b440d8a836d6b81ab92efb DIFF: https://github.com/llvm/llvm-project/commit/12dcaa2e1e6c46d8a1b440d8a836d6b81ab92efb.diff

[clang] [TargetVersion] Only enable on RISC-V and AArch64 (PR #115991)

2024-11-13 Thread Craig Topper via cfe-commits
topperc wrote: Need a test https://github.com/llvm/llvm-project/pull/115991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] add la v1.1 features for sys::getHostCPUFeatures (PR #115832)

2024-11-13 Thread Lu Weining via cfe-commits
@@ -135,8 +135,13 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, Features.push_back("+lsx"); std::string ArchName; - if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) + if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) { ArchName

[clang] [Clang] Emit stub version of OpenCL Kernel (PR #115821)

2024-11-13 Thread Aniket Lal via cfe-commits
https://github.com/lalaniket8 updated https://github.com/llvm/llvm-project/pull/115821 >From f8265debdf3fcd7b3097f18d3823c6fdc8a20ef2 Mon Sep 17 00:00:00 2001 From: anikelal Date: Tue, 12 Nov 2024 11:30:45 +0530 Subject: [PATCH] [Clang][AMDGPU] Emit stub version of OpenCL Kernel OpenCL allows

[clang] [llvm] Fix report script (PR #116017)

2024-11-13 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/116017 None >From 69a3030e61ab5d4483464cd912d78a4e5d24d644 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Wed, 13 Nov 2024 09:19:10 + Subject: [PATCH 1/2] Reland "[ci] New script to generate test report

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Sergio Afonso via cfe-commits
skatrak wrote: Thank you @Meinersbur for your comments. I just updated the PR description and replaced `cantFail()` calls in unit tests as you suggested, let me know if that addresses your concerns. https://github.com/llvm/llvm-project/pull/115863 __

[clang] [llvm] [OpenMP][OMPIRBuilder] Handle non-failing calls properly (PR #115863)

2024-11-13 Thread Sergio Afonso via cfe-commits
https://github.com/skatrak edited https://github.com/llvm/llvm-project/pull/115863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip shadow warnings for enum constants in distinct class scopes (PR #115656)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115656 >From e13774913ecba7d66652f10f9a3468a55acb3b42 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 10 Nov 2024 15:11:39 +0200 Subject: [PATCH 1/2] [Clang] skip shadow warnings for enum constants in distinc

[clang] [Clang] skip warnings for constructors marked with the [[noreturn]] attribute (PR #115558)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115558 >From f63263a1aa4873a63918649ea92352eb5cfe66eb Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 9 Nov 2024 00:41:13 +0200 Subject: [PATCH] [Clang] skip warnings for constructors marked with the [[noretu

[clang] [Clang] update reasoned delete diagnostic kind to use Extension, making it pedantic only (PR #114713)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114713 >From c07fa270194eadde3ccecab368b2225702fc2e63 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 3 Nov 2024 19:22:56 +0200 Subject: [PATCH 1/2] [Clang] update reasoned delete diagnostic kind to use Exten

[clang] [Clang] eliminate shadowing warnings for parameters using deducing this (PR #114813)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/114813 >From 91ff2b4226110ea35c78f0f1b6ff89b4bec2c788 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 4 Nov 2024 17:38:46 +0200 Subject: [PATCH 1/3] [Clang] eliminate shadowing warnings for parameters using d

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > I think `modernize-use-starts-ends-with` should be extended instead. Agreed! https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang-tools-extra] Rename CODE_OWNERS -> Maintainers (PR #114544)

2024-11-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/114544 >From 6a9f356c13a2a391909cc2161318e4d6300e6a48 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 1 Nov 2024 10:43:14 -0400 Subject: [PATCH 1/3] Rename CODE_OWNERS -> Maintainers --- clang-tools-extr

[clang] [llvm] Make +sve2-aes an alias of +sve2+sve-aes (PR #116026)

2024-11-13 Thread Alexandros Lamprineas via cfe-commits
@@ -6,10 +6,15 @@ tbx z0.b, z1.b, z2.b // CHECK: error: instruction requires: sve2 or sme // CHECK-NEXT: tbx z0.b, z1.b, z2.b -.arch armv9-a+sve2-aes labrinea wrote: I have a feeling that the entire file is wrong. The pairs of lines `.arch +` followed by `.a

[clang] [llvm] Make +sve2-aes an alias of +sve2+sve-aes (PR #116026)

2024-11-13 Thread Alexandros Lamprineas via cfe-commits
@@ -769,7 +769,7 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const { .Case("f32mm", FPU & SveMode && HasMatmulFP32) .Case("f64mm", FPU & SveMode && HasMatmulFP64) .Case("sve2", FPU & SveMode && HasSVE2) - .Case("sve2-pmull128", FPU & SveMode

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread Helmut Januschka via cfe-commits
hjanuschka wrote: ok will refactor the PR --  Helmut Januschka Am 13. November 2024 um 16:28:52, Carlos Galvez ***@***.*** ***@***.***> ) schrieb: I think modernize-use-starts-ends-with should be extended instead. Agreed! — Reply to this email directly, view it on GitHub

[clang-tools-extra] [clang-tidy] Add modernize-substr-to-starts-with check (PR #116033)

2024-11-13 Thread via cfe-commits
EugeneZelenko wrote: I think `modernize-use-starts-ends-with` should be extended instead. https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [llvm] Make +sve2-aes an alias of +sve2+sve-aes (PR #116026)

2024-11-13 Thread Alexandros Lamprineas via cfe-commits
@@ -861,12 +861,10 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector &Features, HasSVE2 = true; HasSVE2p1 = true; } -if (Feature == "+sve2-aes") { +if (Feature == "+sve-aes") { labrinea wrote: If I understand correctly the Ta

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread via cfe-commits
@@ -67,19 +67,24 @@ // CHECK-NO-EXE-NOT: "--unresolved-symbols // CHECK-NO-EXE-NOT: "-z" -// Test that an appropriate linker script is supplied by the driver. +// Test that an appropriate linker script is supplied by the driver, but can +// be overridden with -T. -

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This was done a long time ago for OpenMP, but it seems HIP was never updated. This patch rectifies that. The default for the LLVM backend is 5 so this is probably required for some stuff. --- Full d

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/116077 Summary: This was done a long time ago for OpenMP, but it seems HIP was never updated. This patch rectifies that. The default for the LLVM backend is 5 so this is probably required for some stuff. >From bed638b

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

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

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Hmm, I thought this is already the default one if nothing is specified https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread via cfe-commits
https://github.com/bd1976bris approved this pull request. LGTM. I would have preferred a simpler way of checking that there are no other occurrences of -T/--script/--default-script but couldn't think of anything. I didn't notice that this was an upstream review initially. It would be worth wai

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

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

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

2024-11-13 Thread Utkarsh Saxena via cfe-commits
@@ -249,9 +254,10 @@ static void visitLocalsRetainedByReferenceBinding(IndirectLocalPath &Path, LocalVisitor Visit); template static bool isRecordWithAttr(QualType Type) { - if (auto *RD = Type->getAsCXXRecordDecl()) -re

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance diagnostic message for __builtin_bit_cast size mismatch (PR #115940)

2024-11-13 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/115940 >From 2132ccb175f1eb37a4b4e60c8ee8ade90ba5bb18 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 12 Nov 2024 23:09:06 +0200 Subject: [PATCH 1/3] [Clang] enhance diagnostic message for __builtin_bit_cast

[clang] [HIP] Default to COV5 for HIP compilations (PR #116077)

2024-11-13 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Hmm, I thought this is already the default one if nothing is specified My thoughts as well, but apparently not. Something else no one ever upstreamed from the AMD fork. https://github.com/llvm/llvm-project/pull/116077 ___ cfe-commits

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -793,3 +806,202 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } + void captureSV(std::string_view sv [[clang::lifetime_captu

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -1110,12 +1117,13 @@ static bool shouldRunGSLAssignmentAnalysis(const Sema &SemaRef, isAssignmentOperatorLifetimeBound(Entity.AssignmentOperator))); } -static void checkExprLifetimeImpl(Sema &SemaRef, - const InitializedEntity *I

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -1199,6 +1207,21 @@ static void checkExprLifetimeImpl(Sema &SemaRef, break; } +case LK_LifetimeCapture: { + if (!MTE) bricknerb wrote: Add a comment explaining when do we expect this to happen? https://github.com/llvm/llvm-project/pull/

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

2024-11-13 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb commented: First pass, still didn't dive fully into the logic. https://github.com/llvm/llvm-project/pull/115921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

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

2024-11-13 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/112983 >From 0b98a56337d3210e82cac0f509eb7d3d547083f9 Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Tue, 22 Oct 2024 12:37:48 -0700 Subject: [PATCH] [RISCV] GPR Pairs for Inline Asm using `Pr` This patch adds suppor

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

2024-11-13 Thread Sam Elliott via cfe-commits
lenary wrote: The commit I just pushed up should be the final version, and not fundamentally different from what was reviewed (but with various NFC patches split out). I think I do have a route towards merging GPRPair and GPRF64Pair, but I'll do that in a follow-up, as there's a mystery crash

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -10132,10 +10132,10 @@ def err_lifetimebound_ctor_dtor : Error< "%select{constructor|destructor}0">; def err_lifetimebound_parameter_void_return_type : Error< "'lifetimebound' attribute cannot be applied to a parameter of a function " - "that returns void">; + "that re

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread Jeremy Morse via cfe-commits
https://github.com/jmorse approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/116074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -1438,13 +1471,13 @@ void checkExprLifetime(Sema &SemaRef, const InitializedEntity &Entity, LifetimeKind LK = LTResult.getInt(); const InitializedEntity *ExtendingEntity = LTResult.getPointer(); checkExprLifetimeImpl(SemaRef, &Entity, ExtendingEntity, LK, -

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s +// RUN: %clang_cc1 --std=c++20 -fsyntax-only -Wdangling -Wdangling-field -Wreturn-stack-address -verify %s bricknerb wrote: Should we limit all the

[clang] [PS5][Driver] Allow `-T` to override `--default-script` (PR #116074)

2024-11-13 Thread Edd Dawson via cfe-commits
@@ -67,19 +67,24 @@ // CHECK-NO-EXE-NOT: "--unresolved-symbols // CHECK-NO-EXE-NOT: "-z" -// Test that an appropriate linker script is supplied by the driver. +// Test that an appropriate linker script is supplied by the driver, but can +// be overridden with -T. -

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -1199,6 +1207,21 @@ static void checkExprLifetimeImpl(Sema &SemaRef, break; } +case LK_LifetimeCapture: { + if (!MTE) +return false; + assert(shouldLifetimeExtendThroughPath(Path) == + PathLifetimeKind::NoExtend && +

[clang] [clang] [NFC] In GetDiagForGotoScopeDecl(), limit Init to inside the if condition (PR #116080)

2024-11-13 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/116080 None >From 3d3d273f849ed5cdf357d6c1ea7c34f76f51afeb Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 13 Nov 2024 17:54:40 +0100 Subject: [PATCH] [clang] [NFC] In GetDiagForGotoScopeDecl(), limit Init t

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -793,3 +806,202 @@ void test13() { } } // namespace GH100526 + +namespace lifetime_capture_by { +struct S { + const int *x; + void captureInt(const int&x [[clang::lifetime_capture_by(this)]]) { this->x = &x; } bricknerb wrote: Be consistent regarding sp

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

2024-11-13 Thread Boaz Brickner via cfe-commits
@@ -10230,6 +10230,9 @@ def warn_dangling_pointer_assignment : Warning< "object backing %select{|the pointer }0%1 " "will be destroyed at the end of the full-expression">, InGroup; +def warn_dangling_reference_captured : Warning< + "object whose reference is captured

[clang] [llvm] [HLSL] Implement WaveActiveAnyTrue intrinsic (PR #115902)

2024-11-13 Thread Ashley Coleman via cfe-commits
@@ -93,6 +93,7 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_active_countbits : DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_i1_ty], [IntrConvergent, IntrNoMem]>; def int_dx_wave_getlaneindex : DefaultAttrsIntrinsic<[llvm_i32

  1   2   3   4   5   >