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

2025-03-19 Thread Aniket Lal via cfe-commits
@@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -emit-llvm -o - %s | FileCheck %s lalaniket8 wrote: Changed test file to auto generate using update_cc_test_checks.py with --include-generated-funcs argument. This can detect and include stub v

[clang] [llvm] [MIPS] Add MIPS i6400 and i6500 processors (PR #130587)

2025-03-19 Thread via cfe-commits
@@ -121,6 +121,30 @@ // MIPS-ARCH-P5600-N64: error: ABI 'n64' is not supported on CPU 'p5600' // // RUN: %clang --target=mips-linux-gnu -### -c %s \ +// RUN:-march=i6400 2>&1 \ +// RUN: | FileCheck -check-prefix=MIPS-ARCH-I6400 %s +// MIPS-ARCH-I6400: "-target-cpu" "i

[clang] [Format] Do not crash on non-null terminated strings (PR #131299)

2025-03-19 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/131299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][AVX10.2] Use 's_' for saturate-convert intrinsics (PR #131592)

2025-03-19 Thread Phoebe Wang via cfe-commits
phoebewang wrote: Here is GCC patch: https://gcc.gnu.org/pipermail/gcc-patches/2025-March/678227.html https://github.com/llvm/llvm-project/pull/131592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clang-doc][fix] crashes when generating HTML without `--repository` (PR #131698)

2025-03-19 Thread Mohamed Emad via cfe-commits
hulxv wrote: @ilovepi I see you opened a PR to solve the same issue [here](https://github.com/llvm/llvm-project/pull/131939). Wouldn't be better if I continue working on it with your suggestions? 😅 https://github.com/llvm/llvm-project/pull/131698 ___

[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-03-19 Thread YunQiang Su via cfe-commits
https://github.com/wzssyqa updated https://github.com/llvm/llvm-project/pull/129207 >From 5c3b36b06294b43088d277c689c3367825708779 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Fri, 28 Feb 2025 16:09:04 +0800 Subject: [PATCH 1/6] Clang: Add minnum/maxnum builtin functions support With https

[clang] [clang][bytecode] Fix initialing array struct fields from an APValue (PR #131983)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We need to recurse once more here and move the array case into the bigger if chain. --- Full diff: https://github.com/llvm/llvm-project/pull/131983.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCo

[clang] [clang][bytecode] Fix initialing array struct fields from an APValue (PR #131983)

2025-03-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/131983 We need to recurse once more here and move the array case into the bigger if chain. >From 7fa354a81378172ce3cd5488b457f129da883698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 19 Ma

[clang] Clang: Add elementwise minnum/maxnum builtin functions (PR #129207)

2025-03-19 Thread YunQiang Su via cfe-commits
wzssyqa wrote: > > > Needs the documentation updates in clang language extensions with the > > > other elementwise builtins, and a release note > > > > > > Documentation updated. And ReleaseNotes is submitted as a new PR: #131977 > > Best to keep the note about the new builtins here. The PR m

[clang] [llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)

2025-03-19 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,407 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 arsenm wrote: Should not be testing the vectorizer in clang. This needs a pure IR test in the backend https://github.com/llvm/llvm-project/p

[clang] [OffloadBundler] Expose function to parse compressed bundle headers (PR #130284)

2025-03-19 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez closed https://github.com/llvm/llvm-project/pull/130284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-19 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From e9988c36ed788b2d1ce00b028bed51169bd8b02c Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Mar 2025 09:04:29 +0100 Subject: [PATCH] [clang][Sema] Propagate qualifiers during derived-t

[clang] [OffloadBundler] Expose function to parse compressed bundle headers (PR #130284)

2025-03-19 Thread Juan Manuel Martinez Caamaño via cfe-commits
jmmartinez wrote: Thanks for the review ! https://github.com/llvm/llvm-project/pull/130284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix initializing array struct fields from an APValue (PR #131983)

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

[clang-tools-extra] [clang-tidy][C++20] Add support for aggregate types within modernize-use-emplace (PR #131969)

2025-03-19 Thread Baranov Victor via cfe-commits
@@ -0,0 +1,86 @@ +// RUN: %check_clang_tidy %s -std=c++20 modernize-use-emplace %t -- \ +// RUN: -config="{CheckOptions: \ +// RUN: {modernize-use-emplace.ContainersWithPushBack: \ +// RUN:'::std::vector; ::std::list; ::std::deque; llvm::LikeASmallVe

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/132016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > We could, but also RenamerClangTidyVisitor could be improved to skip system > code if not enabled. I checked briefly and it does not seem to process system declarations already now, it was just the macros that were missing. https://github.com/llvm/llvm-project/pull/1320

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -149,14 +156,125 @@ void CIRGenFunction::declare(mlir::Value addrVal, const Decl *var, QualType ty, allocaOp.setConstantAttr(mlir::UnitAttr::get(&getMLIRContext())); } +void CIRGenFunction::LexicalScope::cleanup() { + CIRGenBuilderTy &builder = cgf.builder; + Lexical

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: 2 nits, else LGTM. https://github.com/llvm/llvm-project/pull/131945 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream a basic version of class LexicalScope (PR #131945)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -149,14 +156,125 @@ void CIRGenFunction::declare(mlir::Value addrVal, const Decl *var, QualType ty, allocaOp.setConstantAttr(mlir::UnitAttr::get(&getMLIRContext())); } +void CIRGenFunction::LexicalScope::cleanup() { + CIRGenBuilderTy &builder = cgf.builder; + Lexical

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

2025-03-19 Thread Carlos Galvez via cfe-commits
@@ -0,0 +1,20 @@ +set(LLVM_LINK_COMPONENTS + support + ) + +add_clang_library(clangTidyCustomModule STATIC + CustomTidyModule.cpp + QueryCheck.cpp + + LINK_LIBS + clangTidy + clangTidyUtils + + DEPENDS + ClangDriverOptions + ) + +clang_target_link_libraries(clangTidyCust

[clang] [Clang][NFC] Add test for CWG2289 "Uniqueness of structured binding names" (PR #131054)

2025-03-19 Thread Yanzuo Liu via cfe-commits
zwuis wrote: > "Declarative region" is clearly pre-P1787R6 wording. Can you find the wording > in the current draft that covers this? Yes. I have updated the description of this PR. https://github.com/llvm/llvm-project/pull/131054 ___ cfe-commits mai

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-19 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: @efriedma-quic Any more comments? https://github.com/llvm/llvm-project/pull/130734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 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 861efd4b3f93d30d353f0a6eea249fbdac1778a0 0d4f53cefc223a116b25f9106d37dc707c58ec0f --e

[clang] [Clang] Introduce a trait to determine the structure binding size (PR #131515)

2025-03-19 Thread Yanzuo Liu via cfe-commits
@@ -1642,6 +1661,56 @@ void Sema::CheckCompleteDecompositionDeclaration(DecompositionDecl *DD) { DD->setInvalidDecl(); } +std::optional Sema::GetDecompositionElementCount(QualType T, + SourceLocation Loc) { + con

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: LGTM! I second the suggestion to add a test. Also see the suggestion to turn this into a warning in the first place: https://github.com/llvm/llvm-project/issues/126231#issuecomment-2735876367 I am not sure why lifetimebound needs to be an error while other attributes like

[clang] [Clang] Force expressions with UO_Not to not be non-negative (PR #126846)

2025-03-19 Thread Yutong Zhu via cfe-commits
YutongZhuu wrote: > I think this change might went too far. We are seeing this check flagging > code like this: > > ``` > error: implicit conversion loses integer precision: 'int' to 'int8_t' (aka > 'signed char') [-Werror,-Wimplicit-int-conversion]: > int8_t shift = ... > ... > shift = -shift

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
erichkeane wrote: > I was wondering if it was okay for a replacement since the names of the > CommandTraits options are the same. Also would a select with only 1 use (with > a magic number) be up for replacement? I'll check out the review. As far as this CommandTraits one, it probably is not

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: The parts I could see are in teh right direction, I've made some comments. Please undo the clang-format of `ExprConstant.cpp` (and only clang-format the parts of the file you modified) and I can look at the hwole thing. https://github.com/llvm/llvm-proj

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -71,721 +71,704 @@ using namespace clang; using llvm::APFixedPoint; +using llvm::APFloat; erichkeane wrote: DEFINITELY looks like you clang-formatted this entire file. Please don't! I can't see what the changes you made here were. https://github.com/ll

[clang] [Clang] Implement Wpointer-bool-conversion-strict (PR #131523)

2025-03-19 Thread Yutong Zhu via cfe-commits
https://github.com/YutongZhuu converted_to_draft https://github.com/llvm/llvm-project/pull/131523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Diagnostics] Update select uses in DiagnosticXKinds.td to use enum_select (PR #130868)

2025-03-19 Thread Erich Keane via cfe-commits
@@ -1041,4 +1042,4 @@ def warn_unpacked_field def warn_unaligned_access : Warning< "field %1 within %0 is less aligned than %2 and is usually due to %0 being " "packed, which can lead to unaligned accesses">, InGroup, DefaultIgnore; -} +} erichkeane wrote:

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

2025-03-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] baef6fa - [Clang] Increase the default expression nesting limit (#132021)

2025-03-19 Thread via cfe-commits
Author: cor3ntin Date: 2025-03-19T15:16:38+01:00 New Revision: baef6fadbf0e4ddac33c6a8a6275208435f52965 URL: https://github.com/llvm/llvm-project/commit/baef6fadbf0e4ddac33c6a8a6275208435f52965 DIFF: https://github.com/llvm/llvm-project/commit/baef6fadbf0e4ddac33c6a8a6275208435f52965.diff LOG:

[clang] [compiler-rt] [Coverage] Fix region termination for GNU statement expressions (PR #130976)

2025-03-19 Thread Justin Cady via cfe-commits
https://github.com/justincady updated https://github.com/llvm/llvm-project/pull/130976 >From 1b7884bbff037efa5c69eeecafe8db282561b2fc Mon Sep 17 00:00:00 2001 From: Justin Cady Date: Wed, 12 Mar 2025 11:23:19 -0400 Subject: [PATCH] [Coverage] Fix region termination for GNU statement expression

[clang] [Offload] Handle `BoundArchitecture` for non-GPU targets (PR #132037)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: Offloading tends to have a bound architecture that directly correponds to the `-mcpu` argument for that embedded job. This is currently handled by the GPU offloading toolchains, but is ignored by the

[clang] [Offload] Handle `BoundArchitecture` for non-GPU targets (PR #132037)

2025-03-19 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/132037 Summary: Offloading tends to have a bound architecture that directly correponds to the `-mcpu` argument for that embedded job. This is currently handled by the GPU offloading toolchains, but is ignored by the CPU

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

2025-03-19 Thread via cfe-commits
cor3ntin wrote: Thanks @erichkeane. Let see if the bots scream https://github.com/llvm/llvm-project/pull/132021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

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

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Baranov Victor via cfe-commits
vbvictor wrote: @PiotrZSL Ping https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL commented: Few nits https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,100 @@ +.. title:: clang-tidy - modernize-use-scoped-lock + +modernize-use-scoped-lock += + +Finds uses of ``std::lock_guard`` and suggests replacing them with C++17's +alternative ``std::scoped_lock``. The check will automatically transform only

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,342 @@ +//===--- UseScopedLockCheck.cpp - clang-tidy --===// +// +// 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: Ap

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-19 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/131804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Do not infer lifetimebound for functions with void return type (PR #131997)

2025-03-19 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @usx95 I struggled to come up with a reproducer and couldn't understand why at first. I think we infer the attribute **after** we check for this error. This is obviously something we need to fix, but you can get a reproducer like this: https://gcc.godbolt.org/z/e66MY1nn5

[libclc] [libclc] Move __clc_(remainder|fmod|remquo) to the CLC library (PR #132054)

2025-03-19 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/132054 These functions were already nominally in the CLC namespace; this commit just formally moves them over. Note that 'half' versions of these CLC functions are now provided. Previously the corresponding OpenC

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -2316,6 +2337,49 @@ void BuildLockset::VisitReturnStmt(const ReturnStmt *S) { ReturnType->getPointeeType().isConstQualified() ? AK_Read : AK_Written, POK_ReturnPointer); } + + if (!checkRecordTypeForScopedCapability(ReturnType)) +return; + + if (const

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -1799,11 +1799,11 @@ class ThreadSafetyReporter : public clang::threadSafety::ThreadSafetyHandler { : getNotes(); } - OptionalNotes makeManagedMismatchNoteForParam(SourceLocation DeclLoc) { + OptionalNotes makeManagedMismatchNote(SourceLocation DeclLoc,

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Looks good to me, just some small nitpicks. https://github.com/llvm/llvm-project/pull/131831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -2316,6 +2337,49 @@ void BuildLockset::VisitReturnStmt(const ReturnStmt *S) { ReturnType->getPointeeType().isConstQualified() ? AK_Read : AK_Written, POK_ReturnPointer); } + + if (!checkRecordTypeForScopedCapability(ReturnType)) +return; + + if (const

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -2041,15 +2042,16 @@ void BuildLockset::handleCall(const Expr *Exp, const NamedDecl *D, if (!a.has_value()) { Analyzer->Handler.handleExpectFewerUnderlyingMutexes( Exp->getExprLoc(), D->getLocation(), Scope->toString(), - b.value

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -3566,6 +3565,38 @@ void releaseMemberCall() { ReleasableMutexLock lock(&obj.mu); releaseMember(obj, lock); } +#ifdef __cpp_guaranteed_copy_elision aaronpuchert wrote: Add blank lines around `#ifdef` and `#endif` for readability. https://github.com/llv

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-19 Thread Sam Elliott via cfe-commits
https://github.com/lenary approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/131094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IRBuilder] Add new overload for CreateIntrinsic (PR #131942)

2025-03-19 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/131942 >From e24106ee27fc6143914e92243556d5206cd230cf Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Tue, 18 Mar 2025 13:19:24 -0700 Subject: [PATCH] [IRBuilder] Add new overload for CreateIntrinsic Add a new `Creat

[clang] [clang] Auto-detect which newline style to use for `cxx_dr_status.html` (PR #132045)

2025-03-19 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/132045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add new check: modernize-use-scoped-lock (PR #126434)

2025-03-19 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/126434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-19 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl requested changes to this pull request. Test changes needed aswell as some type constraints to template type T. https://github.com/llvm/llvm-project/pull/131900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [llvm] Hlsl asint16 intrinsic (PR #131900)

2025-03-19 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,55 @@ +; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; CHECK: OpCapability Int16 +; CHECK: OpCapability Float16 +; CH

[clang] [CIR] Upstream support for type aliases (PR #131912)

2025-03-19 Thread Morris Hafner via cfe-commits
@@ -89,6 +89,7 @@ list(APPEND CLANG_TEST_DEPS if(CLANG_ENABLE_CIR) list(APPEND CLANG_TEST_DEPS cir-opt +cir-translate mmha wrote: Thanks! I missed that. I can see that the incubator has `mlir-translate` as a dependency, too. Should we add this now a

[clang] [CIR] Upstream support for type aliases (PR #131912)

2025-03-19 Thread Morris Hafner via cfe-commits
@@ -1,5 +1,5 @@ # Test runner infrastructure for Clang. This configures the Clang test trees -# for use by Lit, and delegates to LLVM's lit test handlers. +# for use by Lit, and delegates to LLVM's lit test handlers.int mmha wrote: copy/paste error? https://git

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-19 Thread via cfe-commits
@@ -3660,6 +3660,8 @@ class TreeTransform { return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd()); } + bool HeuristicallyComputeSizeOfPackExpr() const { return true; } + cor3ntin wrote: I think I would prefer to add a `TransformSiz

[clang] [clang] Remove deprecated `FileManager` APIs (PR #132063)

2025-03-19 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/132063 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Andy Kaylor via cfe-commits
@@ -271,16 +314,61 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const APValue &value, cgm.getASTContext().getTargetInfo().useFP16ConversionIntrinsics()) { cgm.errorNYI("ConstExprEmitter::tryEmitPrivate half"); return {}; -} else { - mlir::Typ

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Andy Kaylor via cfe-commits
@@ -228,6 +257,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr fltAttr) { loc, converter->convertType(fltAttr.getType()), fltAttr.getValue()); } +// ConstArrayAttr visitor +mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstArrayAttr attr) { + auto llvmTy =

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilb (Long Branch) extension (PR #131996)

2025-03-19 Thread Craig Topper via cfe-commits
@@ -96,6 +96,21 @@ def simm32 : RISCVOp { }]; } +// A 32-bit signed immediate where the least significant bit is zero. +def simm32_lsb0 : Operand { + let ParserMatchClass = SImmAsmOperand<32, "Lsb0">; + let PrintMethod = "printBranchOperand"; + let EncoderMethod = "getImm

[clang] [CIR] Upstream support for type aliases (PR #131912)

2025-03-19 Thread Andy Kaylor via cfe-commits
@@ -89,6 +89,7 @@ list(APPEND CLANG_TEST_DEPS if(CLANG_ENABLE_CIR) list(APPEND CLANG_TEST_DEPS cir-opt +cir-translate andykaylor wrote: That won't be needed until we upstream one of the tests that uses it. Those are all in the Lowering/ThroughMLIR d

[clang] [CLANG-CL] ignores wpadded (PR #130182)

2025-03-19 Thread Theo de Magalhaes via cfe-commits
=?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes , =?utf-8?q?Théo?= De Magalhaes Message-ID: In-Reply-To: https://github.com/therealcoochieman updated https://github.com/llvm/llvm-project/pull/130182 >From 3a9bc908a7

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -3566,6 +3565,38 @@ void releaseMemberCall() { ReleasableMutexLock lock(&obj.mu); releaseMember(obj, lock); } +#ifdef __cpp_guaranteed_copy_elision +// expected-note@+2{{mutex acquired here}} +// expected-note@+1{{see attribute on function here}} +RelockableScope returnU

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
@@ -3566,6 +3565,38 @@ void releaseMemberCall() { ReleasableMutexLock lock(&obj.mu); releaseMember(obj, lock); } +#ifdef __cpp_guaranteed_copy_elision +// expected-note@+2{{mutex acquired here}} +// expected-note@+1{{see attribute on function here}} +RelockableScope returnU

[clang] Thread Safety Analysis: Check managed capabilities of returned scoped capability (PR #131831)

2025-03-19 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/131831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV] Emit HLSL structured buffers (PR #132034)

2025-03-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/132034 >From d56c4165207aaf1b14802f115a0706e189571c4f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 24 Jan 2025 13:04:29 -0500 Subject: [PATCH 1/5] [HLSL] Add SPIR-V target type for RWStructuredBuffers This

[libclc] [libclc] Update license headers (PR #132070)

2025-03-19 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: Note that this work is the result of asking the LLVM Foundation about the state of libclc licensing, and their checking with the Foundation's IP lawyer. I've CC'd @kbeyls for confirmation. https://github.com/llvm/llvm-project/pull/132070 _

[clang] [Clang] Fix various bugs in alias CTAD transform (PR #132061)

2025-03-19 Thread via cfe-commits
@@ -3660,6 +3660,8 @@ class TreeTransform { return SemaRef.BuildCXXNoexceptExpr(Range.getBegin(), Arg, Range.getEnd()); } + bool HeuristicallyComputeSizeOfPackExpr() const { return true; } + cor3ntin wrote: This will need a comment https://github.com/

[clang] 03adb0e - [analyzer] Remove deprecated option VirtualCall:PureOnly (#131823)

2025-03-19 Thread via cfe-commits
Author: Donát Nagy Date: 2025-03-19T18:22:00+01:00 New Revision: 03adb0ec7dce36814b9e403e98e7471630c4a732 URL: https://github.com/llvm/llvm-project/commit/03adb0ec7dce36814b9e403e98e7471630c4a732 DIFF: https://github.com/llvm/llvm-project/commit/03adb0ec7dce36814b9e403e98e7471630c4a732.diff LO

[clang] [analyzer] Remove deprecated option VirtualCall:PureOnly (PR #131823)

2025-03-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat closed https://github.com/llvm/llvm-project/pull/131823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Andy Kaylor via cfe-commits
@@ -158,13 +158,56 @@ class ConstExprEmitter // TODO(cir): this can be shared with LLVM's codegen static QualType getNonMemoryType(CIRGenModule &cgm, QualType type) { - if (auto at = type->getAs()) { + if (const auto *at = type->getAs()) { return cgm.getASTContext().get

[clang] [HLSL] Add SPIR-V target type for StructuredBuffers (PR #132027)

2025-03-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron converted_to_draft https://github.com/llvm/llvm-project/pull/132027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc][fix] crashes when generating HTML without `--repository` (PR #131698)

2025-03-19 Thread Paul Kirth via cfe-commits
@@ -494,7 +494,7 @@ genReferencesBlock(const std::vector &References, static std::unique_ptr writeFileDefinition(const Location &L, std::optional RepositoryUrl = std::nullopt) { - if (!L.IsFileInRootDir && !RepositoryUrl) + if (!L.IsFileInRootDir || !Repos

[clang] [llvm] [SPIRV] Emit HLSL structured buffers (PR #132034)

2025-03-19 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/132034 >From d56c4165207aaf1b14802f115a0706e189571c4f Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 24 Jan 2025 13:04:29 -0500 Subject: [PATCH 1/4] [HLSL] Add SPIR-V target type for RWStructuredBuffers This

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Donát Nagy (NagyDonat) Changes Simplify `VirtualCallChecker.cpp` with the help of the new framework for multipart checkers that was introduced by commit 27099982da2f5a6c2d282d6b385e79d080669546. This is part of a commit series that will p

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat updated https://github.com/llvm/llvm-project/pull/132072 From f4e583ff179faf03b571cbd0091af404e5c2d5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 18 Mar 2025 13:44:19 +0100 Subject: [PATCH 1/2] [NFC][analyzer] Multipart checker refactor

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-19 Thread Donát Nagy via cfe-commits
@@ -42,8 +42,14 @@ namespace { class VirtualCallChecker : public Checker { public: - // These are going to be null if the respective check is disabled. - mutable std::unique_ptr BT_Pure, BT_Impure; + enum : CheckerPartIdx { PureChecker, ImpureChecker, NumCheckerParts };

[clang] e1f4daf - [clang][modules] Correctly set module map systemness (#131940)

2025-03-19 Thread via cfe-commits
Author: Michael Spencer Date: 2025-03-19T11:19:25-07:00 New Revision: e1f4daf836e24d9c39fdd4fda84c01e4af31fd65 URL: https://github.com/llvm/llvm-project/commit/e1f4daf836e24d9c39fdd4fda84c01e4af31fd65 DIFF: https://github.com/llvm/llvm-project/commit/e1f4daf836e24d9c39fdd4fda84c01e4af31fd65.dif

[clang] [clang][modules] Correctly set module map systemness (PR #131940)

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

[clang] [NFC][analyzer] Multipart checker refactor 1: VirtualCallChecker (PR #132072)

2025-03-19 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/132072 Simplify `VirtualCallChecker.cpp` with the help of the new framework for multipart checkers that was introduced by commit 27099982da2f5a6c2d282d6b385e79d080669546. This is part of a commit series that will pe

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

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

[clang] [CIR] Upstream global initialization for ArrayType (PR #131657)

2025-03-19 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor commented: I have just a few more issues. https://github.com/llvm/llvm-project/pull/131657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Improve checking of operator functions (PR #131777)

2025-03-19 Thread via cfe-commits
@@ -4120,6 +4121,28 @@ TemplateDeductionResult Sema::FinishTemplateArgumentDeduction( } } + // If the template is an operator function template, check that the + // resulting specialization is a valid operator function. + switch (Specialization->getOverloadedOperator

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Carlos Galvez (carlosgalvezp) Changes Currently, the check is processing system macros. Most importantly, it tries to find .clang-tidy files associated with those files, if the option GetConfigPerFile (on by default) is active

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -18933,12 +18945,35 @@ static bool actOnOMPReductionKindClause( reportOriginalDsa(S, Stack, D, DVar); continue; } + // OpenMP 6.0 [ 7.6.10 ] + // Support Reduction over private variables with reduction clause. + // A list item in a reduct

[clang] [llvm] [CLANG] Add support of shared attribute for the pragma section. (PR #128197)

2025-03-19 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/128197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Skip system macros in readability-identifier-naming check (PR #132016)

2025-03-19 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Maybe we do want to enable processing the macro if `SystemHeaders` is active? https://github.com/llvm/llvm-project/pull/132016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [OpenMP 6.0] Parse/Sema support for reduction over private variable with reduction clause. (PR #129938)

2025-03-19 Thread Alexey Bataev via cfe-commits
@@ -11721,6 +11721,12 @@ void OMPClauseReader::VisitOMPReductionClause(OMPReductionClause *C) { Vars.push_back(Record.readSubExpr()); C->setInscanCopyArrayElems(Vars); } + unsigned NumFlags = Record.readInt(); + SmallVector Flags; + Flags.reserve(NumFlags); + f

[clang] [Clang] Increase the default expression nesting limit (PR #132021)

2025-03-19 Thread via cfe-commits
cor3ntin wrote: Note this doesn't appear to impact performance negatively https://llvm-compile-time-tracker.com/compare.php?from=33e5d013b7f7a6ae136a058f842b30c87623ecfb&to=9e96b0f696f2478cdfeccec0c349b973e96f1432&stat=instructions%3Au https://github.com/llvm/llvm-project/pull/132021 __

<    1   2   3   4   >