[clang] 366dadd - [Serialization] Update DECL_LAST

2025-02-24 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-02-25T13:30:30+08:00 New Revision: 366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9 URL: https://github.com/llvm/llvm-project/commit/366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9 DIFF: https://github.com/llvm/llvm-project/commit/366daddfad9aa38ebb7d40055cf65f4ecb7dd6f9.diff LO

[clang] [clang-format] Allow breaking before kw___attribute (PR #128623)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #74784 --- Full diff: https://github.com/llvm/llvm-project/pull/128623.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+2-3) - (modified) clang/unittests/Format/FormatTest

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-24 Thread Hank Chang via cfe-commits
https://github.com/HankChang736 created https://github.com/llvm/llvm-project/pull/128636 This patch use the hook getClobbers() in RISCV target and mark {vl, type} as clobber to prevent Post-RA scheduler moving vsetvl across inline assembly. Fixing [#97794](https://github.com/llvm/llvm-project/

[clang] [flang] [flang][OpenMP] Upstream `do concurrent` loop-nest detection. (PR #127595)

2025-02-24 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @kiranchandramohan @clementval thanks for your comments (and sorry for the late response, I was off yesterday). Sure, we can works on a multi-range loop op in FIR, our team did not write the current loop op definition so I was working with what I have. Just to be on the same pag

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-24 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] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-24 Thread Farzon Lotfi via cfe-commits
farzonl wrote: The SPIRV test case isn't sufficent. Two reasons. 1. Since you are not using `__builtin_addc ` Your codegen path for `uadd.with.overflow` is custom to HLSL. Your emitter is in `EmitHLSLBuiltinExpr`. 2. `llvm/test/CodeGen/SPIRV/llvm-intrinsics/uadd.with.overflow.ll` only tests `

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-02-24 Thread Thurston Dang via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: Hank Chang (HankChang736) Changes This patch use the hook getClobbers() in RISCV target and mark {vl, type} as clobber to prevent Post-RA scheduler moving vsetvl across inline assembly. Fixing [#97794](https://github.com/llvm/llv

[clang] [Sema] Add code completion for if constexpr and consteval (PR #124315)

2025-02-24 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From ad4784ab47b65e478f669c6ef4b30008c76c5f0b Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 1/9] [Sema] Add code completion for if constexpr C++17 supports `i

[clang] [clang][AMDGPU] Enable module splitting by default (PR #128509)

2025-02-24 Thread Pierre van Houtryve via cfe-commits
https://github.com/Pierre-vh updated https://github.com/llvm/llvm-project/pull/128509 >From cae772441c0d87a017f5cc2cb0b9c970c6b7fcde Mon Sep 17 00:00:00 2001 From: pvanhout Date: Mon, 24 Feb 2025 14:21:49 +0100 Subject: [PATCH 1/2] [clang][AMDGPU] Enable module splitting by default The default

[clang] [analyzer] Partial revert of #127017 (PR #128642)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes This assertion was hit, as reported by a user. https://github.com/llvm/llvm-project/issues/128427#issuecomment-2677724438 Ideally, we would reduce and add a regression test for this, but I

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-02-24 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 b335d5a8303250cb49901ecae7570adf61abbd3c a4cd301d6176a8ee3441d0c74f6d2c4e32a50cdd --e

[clang] [analyzer] Partial revert of #127017 (PR #128642)

2025-02-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/128642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-24 Thread Hank Chang via cfe-commits
HankChang736 wrote: > I think this may not be the right way. > > 1. We should at least add vl/vtype to clobbered registers when V is > specified. > > 2. The asm may not depend on vl/type, but adding vl/type dependencies > unconditionally stop further scheduling. Yes, you're right. Bu

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Add a new WebKit checker for member variables and instance variables of NS and CF types. A member variable or instance variable to a CF type should be RetainPtr reg

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ppc64-aix` running on `aix-ppc64` while building `clang` at step 3 "clean-build-dir". Full details are available at: https://lab.llvm.org/buildbot/#/builders/64/builds/2347 Here is the relevant piece of the build log f

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128641 >From a4cd301d6176a8ee3441d0c74f6d2c4e32a50cdd Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 23:01:31 -0800 Subject: [PATCH 1/2] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit chec

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-02-24 Thread via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/121577 >From 5551c179d4b1ed0f41885fc96fa4844c9b0435b5 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Fri, 3 Jan 2025 23:00:14 +0800 Subject: [PATCH 1/6] fix gnu::init_priority behavior --- clang/include/cla

[clang] [clang] Fix `gnu::init_priority` attribute handling for reserved values (PR #121577)

2025-02-24 Thread via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/121577 >From 5551c179d4b1ed0f41885fc96fa4844c9b0435b5 Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Fri, 3 Jan 2025 23:00:14 +0800 Subject: [PATCH 1/6] fix gnu::init_priority behavior --- clang/include/cla

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/128651 Add a new WebKit checker for checking that lambda captures of CF types use RetainPtr either when ARC is disabled or enabled, and those of NS types use RetainPtr when ARC is disabled. >From dc53e0602fcec63bdd1bc8

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Add a new WebKit checker for checking that lambda captures of CF types use RetainPtr either when ARC is disabled or enabled, and those of NS types use RetainPtr whe

[clang] [WebAssembly] Generate invokes with llvm.wasm.(re)throw (PR #128105)

2025-02-24 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -target-feature +reference-types -target-feature +exception-handling -target-feature +multivalue -exception-model=wasm -emit-llvm -o - %s | FileCheck %s + +// Check if __builtin_wa

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128651 >From dc53e0602fcec63bdd1bc84325ecc16a3f3e293b Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 23:39:13 -0800 Subject: [PATCH 1/2] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit ch

[clang] [WebAssembly] Generate invokes with llvm.wasm.(re)throw (PR #128105)

2025-02-24 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -target-feature +reference-types -target-feature +exception-handling -target-feature +multivalue -exception-model=wasm -emit-llvm -o - %s | FileCheck %s + +// Check if __builtin_wa

[clang] [llvm] [alpha.webkit.UnretainedLambdaCapturesChecker] Add a WebKit checker for lambda capturing NS or CF types. (PR #128651)

2025-02-24 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 b335d5a8303250cb49901ecae7570adf61abbd3c dc53e0602fcec63bdd1bc84325ecc16a3f3e293b --e

[clang] [clang-format] Allow breaking before kw___attribute (PR #128623)

2025-02-24 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/128623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow breaking before kw___attribute (PR #128623)

2025-02-24 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/128623 Fixes 74784 >From aca2c4f54baaf05831d151c6fa3f20a6cc28a514 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 24 Feb 2025 20:09:22 -0800 Subject: [PATCH] [clang-format] Allow breaking before kw___attribute Fixe

[clang] [HLSL] Implement default constant buffer $Globals (2nd attempt) (PR #128589)

2025-02-24 Thread Helena Kotas via cfe-commits
@@ -5769,11 +5776,11 @@ void HLSLBufferDecl::addLayoutStruct(CXXRecordDecl *LS) { addDecl(LS); } -void HLSLBufferDecl::addDefaultBufferDecl(Decl *D) { +void HLSLBufferDecl::setDefaultBufferDecls(ArrayRef Decls) { hekota wrote: Good idea! https://github.co

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-24 Thread via cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index, StringRef Name) { Summary->setLive(true); } +// Return true if the User U is reachable from a non-vtable user +// through the use-def chain. +static bool hasNonVTableUsers(const User *U, CXXABI *ABI

[clang] f58fde5 - Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (#128267)

2025-02-24 Thread via cfe-commits
Author: Hiroshi Yamauchi Date: 2025-02-24T22:52:15-08:00 New Revision: f58fde585775a7c25dc673076db914f8d1866081 URL: https://github.com/llvm/llvm-project/commit/f58fde585775a7c25dc673076db914f8d1866081 DIFF: https://github.com/llvm/llvm-project/commit/f58fde585775a7c25dc673076db914f8d1866081.di

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-24 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi closed https://github.com/llvm/llvm-project/pull/128267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ThinLTO] Support dead RTTI data elimination under -fno-split-lto-unit (PR #126336)

2025-02-24 Thread via cfe-commits
@@ -50,6 +51,41 @@ findCallsAtConstantOffset(SmallVectorImpl &DevirtCalls, } } +static bool hasTypeIdLoadAtConstantOffset(const Module *M, Value *VPtr, + int64_t Offset, const CallInst *CI, +

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-02-24 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 created https://github.com/llvm/llvm-project/pull/128640 This PR replaces the `default` clause with the `otherwise` clause for the `metadirective` in OpenMP. The `otherwise` clause serves as a fallback condition when no directive from the when clauses is selected.

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Urvi Rav (ravurvi20) Changes This PR replaces the `default` clause with the `otherwise` clause for the `metadirective` in OpenMP. The `otherwise` clause serves as a fallback condition when no directive from the when clauses is selected. I

[clang] [alpha.webkit.NoUnretainedMemberChecker] Add a new WebKit checker for unretained member variables and ivars. (PR #128641)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/128641 Add a new WebKit checker for member variables and instance variables of NS and CF types. A member variable or instance variable to a CF type should be RetainPtr regardless of whether ARC is enabled or disabled, a

[clang] Revert partially #127017 (PR #128642)

2025-02-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/128642 This assertion was hit, as reported by a user. https://github.com/llvm/llvm-project/issues/128427#issuecomment-2677724438 Ideally, we would reduce and add a regression test for this, but I don't have the bandw

[clang] [clang][NFC] Avoid potential null dereferences (PR #127017)

2025-02-24 Thread Balazs Benics via cfe-commits
steakhal wrote: > @schittir Could you please revert the Static Analyzer part? It seems a user > tripped on it at #128427 The revert is proposed at https://github.com/llvm/llvm-project/pull/128642 https://github.com/llvm/llvm-project/pull/127017 ___ c

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-24 Thread Akira Hatanaka via cfe-commits
@@ -980,6 +980,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/127896 >From 362b64d31e5f70e4a26ea04c99a58fd5f5ca50ca Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 14 Feb 2025 12:59:56 -0800 Subject: [PATCH 1/4] Allow arrays to be returned by value in HLSL + test --- clang/

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-24 Thread Malavika Samak via cfe-commits
@@ -245,3 +243,40 @@ struct AggregateViaDefaultInit { void testAggregateViaDefaultInit() { AggregateViaDefaultInit A; }; + +struct A { + int arr[2]; + + [[clang::unsafe_buffer_usage]] + int *ptr; +}; + +namespace std{ + template class span { + + T *elements; + + pu

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-24 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think if we're trying to automatically identify whether an alloca has one of two lifetimes, and one of those lifetimes isn't a subset of the other, we're guaranteed to run into trouble again, eventually. We have to pick the right lifetime 100% of the time... but without

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for offloading triples (PR #126956)

2025-02-24 Thread Nick Sarnie via cfe-commits
@@ -1109,6 +1109,11 @@ class Triple { Env == llvm::Triple::EABIHF; } + /// Tests if the target represents a device which can be offloaded to. + bool isOffloadingTarget() const { +return isAMDGPU() || isNVPTX() || isSPIRV(); + } sarnex wrote

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-02-24 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 b335d5a8303250cb49901ecae7570adf61abbd3c 90403f77295c0b3e4415263754e22b3c66f31876 --e

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR adds alpha.webkit.UnretainedCallArgsChecker by generalizing RawPtrRefLocalVarsChecker. It checks call arguments of NS or CF types are backed by a RetainPtr or not. The new checker is

[clang] [libc] [lld] [llvm] Ugly example of building libc to spirv (PR #128585)

2025-02-24 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 72791fef6d6c84b72cb961b288b25283bea97310 874f408032cdb12188810a06c9b68d90c35deecb --e

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/128586 This PR adds alpha.webkit.UnretainedCallArgsChecker by generalizing RawPtrRefLocalVarsChecker. It checks call arguments of NS or CF types are backed by a RetainPtr or not. The new checker is effective for NS and

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes This PR adds alpha.webkit.UnretainedCallArgsChecker by generalizing RawPtrRefLocalVarsChecker. It checks call arguments of NS or CF types are backed by a RetainPtr or not. The new checker is effective for NS a

[clang] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS or CF type call arguments. (PR #128586)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/128586 >From 90403f77295c0b3e4415263754e22b3c66f31876 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 24 Feb 2025 13:43:04 -0800 Subject: [PATCH 1/2] [alpha.webkit.UnretainedCallArgsChecker] Add a checker for NS

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread via cfe-commits
@@ -0,0 +1,272 @@ +// RUN: %clang_cc1 -std=c++2c -verify %s + +class Trivial {}; +struct NonRelocatable { +~NonRelocatable(); +}; +static NonRelocatable NonRelocatable_g; + +class A trivially_relocatable_if_eligible {}; +class B trivially_relocatable_if_eligible : Trivial{}; +

[clang] [libc] [lld] [llvm] Ugly example of building libc to spirv (PR #128585)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-offload @llvm/pr-subscribers-lld-elf Author: Jon Chesterfield (JonChesterfield) Changes Hopefully we can do better before landing. Posting for discussion. Didn't learn a huge amount. spirv rejects the clang::amdgpu_kernel annotation and I can't work ou

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-24 Thread Michael Spencer via cfe-commits
@@ -149,11 +149,16 @@ std::vector HeaderSearch::collectVFSUsageAndClear() const { llvm::vfs::FileSystem &RootFS = FileMgr.getVirtualFileSystem(); // TODO: This only works if the `RedirectingFileSystem`s were all created by - // `createVFSFromOverlayFiles`. + //

[clang] Exclude RedirectingFileSystem with null OverlayFileDir in VFSUsage (PR #128267)

2025-02-24 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese edited https://github.com/llvm/llvm-project/pull/128267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-24 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/125671 >From 821a4b46705375bb34e207d406d8d7e9a2818f85 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 31 Jan 2025 13:19:46 +0530 Subject: [PATCH 1/3] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-02-24 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 29b82de7c0ac1cd008a5ddc79c42f5cd492694a7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 1/2] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang] [clang] Implement __attribute__((format_matches)) (PR #116708)

2025-02-24 Thread Shafik Yaghmour via cfe-commits
=?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier , =?utf-8?q?Félix?= Cloutier Message-ID

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/3] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Thanks for the update @dkolsen-pgi, reviewing the incubator change today https://github.com/llvm/llvm-project/pull/128089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-24 Thread Tom Stellard via cfe-commits
https://github.com/tstellar ready_for_review https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-24 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/128554 This will make the binaries more portable. >From cd4c3fba2c4edb69797ba16cd6faf1440d5f7e13 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 24 Feb 2025 19:13:54 + Subject: [PATCH] [CMake][Release] Sta

[clang] [clang] Improve module out of date error message (PR #128103)

2025-02-24 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/128103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes This will make the binaries more portable. --- Full diff: https://github.com/llvm/llvm-project/pull/128554.diff 1 Files Affected: - (modified) clang/cmake/caches/Release.cmake (+1-3) ``diff dif

[clang] [CMake][Release] Statically link ZSTD on all OSes (PR #128554)

2025-02-24 Thread Keith Smiley via cfe-commits
https://github.com/keith approved this pull request. https://github.com/llvm/llvm-project/pull/128554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Initial implementation of lowering CIR to MLIR (PR #127835)

2025-02-24 Thread Ronan Keryell via cfe-commits
https://github.com/keryell approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/127835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Coroutines] Mark parameter allocas with coro.outside.frame metadata (PR #127653)

2025-02-24 Thread Reid Kleckner via cfe-commits
rnk wrote: Re: sroa/mem2reg, that's a valid concern with Hans's intrinsic approach. > So it's not really a question of "improving" the existing algorithm; we need > markers in the IR, like coro_outside_frame, and the algorithm should be based > on that. To check my understanding, by explicit

[clang] [clang-tools-extra] [clang][NFC] Remove CXXRecordDecl::lookupDependentName() and its helpers (PR #128392)

2025-02-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/128392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cec3507 - [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (#127554)

2025-02-24 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-02-24T12:14:14-08:00 New Revision: cec35077025da73bd2d8bf78d5bb62c43f3ccd0a URL: https://github.com/llvm/llvm-project/commit/cec35077025da73bd2d8bf78d5bb62c43f3ccd0a DIFF: https://github.com/llvm/llvm-project/commit/cec35077025da73bd2d8bf78d5bb62c43f3ccd0a.diff

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
@@ -332,6 +345,14 @@ class UncheckedCallArgsChecker final : public RawPtrRefCallArgsChecker { return isUncheckedPtr(QT); } + bool isSafePtr(const CXXRecordDecl *Record) const final { +return isRefCounted(Record) || isCheckedPtr(Record); + } + + bool isSafePtrType

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-24 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/127554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UnretainedLocalVarsChecker] Add a checker for local variables to NS and CF types. (PR #127554)

2025-02-24 Thread Rashmi Mudduluru via cfe-commits
@@ -332,6 +345,14 @@ class UncheckedCallArgsChecker final : public RawPtrRefCallArgsChecker { return isUncheckedPtr(QT); } + bool isSafePtr(const CXXRecordDecl *Record) const final { +return isRefCounted(Record) || isCheckedPtr(Record); + } + + bool isSafePtrType

[clang] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory` linker flag (PR #127939)

2025-02-24 Thread Derek Schuff via cfe-commits
https://github.com/dschuff approved this pull request. https://github.com/llvm/llvm-project/pull/127939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][WebAssembly] Always have `-pthread` imply `--shared-memory` linker flag (PR #127939)

2025-02-24 Thread Sam Clegg via cfe-commits
https://github.com/sbc100 closed https://github.com/llvm/llvm-project/pull/127939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-02-24 Thread Akira Hatanaka via cfe-commits
@@ -5708,6 +5732,27 @@ CGCallee CodeGenFunction::EmitCallee(const Expr *E) { return EmitCallee(ICE->getSubExpr()); } +// Try to remember the original __ptrauth qualifier for loads of +// function pointers. +if (ICE->getCastKind() == CK_LValueToRValue) { +

[clang] 1e85e5a - [clang][WebAssembly] Always have `-pthread` imply `--shared-memory` linker flag (#127939)

2025-02-24 Thread via cfe-commits
Author: Sam Clegg Date: 2025-02-24T13:09:20-08:00 New Revision: 1e85e5abb32731cfe0d5d97d6dc211dbc1e3 URL: https://github.com/llvm/llvm-project/commit/1e85e5abb32731cfe0d5d97d6dc211dbc1e3 DIFF: https://github.com/llvm/llvm-project/commit/1e85e5abb32731cfe0d5d97d6dc211dbc1e3.diff LOG

[clang] [spirv][amdgpu] Set atomic size in the clang target info (PR #128569)

2025-02-24 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx approved this pull request. LGTM, thanks. FWIW we've only done HIP bring-up, so there will probably be a few of these lingering. https://github.com/llvm/llvm-project/pull/128569 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Or maybe it makes more sense to set the working directory to SYSROOT, or to the input header's path? https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [analyzer] Clean up slightly the messed up ownership model of the analyzer (PR #128368)

2025-02-24 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-ubuntu-fast` running on `sie-linux-worker` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/144/builds/18717 Here is the re

[clang] ab9cd53 - [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (#112284)

2025-02-24 Thread via cfe-commits
Author: Malavika Samak Date: 2025-02-25T00:31:52+05:30 New Revision: ab9cd53b86e84cc2db47d312232de4789c15adc4 URL: https://github.com/llvm/llvm-project/commit/ab9cd53b86e84cc2db47d312232de4789c15adc4 DIFF: https://github.com/llvm/llvm-project/commit/ab9cd53b86e84cc2db47d312232de4789c15adc4.diff

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2025-02-24 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak closed https://github.com/llvm/llvm-project/pull/112284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -273,29 +273,36 @@ def CIR_PointerType : CIR_Type<"Pointer", "ptr", def CIR_FuncType : CIR_Type<"Func", "func"> { let summary = "CIR function type"; let description = [{ -The `!cir.func` is a function type. It consists of a single return type, a -list of paramete

[clang] 607a1f2 - [CIR] Add cir-opt tool to exercise CIR dialect parsing (#128254)

2025-02-24 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-02-24T11:22:58-08:00 New Revision: 607a1f2ace77fffb67a1f62df5ac6caa1c568f51 URL: https://github.com/llvm/llvm-project/commit/607a1f2ace77fffb67a1f62df5ac6caa1c568f51 DIFF: https://github.com/llvm/llvm-project/commit/607a1f2ace77fffb67a1f62df5ac6caa1c568f51.diff L

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be5c66d - [clang] Improve module out of date error message (#128103)

2025-02-24 Thread via cfe-commits
Author: Michael Spencer Date: 2025-02-24T11:18:21-08:00 New Revision: be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b URL: https://github.com/llvm/llvm-project/commit/be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b DIFF: https://github.com/llvm/llvm-project/commit/be5c66d97d7977bd9fa31b1a0e78196ecbb6e52b.dif

[clang] [Clang] Handle instantiating captures in addInstantiatedCapturesToScope() (PR #128478)

2025-02-24 Thread via cfe-commits
@@ -711,9 +711,32 @@ bool Sema::addInstantiatedCapturesToScope( unsigned Instantiated = 0; + // FIXME: This is a workaround for not having deferred lambda body + // instantiation. + // When transforming a lambda's body, if we encounter another call to an + // inline lam

[clang] [Clang] Handle instantiating captures in addInstantiatedCapturesToScope() (PR #128478)

2025-02-24 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/128478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle instantiating captures in addInstantiatedCapturesToScope() (PR #128478)

2025-02-24 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. No changelog because presumably you want to backport? https://github.com/llvm/llvm-project/pull/128478 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang] Handle instantiating captures in addInstantiatedCapturesToScope() (PR #128478)

2025-02-24 Thread via cfe-commits
@@ -711,9 +711,32 @@ bool Sema::addInstantiatedCapturesToScope( unsigned Instantiated = 0; + // FIXME: This is a workaround for not having deferred lambda body + // instantiation. + // When transforming a lambda's body, if we encounter another call to an + // inline lam

[clang] [Clang][NFC] Add test for CWG2285 "Issues with structured bindings" (PR #126421)

2025-02-24 Thread via cfe-commits
@@ -136,7 +136,7 @@ namespace MultiDeclarator { namespace Template { int n[3]; - // FIXME: There's no actual rule against this... + // Structured binding template is not allowed. template auto [a, b, c] = n; // expected-error {{decomposition declaration template not su

[clang] [WebAssembly] Generate invokes with llvm.wasm.(re)throw (PR #128105)

2025-02-24 Thread Derek Schuff via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -target-feature +reference-types -target-feature +exception-handling -target-feature +multivalue -exception-model=wasm -emit-llvm -o - %s | FileCheck %s + +// Check if __builtin_wa

[clang] [spirv][amdgpu] Set atomic size in the clang target info (PR #128569)

2025-02-24 Thread Jon Chesterfield via cfe-commits
https://github.com/JonChesterfield created https://github.com/llvm/llvm-project/pull/128569 Problem identified by Joseph. The openmp device runtime uses __scoped_atomic_load_n and similar which presently hit ``` error: large atomic operation may incur significant performance penalty; th

[clang] [Sema] Add code completion for if constexpr and consteval (PR #124315)

2025-02-24 Thread via cfe-commits
@@ -0,0 +1,6 @@ +void test() { + if c cor3ntin wrote: can you add a test for `if !` ? https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] [Clang][analyzer] replace Stmt* with ConstCFGElementRef in SymbolConjured (PR #128251)

2025-02-24 Thread Fangyi Zhou via cfe-commits
@@ -494,7 +494,7 @@ void IteratorModeling::handleComparison(CheckerContext &C, const Expr *CE, auto &SymMgr = C.getSymbolManager(); auto *LCtx = C.getLocationContext(); RetVal = nonloc::SymbolVal(SymMgr.conjureSymbol( -CE, LCtx, C.getASTContext().BoolTy, C.

[clang] [clang] Add alternative email for steakhal (PR #128558)

2025-02-24 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/128558 Both steakhal and balazs-benics-sonarsource accounts are mine. See #125859 >From 793b26139928a8578aeda10a811b7d2cc396ce67 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 24 Feb 2025 20:28:38 +0100 Subj

[clang] [clang] Add alternative email for steakhal (PR #128558)

2025-02-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes Both steakhal and balazs-benics-sonarsource accounts are mine. See #125859 --- Full diff: https://github.com/llvm/llvm-project/pull/128558.diff 1 Files Affected: - (modified) clang/Maintainers.rst (+1)

[clang] [Clang][CodeGen] Bail out on constexpr unknown values in ConstantEmitter (PR #127525)

2025-02-24 Thread via cfe-commits
cor3ntin wrote: How do people feel about landing and backporting this as a stop-gap solution for clang 20 while we investigate whether a cleaner design can be found in trunk? https://github.com/llvm/llvm-project/pull/127525 ___ cfe-commits mailing li

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Sarah Spall via cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/127896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow direct dispatch for the ObjFW runtime (PR #126382)

2025-02-24 Thread Jonathan Schleifer via cfe-commits
Midar wrote: @rjmccall @davidchisnall @ahatanak Could any of you have a look, please? I'd think this is rather straightforward. https://github.com/llvm/llvm-project/pull/126382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] Treat constexpr-unknown value as invalid in `evaluateValue` (PR #128409)

2025-02-24 Thread Eli Friedman via cfe-commits
@@ -2587,6 +2587,9 @@ APValue *VarDecl::evaluateValueImpl(SmallVectorImpl &Notes, !Notes.empty()) Result = false; + if (Eval->Evaluated.allowConstexprUnknown()) +Result = false; efriedma-quic wrote: I think this check should be inside `Evaluat

  1   2   3   4   >