[clang] [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (PR #114198)

2024-11-04 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb closed https://github.com/llvm/llvm-project/pull/114198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bf43a13 - [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (#114198)

2024-11-04 Thread via cfe-commits
Author: Boaz Brickner Date: 2024-11-05T08:57:52+01:00 New Revision: bf43a138f0a6220cd043a376200bd739cacb25e3 URL: https://github.com/llvm/llvm-project/commit/bf43a138f0a6220cd043a376200bd739cacb25e3 DIFF: https://github.com/llvm/llvm-project/commit/bf43a138f0a6220cd043a376200bd739cacb25e3.diff

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-11-04 Thread via cfe-commits
@@ -0,0 +1,5025 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc --mtriple=loongarch64 -mattr=+d,-lamcas < %s | FileCheck %s --check-prefix=LA64 +; RUN: llc --mtriple=loongarch64 -mattr=+d,+lamcas < %s | FileCheck %s --check-prefix=LA

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread John McCall via cfe-commits
rjmccall wrote: > > Can we find a way to re-use the code between this and the actual lookup > > code? Feels like we could have some sort of predicate like > > `doesLookupResultSuppressADL(NamedDecl*)`. Or are we forced to use slightly > > different predicates for some compatibility reason? >

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-11-04 Thread Craig Topper via cfe-commits
@@ -4887,10 +4906,19 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, return false; } - unsigned ReqArgs = Attrs.getKind() == ParsedAttr::AT_Pcs ? 1 : 0; - if (!Attrs.checkExactlyNumArgs(*this, ReqArgs)) { -Attrs.setInvalid(); -retu

[clang-tools-extra] 7de1eff - [clangd] Check for editsNearCursor client capability under experimental capabilities (#114699)

2024-11-04 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-11-05T02:13:21-05:00 New Revision: 7de1eff7cff35481e4a502858c5e3ff21502b186 URL: https://github.com/llvm/llvm-project/commit/7de1eff7cff35481e4a502858c5e3ff21502b186 DIFF: https://github.com/llvm/llvm-project/commit/7de1eff7cff35481e4a502858c5e3ff21502b186.diff

[clang-tools-extra] [clangd] Check for editsNearCursor client capability under experimental capabilities (PR #114699)

2024-11-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/114699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Check for editsNearCursor client capability under experimental capabilities (PR #114699)

2024-11-04 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > (No action required) – we have other extensions in clangd e.g. > `references.container` `offsetEncoding`. Do we plan to do the same thing for > them? Good question; I was initially thinking of doing it as needed / when someone asks for it. But maybe it would be better

[clang] [compiler-rt] [XRay][AArch64] Support -fxray-shared (PR #114431)

2024-11-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/114431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Ok, so I've gone through all my GitHub settings, and am hoping for a comment or something, to see if GH will actually ping me this time :D https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] 7767aa4 - [XRay][AArch64] Support -fxray-shared (#114431)

2024-11-04 Thread via cfe-commits
Author: Sebastian Kreutzer Date: 2024-11-04T23:05:05-08:00 New Revision: 7767aa45abf9706fa5ec9a2b182f3ccde92a93f0 URL: https://github.com/llvm/llvm-project/commit/7767aa45abf9706fa5ec9a2b182f3ccde92a93f0 DIFF: https://github.com/llvm/llvm-project/commit/7767aa45abf9706fa5ec9a2b182f3ccde92a93f0.

[clang] [Clang] Correctly initialize placeholder fields from their initializers (PR #114196)

2024-11-04 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/114196 >From a9e9ea542ec0ef8c72982e619c746a86971b8745 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 30 Oct 2024 10:25:42 +0100 Subject: [PATCH] [Clang] Correctly initialize placeholder fields from their in

[compiler-rt] [libunwind] [llvm] [cmake] Remove obsolete files, docs and CMake variables related to the standalone build (PR #112741)

2024-11-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek commented: LGTM https://github.com/llvm/llvm-project/pull/112741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: also sorry for cycling to and from "review" the GH interface is still not obvious to me https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-11-04 Thread Craig Topper via cfe-commits
@@ -350,9 +350,24 @@ ABIArgInfo RISCVABIInfo::coerceVLSVector(QualType Ty, //* (RVVBitsPerBlock / EltSize) ResType = llvm::ScalableVectorType::get(EltType, NumElts / VScale->first); } else { +// If the corresponding extension is not supported, just make it an

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -307,6 +307,10 @@ EXTENSION(datasizeof, LangOpts.CPlusPlus) FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVTables) +// Type aware allocators +FEATURE(cxx_type_aware_allocators, LangOpts.TypeAwareAllocators) ojhunt wrote: O

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt converted_to_draft https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -3358,6 +3358,12 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const { return false; const auto *proto = getType()->castAs(); + if (proto->getNumParams() < 2) +return false; + bool IsTypeAwareAllocator = ojhunt wrote: Yeah, I think

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -8126,7 +8143,7 @@ class Sema final : public SemaBase { /// The scope in which to find allocation functions. enum AllocationFunctionScope { -/// Only look for allocation functions in the global scope. +/// Only look for allocation functions in the global scope -

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -4749,6 +4753,15 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + ClassTemplateDecl *getStdTypeIdentity() const; + std::optional InstantiateSpecializedTypeIdentity(QualType Subject); o

[compiler-rt] [libunwind] [llvm] [cmake] Remove obsolete files, docs and CMake variables related to the standalone build (PR #112741)

2024-11-04 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `cmake,compiler-rt,libunwind,llvm,runtimes` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/b

[clang] [clang][bytecode] Fix bitcasting packed bool vectors (PR #114937)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is a special case we need to handle. We don't do bitcasting _into_ such vectors yet though. --- Full diff: https://github.com/llvm/llvm-project/pull/114937.diff 2 Files Affected: - (modified) clang/l

[clang] [clang][bytecode] Fix bitcasting packed bool vectors (PR #114937)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114937 This is a special case we need to handle. We don't do bitcasting _into_ such vectors yet though. >From 762974afcfe2ba3e667f5362eddef0902ca23e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Dat

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
@@ -2234,6 +2234,17 @@ enum class CXXNewInitializationStyle { Braces }; +struct ImplicitAllocationParameters { + bool PassTypeIdentity; ojhunt wrote: What is the rationale for bitfields? I'm generally opposed to flag enums as the language support is so po

[clang] [CGObjC] Use llvm::isKnownNonZero to determine if receiver can be null. (PR #114914)

2024-11-04 Thread Ellis Hoag via cfe-commits
ellishg wrote: Yeah it seems good to me, but we should have a test case too https://github.com/llvm/llvm-project/pull/114914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix discarding __builtin_bit_cast calls (PR #114926)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Optionally prepare storage for the result and do the bitcast anyway, to get the right diagnostic output. --- Full diff: https://github.com/llvm/llvm-project/pull/114926.diff 2 Files Affected: - (modified)

[clang] [clang][bytecode] Fix discarding __builtin_bit_cast calls (PR #114926)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114926 Optionally prepare storage for the result and do the bitcast anyway, to get the right diagnostic output. >From 76e549b6fab3021050148ee0555b7ac6ea20b7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4de

[clang] 2f13fbf - [clang][bytecode] Support bitcasting into float fields (#114825)

2024-11-04 Thread via cfe-commits
Author: Timm Baeder Date: 2024-11-05T05:52:03+01:00 New Revision: 2f13fbfcd1b874019191ab68b661d9b9d82d8556 URL: https://github.com/llvm/llvm-project/commit/2f13fbfcd1b874019191ab68b661d9b9d82d8556 DIFF: https://github.com/llvm/llvm-project/commit/2f13fbfcd1b874019191ab68b661d9b9d82d8556.diff L

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-04 Thread Tom Honermann via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [clang][bytecode] Support bitcasting into float fields (PR #114825)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/114825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -13,7 +13,10 @@ void init(void * __attribute__((pass_dynamic_object_size(0; // CHECK-LABEL: define dso_local void @_ZN3foo3barC1Ev( // CHECK-SAME: ptr noundef nonnull align 4 dereferenceable(1) [[THIS:%.*]]) unnamed_addr #[[ATTR0:[0-9]+]] align 2 { // CHECK-NEXT: entr

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/6] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/5] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/4] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113623 >From 81dfa26a941f7a0926a3126fe3ebbb4d2a67cec1 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 23 Oct 2024 22:59:15 + Subject: [PATCH 01/14] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113623 >From 81dfa26a941f7a0926a3126fe3ebbb4d2a67cec1 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 23 Oct 2024 22:59:15 + Subject: [PATCH 01/13] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
inbelic wrote: Regarding the comments about differentiating between `OpSDot/DotProduct` and `OpSDotKHR/DotProductKHR`: I agree that these are different ops/capabilities in the SPIR-V spec. However from a quick attempt to implement this, I found that since the Capabilities share the same bit v

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
@@ -45,32 +52,119 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { -Checker->visitLambdaExpr(L); +

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: The attribute gets some action! Nice!! I noticed that currently the attribute's documentation doesn't say it can be placed on lambdas. But it doesn't look like it's actively rejected either. So it might be a good idea to update the documentation as part of

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/114897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #114897)

2024-11-04 Thread Artem Dergachev via cfe-commits
@@ -45,32 +52,119 @@ class UncountedLambdaCapturesChecker bool shouldVisitTemplateInstantiations() const { return true; } bool shouldVisitImplicitCode() const { return false; } - bool VisitLambdaExpr(LambdaExpr *L) { -Checker->visitLambdaExpr(L); +

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Can we find a way to re-use the code between this and the actual lookup code? > Feels like we could have some sort of predicate like > `doesLookupResultSuppressADL(NamedDecl*)`. Or are we forced to use slightly > different predicates for some compatibility reaso

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -4914,3 +4914,9 @@ def ArithmeticFence : LangBuiltin<"ALL_LANGUAGES"> { let Attributes = [CustomTypeChecking, Constexpr]; let Prototype = "void(...)"; } + +def CountedByRef : Builtin { + let Spellings = ["__builtin_counted_by_ref"]; + let Attributes = [NoThrow, CustomT

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: > Is it worth adding `ClangABICompat` support for this? (Do we think this will > affect any real code, or is this more just formal correctness?) The change was motivated by formal correctness (and the work led to the discovery of CWG 2946). I have some doubts that

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
@@ -312,15 +335,35 @@ diffs from HEAD in the buffer. If no STYLE is given uses file. If no ASSUME-FILE-NAME is given uses the function ‘buffer-file-name’." (interactive) - (let ((diff-lines (clang-format--vc-diff-get-diff-lines))) -;; If we have any diffs, format them. -

[clang] [HLSL][NFC] Cleanup - removed unused function, includes and param, fix typos (PR #113649)

2024-11-04 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/113649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread Campbell Barton via cfe-commits
https://github.com/ideasman42 edited https://github.com/llvm/llvm-project/pull/112792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][NFC] Cleanup - removed unused function, includes and param, fix typos (PR #113649)

2024-11-04 Thread Tex Riddell via cfe-commits
https://github.com/tex3d approved this pull request. https://github.com/llvm/llvm-project/pull/113649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Yeoul Na via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 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 bb9ff32867d633787b5dd2572bc6e2fe5dade107 3f4032e61fc6a847293cb53e44c8fee63b647bdc --e

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113643 >From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 24 Oct 2024 20:32:28 -0700 Subject: [PATCH 1/5] [HLSL] Add AppendStructuredBuffer and ConsumeStructuredBuffer

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes We can take advantage of the attribute `alloc_size`. For example, ``` void * malloc(size_t size) __attribute__((alloc_size(1))); std::span{(char *)malloc(x), x}; // this is safe ``` rdar://1366347

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,182 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s --check-prefix=X86_64 +// RUN: %clang_cc1 -triple i386-unknown-unknown

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/114894 We can take advantage of the attribute `alloc_size`. For example, ``` void * malloc(size_t size) __attribute__((alloc_size(1))); std::span{(char *)malloc(x), x}; // this is safe ``` rdar://136634730 >F

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -0,0 +1,182 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s --check-prefix=X86_64 +// RUN: %clang_cc1 -triple i386-unknown-unknown

[clang] [llvm] [AMDGPU] modify named barrier builtins and intrinsics (PR #114550)

2024-11-04 Thread Gang Chen via cfe-commits
cmc-rep wrote: Also, I added the piece in AMDGPULowerModuleLDS during internal review because other reviewers want to see the functional completeness. https://github.com/llvm/llvm-project/pull/114550 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-11-04 Thread Peilin Ye via cfe-commits
@@ -0,0 +1,142 @@ +; RUN: llc < %s -march=bpfel -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ peilin-ye wrote: > again Thanks for pointing this out, but I do want to test the MC encoding. It looks like at the moment a lot of tests under `llvm/test/CodeGen

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Mostly looking good to me. A few small comments. https://github.com/llvm/llvm-project/pull/112600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
@@ -483,10 +581,102 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/112600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v4 (PR #108636)

2024-11-04 Thread Peilin Ye via cfe-commits
@@ -0,0 +1,142 @@ +; RUN: llc < %s -march=bpfel -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ +; RUN: | FileCheck -check-prefixes=CHECK-LE %s +; RUN: llc < %s -march=bpfeb -mcpu=v4 -verify-machineinstrs -show-mc-encoding \ peilin-ye wrote: (replied above)

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/114847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/114847 ___ 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-04 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/114818 >From e7d67f36df2424e78b1cc3ad19d6c3a6e5553dec Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Mon, 4 Nov 2024 16:50:45 +0100 Subject: [PATCH] [TLI] Add support for reallocarray reallocarray is

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
bwendling wrote: -ast-print testcase added. https://github.com/llvm/llvm-project/pull/114495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/5] `sret` args should always point to the `alloca` AS, so we can

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Akshay Deodhar via cfe-commits
https://github.com/akshayrdeodhar approved this pull request. https://github.com/llvm/llvm-project/pull/114589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #114864)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes This PR implements a new type trait as a builtin, __builtin_hlsl_is_typed_resource_element_compatible This type traits verifies that the given input type is suitable as a typed resource element type. It c

[clang] [Clang] prevent assertion failure from an invalid template instantiation pattern when adding instantiated params to the scope in friend functions with defaulted params (PR #113777)

2024-11-04 Thread Oleksandr T. via cfe-commits
@@ -3437,10 +3437,10 @@ bool Sema::SubstDefaultArgument( // template void f(T a, int = decltype(a)()); // void g() { f(0); } LIS = std::make_unique(*this); - FunctionDecl *PatternFD = FD->getTemplateInstantiationPattern( - /*ForDefinition*/ f

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Chris B via cfe-commits
@@ -1,7 +1,5 @@ // RUN: %clang_cc1 -O0 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck --check-prefixes=CHECK,NOOPT %s // RUN: %clang_cc1 -O1 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-pas

[clang] Add Chris as the HLSL maintainer (PR #114863)

2024-11-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Thank you for the vote of confidence :smile: https://github.com/llvm/llvm-project/pull/114863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Greg Roth via cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) { // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}} a = b + &c; - //

[clang] [HLSL][SPIRV] Add HLSL type translation for spirv. (PR #114273)

2024-11-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota commented: LGTM! https://github.com/llvm/llvm-project/pull/114273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Chris B via cfe-commits
@@ -852,34 +852,51 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType *T, raw_ostream &OS) { void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T, raw_ostream &OS) { + if (Policy.UseHLSLTypes) +OS <

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
@@ -146,18 +146,118 @@ is a zero-based file offset, assuming ‘utf-8-unix’ coding." (lambda (byte &optional _quality _coding-system) (byte-to-position (1+ byte) -;;;###autoload -(defun clang-format-region (start end &optional style assume-file-name) - "Use clang

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 1/8] [emacs][clang-format] Add elisp API for clang-format on

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 1/7] [emacs][clang-format] Add elisp API for clang-format on

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [HLSL] get inout/out ABI for array parameters working (PR #111047)

2024-11-04 Thread Chris B via cfe-commits
@@ -0,0 +1,134 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes -emit-llvm -finclude-default-header -o - %s | FileCheck %s + +// CHECK-LABEL: increment +void increment(inout int Arr[2]) { + for (int I = 0; I < 2; I++) +Arr[0] += 2; +} + +//

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/114589 >From ac0790a431d94f78ee73e96fd97f9263192c3153 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Tue, 27 Aug 2024 16:16:14 -0700 Subject: [PATCH 1/2] [CUDA] Add support for __grid_constant__ attribute --- cl

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
@@ -1450,6 +1450,13 @@ def CUDAHost : InheritableAttr { } def : MutualExclusions<[CUDAGlobal, CUDAHost]>; +def CUDAGridConstant : InheritableAttr { + let Spellings = [GNU<"grid_constant">, Declspec<"__grid_constant__">]; + let Subjects = SubjectList<[ParmVar]>; + let LangOp

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-11-04 Thread Mikołaj Piróg via cfe-commits
@@ -0,0 +1,13 @@ +// This test checks if Window PE file compiled with -flto option contains a magic +// string "LTCG" to indicate LTO compilation. + +// REQUIRES: system-windows + +// RUN: %clang --target=x86_64-pc-windows-msvc -flto -fuse-ld=lld %s -o %t.exe +// RUN: dumpbin /H

  1   2   3   4   5   6   >