[clang-tools-extra] [clangd] Add feature modules registry (PR #153756)

2025-08-18 Thread Aleksandr Platonov via cfe-commits
@@ -1017,6 +1017,13 @@ clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment var : static_cast(ErrorResultCode::CheckFailed); } + FeatureModuleSet ModuleSet; + for (FeatureModuleRegistry::entry E : FeatureModuleRegistry::entries()) {

[clang-tools-extra] [clangd] Add feature modules registry (PR #153756)

2025-08-18 Thread Aleksandr Platonov via cfe-commits
@@ -185,6 +194,8 @@ class FeatureModuleSet { template int FeatureModuleSet::ID::Key; +typedef llvm::Registry FeatureModuleRegistry; ArcsinX wrote: Thanks, changed to `using FeatureModuleRegistry = llvm::Registry;` https://github.com/llvm/llvm-project/pull

[clang-tools-extra] [clangd] Add feature modules registry (PR #153756)

2025-08-18 Thread Aleksandr Platonov via cfe-commits
@@ -172,6 +178,9 @@ class FeatureModuleSet { const_iterator begin() const { return const_iterator(Modules.begin()); } const_iterator end() const { return const_iterator(Modules.end()); } + void add(std::unique_ptr M) { ArcsinX wrote: Moved https://githu

[clang] [CIR][Dialect] Add SourceLangAttr (PR #152511)

2025-08-18 Thread via cfe-commits
https://github.com/seven-mile updated https://github.com/llvm/llvm-project/pull/152511 >From f501e18cd33bf54d9c91dd772fb3db6f7ee52335 Mon Sep 17 00:00:00 2001 From: seven-mile Date: Thu, 7 Aug 2025 14:10:08 + Subject: [PATCH 1/4] [CIR][Dialect] Add SourceLangAttr --- .../include/clang/CIR

[clang] [analyzer] Harden RegionStoreManager::bindArray (PR #153177)

2025-08-18 Thread Marco Borgeaud via cfe-commits
@@ -2654,14 +2654,19 @@ RegionStoreManager::bindArray(LimitedRegionBindingsConstRef B, SVal V = getBinding(B.asStore(), *MRV, R->getValueType()); return bindAggregate(B, R, V); } + if (auto const *Value = Init.getAsInteger()) { +auto SafeValue = StateMgr.getBasi

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread Chuanqi Xu via cfe-commits
@@ -9363,6 +9363,119 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle)`` member function of

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread Chuanqi Xu via cfe-commits
@@ -9363,6 +9363,119 @@ Example: }]; } +def CoroAwaitSuspendDestroyDoc : Documentation { + let Category = DocCatFunction; + let Content = [{ + +The ``[[clang::coro_await_suspend_destroy]]`` attribute applies to an +``await_suspend(std::coroutine_handle)`` member function of

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread Chuanqi Xu via cfe-commits
@@ -5288,13 +5290,22 @@ class CoroutineSuspendExpr : public Expr { } CoroutineSuspendExpr(StmtClass SC, EmptyShell Empty) : Expr(SC, Empty) { +CoroutineSuspendExprBits.UseAwaitSuspendDestroy = false; SubExprs[SubExpr::Operand] = nullptr; SubExprs[SubExpr::Com

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-18 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { +auto EnsureDefaultPtrauthFlag = [&](OptSpecifier Pos, OptSpecifier Ne

[clang] [clang][bytecode] Move pointers from extern globals to new decls (PR #154273)

2025-08-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/154273 >From a7a197cdcf058ed8404e62a2f4b2157e33e9c34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Aug 2025 08:22:02 +0200 Subject: [PATCH] [clang][bytecode] Move pointers from extern glo

[clang] [clang][bytecode] Move pointers from extern globals to new decls (PR #154273)

2025-08-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/154273 >From 68b2c53e44dbe20cf78e5bff2961464560e5aa9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Aug 2025 08:22:02 +0200 Subject: [PATCH] [clang][bytecode] Move pointers from extern glo

[clang] [clang][bytecode] Support pmul X86 builtins (PR #154275)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/154275.diff 1 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+24-3) ``diff diff --git a/clang/lib/AST/ByteCode/I

[clang] [clang][bytecode] Support pmul X86 builtins (PR #154275)

2025-08-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/154275 None >From e9a3788484b567c5af15f84caeead70cc2f363a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Aug 2025 08:37:31 +0200 Subject: [PATCH] [clang][bytecode] Support pmul X86 builti

[clang] [Clang] improve -Wstring-concatenation to warn on every missing comma in initializer lists (PR #154018)

2025-08-18 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: For what it's worth, this causes `-Wstring-concatenation` to pop up a few times in the Linux kernel. Two of the instances are simple enough to resolve under the kernel's "Do not split user visible strings regardless of length" rule. ``` drivers/scsi/lpfc/lpfc_attr.c:76:3: w

[clang] [clang][bytecode] Move pointers from extern globals to new decls (PR #154273)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/154273.diff 4 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBlock.h (+1) - (modified) clang/lib/AST/ByteCode/Pointer.h (+1) - (modifi

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-18 Thread Mythreya Kuricheti via cfe-commits
MythreyaK wrote: Does [this](https://github.com/llvm/llvm-project/pull/153760#discussion_r2280735143) seem okay? > Could you add a test case for the nested-scope scenario discussed in > https://github.com/llvm/llvm-project/pull/153760#discussion_r2280630270 > please? Thanks for the heads up

[clang] [clang][bytecode] Move pointers from extern globals to new decls (PR #154273)

2025-08-18 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/154273 None >From 8659ba0907740ba29b0117bf5790ba6ef800efb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 19 Aug 2025 08:22:02 +0200 Subject: [PATCH] [clang][bytecode] Move pointers from exte

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread via cfe-commits
https://github.com/snarkmaster edited https://github.com/llvm/llvm-project/pull/152623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-18 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/153760 >From b279e4b718488a08d25fdc43edae965c0fec288c Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Fri, 15 Aug 2025 00:52:37 -0700 Subject: [PATCH 1/4] [clang] Skip unqualified members in explicit-member

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread via cfe-commits
snarkmaster wrote: @ChuanqiXu9, please take a look at the update. I incorporated all the feedback from you and @yuxuanchen1997, as collected in my prior comment / checklist. I additionally made a change that Yuxuan mentioned, and that I thought I wouldn't be able to make. Specifically, I went

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-18 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: Filed #154270 w/ another crash, which looks different from #153933 / #153996. https://github.com/llvm/llvm-project/pull/147835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-18 Thread via cfe-commits
https://github.com/snarkmaster updated https://github.com/llvm/llvm-project/pull/152623 >From 9fc3169ea5f1aea2a88b2616b7c9c4f2949139be Mon Sep 17 00:00:00 2001 From: Alexey Date: Thu, 7 Aug 2025 12:10:07 -0700 Subject: [PATCH 1/6] Elide suspension points via [[clang::coro_await_suspend_destroy

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Kevin Sala Penades via cfe-commits
kevinsala wrote: > Has `dyn_groupprivate` already been approved to be in 6.1 or is this just a > PoC implementation? @shiltian It has been accepted for OpenMP 6.1. Currently I'm missing to restrict this clause to the 6.1 version. https://github.com/llvm/llvm-project/pull/152651 __

[clang-tools-extra] [clangd] Add feature modules registry (PR #153756)

2025-08-18 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX updated https://github.com/llvm/llvm-project/pull/153756 >From b3dd0dd17e8f969d8198dd04ae25329ec5751af7 Mon Sep 17 00:00:00 2001 From: Aleksandr Platonov Date: Fri, 15 Aug 2025 09:45:48 +0300 Subject: [PATCH 1/2] [clangd] Introduce feature modules registry This patch

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 unassigned https://github.com/llvm/llvm-project/pull/154231 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Save a per-block dynamic allocation ID (PR #154094)

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

[clang] 25c137e - [clang][bytecode] Save a per-block dynamic allocation ID (#154094)

2025-08-18 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-19T06:52:21+02:00 New Revision: 25c137e43b830d85acf0cb27f6fe5786566e5f27 URL: https://github.com/llvm/llvm-project/commit/25c137e43b830d85acf0cb27f6fe5786566e5f27 DIFF: https://github.com/llvm/llvm-project/commit/25c137e43b830d85acf0cb27f6fe5786566e5f27.diff L

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-18 Thread Alan Zhao via cfe-commits
https://github.com/alanzhao1 updated https://github.com/llvm/llvm-project/pull/154231 >From 9f07859077fb6df79388d1cc346f3e57f2832f7c Mon Sep 17 00:00:00 2001 From: Alan Zhao Date: Mon, 18 Aug 2025 16:46:48 -0700 Subject: [PATCH 1/3] [clang][timers][modules] Fix a timer being started when it's

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-18 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Also, could you file a follow-up issue about the analogous bug for `static` functions that we discovered? (You don't necessarily need to work on it, I'd just like to make sure it's on file before we forget about it.) https://github.com/llvm/llvm-project/pull/153760 __

[clang] [Clang] Only remove lambda scope after computing evaluation context (PR #154106)

2025-08-18 Thread Younan Zhang via cfe-commits
@@ -16681,7 +16677,8 @@ Decl *Sema::ActOnFinishFunctionBody(Decl *dcl, Stmt *Body, if (!IsInstantiation) PopDeclContext(); - PopFunctionScopeInfo(ActivePolicy, dcl); + if (!RetainFunctionScopeInfo) +PopFunctionScopeInfo(ActivePolicy, dcl); zyn0217

[clang] [llvm] [LLVM] Introduce 'llvm-offload-wrapper' tool (PR #153504)

2025-08-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: ping https://github.com/llvm/llvm-project/pull/153504 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Only remove lambda scope after computing evaluation context (PR #154106)

2025-08-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/154106 >From befaf0fa99bfcdd09434345e93fc24765c70d243 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Mon, 18 Aug 2025 20:16:14 +0800 Subject: [PATCH 1/2] [Clang] Only remove lambda scope after computing evaluation

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-18 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. Could you add a test case for the nested-scope scenario discussed in [this comment](https://github.com/llvm/llvm-project/pull/153760#discussion_r2280630270) please? (Feel free to pick just one of the libSema and clangd t

[clang] [Clang] Only remove lambda scope after computing evaluation context (PR #154106)

2025-08-18 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/154106 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Only remove lambda scope after computing evaluation context (PR #154106)

2025-08-18 Thread Younan Zhang via cfe-commits
@@ -15791,12 +15791,9 @@ TreeTransform::TransformLambdaExpr(LambdaExpr *E) { return ExprError(); } - // Copy the LSI before ActOnFinishFunctionBody removes it. zyn0217 wrote: Ugh it turns out we are able to keep the LSI if we don't drop the result of

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-08-18 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov edited https://github.com/llvm/llvm-project/pull/142150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle FunctionToPointerDecay casts (#153657) (PR #154060)

2025-08-18 Thread Justin Riddell via cfe-commits
https://github.com/Arghnews edited https://github.com/llvm/llvm-project/pull/154060 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle FunctionToPointerDecay casts (#153657) (PR #154060)

2025-08-18 Thread Justin Riddell via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - | FileCheck %s Arghnews wrote: If I change the test file to: ```c // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir // RUN:

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian commented: Has `dyn_groupprivate` already been approved to be in 6.1 or is this just a PoC implementation? https://github.com/llvm/llvm-project/pull/152651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/152651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Tests for local resource arrays (PR #153257)

2025-08-18 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/153257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota created https://github.com/llvm/llvm-project/pull/154248 Adds support for accessing sub-arrays from fixed-size multi-dimensional global resource arrays. Enables indexing into globally scoped, fixed-size resource arrays that have multiple dimensions when the result is

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-clang-codegen Author: Helena Kotas (hekota) Changes Adds support for accessing sub-arrays from fixed-size multi-dimensional global resource arrays. Enables indexing into globally scoped, fixed-size resource arrays that have m

[clang] [libc++] Mark std::expected as nodiscard (PR #139651)

2025-08-18 Thread via cfe-commits
https://github.com/halbi2 updated https://github.com/llvm/llvm-project/pull/139651 >From 1efa70c6702f7506580a5b8c49ea3df779d31163 Mon Sep 17 00:00:00 2001 From: halbi2 Date: Mon, 18 Aug 2025 21:46:47 -0400 Subject: [PATCH 1/2] [clang] [test] Better test coverage for nodiscard attributes ---

[clang] [HLSL] Codegen for indexing of sub-arrays of multi-dimensional resource arrays (PR #154248)

2025-08-18 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/154248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][timers][modules] Fix a timer being started when it's running (PR #154231)

2025-08-18 Thread Alexander Kornienko via cfe-commits
@@ -11003,7 +11003,8 @@ void ASTReader::diagnoseOdrViolations() { } void ASTReader::StartedDeserializing() { - if (++NumCurrentElementsDeserializing == 1 && ReadTimer.get()) + if (llvm::Timer *T = ReadTimer.get(); + ++NumCurrentElementsDeserializing == 1 && T && !T->isR

[libclc] [libclc] Implement __clc_get_local_size/__clc_get_max_sub_group_size for amdgcn (PR #153785)

2025-08-18 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/153785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] a450dc8 - [libclc] Implement __clc_get_local_size/__clc_get_max_sub_group_size for amdgcn (#153785)

2025-08-18 Thread via cfe-commits
Author: Wenju He Date: 2025-08-19T07:51:17+08:00 New Revision: a450dc80bf3fe8af7caf6f88265cf629fb261169 URL: https://github.com/llvm/llvm-project/commit/a450dc80bf3fe8af7caf6f88265cf629fb261169 DIFF: https://github.com/llvm/llvm-project/commit/a450dc80bf3fe8af7caf6f88265cf629fb261169.diff LOG:

[clang] [flang] [llvm] [OpenMP] Add parser/semantic support for dyn_groupprivate clause (PR #152651)

2025-08-18 Thread Kevin Sala Penades via cfe-commits
@@ -1104,6 +1107,7 @@ def OMP_Target : Directive<[Spelling<"target">]> { let allowedOnceClauses = [ VersionedClause, VersionedClause, +VersionedClause, kevinsala wrote: The restriction in the spec is correct. Currently, only `cgroup` is allowed i

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/154150 >From 478331c5254da6d8d4062fac6d63f503729133ff Mon Sep 17 00:00:00 2001 From: erichkeane Date: Mon, 4 Aug 2025 13:00:02 -0700 Subject: [PATCH 1/3] [OpenACC] Implement 'firstprivate' clause copy lowering This

[clang] [Clang] Only enable builtins on aux triple if supported by language (PR #154217)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aiden Grossman (boomanaiden154) Changes This patch makes it so that builtins for the aux triple only get enabled if they are marked as supported by the current language options. Otherwise we define them regardless of the language mode. Th

[clang] [Clang] Only enable builtins on aux triple if supported by language (PR #154217)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Aiden Grossman (boomanaiden154) Changes This patch makes it so that builtins for the aux triple only get enabled if they are marked as supported by the current language options. Otherwise we define them regardless of the language mo

[clang] [Clang] Only enable builtins on aux triple if supported by language (PR #154217)

2025-08-18 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/154217 This patch makes it so that builtins for the aux triple only get enabled if they are marked as supported by the current language options. Otherwise we define them regardless of the language mode. This ca

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Helena Kotas via cfe-commits
@@ -700,3 +795,90 @@ void CGHLSLRuntime::emitInitListOpaqueValues(CodeGenFunction &CGF, } } } + +std::optional CGHLSLRuntime::emitResourceArraySubscriptExpr( +const ArraySubscriptExpr *ArraySubsExpr, CodeGenFunction &CGF) { + assert(ArraySubsExpr->getType()->isHLSLR

[clang] [clang][RISCV] Fix crash on VLS calling convention (PR #145489)

2025-08-18 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/145489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-08-18 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/154179 >From e45d9079a091cf82af632d39f342335a61318b0b Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 18 Aug 2025 13:08:01 -0500 Subject: [PATCH 1/2] [NFC] Change const char* to StringRef This API takes a

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Joseph Huber via cfe-commits
@@ -5558,8 +5558,8 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { // OpenCL: If the condition is a vector, we can treat this condition like // the select function. - if ((CGF.getLangOpts().OpenCL && condExpr->getType()->isVectorType()) || -

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
@@ -518,12 +523,19 @@ class CIRGenFunction : public CIRGenTypeCache { symbolTable.insert(vd, addr.getPointer()); } - /// Removes a declaration from the address-relationship. This is a function - /// that shouldn't need to be used except in cases where we're adding/re

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/154150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
@@ -77,7 +77,7 @@ bool CIRGenFunction::isTrivialInitializer(const Expr *init) { } void CIRGenFunction::emitAutoVarInit( -const CIRGenFunction::AutoVarEmission &emission) { +const CIRGenFunction::AutoVarEmission &emission, bool allocatedSeparately) { a

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I just have one suggestion about how to represent the different different emission behavior. https://github.com/llvm/llvm-project/pull/154150 ___ cfe-commits mailing list cfe-c

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
@@ -392,12 +392,27 @@ class OpenACCClauseCIREmitter final CIRGenFunction::AutoVarEmission tempDeclEmission, mlir::acc::FirstprivateRecipeOp recipe, const VarDecl *varRecipe, const VarDecl *temporary) { -builder.createBlock(&recipe.getCopyRegion(), recipe.g

[clang] [OpenACC] Implement 'firstprivate' clause copy lowering (PR #154150)

2025-08-18 Thread Andy Kaylor via cfe-commits
@@ -159,9 +159,10 @@ void CIRGenFunction::emitAutoVarInit( mlir::Value val = lv.getAddress().getPointer(); assert(val && "Should have an address"); auto allocaOp = val.getDefiningOp(); -assert(allocaOp && "Address should come straight out of the alloca"); +a

[clang] [clang-format] Add an option to format integer and float literal case (PR #151590)

2025-08-18 Thread Andy MacGregor via cfe-commits
@@ -77,7 +77,7 @@ static std::optional formatIfNeeded(StringRef IntegerLiteral, transformComponent(IntegerLiteral.take_front(1 + N.BaseLetterPos), Style.NumericLiteralCase.Prefix); } - // reformat this slice as HexDigit whether or not the

[clang] Reland Reland [clang][modules-driver] Add scanner to detect C++20 module presence (#147630) (PR #153497)

2025-08-18 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/15198 Here is the relevant piece of the build log f

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt auto_merge_enabled https://github.com/llvm/llvm-project/pull/153912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)

2025-08-18 Thread Alexey Bader via cfe-commits
https://github.com/bader approved this pull request. https://github.com/llvm/llvm-project/pull/140282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC] ptrauth_qualifier and ptrauth_intrinsic should only be available on Darwin (PR #153912)

2025-08-18 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/153912 >From ea731927d6bdf85a3cdb333b756447658f2c2ea6 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Fri, 15 Aug 2025 18:40:12 -0700 Subject: [PATCH 1/6] [clang][PAC] Make ptrauth_qualifier and ptrauth_intrinsic Darw

[clang-tools-extra] 378d240 - [clang-tidy] Remove addition of emacs tag in checks headers (#153942)

2025-08-18 Thread via cfe-commits
Author: Baranov Victor Date: 2025-08-18T22:49:54+03:00 New Revision: 378d2401251f53a8abb8a9757536bae2d000bc77 URL: https://github.com/llvm/llvm-project/commit/378d2401251f53a8abb8a9757536bae2d000bc77 DIFF: https://github.com/llvm/llvm-project/commit/378d2401251f53a8abb8a9757536bae2d000bc77.diff

[clang-tools-extra] [clang-tidy] Remove addition of emacs tag in checks headers (PR #153942)

2025-08-18 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor closed https://github.com/llvm/llvm-project/pull/153942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper deleted https://github.com/llvm/llvm-project/pull/154107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [doc] Add documentation for clang-change-namespace (PR #148277)

2025-08-18 Thread Konrad Kleine via cfe-commits
https://github.com/kwk closed https://github.com/llvm/llvm-project/pull/148277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] f5a648f - [doc] Add documentation for clang-change-namespace (#148277)

2025-08-18 Thread via cfe-commits
Author: Konrad Kleine Date: 2025-08-18T21:46:34+02:00 New Revision: f5a648f9193a16b1136772096c3024a0d8b3fb34 URL: https://github.com/llvm/llvm-project/commit/f5a648f9193a16b1136772096c3024a0d8b3fb34 DIFF: https://github.com/llvm/llvm-project/commit/f5a648f9193a16b1136772096c3024a0d8b3fb34.diff

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-08-18 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 HEAD~1 HEAD --extensions cpp,h -- clang/lib/CodeGen/CGCUDANV.cpp clang/lib/CodeGen/CG

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Chris B (llvm-beanz) Changes This API takes a const char* with a default nullptr value and immdiately passes it down to an API taking a StringRef. All of the places this is called from are either using compile time string literals, the def

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-08-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Chris B (llvm-beanz) Changes This API takes a const char* with a default nullptr value and immdiately passes it down to an API taking a StringRef. All of the places this is called from are either using compile time string literals

[clang] [NFC] Change const char* to StringRef (PR #154179)

2025-08-18 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/154179 This API takes a const char* with a default nullptr value and immdiately passes it down to an API taking a StringRef. All of the places this is called from are either using compile time string literals, the

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-18 Thread Ahmed Bougacha via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-08-18 Thread Ben Dunkin via cfe-commits
@@ -1318,281 +1343,249 @@ void WhitespaceManager::alignArrayInitializers(unsigned Start, unsigned End) { void WhitespaceManager::alignArrayInitializersRightJustified( CellDescriptions &&CellDescs) { - if (!CellDescs.isRectangular()) + + // If there are less than two row

[clang] [HLSL] Global resource arrays element access (PR #152454)

2025-08-18 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. I'm happy with this, but @s-perron had some good comments that should be addressed too. https://github.com/llvm/llvm-project/pull/152454 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CIR] Implement MemberExpr support for ComplexType (PR #154027)

2025-08-18 Thread Andy Kaylor via cfe-commits
@@ -62,6 +62,14 @@ class ComplexExprEmitter : public StmtVisitor { mlir::Value VisitImplicitCastExpr(ImplicitCastExpr *e); mlir::Value VisitInitListExpr(InitListExpr *e); + mlir::Value VisitMemberExpr(MemberExpr *me) { +if (CIRGenFunction::ConstantEmission constant =

[clang] [LifetimeSafety] Implement a basic use-after-free diagnostic (PR #149731)

2025-08-18 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. LG, thanks! https://github.com/llvm/llvm-project/pull/149731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-08-18 Thread Ben Dunkin via cfe-commits
@@ -1609,6 +1602,10 @@ WhitespaceManager::linkCells(CellDescriptions &&CellDesc) { return std::move(CellDesc); } +void WhitespaceManager::setChangeSpaces(unsigned Start, unsigned Spaces) { bdunkin wrote: The member function is a convenience for using the n

[clang] [mlir] [MLIR] Default valued enum parameter (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] XXX (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#154168** https://app.graphite.dev/github/pr/llvm/llvm-project/154168?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/15416

[clang] [mlir] XXX (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/154168 None >From 4b75153b6542eb7dc906d378a00aadee10359a64 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 15 Jul 2025 14:17:46 +0200 Subject: [PATCH] XXX --- clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp | 1 - ml

[clang] [clang-format] Allow array alignment on non-rectangular arrays (PR #143781)

2025-08-18 Thread Ben Dunkin via cfe-commits
@@ -67,11 +67,11 @@ void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, bool InPPDirective) { if (Tok.Finalized || (Tok.MacroCtx && Tok.MacroCtx->Role == MR_ExpandedArg)) return; - Changes.push_back(Change(Tok,

[clang] [Serialization] Fix lazy template loading (PR #133057)

2025-08-18 Thread Jonas Hahnfeld via cfe-commits
hahnjo wrote: Invested some time today and I think the fix is https://github.com/llvm/llvm-project/pull/154158. It works for the reproducer posted in https://github.com/llvm/llvm-project/pull/133057#issuecomment-2886816972, @ilya-biryukov or @emaxx-google if you have some time, would it be po

[clang] [HLSL] Rewrite semantics parsing (PR #152537)

2025-08-18 Thread Steven Perron via cfe-commits
@@ -118,6 +118,48 @@ static void fixSeparateAttrArgAndNumber(StringRef ArgStr, SourceLocation ArgLoc, Slot = new (Ctx) IdentifierLoc(ArgLoc, PP.getIdentifierInfo(FixedArg)); } +Parser::ParsedSemantic Parser::ParseHLSLSemantic() { + assert(Tok.is(tok::identifier) && "Not a

[clang] [Sema] Compare canonical conversion function (PR #154158)

2025-08-18 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo unassigned https://github.com/llvm/llvm-project/pull/154158 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Compare canonical conversion function (PR #154158)

2025-08-18 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/154158 This can be triggered with lazy template loading. Draft because it would be nice to have a standalone test for this... >From 05dce547dd35e40ddc7ff8f4d788be68d3ddc8a5 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > > > errors, but I think to fold it directly we'd need a dedicated builtin. > > > But I'm not a master of the clang AST. > > > > > > We shouldn't need a builtin, we should just be able to handle the AST nodes > > directly in ExprConstant.cpp. > > Ah, right. That doesn't wo

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/154145 >From 0e67cc11433a0e2e0d5ac454643de07eba7a145a Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 18 Aug 2025 09:35:01 -0500 Subject: [PATCH] [Clang] Support using boolean vectors in ternary operators Summa

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > errors, but I think to fold it directly we'd need a dedicated builtin. But > > I'm not a master of the clang AST. > > We shouldn't need a builtin, we should just be able to handle the AST nodes > directly in ExprConstant.cpp. Ah, right. That doesn't work, but it seems like

[clang] [llvm] [Utils] Adds support for diff based tests to lit's --update-tests (PR #154147)

2025-08-18 Thread Henrik G. Olsson via cfe-commits
https://github.com/hnrklssn updated https://github.com/llvm/llvm-project/pull/154147 >From b2bdc5bbac4260089097114f7bd5a968c9d6d761 Mon Sep 17 00:00:00 2001 From: "Henrik G. Olsson" Date: Fri, 15 Aug 2025 14:56:11 +0200 Subject: [PATCH 1/4] Reland "[Utils] Add new --update-tests flag to llvm-li

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Erich Keane via cfe-commits
erichkeane wrote: > errors, but I think to fold it directly we'd need a dedicated builtin. But > I'm not a master of the clang AST. We shouldn't need a builtin, we should just be able to handle the AST nodes directly in ExprConstant.cpp. https://github.com/llvm/llvm-project/pull/154145 __

[clang] [Clang] Support using boolean vectors in ternary operators (PR #154145)

2025-08-18 Thread Erich Keane via cfe-commits
@@ -219,3 +219,65 @@ void OneScalarOp() { four_ll ? four_ll : some_ll; } + +constexpr TwoBools constexpr_two_bools{false, true}; +// CHECK-LABEL: define internal noundef double @_ZL16constexpr_vectorDv2_bDv2_iS0_( +// CHECK-SAME: i8 noundef [[C_COERCE:%.*]], double noundef

[clang] [C] Add (new) -Wimplicit-void-ptr-cast to -Wc++-compat (PR #136855)

2025-08-18 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > I think it's worth filing an issue over. I will file an issue. I did bisect and verified that this commit is causing the issue. It is also a mystery to me how this commit could affect AST shapes. https://github.com/llvm/llvm-project/pull/136855 __

[clang] [llvm] [Utils] Adds support for diff based tests to lit's --update-tests (PR #154147)

2025-08-18 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 HEAD~1...HEAD llvm/utils/lit/lit/DiffUpdater.py llvm/utils/lit/tests/diff-test-update.py c

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-18 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > The comments in this area are confusing me, FWIW: > > ``` > /// Stores the TagDecl associated with this type. The decl may point to any > /// TagDecl that declares the entity. > TagDecl *decl; > > ... > > TagDecl *getOriginalDecl() const { return decl; } > ``` > >

  1   2   3   4   5   >