[clang] [AArch64] Change the coercion type of structs with pointer members. (PR #135064)

2025-05-02 Thread David Green via cfe-commits
https://github.com/davemgreen updated https://github.com/llvm/llvm-project/pull/135064 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138271 >From 6360cf51134d978b1ee8b6615128922eb3726d97 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 May 2025 07:35:57 -0400 Subject: [PATCH 1/4] Handle null pointer constants properly --- clang/lib/S

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/138271 >From 6360cf51134d978b1ee8b6615128922eb3726d97 Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Fri, 2 May 2025 07:35:57 -0400 Subject: [PATCH 1/3] Handle null pointer constants properly --- clang/lib/S

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -13958,7 +13979,11 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, LHSType->isObjCObjectPointerType( ConvTy = AssignConvertType::Compatible; +<<< HEAD AaronBallman wrote: Yeah, I just hit that error in my

[clang] a4ceac7 - [C23] Implement WG14 N3037 (#132939)

2025-05-02 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T09:19:21-04:00 New Revision: a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8 URL: https://github.com/llvm/llvm-project/commit/a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8 DIFF: https://github.com/llvm/llvm-project/commit/a4ceac7e3e04c32cb3e334eb89b54d8e99a298f8.diff

[clang] clang-format: Add IncludeSortKey option (PR #137840)

2025-05-02 Thread Daan De Meyer via cfe-commits
https://github.com/DaanDeMeyer updated https://github.com/llvm/llvm-project/pull/137840 >From 7e2463f6fb9a3d64b1be25f2ea6ea91de2d4e982 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 29 Apr 2025 18:26:36 +0200 Subject: [PATCH] clang-format: Add IncludeSortKey option Sorting by stem giv

[clang] [C23] Implement WG14 N3037 (PR #132939)

2025-05-02 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/132939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Erich Keane via cfe-commits
@@ -13958,7 +13979,11 @@ QualType Sema::CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, LHSType->isObjCObjectPointerType( ConvTy = AssignConvertType::Compatible; +<<< HEAD erichkeane wrote: bad merge! Below too https://githu

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-05-02 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/137670 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-05-02 Thread Nikita Popov via cfe-commits
@@ -250,6 +250,32 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, return CurStatus; } +static bool IsKeywordInCpp(unsigned Flags) { + while (Flags != 0) { +unsigned CurFlag = Flags & ~(Flags - 1); +Flags = Flags & ~CurFlag; +switch (static

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I'm not sure I buy the justification FWIW, this came from a post-commit review comment: https://github.com/llvm/llvm-project/pull/137166#discussion_r2070615023 >, and the flag-diag there is perhaps 'cute' (and frankly, if we find ourself >doing that again, I would vastly

[clang] [Clang] Bypass TAD during overload resolution if a perfect match exists (PR #136203)

2025-05-02 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Please take a look, so far it seems like it should be reverted. https://github.com/llvm/llvm-project/pull/136203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Update the -Wdefault-const-init-unsafe wording (PR #138266)

2025-05-02 Thread Erich Keane via cfe-commits
erichkeane wrote: > > I'm not sure I buy the justification > > FWIW, this came from a post-commit review comment: [#137166 > (comment)](https://github.com/llvm/llvm-project/pull/137166#discussion_r2070615023) > > > , and the flag-diag there is perhaps 'cute' (and frankly, if we find > > ourse

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-05-02 Thread Zishan Mirza via cfe-commits
zimirza wrote: > > `localtime_s` was removed from #110363, and will be added to a new pull > > request and `ctime_s` has not been merged yet (#110676). It might be a good > > wait before merging this pull request. > > I think it is better to remove `localtime_s` and `ctime_s` from this pull >

[clang] [C] Update -Wimplicit-void-ptr-cast for null pointer constants (PR #138271)

2025-05-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/138271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Diagnose use of C++ keywords in C (PR #137234)

2025-05-02 Thread Aaron Ballman via cfe-commits
@@ -250,6 +250,32 @@ static KeywordStatus getKeywordStatus(const LangOptions &LangOpts, return CurStatus; } +static bool IsKeywordInCpp(unsigned Flags) { + while (Flags != 0) { +unsigned CurFlag = Flags & ~(Flags - 1); +Flags = Flags & ~CurFlag; +switch (static

[clang] [Clang] Implement CWG3005 Function parameters should never be name-independent (PR #138245)

2025-05-02 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/138245 >From 63aedb490ecdb251a5005f40e8e1bd3dd2f89e70 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Fri, 2 May 2025 10:53:38 +0200 Subject: [PATCH 1/2] [Clang] Implement CWG3005 Function parameters should never

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-02 Thread Erich Keane via cfe-commits
@@ -623,6 +623,8 @@ Bug Fixes to C++ Support - Clang now emits a warning when class template argument deduction for alias templates is used in C++17. (#GH133806) - Fix a crash when checking the template template parameters of a dependent lambda appearing in an alias declaratio

[clang] [Clang] Fix handling of reference types in tryEvaluateBuiltinObjectSize (PR #138247)

2025-05-02 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/138247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0b2ab11 - Simplify implementation; NFC

2025-05-02 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2025-05-02T09:39:20-04:00 New Revision: 0b2ab11321d2b400987e9ade28a221dff67aea7d URL: https://github.com/llvm/llvm-project/commit/0b2ab11321d2b400987e9ade28a221dff67aea7d DIFF: https://github.com/llvm/llvm-project/commit/0b2ab11321d2b400987e9ade28a221dff67aea7d.diff

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
rorth wrote: /cherry-pick e71c8ea3cc73c8f7b0382468f355a254166d3a72 https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
https://github.com/rorth milestoned https://github.com/llvm/llvm-project/pull/137141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix _XOPEN_SOURCE definition on Solaris (PR #137141)

2025-05-02 Thread Rainer Orth via cfe-commits
rorth wrote: This patch is required to build `flang` on Solaris/amd64. Until very recently, a 2-stage build of `main` with `flang` included worked with `clang-20` as build compiler since `flang` was only built in stage 2 and the freshly built `clang-21` does include the patch.. However, now

[clang] [Clang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Benjamin Maxwell via cfe-commits
@@ -934,7 +934,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, std::optional OptVal = llvm::StringSwitch>(ArgVecLib->getValue()) .Case("Accelerate", "Accelerate") -.Case("LIBMVEC", "LIBMVEC-X86") +

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
https://github.com/tigbr created https://github.com/llvm/llvm-project/pull/138295 This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph everywhere. I

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (tigbr) Changes This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph e

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (tigbr) Changes This patch improves the performance of the Clang Static Analyzer by passing separate `BumpPtrAllocator` instances to its data structures instead of using the `BumpPtrAllocator` of the ExplodedGraph everywhere. It gre

[clang] fix emiision of nested unused enum types with -fno-eliminate-unused-d… (PR #137818)

2025-05-02 Thread Steve Merritt via cfe-commits
@@ -1987,7 +1987,8 @@ void CGDebugInfo::CollectRecordFields( // Bump field number for next field. ++fieldNo; - } else if (CGM.getCodeGenOpts().EmitCodeView) { + } else if (CGM.getCodeGenOpts().hasMaybeUnusedDebugInfo() || + CGM.getCode

[clang] [clang][analyzer][NFC] Improve Clang Static Analyzer performance. (PR #138295)

2025-05-02 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/StaticAnalyzer/Core/PathSensiti

[clang] [llvm] [AMDGPU][clang][CodeGen][opt] Add late-resolved feature identifying predicates (PR #134016)

2025-05-02 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/134016 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Baranov Victor via cfe-commits
vbvictor wrote: Did you run code sanitizer over all clang-tidy code or you only interested in this particular file? I think there are many more places where such `nullptr` dereference can happen, e.g. https://github.com/llvm/llvm-project/blob/52d2b589b2d7adc3e2b4ea503df4131e088de61f/clang-tools

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-02 Thread via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] [Clang][Driver] Fix target parsing for -fveclib=libmvec option. (PR #138288)

2025-05-02 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. LGTM, thanks :+1: There's one other use of "LIBMVEC" in flang that looks suspicious, but I've not check if it's actually an issue: https://github.com/llvm/llvm-project/blob/d6dbe7799e638702309e23fc7b73d4be2231e2ac/flang/lib/Frontend/Compil

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/138162 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/138162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream local initialization for VectorType (PR #138107)

2025-05-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138107 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,s

[clang-tools-extra] [NFC] Fix potential nullptr dereference. (PR #138283)

2025-05-02 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > This is not needed IMO. This is a simple matcher, `op` is expected to always > be bound. > > One might say that it can't hurt to add extra checks, but I don't think > that's good justification for adding more code / bloat, even if in this case > it's a single line. Still, 5%

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. https://github.com/llvm/llvm-project/pull/138222 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix implicit attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/138162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-02 Thread Krzysztof Drewniak via cfe-commits
@@ -2641,6 +2641,28 @@ def int_amdgcn_perm : // GFX9 Intrinsics //===--===// +/// This is a general-purpose intrinsic for all operations that take a pointer +/// a base location in LDS, and a data size and us

[clang] [CIR] Upstream support for switch statements case kinds (PR #138003)

2025-05-02 Thread Andy Kaylor via cfe-commits
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s, + mlir::Type condType, +

[clang] [CUDA][HIP] Fix host/device attribute of builtin (PR #138162)

2025-05-02 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/138162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/138222 >From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 29 Apr 2025 15:47:01 -0700 Subject: [PATCH 1/3] [CIR] Refactor global variable emission and initialization

[clang] e59ed0f - [Clang] __has_unique_object_representations should not accept Incomplete[] (#138291)

2025-05-02 Thread via cfe-commits
Author: cor3ntin Date: 2025-05-02T19:36:53+02:00 New Revision: e59ed0fb0f3324ae3fce4080e15472a316713dfd URL: https://github.com/llvm/llvm-project/commit/e59ed0fb0f3324ae3fce4080e15472a316713dfd DIFF: https://github.com/llvm/llvm-project/commit/e59ed0fb0f3324ae3fce4080e15472a316713dfd.diff LOG:

[clang] [Clang] __has_unique_object_representations should not accept Incomplete[] (PR #138291)

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

[clang] 140c2b6 - [clang][NFC] Convert `Sema::AllowFoldKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T10:48:08+03:00 New Revision: 140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1 URL: https://github.com/llvm/llvm-project/commit/140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1 DIFF: https://github.com/llvm/llvm-project/commit/140c2b6d081b781b19f50bf1c4fbf4b17bfacdc1.

[clang] [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (PR #138120)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo edited https://github.com/llvm/llvm-project/pull/138120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (PR #138120)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/138120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (PR #138120)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. I updated the PR description with the details I wanted to have included in the commit message. https://github.com/llvm/llvm-project/pull/138120 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] abe93fe - [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (#138120)

2025-05-02 Thread via cfe-commits
Author: Mateusz Mikuła Date: 2025-05-02T11:07:15+03:00 New Revision: abe93fe7c88c477343c884036982ddc15f820425 URL: https://github.com/llvm/llvm-project/commit/abe93fe7c88c477343c884036982ddc15f820425 DIFF: https://github.com/llvm/llvm-project/commit/abe93fe7c88c477343c884036982ddc15f820425.diff

[clang] [Clang][Cygwin] don't use -Bsymbolic-functions (PR #138217)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/138217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-05-02 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > Okay, you were right. Keeping this in a single description hurts readability > a lot. > > So I have opened a series of smaller PRs: #138117 #138118 #138119 #138120 > > This branch is equal to the other ones (once they are merged together), so we > can go either way. I think

[clang] db247dd - [clang][NFC] Convert `Sema::ArithConvKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T11:02:01+03:00 New Revision: db247ddc9d5411ace70b478f7119eb44a43a8e5c URL: https://github.com/llvm/llvm-project/commit/db247ddc9d5411ace70b478f7119eb44a43a8e5c DIFF: https://github.com/llvm/llvm-project/commit/db247ddc9d5411ace70b478f7119eb44a43a8e5c.

[clang] 592243c - [Clang][Cygwin] Fix symbol visibility definition (#138118)

2025-05-02 Thread via cfe-commits
Author: Mateusz Mikuła Date: 2025-05-02T11:01:37+03:00 New Revision: 592243c1cb3ea53b34033132a87b0d14af9d1079 URL: https://github.com/llvm/llvm-project/commit/592243c1cb3ea53b34033132a87b0d14af9d1079 DIFF: https://github.com/llvm/llvm-project/commit/592243c1cb3ea53b34033132a87b0d14af9d1079.diff

[clang] [Clang][Cygwin] Fix symbol visibility definition (PR #138118)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/138118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-05-02 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/137958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-05-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ml-opt-dev-x86-64` running on `ml-opt-dev-x86-64-b2` while building `clang,llvm,mlir` at step 4 "cmake-configure". Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/17828 Here is the relevan

[clang] [CIR] Refactor floating point type constraints (PR #138112)

2025-05-02 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-4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/19356 Here is th

[clang] 9bc20fb - [Clang][Cygwin] Disable shared libs on Cygwin by default (#138119)

2025-05-02 Thread via cfe-commits
Author: Mateusz Mikuła Date: 2025-05-02T11:02:11+03:00 New Revision: 9bc20fbbadb18a1c3415d4442066ed35a6bcc175 URL: https://github.com/llvm/llvm-project/commit/9bc20fbbadb18a1c3415d4442066ed35a6bcc175 DIFF: https://github.com/llvm/llvm-project/commit/9bc20fbbadb18a1c3415d4442066ed35a6bcc175.diff

[clang] [Clang][Cygwin] Disable shared libs on Cygwin by default (PR #138119)

2025-05-02 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo closed https://github.com/llvm/llvm-project/pull/138119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d0dcfd4 - [clang][NFC] Convert `Sema::VarArgKind` to scoped enum

2025-05-02 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2025-05-02T11:24:08+03:00 New Revision: d0dcfd4c68171c3b9b863626c08efa7f38cd0c54 URL: https://github.com/llvm/llvm-project/commit/d0dcfd4c68171c3b9b863626c08efa7f38cd0c54 DIFF: https://github.com/llvm/llvm-project/commit/d0dcfd4c68171c3b9b863626c08efa7f38cd0c54.

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-05-02 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Closed in favor of https://github.com/llvm/llvm-project/pull/135794 https://github.com/llvm/llvm-project/pull/134844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Mark convergence intrins as has-side-effect (PR #134844)

2025-05-02 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/134844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-android` running on `sanitizer-buildbot-android` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/186/builds/8689 Here is the releva

[clang] [ARM, AArch64] Fix ABI bugs with over-sized bitfields (PR #126774)

2025-05-02 Thread Oliver Stannard via cfe-commits
ostannard wrote: I'd assumed that this was a sufficiently uncommon edge-case that it wasn't worth a release note, but I'll keep that in mind in future and add release notes for things like this. https://github.com/llvm/llvm-project/pull/126774 ___ cf

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-05-02 Thread Mateusz Mikuła via cfe-commits
mati865 wrote: Thank you for taking care of it! https://github.com/llvm/llvm-project/pull/134494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang][Cygwin] Fix building Clang for Cygwin (PR #134494)

2025-05-02 Thread Mateusz Mikuła via cfe-commits
https://github.com/mati865 closed https://github.com/llvm/llvm-project/pull/134494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (PR #138120)

2025-05-02 Thread Mateusz Mikuła via cfe-commits
mati865 wrote: Looks good, thanks. https://github.com/llvm/llvm-project/pull/138120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Refactor IntType constraints (PR #138106)

2025-05-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu-no-asserts` running on `doug-worker-6` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/202/builds/1014

[clang] [llvm] [IRBuilder] Add versions of createInsertVector/createExtractVector that take a uint64_t index. (PR #138324)

2025-05-02 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/138324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 123758b - [IRBuilder] Add versions of createInsertVector/createExtractVector that take a uint64_t index. (#138324)

2025-05-02 Thread via cfe-commits
Author: Craig Topper Date: 2025-05-02T16:10:18-07:00 New Revision: 123758b1f4a8106926d95268ea8dc27158b6393a URL: https://github.com/llvm/llvm-project/commit/123758b1f4a8106926d95268ea8dc27158b6393a DIFF: https://github.com/llvm/llvm-project/commit/123758b1f4a8106926d95268ea8dc27158b6393a.diff

[clang] [clang] Provide to `PPCallbacks` full expression range even in single file parse mode. (PR #138358)

2025-05-02 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/138358 Restore the behavior existing prior to fe2eefc4718f57e1753f7bd51c158fc03d70b34f. Make reporting of unevaluated directive source range more consistent and with fewer assumptions. In case of a failed evaluation

[clang] [clang] Provide to `PPCallbacks` full expression range even in single file parse mode. (PR #138358)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes Restore the behavior existing prior to fe2eefc4718f57e1753f7bd51c158fc03d70b34f. Make reporting of unevaluated directive source range more consistent and with fewer assumptions. In case of a failed eval

[clang] [Win/X86] Make _m_prefetch[w] builtins to avoid winnt.h conflicts (PR #115099)

2025-05-02 Thread Reid Kleckner via cfe-commits
@@ -138,6 +142,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in } } +// PRFCHW +let Features = "prfchw", Header = "x86intrin.h", Attributes = [NoThrow, Const] in { + def _m_prefetch : X86LibBuiltin<"void(void *)">; rn

[clang] [CIR] Upstream enum support (PR #136807)

2025-05-02 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 01/13] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenMo

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-05-02 Thread Krzysztof Drewniak via cfe-commits
@@ -2641,6 +2641,28 @@ def int_amdgcn_perm : // GFX9 Intrinsics //===--===// +/// This is a general-purpose intrinsic for all operations that take a pointer +/// a base location in LDS, and a data size and us

[clang] [Clang][NFC] Use std::move for Detail in timeTraceMetadata (PR #138352)

2025-05-02 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/138352 Static analysis flagged the use of Detail because we were not using std::move when returning values. Modified the returns to use std::move. >From f12ee9b85d6f457061b7976ef929e3547c510b06 Mon Sep 17 00:00:00 2001

[clang] [Clang][Cygwin] attempt to fix building shared libclang. (PR #138351)

2025-05-02 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-c/Platform.h `` View t

[clang] [CIR] Upstream local VectorType with 0 init elements (PR #138346)

2025-05-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/138346 >From 821d56db431ec2587eefc18f9f9dab5f5dc48c7e Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 2 May 2025 23:12:34 +0200 Subject: [PATCH 1/2] [CIR] Upstream local VectorType with 0 init elemnts ---

[clang] [CIR] Upstream local VectorType with 0 init elements (PR #138346)

2025-05-02 Thread Amr Hesham via cfe-commits
@@ -70,12 +72,15 @@ void foo() { // CIR: %[[VEC_E:.*]] = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["e", init] // CIR: %[[VEC_F:.*]] = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["f", init] // CIR: %[[VEC_G:.*]] = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["g", in

[clang] [CIR] Unblock simple C++ structure support (PR #138368)

2025-05-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/138368 This change adds additional checks to a few places where a simple struct in C++ code was triggering `errorNYI` in places where no additional handling was needed, and adds a very small amount of trivial initi

[clang] [CIR] Unblock simple C++ structure support (PR #138368)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes This change adds additional checks to a few places where a simple struct in C++ code was triggering `errorNYI` in places where no additional handling was needed, and adds a very small amount of trivial i

[clang] [CIR] Unblock simple C++ structure support (PR #138368)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes This change adds additional checks to a few places where a simple struct in C++ code was triggering `errorNYI` in places where no additional handling was needed, and adds a very small amount of trivial ini

[clang] [CIR] Refactor global variable emission and initialization (PR #138222)

2025-05-02 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-bootstrap-msan` running on `sanitizer-buildbot6` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/164/builds/9589 Here is the releva

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-05-02 Thread David Rivera via cfe-commits
@@ -52,8 +54,17 @@ intCastExpression(bool IsSigned, const auto StaticCastExpr = cxxStaticCastExpr(has(ImplicitCastExpr)); const auto FunctionalCastExpr = cxxFunctionalCastExpr(has(ImplicitCastExpr)); + // Match function calls or variable references not directly wrapped by

[clang-tools-extra] [clang-tidy] Improve integer comparison by matching valid expressions outside implicitCastExpr (PR #134188)

2025-05-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/134188 >From f5f0b14c9f49b2b956e6f1c63f24e203d6f4beef Mon Sep 17 00:00:00 2001 From: David Rivera Date: Wed, 2 Apr 2025 21:02:00 -0400 Subject: [PATCH] [clang-tidy] Improve integer comparison by matching valid expre

[clang] [clang][ptrauth] reject incorrectly placed ptrauth qualifier (PR #138376)

2025-05-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/138376 When parsing a function pointer typed field we use Parser::ParseTypeQualifierListOpt, but then drops subsequent type attributes and qualifiers unless explicitly handled. There is an existing solution for the _A

[clang] [clang][ptrauth] reject incorrectly placed ptrauth qualifier (PR #138376)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oliver Hunt (ojhunt) Changes When parsing a function pointer typed field we use Parser::ParseTypeQualifierListOpt, but then drops subsequent type attributes and qualifiers unless explicitly handled. There is an existing solution for the

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-05-02 Thread David Rivera via cfe-commits
https://github.com/RiverDave updated https://github.com/llvm/llvm-project/pull/131969 >From ed0c4bd4c5200819b82e97dc8032b7defdfd88da Mon Sep 17 00:00:00 2001 From: David Rivera Date: Sun, 16 Mar 2025 16:20:16 -0400 Subject: [PATCH] [clang-tidy] Add support for Initialization Forwarding in Nest

[clang] [Clang] Don't retain template FoundDecl for conversion function calls (PR #138377)

2025-05-02 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/138377 In consteval calls rewriting, we expect an instantiated AST to remain untouched. However, this was not true when rebuilding a MemberExpr in TreeTransform, as it relies on FoundDecl to build a resolved member ca

[clang] [Clang] Don't retain template FoundDecl for conversion function calls (PR #138377)

2025-05-02 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes In consteval calls rewriting, we expect an instantiated AST to remain untouched. However, this was not true when rebuilding a MemberExpr in TreeTransform, as it relies on FoundDecl to build a resolved member

[clang] [clang][ptrauth] add support for options parameter to __ptrauth (PR #136828)

2025-05-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/136828 >From d51ed1b628eac11e3ff1a2bb5fffd87e7ca127ea Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Wed, 30 Apr 2025 22:26:59 -0700 Subject: [PATCH] [clang][ptrauth] add support for options parameter to __ptrauth T

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

2025-05-02 Thread Younan Zhang via cfe-commits
@@ -360,6 +360,13 @@ class Sema; LLVM_PREFERRED_TYPE(bool) unsigned ObjCLifetimeConversionBinding : 1; +/// Whether the source expression was originally a single element +/// braced-init-list. Such a conversion is not a perfect match, +/// as we prefer a st

[clang] [Clang] Never consider conversion from single-element braced-init-list perfect (PR #138307)

2025-05-02 Thread Younan Zhang via cfe-commits
@@ -412,6 +419,12 @@ class Sema; bool isPerfect(const ASTContext &C) const { if (!isIdentityConversion()) return false; + + // We might prefer a std::initializer constructor, zyn0217 wrote: `std::initializer_list` https://github.com/llv

[clang-tools-extra] [clang-tidy][C++20] Add support for Initialization Forwarding in structs and Nested Objects within modernize-use-emplace (PR #131969)

2025-05-02 Thread David Rivera via cfe-commits
RiverDave wrote: Ping https://github.com/llvm/llvm-project/pull/131969 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang] Add `__ptrauth_restricted_intptr` qualifier (PR #137580)

2025-05-02 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt updated https://github.com/llvm/llvm-project/pull/137580 >From 9c29520abea852086f8f4c555e2ad1ea7c711800 Mon Sep 17 00:00:00 2001 From: Oliver Hunt Date: Sun, 27 Apr 2025 22:33:44 -0700 Subject: [PATCH] [clang] Add `__ptrauth_restricted_intptr` qualifier __ptrauth_rest

[clang] [Clang][Driver] Enable internalization by default for AMDGPU (PR #138365)

2025-05-02 Thread Joseph Huber via cfe-commits
@@ -9284,6 +9284,12 @@ void LinkerWrapper::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back(Args.MakeArgString( "--device-linker=" + TC->getTripleString() + "=" + Arg)); + // Enable internalization for AMDGPU. + if (TC->getTrip

[clang] [C] Add -Wjump-bypasses-init (PR #138009)

2025-05-02 Thread Andrew Pinski via cfe-commits
pinskia wrote: Just FYI, the GCC name of the option is -Wjump-misses-init . https://github.com/llvm/llvm-project/pull/138009 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][RISCV] Use vscale_range to handle more fixed<->scalable casts of i1 vectors. (PR #138378)

2025-05-02 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/138378 RISC-V with -mrvv-vector-bits-min supports giving a size to our scalable vector types. To do this, we represent the vector as a fixed vector in memory and need to cast back and force to scable vectors. For i1

[clang] [clang] make it possible to disable c++26 type aware allocators (PR #138372)

2025-05-02 Thread via cfe-commits
cor3ntin wrote: I'm fairly opposed to adding this flag before Sofia - My assumption is that this is a C++26 feature (and one that is backward compatible) - and we should not add a flag for every standard feature. _if_ the committee fails to land this in Sofia, then we can add the flag before t

<    1   2   3   4   5   6   7   >