[libclc] [libclc] update __clc_mem_fence: add MemorySemantic arg and use __builtin_amdgcn_fence for AMDGPU (PR #152275)

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

[libclc] [libclc] update __clc_mem_fence: add MemorySemantic arg and use __builtin_amdgcn_fence for AMDGPU (PR #152275)

2025-08-07 Thread Wenju He via cfe-commits
@@ -0,0 +1,21 @@ +//===--===// +// +// 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: Apac

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-08-07 Thread Roger Ferrer Ibáñez via cfe-commits
@@ -5863,7 +5881,10 @@ class OMPInterchangeDirective final : public OMPLoopTransformationDirective { : OMPLoopTransformationDirective(OMPInterchangeDirectiveClass, llvm::omp::OMPD_interchange, StartLoc,

[clang] [Clang-Repl] Adds custom lambda in launchExecutor and PID retrieval (PR #152562)

2025-08-07 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/152562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] eccc6e2 - [clang-repl] Enable extending `launchExecutor` (#152562)

2025-08-07 Thread via cfe-commits
Author: Abhinav Kumar Date: 2025-08-08T08:54:34+03:00 New Revision: eccc6e22f81141691542f5dd5bbb7996e446a44f URL: https://github.com/llvm/llvm-project/commit/eccc6e22f81141691542f5dd5bbb7996e446a44f DIFF: https://github.com/llvm/llvm-project/commit/eccc6e22f81141691542f5dd5bbb7996e446a44f.diff

[clang] [Clang-Repl] Adds custom lambda in launchExecutor and PID retrieval (PR #152562)

2025-08-07 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/152562 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152596 >From 8776323a7ef1dd625f1fbd02fab912a2dc8e2081 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 7 Aug 2025 13:42:48 -0700 Subject: [PATCH] [NFC][Clang][Docs] Update Pointer Authentication documentation Thi

[libclc] [libclc] update __clc_mem_fence: add MemorySemantic arg and use __builtin_amdgcn_fence for AMDGPU (PR #152275)

2025-08-07 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +//===--===// +// +// 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: Apac

[clang-tools-extra] 2d4bac8 - Reland "[clang-tidy] fix bugprone-narrowing-conversions false positive for conditional expression" (#151874)

2025-08-07 Thread via cfe-commits
Author: Andrey Date: 2025-08-08T07:51:36+03:00 New Revision: 2d4bac867552aa361c16db26a01d36f27507994f URL: https://github.com/llvm/llvm-project/commit/2d4bac867552aa361c16db26a01d36f27507994f DIFF: https://github.com/llvm/llvm-project/commit/2d4bac867552aa361c16db26a01d36f27507994f.diff LOG:

[clang-tools-extra] Reland "[clang-tidy] fix bugprone-narrowing-conversions false positive for conditional expression" (PR #151874)

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

[clang] [HIP] compressed bundle format defaults to v3 (PR #152600)

2025-08-07 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Random question, what would compression look like for the offload binaries? > I'm wondering how difficult it would be to switch HIP to using those instead > of the bundles for its binary format. There has been efforts to compress arbitrary ELF sections (https://maskray.me/bl

[clang] [Headers][X86] Enable constexpr handling for pmulhw/pmulhuw intrinsics (PR #152540)

2025-08-07 Thread Phoebe Wang via cfe-commits
@@ -940,18 +940,21 @@ __m128i test_mm_mulhi_epi16(__m128i A, __m128i B) { // CHECK: call <8 x i16> @llvm.x86.sse2.pmulh.w(<8 x i16> %{{.*}}, <8 x i16> %{{.*}}) return _mm_mulhi_epi16(A, B); } +TEST_CONSTEXPR(match_v8hi(_mm_mulhi_epi16((__m128i)(__v8hi){+1, -2, +3, -4, +5,

[clang] [Headers][X86] Enable constexpr handling for pmulhw/pmulhuw intrinsics (PR #152540)

2025-08-07 Thread Phoebe Wang via cfe-commits
@@ -365,12 +365,14 @@ __m64 test_mm_mulhi_pi16(__m64 a, __m64 b) { // CHECK: call <8 x i16> @llvm.x86.sse2.pmulh.w( return _mm_mulhi_pi16(a, b); } +TEST_CONSTEXPR(match_v4hi(_mm_mulhi_pi16((__m64)(__v4hi){+1, -2, +3, -4}, (__m64)(__v4hi){-10, +8, +6, -4}), -1, -1, 0, 0));

[clang] [Headers][X86] Enable constexpr handling for pmulhw/pmulhuw intrinsics (PR #152540)

2025-08-07 Thread Phoebe Wang via cfe-commits
@@ -11653,6 +11659,18 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) { APSInt(LHS.isSigned() ? LHS.ssub_sat(RHS) : LHS.usub_sat(RHS), DestEltTy->isUnsignedIntegerOrEnumerationType(; break; + case clang::X86::BI__bu

[clang] [CIR] Change unreachable to diagnostic for ill-equipped clang (PR #152614)

2025-08-07 Thread Arseniy Zaostrovnykh via cfe-commits
@@ -0,0 +1,12 @@ +// Test that using -emit-cir when clang is not built with CIR support gives a proper error message +// instead of crashing. + +// This test should only run when CIR support is NOT enabled +// REQUIRES: !cir-support necto wrote: Have you conside

[clang] [CIR] Change unreachable to diagnostic for ill-equipped clang (PR #152614)

2025-08-07 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto commented: Looks reasonable to me. I have little experience in the frontend configuration code, so I'll let someone else to chip in. https://github.com/llvm/llvm-project/pull/152614 ___ cfe-commits mailing list cfe-commits@lis

[clang] [CIR] Change unreachable to diagnostic for ill-equipped clang (PR #152614)

2025-08-07 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto edited https://github.com/llvm/llvm-project/pull/152614 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Coverage] Add gap region between binary operator '&& and ||' and RHS (PR #149085)

2025-08-07 Thread via cfe-commits
int-zjt wrote: > In general, LGTM. Do you need assistance with merging this? Yes, please, I have no permission to merge this. https://github.com/llvm/llvm-project/pull/149085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

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

2025-08-07 Thread via cfe-commits
snarkmaster wrote: @NewSigma, thanks! Two things: - I'm moving some code around, but the `await_suspend` path is 100% unchanged. I effectively just added a branch where a bunch of that stuff isn't needed. - I quickly ran my `folly::result` benchmark from the description under clang-17 rather

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-07 Thread via cfe-commits
@@ -371,6 +392,21 @@ void UnnecessaryCopyInitialization::diagnoseCopyFromLocalVar( maybeIssueFixes(Ctx, Diagnostic); } +void UnnecessaryCopyInitialization::diagnoseCopyFromConstVarMember( +const CheckContext &Ctx, const VarDecl &OldVar, const MemberExpr &ME) { + std::s

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

2025-08-07 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] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libcxx @llvm/pr-subscribers-coroutines Author: None (snarkmaster) Changes Start by reading the detailed user-facing docs in `AttrDocs.td`. My immediate motivation was that I noticed that short-circuiting coroutines failed to optimize well. Interact wi

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

2025-08-07 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] [libcxx] Elide suspension points via [[clang::coro_await_suspend_destroy]] (PR #152623)

2025-08-07 Thread via cfe-commits
https://github.com/snarkmaster created https://github.com/llvm/llvm-project/pull/152623 Start by reading the detailed user-facing docs in `AttrDocs.td`. My immediate motivation was that I noticed that short-circuiting coroutines failed to optimize well. Interact with the demo program here: h

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

2025-08-07 Thread via cfe-commits
@@ -50,6 +50,43 @@ class CIR_UnitAttr traits = []> let isOptional = 1; } +//===--===// +// SourceLanguageAttr +//===--===// + +def CIR_Sour

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

2025-08-07 Thread via cfe-commits
@@ -495,6 +498,27 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd, mlir::Operation *op) { assert(!cir::MissingFeatures::setTargetAttributes()); } +cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const { + using ClangStd = clang::LangStandard; + using CI

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

2025-08-07 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/3] [CIR][Dialect] Add SourceLangAttr --- .../include/clang/CIR

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

2025-08-07 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/2] [CIR][Dialect] Add SourceLangAttr --- .../include/clang/CIR

[libclc] 1458eb2 - [NFC][libclc] Delete unused clc/shared/binary_decl_with_scalar_second_arg.inc (#152463)

2025-08-07 Thread via cfe-commits
Author: Wenju He Date: 2025-08-08T08:50:14+08:00 New Revision: 1458eb206fb652358b3ee7e75d95b52f3f4ac333 URL: https://github.com/llvm/llvm-project/commit/1458eb206fb652358b3ee7e75d95b52f3f4ac333 DIFF: https://github.com/llvm/llvm-project/commit/1458eb206fb652358b3ee7e75d95b52f3f4ac333.diff LOG:

[libclc] [NFC][libclc] Delete unused clc/shared/binary_decl_with_scalar_second_arg.inc (PR #152463)

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

[clang] [clang] Fix constant evaluation of member pointer access into sibling class. (PR #150829)

2025-08-07 Thread Timm Baeder via cfe-commits
tbaederr wrote: I fixed the worst offender in github.com/llvm/llvm-project/commit/193995d5a21dc8b923e19d9370aa8e1f374cd940, now `constant-expression-cxx2a.cpp` doesn't run into an infinite loop anymore and `constant-expression-cxx11.cpp` doesn't crash anymore. https://github.com/llvm/llvm-pro

[clang] [clang][Sema] Fix the continue and break scope for while loops (PR #152606)

2025-08-07 Thread Richard Smith via cfe-commits
zygoloid wrote: It looks like GCC changed their behavior in version 9 onwards. In [prior versions](https://godbolt.org/z/85dvbe1rG), a `continue` in the condition or increment of a `for` loop would branch to the continue block of that `for` loop. But, only in C++ (in C it branches to the conti

[clang] [flang] [flang] Adding support of -fcoarray flang and init PRIF (PR #151675)

2025-08-07 Thread Katherine Rasmussen via cfe-commits
https://github.com/ktras commented: @JDPailleux Thanks, this is a great start. I can confirm that by using this branch, I am able to build a Flang that can build a PRIF runtime library ([Caffeine](https://go.lbl.gov/caffeine)) and then link to that library while compiling an executable that ca

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-08-07 Thread via cfe-commits
@@ -2152,29 +2152,44 @@ static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) UnusedAttr(S.Context, AL)); } +static std::optional sharedGetConstructorDestructorAttrExpr(Sema &S, const ParsedAttr &AL) { Sirraide

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-08-07 Thread via cfe-commits
@@ -2152,29 +2152,44 @@ static void handleUnusedAttr(Sema &S, Decl *D, const ParsedAttr &AL) { D->addAttr(::new (S.Context) UnusedAttr(S.Context, AL)); } +static std::optional sharedGetConstructorDestructorAttrExpr(Sema &S, const ParsedAttr &AL) { Sirraide

[clang] [llvm] [Tests] Add system-cygwin feature, and use it. (PR #152611)

2025-08-07 Thread via cfe-commits
jeremyd2019 wrote: Somewhat unrelated, I'm not seeing where the feature `case-insensitive-filesystem` is set. It seems to be true on Cygwin, but Cygwin is not issuing the non-portable path warning on files that differ only in case, so that's probably actually a bug that I need to track down.

[clang] [llvm] [Tests] Add system-cygwin feature, and use it. (PR #152611)

2025-08-07 Thread via cfe-commits
jeremyd2019 wrote: A couple of these tests seemed like they might make more sense as a target rather than system check, but I followed what they were already doing. Also, confusingly, llvm/utils/lit/tests/lit.cfg includes cygwin with `system-windows`: https://github.com/llvm/llvm-project/blo

[clang] [Clang][AST][NFC] Add assertion on Init to CompoundLiteralExpr (PR #152593)

2025-08-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/152593 >From d7c1848b87a9f33d29acd3c526ea19b7ddaa7be7 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 7 Aug 2025 13:31:03 -0700 Subject: [PATCH 1/2] [Clang][AST][NFC] Add assertion on Init to CompoundLiteralE

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-07 Thread Chinmay Deshpande via cfe-commits
https://github.com/chinmaydd edited https://github.com/llvm/llvm-project/pull/152023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Tests] Add system-cygwin feature, and use it. (PR #152611)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jeremyd2019) Changes Several Clang tests were failing on Cygwin, and were already marked as requiring !system-windows, unsupported on system-windows, or xfail on system-windows. Add system-cygwin to lit's llvm.config, and use it in

[clang] [llvm] [Tests] Add system-cygwin feature, and use it. (PR #152611)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-testing-tools @llvm/pr-subscribers-clang-driver Author: None (jeremyd2019) Changes Several Clang tests were failing on Cygwin, and were already marked as requiring !system-windows, unsupported on system-windows, or xfail on system-windows. Add system-

[clang] [llvm] [Tests] Add system-cygwin feature, and use it. (PR #152611)

2025-08-07 Thread via cfe-commits
https://github.com/jeremyd2019 created https://github.com/llvm/llvm-project/pull/152611 Several Clang tests were failing on Cygwin, and were already marked as requiring !system-windows, unsupported on system-windows, or xfail on system-windows. Add system-cygwin to lit's llvm.config, and use

[clang] [clang][Sema] Fix the continue and break scope for while loops (PR #152606)

2025-08-07 Thread via cfe-commits
https://github.com/Sirraide commented: The main thing I’m still not sure about since I noticed that we allow this is whether it’s a bug or a ‘feature’ (I could imagine some horrible macros maybe making use of this but there ought to be better alternatives...), because we also allow this for `f

[clang] [HIP][SPIRV] Implicit `new`/`delete` should be `cdecl` on host (PR #152023)

2025-08-07 Thread Chinmay Deshpande via cfe-commits
https://github.com/chinmaydd approved this pull request. LGTM. Specifically necessary to avoid CC clash on Windows for AMDGCNSPIRV https://github.com/llvm/llvm-project/pull/152023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [PowerPC] Take ABI into account for data layout (PR #149725)

2025-08-07 Thread Jens Reidel via cfe-commits
Gelbpunkt wrote: Ping, is there anything I can do to help this get reviewed? https://github.com/llvm/llvm-project/pull/149725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix the continue and break scope for while loops (PR #152606)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes Make sure we don't push the break and continue scope for a while loop until after we have evaluated the condition. --- Full diff: https://github.com/llvm/llvm-project/pull/152606.diff 3 Files Affected: - (m

[clang] [llvm] [clang][WebAssembly] Support reftypes & varargs in test_function_pointer_signature (PR #150921)

2025-08-07 Thread Derek Schuff via cfe-commits
https://github.com/dschuff closed https://github.com/llvm/llvm-project/pull/150921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix the continue and break scope for while loops (PR #152606)

2025-08-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/152606 Make sure we don't push the break and continue scope for a while loop until after we have evaluated the condition. >From 467f72d8e2e7f3abbd6824433172fddcd24a771e Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date:

[clang] [Clang][Basic] Add `__has_feature` checks for CFI sanitizers (PR #151348)

2025-08-07 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/151348 >From 49149a0334d8882d24cc35a1d8f3f2af72343145 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Wed, 30 Jul 2025 10:50:58 -0400 Subject: [PATCH 1/8] [Clang][Basic] Enable `__has_feature(cfi)` Support `__has_fea

[clang] [Arm64EC][clang] Implement varargs support in clang. (PR #152411)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -1409,6 +1409,12 @@ class WinX86_64ABIInfo : public ABIInfo { return isX86VectorCallAggregateSmallEnough(NumMembers); } + ABIArgInfo classifyArgForArm64ECVarArg(QualType Ty) const override { efriedma-quic wrote: classifyArgForArm64ECVarArg is exclus

[clang] [compiler-rt] [Coverage] Add gap region between binary operator '&& and ||' and RHS (PR #149085)

2025-08-07 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. In general, LGTM. Do you need assistance with merging this? https://github.com/llvm/llvm-project/pull/149085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

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

2025-08-07 Thread Tom Honermann via cfe-commits
@@ -12251,6 +12264,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (NewFD->hasAttr()) SYCL().CheckSYCLEntryPointFunctionDecl(NewFD); + if (NewFD->hasAttr()) +SYCL().CheckSYCLExternalFunctionDecl(NewFD); tahonermann wrote:

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/152596 >From e531e3a37879fd3b5428211a23aa556b97aba99e Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Thu, 7 Aug 2025 13:42:48 -0700 Subject: [PATCH 1/2] [NFC][Clang][Docs] Update Pointer Authentication documentation

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

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

[clang] [HLSL] Add implicit binding attribute to resource arrays (PR #152452)

2025-08-07 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 approved this pull request. https://github.com/llvm/llvm-project/pull/152452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][KCFI] Respect -fsanitize-cfi-icall-generalize-pointers (PR #152400)

2025-08-07 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/152400 >From c66b915c61d854808da54efb5d83e63f175a08cd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Wed, 6 Aug 2025 15:32:18 -0700 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [clang][PAC] Enable the PAC dynamic_cast to final class optimization (PR #152601)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Oliver Hunt (ojhunt) Changes Update the codegen for the the dynamic_cast to a final class optimization when pointer authentication is enabled. --- Full diff: https://github.com/llvm/llvm-project/pull/152601.diff 5 Files Affected

[clang] [clang][PAC] Enable the PAC dynamic_cast to final class optimization (PR #152601)

2025-08-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/152601 Update the codegen for the the dynamic_cast to a final class optimization when pointer authentication is enabled. >From 0603664d1637ea7fc729486dec97c5f3292cddaa Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date:

[clang] [llvm] [clang][WebAssembly] Support reftypes & varargs in test_function_pointer_signature (PR #150921)

2025-08-07 Thread Hood Chatham via cfe-commits
hoodmane wrote: Updated. https://github.com/llvm/llvm-project/pull/150921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] compressed bundle format defaults to v3 (PR #152600)

2025-08-07 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Random question, what would compression look like for the offload binaries? I'm wondering how difficult it would be to switch HIP to using those instead of the bundles for its binary format. https://github.com/llvm/llvm-project/pull/152600

[clang] [HIP] compressed bundle format defaults to v3 (PR #152600)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes HIP runtime support for compressed bundle format v3 is in place, therefore switch the default compressed bundle format to v3 in compiler. This allows both compressed and decompressed fat binary size to e

[clang] [clang] Followup for constexpr-unknown potential constant expressions. (PR #151053)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -563,8 +563,11 @@ bool Pointer::hasSameBase(const Pointer &A, const Pointer &B) { if (A.isTypeidPointer() && B.isTypeidPointer()) return true; - if (A.isIntegralPointer() || B.isIntegralPointer()) + if (A.isIntegralPointer() || B.isIntegralPointer()) { +if (A.i

[clang] [HIP] compressed bundle format defaults to v3 (PR #152600)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes HIP runtime support for compressed bundle format v3 is in place, therefore switch the default compressed bundle format to v3 in compiler. This allows both compressed and decompressed fat binary si

[clang] [HIP] compressed bundle format defaults to v3 (PR #152600)

2025-08-07 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/152600 HIP runtime support for compressed bundle format v3 is in place, therefore switch the default compressed bundle format to v3 in compiler. This allows both compressed and decompressed fat binary size to exceed

[clang] [CIR][NFC] Fix typo in ComplexRangeKind comment (PR #152535)

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

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Oliver Hunt via cfe-commits
@@ -163,14 +163,20 @@ a cryptographic signature, other implementations may be possible. See data is simply a pepper added to the hash, not an encryption key, and so can be initialized using random data. + *** FIXME *** fpac? ojhunt wrote: yup, I wou

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl commented: Looks great to me! Couple of minor things. Tagging @atrosinenko @kbeyls @smithp35 for visibility https://github.com/llvm/llvm-project/pull/152596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Anton Korobeynikov via cfe-commits
@@ -500,7 +708,884 @@ type. Implementations are not required to make all bits of the result equally significant; in particular, some implementations are known to not leave meaningful data in the low bits. +Standard ``__ptrauth`` qualifiers +^

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Anton Korobeynikov via cfe-commits
@@ -163,14 +163,20 @@ a cryptographic signature, other implementations may be possible. See data is simply a pepper added to the hash, not an encryption key, and so can be initialized using random data. + *** FIXME *** fpac? asl wrote: Looks like it

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl edited https://github.com/llvm/llvm-project/pull/152596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Followup for constexpr-unknown potential constant expressions. (PR #151053)

2025-08-07 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic updated https://github.com/llvm/llvm-project/pull/151053 >From 43e441c0559294f0e4d85cf67bea480140b2e9d1 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 28 Jul 2025 15:47:33 -0700 Subject: [PATCH 1/2] [clang] Followup for constexpr-unknown potential consta

[clang] [HLSL] Add implicit binding attribute to resource arrays (PR #152452)

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

[clang] [HLSL] Add implicit binding attribute to resource arrays (PR #152452)

2025-08-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/152452 >From 10a06e36e875cbc0259d0d95700e5c4ec9721f1a Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 7 Aug 2025 00:03:37 -0700 Subject: [PATCH 1/5] [HLSL] Add `isHLSLResourceRecordArray` method to `clang::Type`

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

2025-08-07 Thread Tom Honermann via cfe-commits
@@ -12251,6 +12264,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (NewFD->hasAttr()) SYCL().CheckSYCLEntryPointFunctionDecl(NewFD); + if (NewFD->hasAttr()) +SYCL().CheckSYCLExternalFunctionDecl(NewFD); tahonermann wrote:

[clang] [Clang][Basic] Add `__has_feature` checks for CFI sanitizers (PR #151348)

2025-08-07 Thread Florian Mayer via cfe-commits
fmayer wrote: > Added a REQUIRES: target={{x86_64.*-linux.*}} in my last commit to fix the > test failure on windows (-fsanitize=cfi-mfcall is not supported on windows) . Since this PR is only adding a preprocessor feature and not something platform specific, I think it's fine to only test on x

[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

2025-08-07 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/150790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InferAlignment] Propagate alignment between loads/stores of the same base pointer (PR #145733)

2025-08-07 Thread Drew Kersnar via cfe-commits
dakersnar wrote: I'll merge tomorrow morning, unless other reviewers have any hesitations. https://github.com/llvm/llvm-project/pull/145733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [Clang][Basic] Add `__has_feature` checks for CFI sanitizers (PR #151348)

2025-08-07 Thread via cfe-commits
https://github.com/moorabbit updated https://github.com/llvm/llvm-project/pull/151348 >From 49149a0334d8882d24cc35a1d8f3f2af72343145 Mon Sep 17 00:00:00 2001 From: moorabbit Date: Wed, 30 Jul 2025 10:50:58 -0400 Subject: [PATCH 1/8] [Clang][Basic] Enable `__has_feature(cfi)` Support `__has_fea

[clang] [clang-tools-extra] [Clang] Add a builtin that deduplicate types into a pack (PR #106730)

2025-08-07 Thread Shafik Yaghmour via cfe-commits
@@ -20,4 +22,10 @@ void expr() { static_assert(__is_same(TypePackElement<0, X<0>, X<1>>, X<0>), ""); static_assert(__is_same(TypePackElement<1, X<0>, X<1>>, X<1>), ""); #endif + +#ifdef DEDUP + static_assert(__is_same(TypePackDedup, TypeList<>), ""); + static_assert(__is_

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-08-07 Thread via cfe-commits
@@ -6324,10 +6324,20 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, SetLLVMFunctionAttributesForDefinition(D, Fn); + auto getPriority = [this](auto *Attr) -> int { +int priority = Attr->DefaultPriority; +Expr *E = Attr->getPriority(); +if (

[clang] [Clang][AST][NFC] Add assertion on Init to CompoundLiteralExpr (PR #152593)

2025-08-07 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 h -- clang/include/clang/AST/Expr.h `` View the

[clang] [llvm] [clang][WebAssembly] Support reftypes & varargs in test_function_pointer_signature (PR #150921)

2025-08-07 Thread Hood Chatham via cfe-commits
hoodmane wrote: Thanks @dschuff! https://github.com/llvm/llvm-project/pull/150921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer][NFCi] Pass if bind is to a Decl or not to checkBind (PR #152137)

2025-08-07 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= , Endre =?utf-8?q?F=C3=BCl=C3=B6p?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. https://github.com/llvm/llvm-project/pull/152137 ___ cfe-commi

[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

2025-08-07 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Still waiting for an answer: > The reason I'm suspicious of the getDeclareMapperVarRef check is that > SemaOpenMP::ActOnOMPIteratorExpr creates the variable (VarDecl::Create) > regardless. So what's supposed to happen for variables where > getDeclareMapperVarRef is false?

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -6324,10 +6324,20 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, SetLLVMFunctionAttributesForDefinition(D, Fn); + auto getPriority = [this](auto *Attr) -> int { +int priority = Attr->DefaultPriority; +Expr *E = Attr->getPriority(); +if (

[clang] 7a16a1d - [HLSL] Add `isHLSLResourceRecordArray` method to `clang::Type` (#152450)

2025-08-07 Thread via cfe-commits
Author: Helena Kotas Date: 2025-08-07T13:38:24-07:00 New Revision: 7a16a1ddb2eaa8c31cd648b0567897f551f8f6c6 URL: https://github.com/llvm/llvm-project/commit/7a16a1ddb2eaa8c31cd648b0567897f551f8f6c6 DIFF: https://github.com/llvm/llvm-project/commit/7a16a1ddb2eaa8c31cd648b0567897f551f8f6c6.diff

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes This updates the pointer authentication documentation to include a complete description of the existing functionaliy and behaviour, details of the more complex aspects of the semantics and security properties,

[clang] [NFC][Clang][Docs] Update Pointer Authentication documentation (PR #152596)

2025-08-07 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/152596 This updates the pointer authentication documentation to include a complete description of the existing functionaliy and behaviour, details of the more complex aspects of the semantics and security properties, a

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

2025-08-07 Thread Tom Honermann via cfe-commits
@@ -4084,6 +4084,19 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, NamedDecl *&OldD, Scope *S, diag::note_carries_dependency_missing_first_decl) << 0/*Function*/; } +// SYCL 2020 section 5.10.1, "SYCL functions and member functions linkage": +// W

[clang] [Clang][AST][NFC] Add assertion on Init to CompoundLiteralExpr (PR #152593)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis complained that: child_range(&Init, &Init+1); in the children member function was potentially out of bounds. This is false b/c it is forming an iterator range but it would be invalid if

[clang] [HLSL] Add `isHLSLResourceRecordArray` method to `clang::Type` (PR #152450)

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

[clang] [Clang][AST][NFC] Add assertion on Init to CompoundLiteralExpr (PR #152593)

2025-08-07 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/152593 Static analysis complained that: child_range(&Init, &Init+1); in the children member function was potentially out of bounds. This is false b/c it is forming an iterator range but it would be invalid if Init w

[clang] [Clang] Add template argument support for {con,de}structor attributes. (PR #151400)

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

[clang-tools-extra] [clang-tidy] support query based custom check (PR #131804)

2025-08-07 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I'll find some time for this check on the weekend https://github.com/llvm/llvm-project/pull/131804 ___ 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-07 Thread via cfe-commits
@@ -0,0 +1,73 @@ +// RUN: %clang_cc1 -fsycl-is-device -triple spir64-unknown-unknown -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s + +// This test code generation when sycl_external attribute is used + +// Function defined and not used - symbols emitted +[[clang::sycl_ex

[clang] [Clang][CodeGen] Preserve alignment information for pointer arithmetics (PR #152575)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -4184,29 +4184,14 @@ Value *ScalarExprEmitter::EmitOverflowCheckedBinOp(const BinOpInfo &Ops) { } /// Emit pointer + index arithmetic. -static Value *emitPointerArithmetic(CodeGenFunction &CGF, -const BinOpInfo &op, -

[clang] [Clang][CodeGen] Preserve alignment information for pointer arithmetics (PR #152575)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -1381,6 +1432,13 @@ static Address EmitPointerWithAlignment(const Expr *E, LValueBaseInfo *BaseInfo, if (CE->getCastKind() == CK_AddressSpaceConversion) Addr = CGF.Builder.CreateAddrSpaceCast( Addr, CGF.ConvertType(E->getType()), ElemTy); +

[clang] [Clang][CodeGen] Preserve alignment information for pointer arithmetics (PR #152575)

2025-08-07 Thread Eli Friedman via cfe-commits
@@ -4309,16 +4292,39 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, // future proof. llvm::Type *elemTy; if (elementType->isVoidType() || elementType->isFunctionType()) -elemTy = CGF.Int8Ty; +elemTy = Int8Ty; else -elemTy = CGF.ConvertTypeFor

[clang] [clang][bytecode] Add AccessFlags to Block (PR #152590)

2025-08-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This way, we can check a single uint8_t for != 0 to know whether this block is accessible or not. If not, we still need to figure out why not and diagnose appropriately of course. --- Patch is 20.19 KiB, t

[clang] [clang][bytecode] Add AccessFlags to Block (PR #152590)

2025-08-07 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/152590 This way, we can check a single uint8_t for != 0 to know whether this block is accessible or not. If not, we still need to figure out why not and diagnose appropriately of course. >From 32a22524266e28a6eea5a8

  1   2   3   4   5   >