[clang] [Clang] [Driver] use __cxa_atexit by default on Cygwin. (PR #135701)

2025-04-14 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/135701 >From 7ee517d33bf488749a624fb9d02ce6dcdccb089b Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Mon, 14 Apr 2025 14:43:42 -0700 Subject: [PATCH] [Clang] [Driver] use __cxa_atexit by default on Cygwin. GCC

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Farzon Lotfi via cfe-commits
@@ -2,7 +2,6 @@ // RUN: not %clang_cc1 %s -o - -S -triple=amdgcn-amd-amdhsa 2>&1 | FileCheck %s void test_amdgcn_fence_failure() { - - // CHECK: error: Unsupported atomic synchronization scope + // CHECK: error: :0:0: in function _Z25test_amdgcn_fence_failurev void (): Unsu

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-14 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/135703 We have had numerous situations where the negatively stat cached paths are invalidated during the build, and such invalidations lead to build errors. This PR adds an API to diagnose such cases. `DependencyS

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes We have had numerous situations where the negatively stat cached paths are invalidated during the build, and such invalidations lead to build errors. This PR adds an API to diagnose such cases. `Dependency

[clang-tools-extra] [clangd] Store documentation when indexing standard library (PR #133681)

2025-04-14 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Review ping https://github.com/llvm/llvm-project/pull/133681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/135573 >From 30a626ee59fbdf96d055b13fe316ff2a8417c93b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Tue, 15 Apr 2025 01:07:05 +0300 Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread via cfe-commits
https://github.com/Sterling-Augustine closed https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC] Fix bot breakage introduced by #134753 (PR #135697)

2025-04-14 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx closed https://github.com/llvm/llvm-project/pull/135697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 23e92c9 - [NFC] Fix bot breakage introduced by #134753 (#135697)

2025-04-14 Thread via cfe-commits
Author: Alex Voicu Date: 2025-04-15T02:18:30+03:00 New Revision: 23e92c985de96ec2f06be1c94228ad5dff2d9097 URL: https://github.com/llvm/llvm-project/commit/23e92c985de96ec2f06be1c94228ad5dff2d9097 DIFF: https://github.com/llvm/llvm-project/commit/23e92c985de96ec2f06be1c94228ad5dff2d9097.diff LO

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
@@ -464,7 +464,8 @@ fatbinary(ArrayRef> InputFiles, } // namespace amdgcn namespace generic { -Expected clang(ArrayRef InputFiles, const ArgList &Args) { +Expected clang(ArrayRef InputFiles, const ArgList &Args, + bool HasSYCLOffloadKind = false) { -

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @Sterling-Augustine sorry I was waiting for all the bots to pass https://github.com/llvm/llvm-project/pull/135686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Volodymyr Sapsai via cfe-commits
@@ -3871,7 +3874,8 @@ class ASTIdentifierTableTrait { if (isInterestingIdentifier(II, MacroOffset)) { DataLen += 2; // 2 bytes for builtin ID DataLen += 2; // 2 bytes for flags - if (MacroOffset) + if (MacroOffset || (II->hasMacroDefinition() && +

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
@@ -937,13 +961,47 @@ Expected> linkAndWrapDeviceFiles( InputFiles.emplace_back(*FileNameOrErr); } +if (HasSYCLOffloadKind) { + // Link the remaining device files using the device linker. + auto OutputOrErr = linkDevice(InputFiles, LinkerArgs, HasSYCLO

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Joseph Huber via cfe-commits
@@ -464,7 +464,8 @@ fatbinary(ArrayRef> InputFiles, } // namespace amdgcn namespace generic { -Expected clang(ArrayRef InputFiles, const ArgList &Args) { +Expected clang(ArrayRef InputFiles, const ArgList &Args, + bool HasSYCLOffloadKind = false) { -

[clang] b9a3e99 - [Clang]Ensure correct handling of cleanup access control (#135668) (#135686)

2025-04-14 Thread via cfe-commits
Author: Oliver Hunt Date: 2025-04-14T16:16:29-07:00 New Revision: b9a3e998b1921f7d1e3093f27d288ee1a121ba4b URL: https://github.com/llvm/llvm-project/commit/b9a3e998b1921f7d1e3093f27d288ee1a121ba4b DIFF: https://github.com/llvm/llvm-project/commit/b9a3e998b1921f7d1e3093f27d288ee1a121ba4b.diff L

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
@@ -35,6 +35,7 @@ enum OffloadKind : uint16_t { OFK_OpenMP, OFK_Cuda, OFK_HIP, + OFK_SYCL, asudarsa wrote: As mentioned earlier (https://github.com/llvm/llvm-project/pull/135683#discussion_r2043140354), it might be better to address this change in a s

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
@@ -464,7 +464,8 @@ fatbinary(ArrayRef> InputFiles, } // namespace amdgcn namespace generic { -Expected clang(ArrayRef InputFiles, const ArgList &Args) { +Expected clang(ArrayRef InputFiles, const ArgList &Args, + bool HasSYCLOffloadKind = false) { -

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
@@ -35,6 +35,7 @@ enum OffloadKind : uint16_t { OFK_OpenMP, OFK_Cuda, OFK_HIP, + OFK_SYCL, asudarsa wrote: As proposed by @jhuber6 earlier, I will submit a separate PR to make changes to offload kind representation. And then update this PR after that g

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/135683 Device code linking happens inside clang-linker-wrapper. In the current implementation, clang-linker-wrapper does the following: 1. Extracts device code. Input_1, Input_2,. 2. Group device code according t

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 There are a couple of TODO comments in this PR: 1. Add sycl post link functionality (including device code splitting) - This PR is under review here - https://github.com/llvm/llvm-project/pull/131347 2. Add SYCL offload wrapping logic - We are working on submitting

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/18291 Here

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread John McCall via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `arc-builder` running on `arc-worker` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/14539 Here is the relevant pie

[clang] 2206e15 - [alpha.webkit.UnretainedCallArgsChecker] Don't emit a warning for RetainPtr::operator= (#135526)

2025-04-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-14T15:03:21-07:00 New Revision: 2206e15e78bc3d5289fb2c2cf5a80d6f08412a58 URL: https://github.com/llvm/llvm-project/commit/2206e15e78bc3d5289fb2c2cf5a80d6f08412a58 DIFF: https://github.com/llvm/llvm-project/commit/2206e15e78bc3d5289fb2c2cf5a80d6f08412a58.diff

[clang] [alpha.webkit.UnretainedCallArgsChecker] Don't emit a warning for RetainPtr::operator= (PR #135526)

2025-04-14 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/135526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Joseph Huber via cfe-commits
@@ -464,7 +464,8 @@ fatbinary(ArrayRef> InputFiles, } // namespace amdgcn namespace generic { -Expected clang(ArrayRef InputFiles, const ArgList &Args) { +Expected clang(ArrayRef InputFiles, const ArgList &Args, + bool HasSYCLOffloadKind = false) { -

[clang] [llvm] [SYCL] Add clang-linker-wrapper changes to call clang-sycl-linker for SYCL offloads (PR #135683)

2025-04-14 Thread Joseph Huber via cfe-commits
@@ -937,13 +961,47 @@ Expected> linkAndWrapDeviceFiles( InputFiles.emplace_back(*FileNameOrErr); } +if (HasSYCLOffloadKind) { + // Link the remaining device files using the device linker. + auto OutputOrErr = linkDevice(InputFiles, LinkerArgs, HasSYCLO

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/135573 >From 213a2377387d8fc032741e4f4ddf50f88fccaca5 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Tue, 15 Apr 2025 01:07:05 +0300 Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang,llvm` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/14505 Here is the releva

[clang] [clang-tools-extra] [lldb] Reland: [clang] preserve class type sugar when taking pointer to member (PR #132401)

2025-04-14 Thread via cfe-commits
eaeltsin wrote: Comparing bcanalyzer --dump outputs for non-deterministic pcms, I see a lot of op values that differ by 1. I wonder if this might be something like the mismatch of Read Write UnsignedOrNone vs unsigned ... https://github.com/llvm/llvm-project/pull/132401 _

[clang] [Clang] enhance loop analysis to handle variable changes inside lambdas (PR #135573)

2025-04-14 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/135573 >From 1bd4c4727596ad6255dd867fd3f2c9386b911bb5 Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Tue, 15 Apr 2025 01:07:05 +0300 Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes

[clang] [Clang]Ensure correct handling of cleanup access control (#135668) (PR #135686)

2025-04-14 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/135686 >From 62be33b3aa475a33d1c11679ed069eb2af981754 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Mon, 14 Apr 2025 15:02:46 -0700 Subject: [PATCH] [Clang]Ensure correct handling of access control in P2719 diagnost

[clang] [Clang] [Driver] add a Cygwin ToolChain (PR #135691)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jeremyd2019) Changes Add a new Cygwin toolchain that just goes through the motions to initialize the Generic_GCC base properly. This allows removing some old, almost certainly wrong hard-coded paths from Lex/InitHeaderSearch.cpp T

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl converted_to_draft https://github.com/llvm/llvm-project/pull/135655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][DirectX] Always use Diagnostic Printer (PR #135655)

2025-04-14 Thread Sarah Spall via cfe-commits
@@ -605,13 +605,11 @@ void BackendConsumer::UnsupportedDiagHandler( // Context will be nullptr for IR input files, we will construct the diag // message from llvm::DiagnosticInfoUnsupported. - if (Context != nullptr) { + if (Context != nullptr) Loc = getBestLocation

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread Alex Voicu via cfe-commits
AlexVlx 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,llvm` at step 6 "test-build-unified-tree-check-all". > > Full details are available at: > https://lab.llvm.org/buildbot/#/builders/1

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2025-04-14 Thread Peter Dimov via cfe-commits
pdimov wrote: I get the warning for your code. ``` 1>testbed2022.cpp(8,15): warning : cast from 'FARPROC' (aka 'long long (*)()') to 'PGNSI' (aka 'void (*)(_SYSTEM_INFO *)') converts to incompatible function type [-Wcast-function-type-mismatch] ``` Make sure you're passing /W4 to clang-cl. htt

[clang] [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (PR #134476)

2025-04-14 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/134476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add intrinsics for v_cvt_pk_norm_{i16, u16}_f16 (PR #135631)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Acim Maravic (Acim-Maravic) Changes Added builtin and intrinsic for v_cvt_pk_norm_i16_f16 and v_cvt_pk_norm_u16_f16 --- Full diff: https://github.com/llvm/llvm-project/pull/135631.diff 8 Files Affected: - (modified) clang/include/clan

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -717,6 +717,12 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [clang] [CodeGen] fix crash when Ty isDependentType in CodeGenFunction::EmitAutoVarAlloca (PR #135643)

2025-04-14 Thread via cfe-commits
https://github.com/MacroModel created https://github.com/llvm/llvm-project/pull/135643 when Ty.isDependentType() is true, it will crash here: I encountered it while compiling my own project, which may not be the right solution, but prevents crashes ```bash Starting program: /home/MacroModel/l

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) {// expected-note {{'not_tail_called' attribute here prevents being called as a tail call}} +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +

[clang] [Clang] Add support for GCC bound member functions extension (PR #135649)

2025-04-14 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw edited https://github.com/llvm/llvm-project/pull/135649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (PR #134570)

2025-04-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/134570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] da17ced - [DirectX] Use scalar arguments for @llvm.dx.dot intrinsics (#134570)

2025-04-14 Thread via cfe-commits
Author: Justin Bogner Date: 2025-04-14T10:34:15-07:00 New Revision: da17ced11b1cf44b433cb2b850978df4b6bff279 URL: https://github.com/llvm/llvm-project/commit/da17ced11b1cf44b433cb2b850978df4b6bff279 DIFF: https://github.com/llvm/llvm-project/commit/da17ced11b1cf44b433cb2b850978df4b6bff279.diff

[clang] 3e64485 - Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (#135629)

2025-04-14 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2025-04-14T10:27:20-07:00 New Revision: 3e644859470e9ba77b8365cc7e2b5234492f4c30 URL: https://github.com/llvm/llvm-project/commit/3e644859470e9ba77b8365cc7e2b5234492f4c30 DIFF: https://github.com/llvm/llvm-project/commit/3e644859470e9ba77b8365cc7e2b5234492f4c30.diff

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand approved this pull request. You might want to re-test after the recent merge of the z17 patch. Otherwise, this now looks all good to me, a few further enhancement we discussed can be done as follow-on. Thanks! https://github.com/llvm/llvm-project/pull/109164

[clang] Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (PR #135629)

2025-04-14 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/15996 Here is the relevant piece of the

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -717,6 +717,13 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-14 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,cppm,cpp -- clang/include/clang/AST/DeclCXX.h clang/includ

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,89 @@ +//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments ---==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -205,13 +205,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { // Call operators //======// - cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee) { -auto op = create(loc

[clang] [ARM, AArch64] Fix passing of structures with aligned base classes (PR #135564)

2025-04-14 Thread Eli Friedman via cfe-commits
@@ -1302,6 +1302,7 @@ ItaniumRecordLayoutBuilder::LayoutBase(const BaseSubobjectInfo *Base) { setSize(std::max(getSize(), Offset + Layout.getSize())); // Remember max struct/class alignment. + UnadjustedAlignment = std::max(UnadjustedAlignment, PreferredBaseAlign); ---

[clang] [llvm] [HIP][HIPSTDPAR][NFC] Re-order & adapt `hipstdpar` specific passes (PR #134753)

2025-04-14 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134753 >From a988ecf63dc79d226c2f7aa1430f65d08256888b Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 8 Apr 2025 00:20:27 +0100 Subject: [PATCH 1/8] Re-order & adapt `hipstdpar` specific passes. --- clang/lib/Co

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

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > We have tracked down a new and spurious "This variable is used uninitialized" > to this PR. I'm working on a reduced test case now. It looks like this: > > ``` > .cpp:XXX+2:13: error: variable 'new_section' is uninitialized when > used here [-Werror,-Wuninitialized] > 572 |

[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-14 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > I'm confused -- how is there existing code depending on a builtin which > doesn't yet exist in Clang? Are we copying these builtins from somewhere else? This is part of the pointer authentication support we are upstreaming, all of which has been in use for a long time, just not

[clang] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Tom Honermann via cfe-commits
@@ -3303,6 +3303,27 @@ void CodeGenModule::EmitDeferred() { CurDeclsToEmit.swap(DeferredDeclsToEmit); for (GlobalDecl &D : CurDeclsToEmit) { +// Functions declared with the sycl_kernel_entry_point attribute are +// emitted normally during host compilation. During d

[clang] [NFC][analyzer] Document configuration options (PR #135169)

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# A tool to automatically generate documentation for the config options of the +# clang static analyzer by reading `AnalyzerOptions.def`. + +import argparse +from collections import namedtuple +from enum import Enum, auto +import re +impo

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Nothing to add after Andy comments are addressed https://github.com/llvm/llvm-project/pull/135493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (PR #130623)

2025-04-14 Thread Jack Styles via cfe-commits
https://github.com/Stylie777 edited https://github.com/llvm/llvm-project/pull/130623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-14 Thread via cfe-commits
@@ -771,3 +771,42 @@ D d(24); // CHECK-NEXT: `-ParmVarDecl {{.+}} 'U' } // namespace GH132616_DeductionGuide + +namespace GH133132 { + +template +struct A {}; + +template +using AA = A; cor3ntin wrote: Can you add a template template parameter test? https

[libclc] [libclc] Fix commands in compile_to_bc are executed sequentially (PR #130755)

2025-04-14 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck approved this pull request. https://github.com/llvm/llvm-project/pull/130755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] 0c21d6b - [libclc] Fix commands in compile_to_bc are executed sequentially (#130755)

2025-04-14 Thread via cfe-commits
Author: Wenju He Date: 2025-04-14T14:11:04+01:00 New Revision: 0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9 URL: https://github.com/llvm/llvm-project/commit/0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9 DIFF: https://github.com/llvm/llvm-project/commit/0c21d6b4c8ad7310b0cd81bbefa06b2947b671f9.diff LOG:

[clang] [clang] Add builtin_get_vtable_pointer and virtual_member_address (PR #135469)

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I just noticed there's no documentation for > > > `__builtin_virtual_member_address()` so I'm addressing that. > > > Due to code drift and time I realized that they disagree as to whether > > > they should take `C*` or `C&` so I'm going to make them both accept > > >

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-14 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. Thank you so much for working on that! https://github.com/llvm/llvm-project/pull/135370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang][test] Improve unit tests for Fixed point AST matchers. (PR #134398)

2025-04-14 Thread via cfe-commits
earnol wrote: Gentle ping! Requesting a review from community, since a week had passed with no response. https://github.com/llvm/llvm-project/pull/134398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. So if I understand correctly, you are marking memsets as unsplittable, lowering them to vector zero and smaller accesses to inserts/extracts. I don't think your general approach here is going to work. We need to be careful about

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
@@ -1170,10 +1204,17 @@ class AllocaSlices::SliceBuilder : public PtrUseVisitor { if (!IsOffsetKnown) return PI.setAborted(&II); +bool Splittable; + +if (getVectorTypeFor(II, DL)) + Splittable = isSplittableMemOp(AS.AI.getAllocatedType(), II.isVolatile

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/133301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +int __attribute__((not_tail_called)) foo1(int a) { +return a + 1; +} + + +int foo2(int a) { +[[clang::musttail]] +return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' bec

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -325,6 +325,9 @@ Improvements to Clang's diagnostics - Now correctly diagnose a tentative definition of an array with static storage duration in pedantic mode in C. (#GH50661) +- An error is now emitted when a ``musttail`` call is made to a function marked with the ``not

[clang] [clang] Reject character devices in #embed for now (PR #135370)

2025-04-14 Thread Aaron Ballman via cfe-commits
@@ -458,6 +458,8 @@ def warn_compat_pp_embed_directive : Warning< InGroup, DefaultIgnore; def err_pp_embed_dup_params : Error< "cannot specify parameter '%0' twice in the same '#embed' directive">; +def err_pp_embed_device_file : Error< + "device files are not yet supporte

[clang] [Clang][Sema]:Fix musttail attribute on a function with not_tail_called attribute has no warning/error (PR #134465)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -717,6 +717,12 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) { return false; } + if (const FunctionDecl *CalleeDecl = CE->getDirectCallee(); + CalleeDecl && CalleeDecl->hasAttr()) { +Diag(St->getBeginLoc(), diag::err_musttail_mismatch) <<

[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

2025-04-14 Thread Finn Plummer via cfe-commits
@@ -32,11 +39,19 @@ struct DescriptorTable { using ClauseType = llvm::dxil::ResourceClass; struct DescriptorTableClause { ClauseType Type; + Register Register; + uint32_t Space = 0; }; // Models RootElement : DescriptorTable | DescriptorTableClause using RootElement =

[clang] [clang] Remove isOSWindows() checks (PR #129909)

2025-04-14 Thread Prabhu Rajasekaran via cfe-commits
Prabhuk wrote: @rnk @mstorsjo -- Can you please take a look at the changes? https://github.com/llvm/llvm-project/pull/129909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread Nikita Popov via cfe-commits
nikic wrote: > > I don't think your general approach here is going to work. We need to be > > careful about introducing vector operations out of thin air, because LLVM > > is not going to second guess them. If you convert a memset to <32768 x i8> > > ops here, LLVM is going to carry those all

[clang] Remove the redundant check for "WeakPtr" in isSmartPtrClass to fix the issue 135612. (PR #135629)

2025-04-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/135629 None >From 928db4c6ac01b96bbe65a9c3aec05c84c97a1040 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 14 Apr 2025 07:49:07 -0700 Subject: [PATCH] Remove the redundant check for "WeakPtr" in isSmartPtrClass

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-04-14 Thread Aniket Lal via cfe-commits
lalaniket8 wrote: > > this change makes sense and it doesn't bring (known to me) regressions > > Actually, there is an incorrect behavior in the following test case: > https://godbolt.org/z/dc3T7Mo3G , note > __clang_ocl_kern_imp_sample_kernel_float was generated, but was never called. > @lal

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-14 Thread via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: https://github.com/mgschossmann updated https://github.com/llvm/llvm-project/pull/130674 >From 017a07e4912c0d06b625207a8465ed2f8d8aac5c Mon Se

[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)

2025-04-14 Thread via cfe-commits
Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= , Markus =?utf-8?q?Gschoßmann?= Message-ID: In-Reply-To: @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s

[clang] 13b55ad - [clang] implement printing of canonical expressions (#135133)

2025-04-14 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-14T12:59:36-03:00 New Revision: 13b55ad3bb6bafda7d8a62c5fe2fc98157442355 URL: https://github.com/llvm/llvm-project/commit/13b55ad3bb6bafda7d8a62c5fe2fc98157442355 DIFF: https://github.com/llvm/llvm-project/commit/13b55ad3bb6bafda7d8a62c5fe2fc98157442355.dif

[clang] [HLSL] Use hlsl_device address space for getpointer. (PR #127675)

2025-04-14 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/127675 >From 81c31fcdee28482ceea703064b0103eccb2a93ad Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Wed, 12 Feb 2025 15:45:32 -0500 Subject: [PATCH 1/3] [HLSL] Use hlsl_device address space for getpointer. We ad

[clang] [flang] [llvm] [mlir] [NFC] Fix destroy typo. (PR #135640)

2025-04-14 Thread Connector Switch via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/135640 None >From 7aa91c6b064a638dcaad0f36ae5cba636f5ee58e Mon Sep 17 00:00:00 2001 From: c8ef Date: Mon, 14 Apr 2025 16:10:25 + Subject: [PATCH] fix destroy typo --- .../WebKit/ref-cntbl-base-virtual-dtor-templates

[clang] [Interp] Mark inline-virtual.cpp as unsupported with ASan (PR #135402)

2025-04-14 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/135402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenACC] Switch Clang to use the Flang 'appertainment' rules for cla… (PR #135372)

2025-04-14 Thread Erich Keane via cfe-commits
erichkeane wrote: > FLANG: `atomic-if' (Valentin has PR) > Clang :: SemaOpenACC/atomic-construct.cpp > Clang :: ParserOpenACC/parse-clauses.c > Clang :: AST/ast-print-openacc-atomic-construct.cpp > Clang :: ParserOpenACC/parse-clauses.cpp > Clang :: SemaOpenACC/atomic-constr

[clang] [llvm] [NFC] Fix xmipscmov extension name (PR #135647)

2025-04-14 Thread Djordje Todorovic via cfe-commits
https://github.com/djtodoro created https://github.com/llvm/llvm-project/pull/135647 The right name was used in riscv-toolchain-conventions docs. >From 86eef6e45b92a8601d2873d89b1b7b153a587bb3 Mon Sep 17 00:00:00 2001 From: Djordje Todorovic Date: Mon, 14 Apr 2025 11:22:28 +0200 Subject: [PATC

[clang] [llvm] [SROA] Vector promote some memsets (PR #133301)

2025-04-14 Thread via cfe-commits
macurtis-amd wrote: I should preface this by mentioning that I'm not all that familiar with SROA, so thank you for your patience. > So if I understand correctly, you are marking memsets as unsplittable, > lowering them to vector zero and smaller accesses to inserts/extracts. > Yes. As a naive

[clang] [Clang][AArch64] Add fp8 variants for untyped NEON intrinsics (PR #128019)

2025-04-14 Thread Momchil Velikov via cfe-commits
@@ -5464,6 +5464,15 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Builder.CreateStore(errorValue, swiftErrorTemp); } +// Mfloat8 type is loaded as scalar type, but is treated as single +// vector type for other operation

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
@@ -2,6 +2,16 @@ ; ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s +; Test f316->i32. uweigand wrote: Comment typo. https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@

[clang] [compiler-rt] [llvm] [SystemZ] Add support for half (fp16) (PR #109164)

2025-04-14 Thread Ulrich Weigand via cfe-commits
https://github.com/uweigand edited https://github.com/llvm/llvm-project/pull/109164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/135660 On Windows, GetProcAddress() is the API used to dynamically load function pointers (similar to dlsym on Linux). This API returns a function pointer (a typedef named FARPROC), which means that casting from

[clang] Silence -Wcast-function-type warnings on idiomatic Windows code (PR #135660)

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes On Windows, GetProcAddress() is the API used to dynamically load function pointers (similar to dlsym on Linux). This API returns a function pointer (a typedef named FARPROC), which means that casting f

[clang] [Interp] Mark inline-virtual.cpp as unsupported with ASan (PR #135402)

2025-04-14 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/135402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Split -Wcast-function-type into a separate group (PR #86131)

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I put up https://github.com/llvm/llvm-project/pull/135660 for review, thank you for bringing this up! https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [CIR] cir.call with scalar return type (PR #135552)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -515,9 +519,32 @@ verifyCallCommInSymbolUses(mlir::Operation *op, return op->emitOpError() << "'" << fnAttr.getValue() << "' does not reference a valid function"; - // TODO(cir): verify function arguments and return type + auto callIf = dy

[clang] [CIR] Upstream ArraySubscriptExpr from function parameter with pointer base (PR #135493)

2025-04-14 Thread Amr Hesham via cfe-commits
@@ -570,9 +570,17 @@ CIRGenFunction::emitArraySubscriptExpr(const clang::ArraySubscriptExpr *e) { } // The base must be a pointer; emit it with an estimate of its alignment. - cgm.errorNYI(e->getSourceRange(), - "emitArraySubscriptExpr: The base must be a p

<    1   2   3   4   5   >