[clang] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil (PR #135100)

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

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread Akira Hatanaka via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
@@ -681,7 +675,7 @@ emitInfo(const RecordDecl *D, const FullComment *FC, int LineNumber, } // TODO: remove first call to parseBases, that function should be deleted parseBases(*I, C); -parseBases(*I, C, IsFileInRootDir, PublicOnly, true); +parseBases(*I, C,

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
@@ -238,31 +238,32 @@ struct MemberTypeInfo : public FieldTypeInfo { }; struct Location { - Location(int LineNumber = 0, StringRef Filename = StringRef(), - bool IsFileInRootDir = false) - : LineNumber(LineNumber), Filename(Filename), -IsFileInRootDir(I

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi approved this pull request. Mostly good, modulo a few small issues. https://github.com/llvm/llvm-project/pull/135081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/135081 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
@@ -85,7 +85,7 @@ llvm::Error decodeRecord(const Record &R, std::optional &Field, if (R[0] > INT_MAX) return llvm::createStringError(llvm::inconvertibleErrorCode(), "integer too large to parse"); - Field.emplace((int)R[0], Blob, (bool)

[clang-tools-extra] [clang-doc] Add Start and End Line Numbers (PR #135081)

2025-04-09 Thread Paul Kirth via cfe-commits
@@ -135,7 +135,7 @@ llvm::Error decodeRecord(const Record &R, if (R[0] > INT_MAX) return llvm::createStringError(llvm::inconvertibleErrorCode(), "integer too large to parse"); - Field.emplace_back((int)R[0], Blob, (bool)R[1]); + Field.

[clang] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil (PR #135100)

2025-04-09 Thread Jan Korous via cfe-commits
https://github.com/jkorous-apple updated https://github.com/llvm/llvm-project/pull/135100 >From 646520113d6ac54810bbb59a1410529b26c69680 Mon Sep 17 00:00:00 2001 From: Jan Korous Date: Wed, 9 Apr 2025 13:48:39 -0700 Subject: [PATCH] [-Wunsafe-buffer-usage][NFC] Factor out FixitUtil --- .../cl

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/135102 …utdown' This patch emits the lowering for 'device_type' on an 'init' or 'shutdown'. This one is fairly unique, as these directives have it as an attribute, rather than as a component of the individual oper

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes …utdown' This patch emits the lowering for 'device_type' on an 'init' or 'shutdown'. This one is fairly unique, as these directives have it as an attribute, rather than as a component of the individual

[clang] [OpenACC][CIR] Implement 'device_type' clause lowering for 'init'/'sh… (PR #135102)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes …utdown' This patch emits the lowering for 'device_type' on an 'init' or 'shutdown'. This one is fairly unique, as these directives have it as an attribute, rather than as a component of the individual op

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -200,6 +200,105 @@ void CIRGenModule::emitGlobalFunctionDefinition(clang::GlobalDecl gd, } } +mlir::Operation *CIRGenModule::getGlobalValue(StringRef name) { + mlir::Operation *global = mlir::SymbolTable::lookupSymbolIn(theModule, name); + if (!global) +return null

[clang] [CIR] Upstream support for cir.get_global (PR #135095)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -1279,6 +1279,37 @@ def GlobalOp : CIR_Op<"global"> { let hasVerifier = 1; } +//===--===// +// GetGlobalOp +//===--===// + +def GetGloba

[libclc] [NFC][libclc] Merge atomic extension built-ins with identical name into a single file (PR #134489)

2025-04-09 Thread Wenju He via cfe-commits
@@ -6,6 +6,17 @@ // //===--===// +// cl_khr_global_int32_base_atomics wenju-he wrote: done, you're right that they should be all guarded since they are extensions. Thanks. https://github.c

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

2025-04-09 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/135105 This change adds minimal support for structure types. To keep the initial change small, only incomplete declarations are being supported in this patch. More complete support will follow. >From 80fa219739a4a

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

2025-04-09 Thread Younan Zhang via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

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

2025-04-09 Thread Jim Lin via cfe-commits
https://github.com/tclin914 created https://github.com/llvm/llvm-project/pull/135110 The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Relocation and fixup for the branch and gp-implied instructions will be

[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-09 Thread Dan Liew via cfe-commits
@@ -0,0 +1,584 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fexperimental-late-parse-attributes -fsyntax-only -verify %s + +#define __counted_by(f) __attribute__((counted_by(f))) + +// =

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-09 Thread Erich Keane via cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type< "cir::VoidType::get($_builder.getContext()))"> { } +//===--===// +// StructType +// +// The base type for all RecordDecls. +//===---

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

2025-04-09 Thread Erich Keane via cfe-commits
@@ -86,10 +86,80 @@ mlir::Type CIRGenTypes::convertFunctionTypeInternal(QualType qft) { return cir::FuncType::get(SmallVector{}, cgm.VoidTy); } +// This is CIR's version of CodeGenTypes::addRecordTypeName. It isn't shareable +// because CIR has different uniquing requiremen

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

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,116 @@ +//===--===// +// +// 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 minimal support for structure types (PR #135105)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -86,10 +86,80 @@ mlir::Type CIRGenTypes::convertFunctionTypeInternal(QualType qft) { return cir::FuncType::get(SmallVector{}, cgm.VoidTy); } +// This is CIR's version of CodeGenTypes::addRecordTypeName. It isn't shareable +// because CIR has different uniquing requiremen

[clang] [clang-format] Keep the space between `not` and a unary operator (PR #135035)

2025-04-09 Thread via cfe-commits
llvmbot wrote: >/cherry-pick f34483838937b1a01ee11ee22bdd6e13c81e9fff Error: Command failed due to missing milestone. https://github.com/llvm/llvm-project/pull/135035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Jim Lin (tclin914) Changes The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Relocation and fixup for the branch and gp-implied instructions will be added

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

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jim Lin (tclin914) Changes The spec can be found at: https://github.com/andestech/andes-v5-isa/releases/tag/ast-v5_4_0-release. This patch only supports assembler. Relocation and fixup for the branch and gp-implied instructions wil

[clang] f344838 - [clang-format] Keep the space between `not` and a unary operator (#135035)

2025-04-09 Thread via cfe-commits
Author: Owen Pan Date: 2025-04-09T17:52:12-07:00 New Revision: f34483838937b1a01ee11ee22bdd6e13c81e9fff URL: https://github.com/llvm/llvm-project/commit/f34483838937b1a01ee11ee22bdd6e13c81e9fff DIFF: https://github.com/llvm/llvm-project/commit/f34483838937b1a01ee11ee22bdd6e13c81e9fff.diff LOG:

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2025-04-09 Thread John McCall via cfe-commits
@@ -0,0 +1,142 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -std=c++11 -fptrauth-calls -fptrauth-intrinsics -verify -fsyntax-only %s + +#define AQ __ptrauth

[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-09 Thread Dan Liew via cfe-commits
https://github.com/delcypher edited https://github.com/llvm/llvm-project/pull/106321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [clang] improved preservation of template keyword (PR #133610)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @slackito this will be fixed here: https://github.com/llvm/llvm-project/pull/135111 https://github.com/llvm/llvm-project/pull/133610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [llvm] [DirectX] Implement UseNativeLowPrecision shader flag analysis (PR #134288)

2025-04-09 Thread Deric C. via cfe-commits
https://github.com/Icohedron closed https://github.com/llvm/llvm-project/pull/134288 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This fixes a regression introduced in https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042 which was reported here https://github.com/llvm/llvm-project/pull/133610#issuecomment-278733

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

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

[clang] [sanitizer] Apply AlwaysIn/Out in parseSanitizeArgs (PR #129405)

2025-04-09 Thread Thurston Dang via cfe-commits
thurstond wrote: > Maybe wait a month or so with landing, in case vptr backfire. @vitalybuka Any last objections to landing? https://github.com/llvm/llvm-project/pull/129405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [clang] fix unresolved dependent template specialization mangling (PR #135111)

2025-04-09 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/135111 This fixes a regression introduced in https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042 which was reported here https://github.com/llvm/llvm-project/pull/133610#issuecomment-2787332042

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

2025-04-09 Thread Sam Elliott via cfe-commits
@@ -535,21 +540,29 @@ RISCVMCCodeEmitter::getImmOpValueSlist(const MCInst &MI, unsigned OpNo, } } -uint64_t -RISCVMCCodeEmitter::getImmOpValueAsr1(const MCInst &MI, unsigned OpNo, +template +unsigned +RISCVMCCodeEmitter::getImmOpValueAsrN(const MCInst &MI, unsigned OpNo,

[clang] 747d4a9 - [DirectX] Implement UseNativeLowPrecision shader flag analysis (#134288)

2025-04-09 Thread via cfe-commits
Author: Deric C. Date: 2025-04-09T18:14:23-07:00 New Revision: 747d4a952bf7ed4adec72ddf3c9038aeff4fe8ee URL: https://github.com/llvm/llvm-project/commit/747d4a952bf7ed4adec72ddf3c9038aeff4fe8ee DIFF: https://github.com/llvm/llvm-project/commit/747d4a952bf7ed4adec72ddf3c9038aeff4fe8ee.diff LOG:

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

2025-04-09 Thread Erich Keane via cfe-commits
@@ -0,0 +1,116 @@ +//===--===// +// +// 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] Track final substitution for Subst* AST nodes (PR #132748)

2025-04-09 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @pranavk this test case is fixed by the same fix as for the first mangling issue: https://github.com/llvm/llvm-project/pull/135111 https://github.com/llvm/llvm-project/pull/132748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [ARM] Save floating point registers and status registers with save_fp function attribute (PR #89654)

2025-04-09 Thread Benson Chu via cfe-commits
https://github.com/pestctrl updated https://github.com/llvm/llvm-project/pull/89654 >From 01c6d6dd84c6cae12f66378017876bee8f71f439 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Mon, 10 Mar 2025 10:51:25 -0500 Subject: [PATCH] [ARM][Thumb] Save FPSCR + FPEXC for save-vfp attribute FPSCR and F

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-09 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-09 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo updated https://github.com/llvm/llvm-project/pull/133910 >From cfa057b4d43ebe7f94ccd4f387a94359beaa29b2 Mon Sep 17 00:00:00 2001 From: Viktoriia Bakalova Date: Fri, 4 Apr 2025 17:45:24 +0200 Subject: [PATCH 01/10] This commit implements a CC1 flag `-dump-deserialized

[clang] Implement `-dump-minimization-hints` flag. (PR #133910)

2025-04-09 Thread Viktoriia Bakalova via cfe-commits
@@ -49,6 +54,185 @@ LLVM_INSTANTIATE_REGISTRY(FrontendPluginRegistry) namespace { +/// DeserializedDeclsLineRangePrinter dumps ranges of deserialized declarations +/// to aid debugging and bug minimization. It implements ASTConsumer and +/// ASTDeserializationListener, so tha

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +bool EnumConstantDecl::isOutOfLine() const { + if (Decl::isOutOfLine()) +return true; + + // In C++, if the enumeration is out of line, the enumerat

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -151,3 +151,21 @@ class C { // expected-error {{unexpected ';' before ')'}} }; } + +#if __cplusplus >= 201103L +namespace GH23317 { +struct A { erichkeane wrote: Is this still going to work for: ``` struct A { enum E : int; enum E :

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

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +bool EnumConstantDecl::isOutOfLine() const { + if (Decl::isOutOfLine()) +return true; + + // In C++, if the enumeration is out of line, the enumerat

[clang] 54cdc75 - clang/AMDGPU: Stop looking for hip.bc in device libs (#134801)

2025-04-09 Thread via cfe-commits
Author: Matt Arsenault Date: 2025-04-09T16:39:50+02:00 New Revision: 54cdc758571731e2b8e6369cc84bbc27f1c1db59 URL: https://github.com/llvm/llvm-project/commit/54cdc758571731e2b8e6369cc84bbc27f1c1db59 DIFF: https://github.com/llvm/llvm-project/commit/54cdc758571731e2b8e6369cc84bbc27f1c1db59.diff

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-09 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/135041 And issue was reported in https://github.com/llvm/llvm-project/pull/133950 . Since we don't always emit vector deleting dtors, only error out about ambiguous operator delete[] when it will be required for vec

[clang] [MS][clang] Error about ambiguous operator delete[] only when required (PR #135041)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes And issue was reported in https://github.com/llvm/llvm-project/pull/133950 . Since we don't always emit vector deleting dtors, only error out about ambiguous operator delete[] when it will be requ

[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] Recognize mutableCopy from literal as +1 (PR #132350)

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

[clang] [clang] Implement CWG2803 and CWG2958 (PR #132779)

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132779 >From 6c5441fd1e22e93de3a6c681842fe19f6e96fa62 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:30:15 + Subject: [PATCH 1/6] [clang] Implement CWG2803 and CWG2958 CWG2803 "Overload resolut

[clang] [clang] Implement CWG2815 (PR #132778)

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/132778 >From 0aa1e7b83888bde7112327fba7db9bdcb71c43d9 Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 24 Mar 2025 16:28:28 + Subject: [PATCH 1/5] [clang] Implement CWG2815 CWG2815 "Overload resolution for refe

[clang] [alpha.webkit.UnretainedLambdaCapturesChecker] Add the support for protectedSelf (PR #132518)

2025-04-09 Thread Rashmi Mudduluru via cfe-commits
@@ -448,6 +483,10 @@ class UnretainedLambdaCapturesChecker : public RawPtrRefLambdaCapturesChecker { return RTC->isUnretained(QT); } + virtual bool isPtrType(const std::string &Name) const final { t-rasmud wrote: Are there any actual callers to this f

[clang] [CIR] Upstream initial function call support (PR #134673)

2025-04-09 Thread Andy Kaylor via cfe-commits
andykaylor wrote: @bcardosolopes Are your concerns addressed with the latest version? https://github.com/llvm/llvm-project/pull/134673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2611 (PR #133747)

2025-04-09 Thread via cfe-commits
https://github.com/offsetof updated https://github.com/llvm/llvm-project/pull/133747 >From 175e2531de9e2fceb72b25aed5073b225e2495ac Mon Sep 17 00:00:00 2001 From: offsetof Date: Mon, 31 Mar 2025 16:35:03 + Subject: [PATCH 1/3] [clang] Implement CWG2611 CWG2611 "Missing parentheses in expan

[clang] d54c28b - [HIP] use offload wrapper for non-device-only non-rdc (#132869)

2025-04-09 Thread via cfe-commits
Author: Yaxun (Sam) Liu Date: 2025-04-09T09:13:21-04:00 New Revision: d54c28b9c1396fa92d9347ac1135da7907121cb8 URL: https://github.com/llvm/llvm-project/commit/d54c28b9c1396fa92d9347ac1135da7907121cb8 DIFF: https://github.com/llvm/llvm-project/commit/d54c28b9c1396fa92d9347ac1135da7907121cb8.dif

[clang] [HIP] use offload wrapper for non-device-only non-rdc (PR #132869)

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

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

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > > @AaronBallman @erichkeane Thank you for your comments. There's a question > > here about whether to report an error or a warning here, and you're in a > > divided opinion. My opinion is that it is better to use the error report > > here. Because these are two mutually exc

[clang] [clang][bytecode] Classify function pointers as PT_Ptr (PR #135026)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The Pointer class already has the capability to be a function pointer, but we still classifed function pointers as PT_FnPtr/FunctionPointer. This means when converting from a Pointer to a FunctionPointer, we

[clang] [clang][bytecode] Classify function pointers as PT_Ptr (PR #135026)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/135026 The Pointer class already has the capability to be a function pointer, but we still classifed function pointers as PT_FnPtr/FunctionPointer. This means when converting from a Pointer to a FunctionPointer, we l

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-09 Thread Zahira Ammarguellat via cfe-commits
=?utf-8?q?Mészáros?= Gergely ,Gergely Meszaros ,Gergely Meszaros Message-ID: In-Reply-To: @@ -10685,6 +10724,7 @@ QualType Sema::CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, if (compType.isNull() || !compType->isArithmeticType()) return InvalidOperand

[clang] [Clang][AMDGPU] Accept builtins in lambda declarations (PR #135027)

2025-04-09 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez created https://github.com/llvm/llvm-project/pull/135027 `Sema::getCurFunctionDecl(AllowLambda = false)` returns a nullptr when the lambda declaration is outside a function (for example, when assigning a lambda to a static constexpr variable). This triggered an a

[clang] [llvm] Reapply "Inline: Propagate callsite nofpclass attribute" (PR #135018)

2025-04-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/135018 This reverts commit 3f38cd07d820248fd2043efb1341fabaac2d84a6. Fix case where inner callsite has nofpclass but callsite does not. >From 14c2ecf4714f5e0c4e6928565678b8e98288fd89 Mon Sep 17 00:00:00 2001 From: Matt

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

2025-04-09 Thread via cfe-commits
@@ -5687,11 +5687,11 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, if (Right.is(tok::r_brace) && Left.is(tok::l_brace) && !Left.Children.empty()) { // Support AllowShortFunctionsOnASingleLine for JavaScript. - return Style.AllowShort

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -4383,7 +4383,6 @@ static void handleAlignValueAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) { - AlignValueAttr TmpAttr(Context, CI, E); erichkeane wrote: This attribute cre

[clang] [Clang][Sema] Fix -Whigher-precision-for-complex-division (PR #131477)

2025-04-09 Thread Zahira Ammarguellat via cfe-commits
=?utf-8?q?Mészáros?= Gergely ,Gergely Meszaros ,Gergely Meszaros Message-ID: In-Reply-To: @@ -0,0 +1,58 @@ +// RUN: %clang_cc1 %s -complex-range=promoted -triple x86_64-unknown-linux -verify=no-diag \ +// RUN: -DDIV_CC -DDIV_RC -DDIVASSIGN -DDIVMIXEDFD -DDIVMIXEDID + +// RUN:

[clang] [clang][bytecode][NFC] Avoid implicit integer conversion (PR #134983)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/134983 ___ 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-09 Thread via cfe-commits
@@ -9753,27 +9753,46 @@ def err_operator_new_delete_invalid_result_type : Error< def err_operator_new_delete_dependent_result_type : Error< "%0 cannot have a dependent return type; use %1 instead">; def err_operator_new_delete_too_few_parameters : Error< - "%0 must have at l

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

2025-04-09 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > @lalaniket8 @arsenm I don't have a strong opinion, but shouldn't this > transformation be done during lowering to the target? Current version of the > patch brings odd behavior for LLVM IR to SPIR-V lowering for OpenCL kernels. > SPIR-V don't allow one EntryPoint to refer ano

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

2025-04-09 Thread via cfe-commits
MillePlateaux wrote: > > @AaronBallman @erichkeane Thank you for your comments. There's a question > > here about whether to report an error or a warning here, and you're in a > > divided opinion. My opinion is that it is better to use the error report > > here. Because these are two mutually

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -1523,7 +1523,10 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) { // Out-of-line definitions shouldn't be pushed into scope in C++, unless they // are function-local declarations. - if (getLangOpts().CPlusPlus && D->isOutOfLine() && !S->get

[clang] Fix crash with align_value diagnostic reporting (PR #135013)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -4383,7 +4383,6 @@ static void handleAlignValueAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } void Sema::AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E) { - AlignValueAttr TmpAttr(Context, CI, E); erichkeane wrote: I think that is ac

[clang] clang/AMDGPU: Stop looking for hip.bc in device libs (PR #134801)

2025-04-09 Thread Matt Arsenault via cfe-commits
arsenm wrote: ### Merge activity * **Apr 9, 10:38 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/134801). https://github.com/llvm/llvm-project/pull/134801 _

[clang] clang/AMDGPU: Stop looking for hip.bc in device libs (PR #134801)

2025-04-09 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/134801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Richard Smith via cfe-commits
zygoloid wrote: I thought CWG's preferred direction on this was to reject entirely? https://github.com/llvm/llvm-project/pull/134998 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-04-09 Thread Matheus Izvekov via cfe-commits
@@ -690,6 +690,23 @@ SmallVector TemplateParamsReferencedInTemplateArgumentList( SemaRef.MarkUsedTemplateParameters( DeducedArgs, TemplateParamsList->getDepth(), ReferencedTemplateParams); + auto MarkDefaultArgs = [&](auto *Param) { +if (!Param || !Param->hasDefa

[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

2025-04-09 Thread Reid Kleckner via cfe-commits
https://github.com/rnk commented: The premerge tests failed on a modules crash recovery test case on other platforms, and those seem like true positives that need to be fixed. Overall, I think the main risk with this approach is that it will break in-process, FP-based stack unwinders that vali

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

2025-04-09 Thread via cfe-commits
Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= , Mateusz =?utf-8?q?Mikuła?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Mateusz Mikuła (mati865) Changes With these changes, LLVM and Clang become buildable for Cygwin.

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Matthew Devereau via cfe-commits
@@ -1492,9 +1492,17 @@ static bool isAllActivePredicate(Value *Pred) { if (cast(Pred->getType())->getMinNumElements() <= cast(UncastedPred->getType())->getMinNumElements()) Pred = UncastedPred; + if (match(Pred, m_Intrinsic( + m_ConstantI

[clang] [HLSL] Implement the `lit` intrinsic (PR #134171)

2025-04-09 Thread Kaitlin Peng via cfe-commits
https://github.com/kmpeng closed https://github.com/llvm/llvm-project/pull/134171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2ab2276 - [HLSL] Implement the `lit` intrinsic (#134171)

2025-04-09 Thread via cfe-commits
Author: Kaitlin Peng Date: 2025-04-09T12:12:26-07:00 New Revision: 2ab2276ee079478b7ba9dd42c62b796d3dab1759 URL: https://github.com/llvm/llvm-project/commit/2ab2276ee079478b7ba9dd42c62b796d3dab1759 DIFF: https://github.com/llvm/llvm-project/commit/2ab2276ee079478b7ba9dd42c62b796d3dab1759.diff

[clang] [clang-format][NFC] Add FormatToken::is(tok::ObjCKeywordKind) (PR #134973)

2025-04-09 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/134973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SVE] Instcombine ptrue(all) to splat(i1) (PR #135016)

2025-04-09 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau edited https://github.com/llvm/llvm-project/pull/135016 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
@@ -5585,6 +5585,18 @@ SourceRange EnumConstantDecl::getSourceRange() const { return SourceRange(getLocation(), End); } +bool EnumConstantDecl::isOutOfLine() const { + if (Decl::isOutOfLine()) +return true; + + // In C++, if the enumeration is out of line, the enumerat

[clang] [OpenACC][CIR] Implement 'data' construct lowering, lower OACC->LLVMIR (PR #135038)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes This patch does two things primarily: 1- It does the lowering of the OpenACC 'data' construct, which requires getting the `default` clause (as `data` requires at least 1 of a list of clauses, and this is

[clang] [OpenACC][CIR] Implement 'data' construct lowering, lower OACC->LLVMIR (PR #135038)

2025-04-09 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes This patch does two things primarily: 1- It does the lowering of the OpenACC 'data' construct, which requires getting the `default` clause (as `data` requires at least 1 of a list of clauses, and this i

[clang] [OpenACC][CIR] Implement 'data' construct lowering, lower OACC->LLVMIR (PR #135038)

2025-04-09 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/135038 >From d175c7cb2de79731f5b5009bb08cc76f971b3e0a Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 8 Apr 2025 17:54:00 -0700 Subject: [PATCH 1/2] [OpenACC][CIR] Implement 'data' construct lowering, lower OA

[clang] [clang-format] Handle C++ keywords in other languages better (PR #132941)

2025-04-09 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/132941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU][clang] provide device implementation for __builtin_logb and … (PR #129347)

2025-04-09 Thread via cfe-commits
https://github.com/choikwa updated https://github.com/llvm/llvm-project/pull/129347 >From dfca8ec1a1e8fc8391fc22a7022065559e4ff20d Mon Sep 17 00:00:00 2001 From: Kevin Choi Date: Fri, 28 Feb 2025 16:52:03 -0600 Subject: [PATCH] [AMDGPU][clang] provide device implementation for __builtin_logb a

[clang] [compiler-rt] [libc] [libcxx] [llvm] [AMDGPU] Fix code object verion not being set to 'none' (PR #135036)

2025-04-09 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/135036 >From e41985970c254f3eda71cb5ef3a1dc321c8e6f56 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Wed, 9 Apr 2025 09:41:38 -0500 Subject: [PATCH 1/2] [AMDGPU] Fix code object verion not being set to 'none' Summa

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale edited https://github.com/llvm/llvm-project/pull/134709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] No longer add enumeration constants to the wrong scope (PR #134998)

2025-04-09 Thread Erich Keane via cfe-commits
erichkeane wrote: > I thought CWG's preferred direction on this was to reject entirely? What do they wish to reject? Defining an enum in a different declaration context than its primary context? That seems odd. Do you have an idea of the CWG DR? We looked but couldn't find anything that lo

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
https://github.com/chandraghale updated https://github.com/llvm/llvm-project/pull/134709 >From a05af192052de8503fb4945bfb853b3f2c14e4c9 Mon Sep 17 00:00:00 2001 From: Chandra Ghale Date: Mon, 7 Apr 2025 13:58:25 -0500 Subject: [PATCH 1/3] Codegen for Reduction over private variables with reduc

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [OpenMP 6.0 ]Codegen for Reduction over private variables with reduction clause (PR #134709)

2025-04-09 Thread CHANDRA GHALE via cfe-commits
@@ -4899,6 +4899,151 @@ void CGOpenMPRuntime::emitSingleReductionCombiner(CodeGenFunction &CGF, } } +void CGOpenMPRuntime::emitPrivateReduction( +CodeGenFunction &CGF, SourceLocation Loc, ArrayRef Privates, +ArrayRef LHSExprs, ArrayRef RHSExprs, +ArrayRef Reduct

[clang] [MS][clang] Make sure vector deleting dtor calls correct operator delete (PR #133950)

2025-04-09 Thread Mariya Podchishchaeva via cfe-commits
Fznamznon wrote: I posted a PR with a potential fix. https://github.com/llvm/llvm-project/pull/133950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Classify function pointers as PT_Ptr (PR #135026)

2025-04-09 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/135026 >From bdfb4c607d2bf7f5f8b83d35de9340be80274d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 9 Apr 2025 15:31:53 +0200 Subject: [PATCH] [clang][bytecode] Classify function pointers as

<    1   2   3   4   5   >