[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135893 We were using AssumedTemplate incorrectly for error recovery. Fixes #135621 >From c2a06ac2819014546e60202ce520e5e327f53e5f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes We were using AssumedTemplate incorrectly for error recovery. Fixes #135621 --- Full diff: https://github.com/llvm/llvm-project/pull/135893.diff 4 Files Affected: - (modified) clang/docs/ReleaseNotes.

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/135876 ___ 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-15 Thread via cfe-commits
modiking wrote: > A general thought, Can we include the base changes in this PR and create a > separate PR for the intrinsics-migration+MLIR changes? That makes sense, will do once we're happy with all the changes. https://github.com/llvm/llvm-project/pull/135444 __

[clang] [NFC][Drive] Reorder boolean expression (PR #135881)

2025-04-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. nit: Driver nit2: I don't think this is really reordering. https://github.com/llvm/llvm-project/pull/135881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-15 Thread via cfe-commits
@@ -2595,6 +2595,14 @@ GetX86_64ByValArgumentPair(llvm::Type *Lo, llvm::Type *Hi, ABIArgInfo X86_64ABIInfo:: classifyReturnType(QualType RetTy) const { + // return int128 as i128 + if (const BuiltinType *BT = RetTy->getAs()) { +BuiltinType::Kind k = BT->getKind(); +

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,222 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [CIR] Upstream initial support for complete record types (PR #135844)

2025-04-15 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/135844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-15 Thread Jim Lin via cfe-commits
https://github.com/tclin914 updated https://github.com/llvm/llvm-project/pull/135110 >From 1615cb987f60d8c6123f7c95bc7bd7f22d897ea1 Mon Sep 17 00:00:00 2001 From: Jim Lin Date: Wed, 9 Apr 2025 09:44:47 +0800 Subject: [PATCH 01/11] [RISCV] Add Andes XAndesperf (Andes Performance) extension. Th

[clang] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread Justin Bogner via cfe-commits
@@ -309,6 +309,9 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, } bool HLSLToolChain::requiresValidation(DerivedArgList &Args) const { + if (!Args.hasArg(options::OPT_dxc_Fo)) +return false; bogner wrote: I'm not sure I

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-15 Thread Jim Lin via cfe-commits
@@ -447,18 +447,25 @@ static DecodeStatus decodeSImmNonZeroOperand(MCInst &Inst, uint32_t Imm, return decodeSImmOperand(Inst, Imm, Address, Decoder); } -template -static DecodeStatus decodeSImmOperandAndLsl1(MCInst &Inst, uint32_t Imm, +template +static DecodeStatus decod

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-15 Thread Jim Lin via cfe-commits
@@ -0,0 +1,358 @@ +//===-- RISCVInstrInfoXAndes.td *- tablegen -*-===// +// +// 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] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-15 Thread Jim Lin via cfe-commits
@@ -0,0 +1,358 @@ +//===-- RISCVInstrInfoXAndes.td *- tablegen -*-===// +// +// 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] [HLSL] Don't invoke `dxv` from `clang-dxc` for text output (PR #135876)

2025-04-15 Thread Damyan Pepper via cfe-commits
@@ -309,6 +309,9 @@ HLSLToolChain::TranslateArgs(const DerivedArgList &Args, StringRef BoundArch, } bool HLSLToolChain::requiresValidation(DerivedArgList &Args) const { + if (!Args.hasArg(options::OPT_dxc_Fo)) +return false; damyanp wrote: Thanks for ex

[clang] [Modules] Fix the inconsistency of which `Decl` should be serialized for an identifier. (PR #135887)

2025-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/135887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From 9f3ea29b57cf9d6611073e3235e79490614e9a05 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 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/AST/Type.cpp clang/lib/Sema/SemaExpr.cpp cl

[clang] [llvm] [RISCV] Add Andes XAndesperf (Andes Performance) extension. (PR #135110)

2025-04-15 Thread Kito Cheng via cfe-commits
https://github.com/kito-cheng edited https://github.com/llvm/llvm-project/pull/135110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen][X86] don't coerce int128 into `{i64,i64}` for SysV-like ABIs (PR #135230)

2025-04-15 Thread via cfe-commits
T0b1-iOS wrote: > Maybe a bad suggestion, I have not looked into the implementation, but at the > point where the i128 gets split into two i64s, could we already update the > #dbg_value there to use fragments? At that point we have all the required > information, and it sounds like it would av

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From c52264e0cebe9e32cb92670779e8fb07e63eca5a Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-04-15 Thread Shafik Yaghmour via cfe-commits
@@ -3,6 +3,11 @@ // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-unknown-fuchsia %s // RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -triple=x86_64-linux-android %s +// expected-n

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

2025-04-15 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/133030 >From 2c99027df798c04d252ff8f66853888db89356f1 Mon Sep 17 00:00:00 2001 From: Elizabeth Andrews Date: Tue, 25 Mar 2025 09:31:11 -0700 Subject: [PATCH 1/5] [SYCL] Basic code generation for SYCL kernel caller

[clang] [clang] fix a crash in error recovery in expressions resolving to templates (PR #135893)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/135893 >From d06164cda2bccc398a49bbbfadb728184ff6cb73 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Tue, 15 Apr 2025 21:54:04 -0300 Subject: [PATCH] [clang] fix a crash in error recovery in expressions resolvi

[clang] [clang] Constant-evaluate format strings as last resort (PR #135864)

2025-04-15 Thread via cfe-commits
https://github.com/apple-fcloutier edited https://github.com/llvm/llvm-project/pull/135864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-15 Thread Sirui Mu 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] cir.call with scalar return type (PR #135552)

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

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

2025-04-15 Thread Sirui Mu via cfe-commits
@@ -29,13 +32,29 @@ CIRGenCallee CIRGenCallee::prepareConcreteCallee(CIRGenFunction &cgf) const { return *this; } -static const CIRGenFunctionInfo &arrangeFreeFunctionLikeCall(CIRGenTypes &cgt) { +static const CIRGenFunctionInfo & +arrangeFreeFunctionLikeCall(CIRGenTypes &

[clang] [clang][scan-deps] Centralize logic for populating StableDirs, NFC (PR #135704)

2025-04-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. https://github.com/llvm/llvm-project/pull/135704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-15 Thread Erich Keane via cfe-commits
@@ -6606,7 +6606,10 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { if (ClassExported && !ClassAttr->isInherited() && TSK == TSK_ExplicitInstantiationDeclaration && !Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) { -Class->dr

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-15 Thread via cfe-commits
@@ -3107,6 +3107,26 @@ let TargetPrefix = "aarch64" in { } } + class SME_OuterProduct_TMOP_Intrinsic + : DefaultAttrsIntrinsic<[], + [llvm_i32_ty, + llvm_anyvector_ty, + LLVMMatchType<0>, + LLVMMatchType<0>, + llvm_nxv16i8

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-15 Thread via cfe-commits
https://github.com/ShashwathiNavada updated https://github.com/llvm/llvm-project/pull/125643 >From 0aebcd7119fbcd51154c5d9706752e8ff3f041bc Mon Sep 17 00:00:00 2001 From: ShashwathiNavada Date: Tue, 4 Feb 2025 00:16:09 -0600 Subject: [PATCH 1/7] Adding diagnostics for unsupported option --- c

[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)

2025-04-15 Thread via cfe-commits
https://github.com/hstk30-hw edited https://github.com/llvm/llvm-project/pull/125643 ___ 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-15 Thread Erich Keane via cfe-commits
@@ -743,6 +759,13 @@ class Sema; Standard.setAllToTypes(T); } +/// A conversion sequence is perfect if erichkeane wrote: this comment is good here, add to 410 would be nice as well. https://github.com/llvm/llvm-project/pull/133426 _

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

2025-04-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-04-15T11:19:19-04:00 New Revision: d0e4af8a88dc7a0377677000d0c92104ff215347 URL: https://github.com/llvm/llvm-project/commit/d0e4af8a88dc7a0377677000d0c92104ff215347 DIFF: https://github.com/llvm/llvm-project/commit/d0e4af8a88dc7a0377677000d0c92104ff215347.diff

[clang] 06da00a - [ARM][Clang] Make `+nosimd` functional for AArch32 Targets (#130623)

2025-04-15 Thread via cfe-commits
Author: Jack Styles Date: 2025-04-15T09:00:14+01:00 New Revision: 06da00ae2d116bb2c4063b124429c2d29eb69d87 URL: https://github.com/llvm/llvm-project/commit/06da00ae2d116bb2c4063b124429c2d29eb69d87 DIFF: https://github.com/llvm/llvm-project/commit/06da00ae2d116bb2c4063b124429c2d29eb69d87.diff L

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

2025-04-15 Thread Erich Keane via cfe-commits
@@ -96,6 +96,12 @@ C++ Language Changes asm((std::string_view("nop")) ::: (std::string_view("memory"))); } +- Clang now implements the changes to overload resolution proposed by `P3606 `_. erichkeane wrote: Can we clarify

[clang] [Clang] Allow simpler visibility annotations when targeting win32 and mingw (PR #133699)

2025-04-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Overall I don't mind the patch. The special attribute here is... frustrating/concerning/etc, and I'd rather we just mark the attribute as 'invalid' in some way so that we can diagnose it instead. https://github.com/llvm/llvm-project/pull/133699 ___

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

2025-04-15 Thread Erich Keane via cfe-commits
@@ -1043,6 +1141,8 @@ class Sema; /// C++ [over.match.call.general] /// Resolve a call through the address of an overload set. CSK_AddressOfOverloadSet, + + CSK_CodeCompletion, erichkeane wrote: What is happening here? I'm a touch confu

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

2025-04-15 Thread Erich Keane via cfe-commits
@@ -1216,6 +1352,24 @@ class Sema; return ConversionSequenceList(Conversions, NumConversions); } +/// Provide storage for any Expr* arg that must be preserved +/// until deferred template candidates are deduced. +/// Typically this should be used for reve

[clang] [llvm] [WIP] Clang ABI Types (PR #133080)

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

[clang] [Clang] Consider preferred_type in bitfield warnings (#116760) (PR #116785)

2025-04-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/116785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa created https://github.com/llvm/llvm-project/pull/135809 Following are the changes: 1. Make OffloadKind enum values to be powers of two so we can use them like a bitfield 2. Include OFK_SYCL enum value 3. Modify ActiveOffloadKinds support in clang-linker-wrapper to

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

2025-04-15 Thread via cfe-commits
https://github.com/jeremyd2019 created https://github.com/llvm/llvm-project/pull/135691 Add a new Cygwin toolchain that just goes through the motions to initialize the Generic_GCC base properly. This allows removing some old, almost certainly wrong hard-coded paths from Lex/InitHeaderSearch.c

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

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

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

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

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

2025-04-15 Thread Sirui Mu 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] [clang] Reject character devices in #embed for now (PR #135370)

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

[clang] Fixed issue #128882: don't warn if 1st argument to 'getcwd' is NULL (PR #135720)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Sean McBride (seanm) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/135720.diff 1 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp (-1) ``diff

[clang] [clang] AST: remove source locations from [Variable/Dependent]SizedArrayType (PR #135511)

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

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

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-directx 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 d

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

2025-04-15 Thread via cfe-commits
@@ -7230,7 +7230,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // -fuse-cxa-atexit is default. if (!Args.hasFlag( options::OPT_fuse_cxa_atexit, options::OPT_fno_use_cxa_atexit, - !RawTriple.isOSAIX() && !RawTriple.isOSWindows() && +

[clang] [llvm] [clang][NVPTX] Add builtins and intrinsics for conversions of new FP types (PR #134345)

2025-04-15 Thread Srinivasa Ravi via cfe-commits
@@ -703,6 +703,41 @@ let hasSideEffects = false in { defm CVT_to_tf32_rz_satf : CVT_TO_TF32<"rz.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rn_relu_satf : CVT_TO_TF32<"rn.relu.satfinite", [hasPTX<86>, hasSM<100>]>; defm CVT_to_tf32_rz_relu_satf : CVT_TO_TF

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

2025-04-15 Thread Jan Svoboda via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

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

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

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

2025-04-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane requested changes to this pull request. See comment re:auto: our lead maintainer's interpretation of our `auto` rules requires that we not use `auto` in this situation. @AaronBallman for attention. https://github.com/llvm/llvm-project/pull/133030 ___

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

2025-04-15 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu closed https://github.com/llvm/llvm-project/pull/135229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-15 Thread via cfe-commits
Author: MillePlateaux Date: 2025-04-14T13:10:20-07:00 New Revision: 061f87f75f38e80e7494b5f7235103f7f11a36c3 URL: https://github.com/llvm/llvm-project/commit/061f87f75f38e80e7494b5f7235103f7f11a36c3 DIFF: https://github.com/llvm/llvm-project/commit/061f87f75f38e80e7494b5f7235103f7f11a36c3.diff

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

2025-04-15 Thread Amr Hesham 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][ARM] Ensure FPU Features are parsed when targeting `cc1as` (PR #134612)

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

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-15 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. https://github.com/llvm/llvm-project/pull/135473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety][Sema] Allow counted_by and counted_by_or_null on pointers where the pointee type is incomplete but potentially completable (PR #106321)

2025-04-15 Thread Dan Liew via cfe-commits
delcypher wrote: > I think this should be fine at this point. I’m having a bit of a hard time > trying to figure out what changed since my last review because of the > force-pushing, but so long as you haven’t made any other major changes since > then then this ltgm now. Sorry about that. Thi

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

2025-04-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/135683 >From 226d96d4e66e0a1e9d4f42df413d11a6ece4fec9 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Mon, 14 Apr 2025 14:16:05 -0700 Subject: [PATCH 1/2] [SYCL] Add clang-linker-wrapper changes to call clang-

[libclc] [libclc] add ctz built-in implementation to clc and generic (PR #135309)

2025-04-15 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/135309 >From 31423376e35f34ca032fe3d11998537912ba2c63 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Thu, 10 Apr 2025 20:10:41 -0700 Subject: [PATCH 1/2] [libclc] add ctz built-in implementation to clc and generic --

[clang] [clang][frontend] Make `CompilerInstance::FailedModules` thread-safe (PR #135473)

2025-04-15 Thread Michael Spencer via cfe-commits
@@ -1206,82 +1198,70 @@ createCompilerInstanceForModuleCompileImpl(CompilerInstance &ImportingInstance, DiagnosticOptions &DiagOpts = Invocation->getDiagnosticOpts(); DiagOpts.VerifyDiagnostics = 0; - assert(ImportingInstance.getInvocation().getModuleHash() == -

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

2025-04-15 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/135526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-15 Thread Erich Keane via cfe-commits
@@ -1117,16 +1205,27 @@ class Sema; SmallVector Candidates; llvm::SmallPtrSet Functions; -// Allocator for ConversionSequenceLists. We store the first few of these +DeferredTemplateOverloadCandidate *FirstDeferredCandidate; +unsigned DeferredCandidatesCount

[clang] [Clang] [Sema] Fix a crash when a `friend` function is redefined as deleted (PR #135679)

2025-04-15 Thread via cfe-commits
https://github.com/Sirraide updated https://github.com/llvm/llvm-project/pull/135679 >From daa795d3807ecdceedb764582a01396c3b7f2e2f Mon Sep 17 00:00:00 2001 From: Sirraide Date: Mon, 14 Apr 2025 22:54:11 +0200 Subject: [PATCH 1/3] [Clang] [Sema] Fix a crash when a `friend` function is redefine

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

2025-04-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 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] [Reland][Clang][CodeGen][UBSan] Add more precise attributes to recoverable ubsan handlers (PR #135135)

2025-04-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: LGTM with one minor comment. https://github.com/llvm/llvm-project/pull/135135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Disable -fdollars-in-identifiers by default (PR #135407)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -1,5 +1,5 @@ // REQUIRES: x86-registered-target -// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fdollars-in-identifiers -fasm-blocks -emit-llvm -o - | FileCheck %s

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

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang 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 diagnostic

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

2025-04-15 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] [MS][clang] Revert vector deleting destructors support (PR #135611)

2025-04-15 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: @zmodem , @DKLoehr , please feel free to hit the submit button once the pre-commit is green. The revert was not clean, so I would prefer to wait for it. I'm feeling ill and may end up offline after some time. https://github.com/llvm/llvm-project/pull/135611 ___

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

2025-04-15 Thread Amr Hesham 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][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-15 Thread Jan Svoboda via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache::diagnoseNegativeStatCachedPaths( +llvm::raw_ostream &OS, llvm::vfs::FileSystem &UnderlyingFS) const { + /

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

2025-04-15 Thread Sirui Mu 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] [Clang] Handle default template arguments for alias CTAD guides (PR #134807)

2025-04-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/134807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/135703 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/C++] Fix clang_File_isEqual for in-memory files (PR #135773)

2025-04-15 Thread Jannick Kremer via cfe-commits
https://github.com/DeinAlptraum created https://github.com/llvm/llvm-project/pull/135773 Add tests for clang_File_isEqual (on-disk and in-memory) >From 62dcfb1cb9bd0918bd471fddc1ffd849c2d604ac Mon Sep 17 00:00:00 2001 From: Jannick Kremer Date: Tue, 15 Apr 2025 19:17:43 +0900 Subject: [PATCH]

[clang-tools-extra] [clang-doc] Add regression test for test comments in macros (PR #132510)

2025-04-15 Thread via cfe-commits
https://github.com/ZhongUncle edited https://github.com/llvm/llvm-project/pull/132510 ___ 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-15 Thread Erich Keane via cfe-commits
@@ -1043,6 +1141,8 @@ class Sema; /// C++ [over.match.call.general] /// Resolve a call through the address of an overload set. CSK_AddressOfOverloadSet, + + CSK_CodeCompletion, erichkeane wrote: Ah, I see. Can you clarify that in a comm

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

2025-04-15 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 6f0a3ba5852134d8bd04679438866e6f373f494a Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 12:12:19 +0800 Subject: [PATCH 1/4] [Clang] Add support for GCC bound member functions extensio

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

2025-04-15 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/135649 >From 445c08bcb007f157f6c66c5fabb01c2aa88b3a89 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 15 Apr 2025 22:58:44 +0800 Subject: [PATCH 1/2] [Clang] Add support for GCC bound member functions extensio

[clang] [llvm] [AArch64][clang][llvm] Add structured sparsity outer product (TMOP) intrinsics (PR #135145)

2025-04-15 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray deleted https://github.com/llvm/llvm-project/pull/135145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Explicitly mark constexpr-unknown variables as such (PR #135806)

2025-04-15 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/135806 Instead of trying to figure out what's constexpr-unknown later on. >From 17b01c64357ecddcf64144ab28ffd85ac7126acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 14 Apr 2025 17:18:50 +0

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -3062,13 +3062,16 @@ class Parser : public CodeCompletionHandler { bool CouldBeBitField = false); Decl *ParseHLSLBuffer(SourceLocation &DeclEnd); - void MaybeParseMicrosoftAttributes(ParsedAttributes &Attrs) { + bool MaybeParseMicrosoftAttrib

[clang] [clang][bytecode] Explicitly mark constexpr-unknown variables as such (PR #135806)

2025-04-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Instead of trying to figure out what's constexpr-unknown later on. --- Full diff: https://github.com/llvm/llvm-project/pull/135806.diff 7 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+

[clang] Allow some attributes on declarations after definitions (PR #135791)

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

[clang] ece10a6 - Allow some attributes on declarations after definitions (#135791)

2025-04-15 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-04-15T12:21:04-04:00 New Revision: ece10a64cb180ba931b60cbd939d80412973eada URL: https://github.com/llvm/llvm-project/commit/ece10a64cb180ba931b60cbd939d80412973eada DIFF: https://github.com/llvm/llvm-project/commit/ece10a64cb180ba931b60cbd939d80412973eada.diff

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -2,3 +2,26 @@ _Alignas(int) struct c1; // expected-warning {{'_Alignas' attribute ignored}} alignas(int) struct c1; // expected-warning {{'alignas' attribute ignored}} + + +__attribute__(()) [[]] alignas(int) int a; // expected-none TODO: actually this line should be an er

[clang] [CLANG] Enable alignas after GNU attributes (PR #133107)

2025-04-15 Thread Aaron Ballman via cfe-commits
@@ -24,7 +24,7 @@ int templateFunction(T value) __attribute__((annotate("works"))); // CHECK: ClassDecl=Test:3:7 (Definition) Extent=[3:1 - 17:2] // CHECK-NEXT: CXXAccessSpecifier=:4:1 (Definition) Extent=[4:1 - 4:8] -// CHECK-NEXT: CXXMethod=aMethod:5:51 Extent=[5:3 - 5:60]

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -923,10 +923,9 @@ Expected> linkAndWrapDeviceFiles( }); auto LinkerArgs = getLinkerArgs(Input, BaseArgs); -DenseSet ActiveOffloadKinds; +uint16_t ActiveOffloadKindMask = 0u; jhuber6 wrote: This code doesn't need to be modified, but I gu

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -32,10 +32,12 @@ namespace object { /// The producer of the associated offloading image. enum OffloadKind : uint16_t { OFK_None = 0, - OFK_OpenMP, - OFK_Cuda, - OFK_HIP, - OFK_LAST, + OFK_OpenMP = (1 << 1), jhuber6 wrote: This is 2, not 1. https://g

[clang] [llvm] [Offload][SYCL] Refactor OffloadKind implementation (PR #135809)

2025-04-15 Thread Joseph Huber via cfe-commits
@@ -32,10 +32,12 @@ namespace object { /// The producer of the associated offloading image. enum OffloadKind : uint16_t { OFK_None = 0, - OFK_OpenMP, - OFK_Cuda, - OFK_HIP, - OFK_LAST, + OFK_OpenMP = (1 << 1), + OFK_FIRST = OFK_OpenMP, jhuber6 wrote: W

[clang] [cindex] Add support for calling getFullyQualifiedName to the Python binding. (PR #135420)

2025-04-15 Thread Jannick Kremer via cfe-commits
DeinAlptraum wrote: Done. Thank you for your contribution! https://github.com/llvm/llvm-project/pull/135420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMacro` (PR #133574)

2025-04-15 Thread marius doerner via cfe-commits
https://github.com/mariusdr updated https://github.com/llvm/llvm-project/pull/133574 >From bcf038103c717edfdcf633ac8f3f6f1f306d927a Mon Sep 17 00:00:00 2001 From: marius doerner Date: Sat, 29 Mar 2025 09:21:20 +0100 Subject: [PATCH 1/3] [clang] Clear `NeedsCleaning` flag after `ExpandBuiltinMa

[clang] 3192ecf - [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (#134951)

2025-04-15 Thread via cfe-commits
Author: Akira Hatanaka Date: 2025-04-15T10:12:18-07:00 New Revision: 3192ecfa89a48b5f56ff36956abe7e84327ced5d URL: https://github.com/llvm/llvm-project/commit/3192ecfa89a48b5f56ff36956abe7e84327ced5d DIFF: https://github.com/llvm/llvm-project/commit/3192ecfa89a48b5f56ff36956abe7e84327ced5d.diff

[clang] [CodeComplete] Don't drop ArrayToPointerDecay when doing member completion (PR #134951)

2025-04-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak closed https://github.com/llvm/llvm-project/pull/134951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Unify `SourceLocation` and `IdentifierInfo*` pair-like data structures to `IdentifierLoc` (PR #135808)

2025-04-15 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. lgtm, but make sure to address Matheus's comments https://github.com/llvm/llvm-project/pull/135808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

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

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

<    1   2   3   4   5   6   7   >