[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-21 Thread Haojian Wu via cfe-commits
@@ -268,6 +268,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { } } +static bool IsPointerLikeType(QualType QT) { hokein wrote: nit: `isPointerLikeType` https://github.com/llvm/llvm-project/pull/117122 __

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-21 Thread Haojian Wu via cfe-commits
@@ -366,3 +366,82 @@ void use() { capture3(std::string(), x3); // expected-warning {{object whose reference is captured by 'x3' will be destroyed at the end of the full-expression}} } } // namespace temporary_views + +// **

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-21 Thread Haojian Wu via cfe-commits
@@ -1757,6 +1757,9 @@ class Sema final : public SemaBase { /// Add [[clang:::lifetimebound]] attr for std:: functions and methods. void inferLifetimeBoundAttribute(FunctionDecl *FD); + /// Add [[clang:::lifetime_capture(this)]] to STL container methods. h

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-21 Thread Haojian Wu via cfe-commits
@@ -268,6 +268,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { } } +static bool IsPointerLikeType(QualType QT) { + QT = QT.getNonReferenceType(); + if (QT->isPointerType()) +return true; + auto *RD = QT->getAsCXXRecordDecl(); + if (!RD) +return f

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mathys Gasnier (Mathys-Gasnier) Changes Not all callers of `ParseExternalDeclaration` were parsing gnu attributes, this caused issues with namespaces declarations attributes needing to be in a specific order (See #73890). This PR fixes th

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ 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)

2024-11-21 Thread Joseph Huber via cfe-commits
@@ -6405,7 +6424,12 @@ const ToolChain &Driver::getToolChain(const ArgList &Args, TC = std::make_unique(*this, Target, Args); break; case llvm::Triple::AMDHSA: - TC = std::make_unique(*this, Target, Args); + TC = + llvm::any_of(Inputs, +

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 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] aaba840 - [NFC][Clang][AArch64]Refactor implementation of Neon vectors MFloat8… (#114804)

2024-11-21 Thread via cfe-commits
Author: CarolineConcatto Date: 2024-11-21T10:29:28Z New Revision: aaba8406c52f369898c7b43fbc7c782f939d38d5 URL: https://github.com/llvm/llvm-project/commit/aaba8406c52f369898c7b43fbc7c782f939d38d5 DIFF: https://github.com/llvm/llvm-project/commit/aaba8406c52f369898c7b43fbc7c782f939d38d5.diff L

[clang] [compiler-rt] [llvm] Single byte coverage with branch coverage (PR #113115)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/116991 >From 09cd07bb30161fe927c55f1fe589d252d39b Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 20 Nov 2024 15:31:54 + Subject: [PATCH 1/4] [TBAA] Add run-line with -fpointer-tbaa to cwg158 --- clang/t

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-21 Thread Florian Hahn via cfe-commits
@@ -206,12 +206,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!CodeGenOpts.PointerTBAA) return AnyPtr; // Compute the depth of the pointer and generate a tag of the form "p -// ". +// ". Look through pointer and array types to

[clang] [Clang] Prevent null dereferences (PR #115502)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/115502 >From d922aea02da8ddb0fe27ed21e1fe94bcb7e5d061 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Fri, 8 Nov 2024 07:40:37 -0800 Subject: [PATCH 1/2] [Clang] Prevent null dereference --- clang/lib/CodeGen/CG

[clang] [TBAA] Only emit pointer tbaa metedata for record types. (PR #116991)

2024-11-21 Thread Florian Hahn via cfe-commits
@@ -206,12 +206,14 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { if (!CodeGenOpts.PointerTBAA) return AnyPtr; // Compute the depth of the pointer and generate a tag of the form "p -// ". +// ". Look through pointer and array types to

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 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 a7427410dd71072cbd1d44a6f78a08268b19a73b 4a85a0cd98bf328f31465d47c56640abdf7ec08c --e

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-21 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. Note, `prefer-256-bit` just prefers. If you want to 256-bit guaranteed, you need `no-evex512`. https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Timm Baeder via cfe-commits
@@ -148,6 +151,9 @@ static bool isARMBareMetal(const llvm::Triple &Triple) { return true; } +} // namespace clang tbaederr wrote: ```suggestion } // namespace toolchains ``` https://github.com/llvm/llvm-project/pull/117140 _

[clang] [llvm] Introduce SingleByteCoverage tests (w/yaml2obj) (PR #113114)

2024-11-21 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/113114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-11-21 Thread via cfe-commits
qt-tatiana wrote: Ping :) https://github.com/llvm/llvm-project/pull/113144 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-21 Thread Haojian Wu via cfe-commits
@@ -268,6 +268,40 @@ void Sema::inferLifetimeBoundAttribute(FunctionDecl *FD) { } } +static bool IsPointerLikeType(QualType QT) { + QT = QT.getNonReferenceType(); + if (QT->isPointerType()) +return true; + auto *RD = QT->getAsCXXRecordDecl(); + if (!RD) +return f

[clang] [Clang] enhance error recovery with RecoveryExpr for trailing commas in call arguments (PR #114684)

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

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-21 Thread Steven Perron via cfe-commits
s-perron wrote: Is there a difference between this test and `llvm/test/CodeGen/SPIRV/HLSLControlFlowHint.ll`? If not, you probably only need one. https://github.com/llvm/llvm-project/pull/116331 ___ cfe-commits mail

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: None (smanna12) Changes This commit addresses several null pointer issues identified by static analysis by replacing dyn_cast<> with cast<> and getAs<> with castAs<> in various parts of the Clang codebase. The cast and castAs method is us

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread via cfe-commits
https://github.com/Discookie edited https://github.com/llvm/llvm-project/pull/117165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/117173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Dan Gohman via cfe-commits
sunfishcode wrote: > I do think its reasonable for all those decoders to support overlong LEBs. > But I think I don't see the advantage that adding this new pseudo feature > offers. Wouldn't it be simpler to simply not add it? I see it more as exposing existing complexity, rather than creating

[clang] [Clang] Prevent potential null pointer dereferences (PR #117176)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -1908,9 +1908,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; // ensure both args have 3 elements int NumElementsArg1 = -TheCall->getArg(0)->getType()->getAs()->getNumElements(); +TheCall->getA

[clang] [clang][bytecode] Improve resource management and state restoration in CallBI function (PR #115496)

2024-11-21 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/115496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

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

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please also add some details to the patch summary about why the changes are needed. https://github.com/llvm/llvm-project/pull/117173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-21 Thread Craig Topper via cfe-commits
@@ -329,6 +329,9 @@ The primary goal of experimental support is to assist in the process of ratifica ``experimental-smctr``, ``experimental-ssctr`` LLVM implements the `1.0-rc3 specification `__.

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/117173 >From 27925c327d9f3164e3ba966ffaed5715681480fd Mon Sep 17 00:00:00 2001 From: Zahira Ammarguellat Date: Thu, 21 Nov 2024 07:03:46 -0800 Subject: [PATCH 1/2] [NFC] Fix uninitialized pointer field. --- clang-to

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam ready_for_review https://github.com/llvm/llvm-project/pull/117173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-21 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/115902 >From 845256b2ed971a4e42f7f871e8b51e711486261a Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Mon, 11 Nov 2024 16:34:23 -0700 Subject: [PATCH 01/19] [HLSL] Implement WaveActiveAnyTrue intrinsic --- clang/

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-21 Thread Sudharsan Veeravalli via cfe-commits
https://github.com/svs-quic updated https://github.com/llvm/llvm-project/pull/117169 >From 92a3e2e9c44c03093e6050b92b938fd2a0d6886c Mon Sep 17 00:00:00 2001 From: Sudharsan Veeravalli Date: Wed, 20 Nov 2024 13:24:07 +0530 Subject: [PATCH 1/2] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension The

[clang] [llvm] AMDGPU: Define v_mfma_f32_{16x16x128|32x32x64}_f8f6f4 instructions (PR #116723)

2024-11-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: ### Merge activity * **Nov 21, 11:47 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/116723). https://github.com/llvm/llvm-project/pull/116723

[clang] [rtsan] NFC: Update docs with suppress_equal_stacks (PR #117187)

2024-11-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris Apple (cjappl) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117187.diff 1 Files Affected: - (modified) clang/docs/RealtimeSanitizer.rst (+5-1) ``diff diff --git a/clang/docs/RealtimeSanitizer.rst b/

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/117173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Define v_mfma_f32_{16x16x128|32x32x64}_f8f6f4 instructions (PR #116723)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/116723 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] a4f835c - [clang-tidy][NFC] Fix uninitialized pointer field. (#117173)

2024-11-21 Thread via cfe-commits
Author: Zahira Ammarguellat Date: 2024-11-21T17:54:13+01:00 New Revision: a4f835c520fcf8c6df8be96fad931fc6f4a2b1e4 URL: https://github.com/llvm/llvm-project/commit/a4f835c520fcf8c6df8be96fad931fc6f4a2b1e4 DIFF: https://github.com/llvm/llvm-project/commit/a4f835c520fcf8c6df8be96fad931fc6f4a2b1e4

[clang] [llvm] AMDGPU: Define v_mfma_f32_{16x16x128|32x32x64}_f8f6f4 instructions (PR #116723)

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

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Ties Stuij via cfe-commits
https://github.com/stuij updated https://github.com/llvm/llvm-project/pull/117140 >From 4a85a0cd98bf328f31465d47c56640abdf7ec08c Mon Sep 17 00:00:00 2001 From: Ties Stuij Date: Fri, 15 Nov 2024 13:19:08 + Subject: [PATCH 1/3] [clang][ARM] disable frame pointers by default for bare metal AR

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Ties Stuij via cfe-commits
@@ -151,6 +152,10 @@ static bool useFramePointerForTargetByDefault(const llvm::opt::ArgList &Args, } } + if (toolchains::isARMBareMetal(Triple)) { +return false; + } stuij wrote: done! https://github.com/llvm/llvm-project/pull/117140 ___

[clang] [llvm] AMDGPU: Define v_mfma_f32_{16x16x128|32x32x64}_f8f6f4 instructions (PR #116723)

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

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread Mathys Gasnier via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcicsr (CSR) extension (PR #117169)

2024-11-21 Thread Sudharsan Veeravalli via cfe-commits
@@ -329,6 +329,9 @@ The primary goal of experimental support is to assist in the process of ratifica ``experimental-smctr``, ``experimental-ssctr`` LLVM implements the `1.0-rc3 specification `__.

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Nicolas van Kempen via cfe-commits
nicovank wrote: @hjanuschka Let's give it another day or so then I’ll go ahead and click merge if there are no other comments 👍 https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread Mathys Gasnier via cfe-commits
https://github.com/Mathys-Gasnier updated https://github.com/llvm/llvm-project/pull/117148 >From 086b2e21da4febd31789fe717bae526af625627e Mon Sep 17 00:00:00 2001 From: Mathys-Gasnier Date: Thu, 21 Nov 2024 11:08:41 +0100 Subject: [PATCH 1/2] [Clang] [Parser] Fixing all callers of `ParseExtern

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-21 Thread Nick Desaulniers via cfe-commits
@@ -151,6 +152,10 @@ static bool useFramePointerForTargetByDefault(const llvm::opt::ArgList &Args, } } + if (toolchains::isARMBareMetal(Triple)) { +return false; + } nickdesaulniers wrote: https://llvm.org/docs/CodingStandards.html#don-t-use-brac

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Current version looks fine. Take a look into comments, if something could be improved. Ping once you finish (looking and/or fixing), so it could be merged. https://github.com/llvm/llvm-project/pull/116033 __

[clang] [clang][SME] Ignore flatten/clang::always_inline statements for callees with mismatched streaming attributes (PR #116391)

2024-11-21 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Note: I've extended this PR to cover the clang-only `[[clang::always_inline]]` statement attribute (which is currently broken for streaming functions too). It's documentation is more relaxed than the GNU `__attribute__((always_inline))` attribute (which says failing to inline is

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited 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-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -265,4 +255,57 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, s.compare(0, 1, "ab") == 0; s.rfind(suffix, 1) == s.size() - suffix.size(); + + #define STR(x) std::string(x) + 0 == STR(s).find("a"); + + #define STRING s + if (0 ==

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -7,26 +7,16 @@ Checks for common roundabout ways to express ``starts_with`` and ``ends_with`` and suggests replacing with the simpler method when it is available. Notably, this will work with ``std::string`` and ``std::string_view``. -.. code-block:: c++ +The check handle

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang] [llvm] [IR] Add TargetExtType::CanBeLocal property (PR #99016)

2024-11-21 Thread Jay Foad via cfe-commits
@@ -4285,6 +4291,12 @@ void Verifier::visitAllocaInst(AllocaInst &AI) { SmallPtrSet Visited; Check(AI.getAllocatedType()->isSized(&Visited), "Cannot allocate unsized type", &AI); + // Check if it's a target extension type that disallows being used on the + // stac

[clang] [llvm] AMDGPU: Optimize mfma_scale intrinsics with 0 inputs (PR #116724)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/116724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized pointer field. (PR #117173)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/117173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -42,3 +47,19 @@ void f1() { // CHECK-MESSAGES-NON-STRICT-REGEX: :[[@LINE-1]]:3: warning: function 'prefix_match_regex' is matched on qualname prefix; it should not be used // no-warning STRICT-REGEX } + +void f2() { + S s; + PiotrZSL wrote: add test w

[clang] [llvm] AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 (PR #116728)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/116728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Shrink used number of registers for mfma scale based on format (PR #117047)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. This isn't good, because "::open" and "std::fstream::open" are 2 different things. Please make sure that those 2 can be distinguished (configured to detect only one or other or both). https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clang-tidy] Add C++ member function support to custom bugprone-unsafe-functions matches (PR #117165)

2024-11-21 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/117165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[clang] [llvm] AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 (PR #116728)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/116728 >From 0468b299aedb800c5f942e1b484b2805ede28304 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 29 Jan 2024 16:29:02 +0530 Subject: [PATCH] AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 --- clang/includ

[clang] [llvm] AMDGPU: Shrink used number of registers for mfma scale based on format (PR #117047)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117047 >From 975c6c066c577171bf51b4dc5b09384ec2d98540 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 17 Jul 2024 10:14:05 +0400 Subject: [PATCH] AMDGPU: Shrink used number of registers for mfma scale based on

[clang] [llvm] AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 (PR #116728)

2024-11-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: ### Merge activity * **Nov 21, 12:00 PM EST**: [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/116728) rebased this pull request as part of a merge. https://github.com/llvm/llvm-project/pull/116728 ___ cfe-commits mail

[clang] 76b2464 - AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 (#116728)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T09:02:12-08:00 New Revision: 76b24640e5dc5716f6fac8ef80dac18757753113 URL: https://github.com/llvm/llvm-project/commit/76b24640e5dc5716f6fac8ef80dac18757753113 DIFF: https://github.com/llvm/llvm-project/commit/76b24640e5dc5716f6fac8ef80dac18757753113.diff

[clang] [Clang] [Parser] Fixing all callers of `ParseExternalDeclaration` that didn't parse gnu attributes (PR #117148)

2024-11-21 Thread Mathys Gasnier via cfe-commits
@@ -267,9 +267,11 @@ void Parser::ParseInnerNamespace(const InnerNamespaceInfoList &InnerNSs, while (!tryParseMisplacedModuleImport() && Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) { ParsedAttributes DeclAttrs(AttrFactory); - MaybeParseCXX11Attrib

[clang] [llvm] AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 (PR #117052)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_mfma_i32_16x16x64_i8 for gfx950 (PR #116728)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/116728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 (PR #117052)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117052 >From 535d10eb541acf48a053d02aedf69c705b1c0a2d Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 29 Jan 2024 17:44:14 +0530 Subject: [PATCH] AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 --- clang/includ

[clang] [llvm] AMDGPU: Shrink used number of registers for mfma scale based on format (PR #117047)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117047 >From f21bf54074830fd0148ace8b2458bb290ce5f7d5 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Wed, 17 Jul 2024 10:14:05 +0400 Subject: [PATCH] AMDGPU: Shrink used number of registers for mfma scale based on

[clang] [llvm] AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 (PR #117052)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f4ed79b - AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 (#117052)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T09:08:15-08:00 New Revision: f4ed79b160cbd2ec537304f095a62750078a0254 URL: https://github.com/llvm/llvm-project/commit/f4ed79b160cbd2ec537304f095a62750078a0254 DIFF: https://github.com/llvm/llvm-project/commit/f4ed79b160cbd2ec537304f095a62750078a0254.diff

[clang] 0a6e874 - AMDGPU: Shrink used number of registers for mfma scale based on format (#117047)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T09:08:05-08:00 New Revision: 0a6e8741ddb4ed8cfb4bf92df863665197be2ccc URL: https://github.com/llvm/llvm-project/commit/0a6e8741ddb4ed8cfb4bf92df863665197be2ccc DIFF: https://github.com/llvm/llvm-project/commit/0a6e8741ddb4ed8cfb4bf92df863665197be2ccc.diff

[clang] [llvm] AMDGPU: Add v_mfma_i32_32x32x32_i8 for gfx950 (PR #117052)

2024-11-21 Thread Matt Arsenault via cfe-commits
arsenm wrote: ### Merge activity * **Nov 21, 12:08 PM EST**: A user merged this pull request with [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/117052). https://github.com/llvm/llvm-project/pull/117052 ___ cfe-commits mailing list

[clang] [llvm] AMDGPU: Shrink used number of registers for mfma scale based on format (PR #117047)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/117047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add basic verification for mfma scale intrinsics (PR #117048)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_mfma_f32_16x16x32_bf16 for gfx950 (PR #117053)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Piotr Zegar via cfe-commits
@@ -265,4 +255,57 @@ void test(std::string s, std::string_view sv, sub_string ss, sub_sub_string sss, s.compare(0, 1, "ab") == 0; s.rfind(suffix, 1) == s.size() - suffix.size(); + + #define STR(x) std::string(x) + 0 == STR(s).find("a"); + + #define STRING s + if (0 ==

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-21 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-21 Thread Steven Perron via cfe-commits
https://github.com/s-perron edited https://github.com/llvm/llvm-project/pull/116858 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_smfmac_f32_16x16x128_fp8_bf8 for gfx950 (PR #117234)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/117234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_smfmac_f32_32x32x64_bf8_bf8 for gfx950 (PR #117256)

2024-11-21 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117256 >From f18c1c98d73d94cb35aa03acb85c9a0aac910e56 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 3 Feb 2024 20:48:16 +0530 Subject: [PATCH] AMDGPU: Add v_smfmac_f32_32x32x64_bf8_bf8 for gfx950 --- clang/

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/115971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/115971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7baadb2 - AMDGPU: Add v_smfmac_f32_16x16x128_bf8_bf8 for gfx950 (#117232)

2024-11-21 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-11-21T16:57:01-08:00 New Revision: 7baadb2a4e48df88c9fdd09629d6f03e66bb30d7 URL: https://github.com/llvm/llvm-project/commit/7baadb2a4e48df88c9fdd09629d6f03e66bb30d7 DIFF: https://github.com/llvm/llvm-project/commit/7baadb2a4e48df88c9fdd09629d6f03e66bb30d7.diff

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115971 >From 7413ceb21a6e0ac9212ef6317763ee0eff559612 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 12 Nov 2024 16:44:00 -0800 Subject: [PATCH 1/5] print struct body within target ext ty context --- .../t

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/117087 >From 48808d43f41b61a419790fd25f99b5e897e5a419 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 04:30:32 -0700 Subject: [PATCH 1/7] [WebAssembly] Define call-indirect-overlong and bulk-memor

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-21 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/117199 >From a7d176ed8c7aa9d22944600a301fb690b845935d Mon Sep 17 00:00:00 2001 From: Tarun Prabhu Date: Thu, 21 Nov 2024 09:53:49 -0700 Subject: [PATCH 1/4] [flang][Driver] Support -print-supported-cpus and associ

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -1,7 +1,7 @@ -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM -; RUN: llc < %s -asm-verbose=false -ve

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -255,10 +255,11 @@ static void setRelocs(const std::vector &chunks, } } -// An object file can have two approaches to tables. With the reference-types -// feature enabled, input files that define or use tables declare the tables -// using symbols, and record each use wit

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -103,6 +106,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo { bool hasMutableGlobals() const { return HasMutableGlobals; } bool hasNontrappingFPToInt() const { return HasNontrappingFPToInt; } bool hasReferenceTypes() const { return HasRefere

<    1   2   3   4   5   6   >