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

2025-04-14 Thread Erich Keane 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] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -2034,13 +2038,15 @@ multiclass F_ATOMIC_2_AS, preds>; defm _S : F_ATOMIC_2, preds>; + defm _S_C : F_ATOMIC_2, !listconcat([hasSM<80>], preds)>; defm _GEN : F_ATOMIC_2, preds>; } multiclass F_ATOMIC_3_AS preds = []> { defvar frag_pat = (frag node:$a, node:$b, n

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -982,8 +982,9 @@ void NVPTXDAGToDAGISel::SelectAddrSpaceCast(SDNode *N) { case ADDRESS_SPACE_SHARED: Opc = TM.is64Bit() ? NVPTX::cvta_shared_64 : NVPTX::cvta_shared; break; -case ADDRESS_SPACE_DSHARED: - Opc = TM.is64Bit() ? NVPTX::cvta_dshared_64 :

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

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

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

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: A few mean comments, but the approach still seems solid here. I think this is a solid patch https://github.com/llvm/llvm-project/pull/133426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -407,6 +407,18 @@ class Sema; Third == ICK_Identity; } +bool isPerfect(const ASTContext &C) const { erichkeane wrote: I would LOVE a comment here, the implementation isn't particularly clear what is going on here. https://github.com/

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -979,6 +995,20 @@ class Sema; return false; } +bool isPerfectMatch(const ASTContext &Ctx) const { erichkeane wrote: `isPerfect` vs `isPerfectMatch` are... confusing. Work to make these easier to understand together would be appreciated. ht

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -1159,12 +1256,29 @@ class Sema; return reinterpret_cast(FreeSpaceStart); } +template T *allocateDeferredCandidate() { + T *C = slabAllocate(1); erichkeane wrote: Seems funny to me to `slab` allocate in increments of 1. I have a 'silly

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

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/135372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
durga4github wrote: (Sorry I clicked the wrong button `Close` instead of `Comment`) https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
https://github.com/durga4github reopened https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This seems reasonable to me, but also kinda short :) I fear it is missing stuff, so I want to let @andykaylor et-all do a final review. https://github.com/llvm/llvm-project/pull/135493 ___ cfe-commits mailing

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
@@ -4704,6 +4754,43 @@ void llvm::UpgradeIntrinsicCall(CallBase *CI, Function *NewFn) { CI->eraseFromParent(); return; } + case Intrinsic::nvvm_mapa_shared_cluster: { +// Create a new call with the correct address space. +NewCall = +Builder.CreateCal

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

2025-04-14 Thread 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] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Henrich Lauko via cfe-commits
@@ -67,6 +72,166 @@ void CIRDialect::printType(Type type, DialectAsmPrinter &os) const { llvm::report_fatal_error("printer is missing a handler for this type"); } +//===--===// +// RecordType Definitions +/

[libclc] 4cb1803 - [libclc][NFC] Fix typo in comment

2025-04-14 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2025-04-14T14:38:58+01:00 New Revision: 4cb1803ff9d052f1b75d90d5be87345e54aebf92 URL: https://github.com/llvm/llvm-project/commit/4cb1803ff9d052f1b75d90d5be87345e54aebf92 DIFF: https://github.com/llvm/llvm-project/commit/4cb1803ff9d052f1b75d90d5be87345e54aebf92.diff

[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 updated https://github.com/llvm/llvm-project/pull/130623 >From 978d9a153f9c5a98f6c20b94281f1acd02ecae4e Mon Sep 17 00:00:00 2001 From: Jack Styles Date: Fri, 7 Mar 2025 15:51:34 + Subject: [PATCH 1/9] [NFC][ARM] Split SIMD identifier away from MVE Previously, t

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

2025-04-14 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed 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] [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 fd46c6b9af7193376f294a3adae47d579de8503b Mon Sep 17 00:00:00 2001 From: Oleksandr Tarasiuk Date: Mon, 14 Apr 2025 14:05:25 +0300 Subject: [PATCH] [Clang] enhance loop analysis to handle variable changes

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-04-14 Thread Morris Hafner via cfe-commits
@@ -1294,6 +1296,90 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( +cir::ShiftOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

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

2025-04-14 Thread Acim Maravic via cfe-commits
https://github.com/Acim-Maravic created https://github.com/llvm/llvm-project/pull/135631 Added builtin and intrinsic for v_cvt_pk_norm_i16_f16 and v_cvt_pk_norm_u16_f16 >From 86976f24c00ae6471c95edf21e4d55b35682 Mon Sep 17 00:00:00 2001 From: Acim Maravic Date: Mon, 14 Apr 2025 16:29:11 +0

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

2025-04-14 Thread Dmitry Sidorov via cfe-commits
MrSidims 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. @lalaniket8 can thi

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

2025-04-14 Thread Shilei Tian via cfe-commits
shiltian wrote: ping 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] [alpha.webkit.UnretainedCallArgsChecker] Add the support for RetainPtrArc (PR #135532)

2025-04-14 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/135532 >From efd914e66352fdf7e9fac3355d0a06159e880987 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 13 Apr 2025 01:30:26 -0700 Subject: [PATCH 1/3] [alpha.webkit.UnretainedCallArgsChecker] Add the support for R

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

2025-04-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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/4] [HLSL] Use hlsl_device address space for getpointer. We ad

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

2025-04-14 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/135493 >From 650a2402bef4ef83abaaa2b5ae78a7bcdfb4b79f Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 11 Apr 2025 23:39:10 +0200 Subject: [PATCH 1/2] [CIR] Upstream ArraySubscriptExpr for base type as poin

[clang] [llvm] [mlir] [NVPTX] Add support for Shared Cluster Memory address space. (PR #135444)

2025-04-14 Thread Durgadoss R via cfe-commits
durga4github wrote: A general thought, Can we include the base changes in this PR and create a separate PR for the intrinsics-migration+MLIR changes? https://github.com/llvm/llvm-project/pull/135444 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -1015,6 +1045,62 @@ class Sema; RewriteKind(CRK_None) {} }; + struct DeferredTemplateOverloadCandidate { +DeferredTemplateOverloadCandidate *Next = nullptr; erichkeane wrote: Comment here + on the slab allocator function as to WHY we are d

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135105 >From 3b19527073c656b631a990397a00030487b3f595 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 12:45:57 -0700 Subject: [PATCH 1/8] [CIR] Upstream minimal support for structure types This cha

[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
@@ -3170,6 +3170,8 @@ def note_musttail_mismatch : Note< "|has type mismatch at %ordinal3 parameter" "%diff{ (expected $ but has $)|}1,2" "|has different return type%diff{ ($ expected but has $)|}1,2}0">; +def note_musttail_disabled_by_not_tail_called : Note< + "'n

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

2025-04-14 Thread Alexander Shaposhnikov via cfe-commits
https://github.com/alexander-shaposhnikov approved this pull request. https://github.com/llvm/llvm-project/pull/134398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Tom Honermann via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -732,6 +732,16 @@ CodeGenTypes::arrangeBuiltinFunctionDeclaration(CanQualType resultType, RequiredArgs::All); } +const CGFunctionInfo & +CodeGenTypes::arrangeSYCLKernelCallerDeclaration(QualType resultType, +

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Djordje Todorovic (djtodoro) Changes The right name was used in riscv-toolchain-conventions docs. --- Full diff: https://github.com/llvm/llvm-project/pull/135647.diff 15 Files Affected: - (modified) clang/test/Driver/print-supported-extens

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

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -350,20 +350,87 @@ void func7() { // OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8 // OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1 false) -void func8(int p[10]) {} -// CIR: cir.func @func8(%arg0: !cir.ptr -// CIR: cir.alloca !cir.ptr, !cir.ptr>

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

2025-04-14 Thread Andy Kaylor 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

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

2025-04-14 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > Thanks! Does the pr fix https://bugs.llvm.org//show_bug.cgi?id=32670 Nope. The test case in #32017 is still failing. I believe it is a different issue as we don't have any identifiers with the same names as macros. And seems like the behavior wasn't affected by d79514e24b4da11

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

2025-04-14 Thread Andy Kaylor 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

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

2025-04-14 Thread via cfe-commits
Author: Thurston Dang Date: 2025-04-14T09:55:36-07:00 New Revision: 9800c3489a06a285cbc469a9aab4601e57dac35a URL: https://github.com/llvm/llvm-project/commit/9800c3489a06a285cbc469a9aab4601e57dac35a DIFF: https://github.com/llvm/llvm-project/commit/9800c3489a06a285cbc469a9aab4601e57dac35a.diff

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

2025-04-14 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Ah, derp, the issue was me not passing `-Wextra` (sorry!). Hmm, yeah, this does seem like a case we probably want to suppress, for similar reasons as we do for `dlsym`. https://github.com/llvm/llvm-project/pull/86131 ___ cfe-commi

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

2025-04-14 Thread via cfe-commits
https://github.com/MillePlateaux updated https://github.com/llvm/llvm-project/pull/134465 >From 596679a60bcae58ac1c9e1b3066b21399a58f24b Mon Sep 17 00:00:00 2001 From: MillePlateaux Date: Fri, 4 Apr 2025 16:26:25 -0700 Subject: [PATCH 1/8] [llvm][Stmt]:git clang format --- clang/lib/Sema/Sema

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

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: One thing that looks fishy, but that is even a different node, is this early return on `VisitSubstNonTypeTemplateParmPackExpr` in `ASTReaderStmt`. ```C++ if (ArgPack.getKind() != TemplateArgument::Pack) return; ``` This looks impossible to hit, because `getArgumentPack` c

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

2025-04-14 Thread Bruno Cardoso Lopes 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] [SYCL] Basic code generation for SYCL kernel caller offload entry point functions. (PR #133030)

2025-04-14 Thread Erich Keane via cfe-commits
@@ -14794,9 +14803,36 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } -static SYCLKernelInfo BuildSYCLKernelInfo(CanQualType KernelNameType, +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, +

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

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -18,9 +18,12 @@ using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create() { - // For now we just create an empty CIRGenFunctionInfo. - CIRGenFunctionInfo *fi = new CIRGenFunctionInfo(); +CIRGenFunctionInfo *CIRGenFunctionInfo:

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

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -87,9 +110,48 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo, assert(!cir::MissingFeatures::opCallMustTail()); assert(!cir::MissingFeatures::opCallReturn()); - // For now we just return nothing because we don't have support for return - // valu

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/135105 >From 3b19527073c656b631a990397a00030487b3f595 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 9 Apr 2025 12:45:57 -0700 Subject: [PATCH 1/7] [CIR] Upstream minimal support for structure types This cha

[clang] [CIR] Upstream minimal support for structure types (PR #135105)

2025-04-14 Thread Andy Kaylor via cfe-commits
@@ -67,6 +72,166 @@ void CIRDialect::printType(Type type, DialectAsmPrinter &os) const { llvm::report_fatal_error("printer is missing a handler for this type"); } +//===--===// +// RecordType Definitions +/

[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

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Joseph Huber via cfe-commits
@@ -1234,6 +1234,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Specify

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Farzon Lotfi (farzonl) Changes fixes #135654 In #128613 we added safe guards to prevent the lowering of just any intrinsic in the backend. We used `DiagnosticInfoUnsupported` to do this. What we found was when using `opt` the dia

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

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 cpp -- clang/lib/CodeGen/CodeGenAction.cpp `` V

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

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/135655 >From e370144bbe16076cc4305c2bb3e8c5fb373a8a90 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Mon, 14 Apr 2025 14:07:30 -0400 Subject: [PATCH] [Clang][DirectX] Always use Diagnostic Printer fixes #135654 In

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

2025-04-14 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/135655 >From 7ec850f4a31cdd4554d813f759f519cb688652f9 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Mon, 14 Apr 2025 14:07:30 -0400 Subject: [PATCH] [Clang][DirectX] Always use Diagnostic Printer fixes #135654 In

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-14 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: I plan to merge this tomorrow if there are no further comments. https://github.com/llvm/llvm-project/pull/134769 ___ 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: > Since you aren't diagnosing reinterpret-casting a function pointer from > `void*`, because this would warn on idiomatic POSIX code (`dlsym` returns > `void*`), it seemed to me that you'd be interested in not warning on > idiomatic Windows code (`GetProcAddress` returns `F

[clang] [clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (PR #135178)

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

[clang] [clang-tools-extra] [clang] implement printing of canonical expressions (PR #135133)

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

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-sparse Author: Connector Switch (c8ef) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135640.diff 4 Files Affected: - (modified) clang/test/Analysis/Checkers/WebKit/ref-cntbl-base-virtual-dtor-templates.cpp (+3-3) - (modifi

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Connector Switch (c8ef) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135640.diff 4 Files Affected: - (modified) clang/test/Analysis/Checkers/WebKit/ref-cntbl-base-virtual-dtor-templates.cpp (+3-3) - (modifi

[clang] 40727bc - [clang] remove unused frontend flag -fretain-subst-template-type-parm-type-ast-nodes (#134177)

2025-04-14 Thread via cfe-commits
Author: Matheus Izvekov Date: 2025-04-14T11:54:13-03:00 New Revision: 40727bca9fa4c5c9a3c12ce47ee09efcd3f26761 URL: https://github.com/llvm/llvm-project/commit/40727bca9fa4c5c9a3c12ce47ee09efcd3f26761 DIFF: https://github.com/llvm/llvm-project/commit/40727bca9fa4c5c9a3c12ce47ee09efcd3f26761.dif

[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 closed 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

[clang] [clang] remove unused frontend flag -fretain-subst-template-type-parm-type-ast-nodes (PR #134177)

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

[clang] Re-apply "Emit missing cleanups for stmt-expr" and other commits (PR #89154)

2025-04-14 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: This seems to have fixed #60112. Thanks! https://github.com/llvm/llvm-project/pull/89154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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: Using library with assertions, I'm seeing out-of-bounds source location read called from `ASTStmtReader::VisitSubstNonTypeTemplateParmExpr` - [trace](https://gist.github.com/eaeltsin/845fb9cc6f65f47ed03a64aca5aff923) https://github.com/llvm/llvm-project/pull/132401

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

2025-04-14 Thread via cfe-commits
MacroModel wrote: I encountered this problem when compiling my own project. ```bash git clone https://github.com/MacroModel/uwvm2.git --depth=1 cd uwvm2 xmake f -m debug --use-llvm=y xmake -v ``` https://github.com/llvm/llvm-project/pull/135643 ___ cfe

[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 created https://github.com/llvm/llvm-project/pull/135649 None >From 6795a5143129520d2db343d768507174a70da453 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 01:24:10 +0800 Subject: [PATCH] [Clang] Add support for GCC bound member functions extensi

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135629.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+1-1) ``diff diff --git a/clan

[clang] [clang-format]: Add `Custom` to `ShortFunctionStyle`; add new AllowShortFunctionsOnASingleLineOptions for granular setup (PR #134337)

2025-04-14 Thread via cfe-commits
https://github.com/irymarchyk updated https://github.com/llvm/llvm-project/pull/134337 >From df25a8bbfd827085265c51a44bedbf38deebbab4 Mon Sep 17 00:00:00 2001 From: Ivan Rymarchyk <> Date: Sat, 29 Mar 2025 13:54:32 -0700 Subject: [PATCH 1/6] [clang-format]: Add `Custom` to `ShortFunctionStyle`;

[clang] [clang] consistently quote expressions in diagnostics (PR #134769)

2025-04-14 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. Woops! Thought I'd already approved this. https://github.com/llvm/llvm-project/pull/134769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135629.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+1-1) ``diff

[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] fcf0f81 - [Clang][AMDGPU] Enable `avail-extern-to-local` for ThinLTO in HIP (#134476)

2025-04-14 Thread via cfe-commits
Author: Shilei Tian Date: 2025-04-14T11:52:19-04:00 New Revision: fcf0f810ac4b22bda3f21048784ee114da1cb061 URL: https://github.com/llvm/llvm-project/commit/fcf0f810ac4b22bda3f21048784ee114da1cb061 DIFF: https://github.com/llvm/llvm-project/commit/fcf0f810ac4b22bda3f21048784ee114da1cb061.diff L

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -0,0 +1,102 @@ + +Configuring the Analyzer + + +The clang static analyzer supports two kinds of options: + +1. Global **analyzer options** influence the behavior of the analyzer engine. + They are documented on this page, in the

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -7,6 +7,9 @@ //===--===// // // This file defines the analyzer options avaible with -analyzer-config. +// Note that clang/docs/tools/generate_analyzer_options_docs.py relies on the +// structure of this

[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] [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] [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] [NFC][analyzer] Document configuration options (PR #135169)

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

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (MacroModel) Changes 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/MacroMode

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

2025-04-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (MacroModel) Changes 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/llvm-d

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

2025-04-14 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

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

2025-04-14 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: The patch looks reasonable to me, however, I'd wait for somebody with more experience in the macro logic in modules. https://github.com/llvm/llvm-project/pull/135471 ___ cfe-commits mailing list cfe-commits@lis

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

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 cpp -- clang/lib/CodeGen/CGDecl.cpp `` View the

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

2025-04-14 Thread Erich Keane via cfe-commits
@@ -18,9 +18,12 @@ using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create() { - // For now we just create an empty CIRGenFunctionInfo. - CIRGenFunctionInfo *fi = new CIRGenFunctionInfo(); +CIRGenFunctionInfo *CIRGenFunctionInfo:

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

2025-04-14 Thread Erich Keane 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] [Modules] Fix an identifier hiding a function-like macro definition. (PR #135471)

2025-04-14 Thread Jan Svoboda 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] [clang] [CodeGen] fix crash when Ty isDependentType in CodeGenFunction::EmitAutoVarAlloca (PR #135643)

2025-04-14 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1294,6 +1296,90 @@ mlir::LogicalResult CIRToLLVMCmpOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( +cir::ShiftOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const { +

[clang] [Clang] add option --offload-jobs=N (PR #135229)

2025-04-14 Thread Yaxun Liu via cfe-commits
@@ -1234,6 +1234,10 @@ def offload_compression_level_EQ : Joined<["--"], "offload-compression-level=">, Flags<[HelpHidden]>, HelpText<"Compression level for offload device binaries (HIP only)">; +def offload_jobs_EQ : Joined<["--"], "offload-jobs=">, + HelpText<"Specify

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

2025-04-14 Thread Balazs Benics via cfe-commits
@@ -143,6 +143,32 @@ if (LLVM_ENABLE_SPHINX) gen_rst_file_from_td(DiagnosticsReference.rst -gen-diag-docs ../include/clang/Basic/Diagnostic.td "${docs_targets}") gen_rst_file_from_td(ClangCommandLineReference.rst -gen-opt-docs ../include/clang/Driver/ClangOptionDocs.td

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

2025-04-14 Thread via cfe-commits
https://github.com/MillePlateaux updated https://github.com/llvm/llvm-project/pull/134465 >From 596679a60bcae58ac1c9e1b3066b21399a58f24b Mon Sep 17 00:00:00 2001 From: MillePlateaux Date: Fri, 4 Apr 2025 16:26:25 -0700 Subject: [PATCH 1/9] [llvm][Stmt]:git clang format --- clang/lib/Sema/Sema

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

2025-04-14 Thread Bruno Cardoso Lopes via cfe-commits
@@ -350,20 +350,87 @@ void func7() { // OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8 // OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1 false) -void func8(int p[10]) {} -// CIR: cir.func @func8(%arg0: !cir.ptr -// CIR: cir.alloca !cir.ptr, !cir.ptr>

[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: Didn't fire so far. Though this is non-deterministic, I might be (un)lucky. https://github.com/llvm/llvm-project/pull/132401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

<    1   2   3   4   5   >